From 49cbbf6ea4d9dbcd75292967a67173d21e61fc25 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 2 Nov 2010 18:57:20 +0200 Subject: Fix Bug#53046 dict_update_statistics_low can still be run concurrently on same table Replace the array of mutexes that used to protect dict_index_t::stat_n_diff_key_vals[] with an array of rw locks that protects all the stats related members in dict_table_t and all of its indexes. Approved by: Jimmy (rb://503) --- .../suite/innodb_plugin/r/innodb_bug53046.result | 27 ++++++++++++ .../suite/innodb_plugin/t/innodb_bug53046.test | 48 ++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 mysql-test/suite/innodb_plugin/r/innodb_bug53046.result create mode 100644 mysql-test/suite/innodb_plugin/t/innodb_bug53046.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug53046.result b/mysql-test/suite/innodb_plugin/r/innodb_bug53046.result new file mode 100644 index 00000000000..69be6c4e0a7 --- /dev/null +++ b/mysql-test/suite/innodb_plugin/r/innodb_bug53046.result @@ -0,0 +1,27 @@ +CREATE TABLE bug53046_1 (c1 INT PRIMARY KEY) ENGINE=INNODB; +CREATE TABLE bug53046_2 (c2 INT PRIMARY KEY, +FOREIGN KEY (c2) REFERENCES bug53046_1(c1) +ON UPDATE CASCADE ON DELETE CASCADE) ENGINE=INNODB; +INSERT INTO bug53046_1 VALUES (1); +INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1) +FROM bug53046_1; +INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1) +FROM bug53046_1; +INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1) +FROM bug53046_1; +INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1) +FROM bug53046_1; +INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1) +FROM bug53046_1; +INSERT INTO bug53046_2 VALUES (1), (2); +ANALYZE TABLE bug53046_1; +Table Op Msg_type Msg_text +test.bug53046_1 analyze status OK +SHOW TABLE STATUS LIKE 'bug53046_1'; +UPDATE bug53046_1 SET c1 = c1 - 1; +DELETE FROM bug53046_1; +INSERT INTO bug53046_1 VALUES (1); +INSERT INTO bug53046_2 VALUES (1); +TRUNCATE TABLE bug53046_2; +DROP TABLE bug53046_2; +DROP TABLE bug53046_1; diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug53046.test b/mysql-test/suite/innodb_plugin/t/innodb_bug53046.test new file mode 100644 index 00000000000..7d9422fe487 --- /dev/null +++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53046.test @@ -0,0 +1,48 @@ +# +# http://bugs.mysql.com/53046 +# dict_update_statistics_low can still be run concurrently on same table +# +# This is a symbolic test, it would not fail if the bug is present. +# Rather those SQL commands have been used during manual testing under +# UNIV_DEBUG & UNIV_SYNC_DEBUG to test all changed codepaths for locking +# correctness. +# + +-- source include/have_innodb_plugin.inc + +CREATE TABLE bug53046_1 (c1 INT PRIMARY KEY) ENGINE=INNODB; +CREATE TABLE bug53046_2 (c2 INT PRIMARY KEY, + FOREIGN KEY (c2) REFERENCES bug53046_1(c1) + ON UPDATE CASCADE ON DELETE CASCADE) ENGINE=INNODB; + +INSERT INTO bug53046_1 VALUES (1); +let $i = 5; +while ($i) { + eval INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1) + FROM bug53046_1; + dec $i; +} + +INSERT INTO bug53046_2 VALUES (1), (2); + +# CREATE TABLE innodb_table_monitor (a int) ENGINE=INNODB; +# wait more than 1 minute and observe the mysqld output +# DROP TABLE innodb_table_monitor; + +ANALYZE TABLE bug53046_1; + +# this prints create time and other nondeterministic data +-- disable_result_log +SHOW TABLE STATUS LIKE 'bug53046_1'; +-- enable_result_log + +UPDATE bug53046_1 SET c1 = c1 - 1; + +DELETE FROM bug53046_1; + +INSERT INTO bug53046_1 VALUES (1); +INSERT INTO bug53046_2 VALUES (1); +TRUNCATE TABLE bug53046_2; + +DROP TABLE bug53046_2; +DROP TABLE bug53046_1; -- cgit v1.2.1 From 64e476e070b473cd55b1f3338d84c24e4017e1a3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 2 Nov 2010 17:28:34 -0500 Subject: In this patch, existing tests innodb_bug54679.test and innodb_bug56632.test are removed and replaced by the comprehensive innodb-create-options.test. It uses the rules listed in the comments at the top of that test. This patch introduces these differences from previous behavior; 1) KEY_BLOCK_SIZE=0 is allowed by Innodb in both strict and non-strict mode with no errors or warnings. It was previously used by the server to set KEY_BLOCK_SIZE to undefined. (Bug#56628) 2) An explicit valid non-DEFAULT ROW_FORMAT always takes priority over a valid KEY_BLOCK_SIZE. (bug#56632) 3) Automatic use of COMPRESSED row format is only done if the ROW_FORMAT is DEFAULT or unspecified. 4) ROW_FORMAT=FIXED is prevented in strict mode. This patch also includes various formatting changes for consistency with InnoDB coding standards. Related Bugs Bug#54679: ALTER TABLE causes compressed row_format to revert to compact Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED --- .../innodb_plugin/r/innodb-create-options.result | 854 +++++++++++++++++++++ mysql-test/suite/innodb_plugin/r/innodb-zip.result | 20 +- .../suite/innodb_plugin/r/innodb_bug54679.result | 91 --- .../suite/innodb_plugin/r/innodb_bug56632.result | 294 ------- .../innodb_plugin/t/innodb-create-options.test | 575 ++++++++++++++ mysql-test/suite/innodb_plugin/t/innodb-zip.test | 8 +- .../suite/innodb_plugin/t/innodb_bug54679.test | 97 --- .../suite/innodb_plugin/t/innodb_bug56632.test | 216 ------ 8 files changed, 1435 insertions(+), 720 deletions(-) create mode 100755 mysql-test/suite/innodb_plugin/r/innodb-create-options.result delete mode 100644 mysql-test/suite/innodb_plugin/r/innodb_bug54679.result delete mode 100755 mysql-test/suite/innodb_plugin/r/innodb_bug56632.result create mode 100755 mysql-test/suite/innodb_plugin/t/innodb-create-options.test delete mode 100644 mysql-test/suite/innodb_plugin/t/innodb_bug54679.test delete mode 100755 mysql-test/suite/innodb_plugin/t/innodb_bug56632.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb_plugin/r/innodb-create-options.result b/mysql-test/suite/innodb_plugin/r/innodb-create-options.result new file mode 100755 index 00000000000..aec9d731ce6 --- /dev/null +++ b/mysql-test/suite/innodb_plugin/r/innodb-create-options.result @@ -0,0 +1,854 @@ +SET storage_engine=InnoDB; +SET GLOBAL innodb_file_format=`Barracuda`; +SET GLOBAL innodb_file_per_table=ON; +SET SESSION innodb_strict_mode = ON; +# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 +# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +# 'FIXED' is sent to InnoDB since it is used by MyISAM. +# But it is an invalid mode in InnoDB +CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: invalid ROW_FORMAT specifier. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: invalid ROW_FORMAT specifier. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE +# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: invalid ROW_FORMAT specifier. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +# Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 KEY_BLOCK_SIZE=2; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +ALTER TABLE t1 KEY_BLOCK_SIZE=4; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +ALTER TABLE t1 KEY_BLOCK_SIZE=8; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED +ALTER TABLE t1 KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=1 +# Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE +# ALTER with each ROW_FORMAT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL, + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=COMPACT; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +# Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Error 1005 Can't create table 'test.t1' (errno: 1478) +# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope +# and that they can be set to default values during strict mode. +SET GLOBAL innodb_file_format=Antelope; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +Level Code Message +ALTER TABLE t1 KEY_BLOCK_SIZE=8; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +SET GLOBAL innodb_file_format=Barracuda; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SET GLOBAL innodb_file_format=Barracuda; +# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +# and a valid non-zero KEY_BLOCK_SIZE are rejected with +# innodb_file_per_table=OFF and that they can be set to default +# values during strict mode. +SET GLOBAL innodb_file_per_table=OFF; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +Level Code Message +ALTER TABLE t1 KEY_BLOCK_SIZE=1; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +ALTER TABLE t1 ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +SET GLOBAL innodb_file_per_table=ON; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SET GLOBAL innodb_file_per_table=ON; +################################################## +SET SESSION innodb_strict_mode = OFF; +# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 +# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' +# 'FIXED' is sent to InnoDB since it is used by MyISAM. +# It is an invalid mode in InnoDB, use COMPACT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; +Warnings: +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=FIXED +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; +Warnings: +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=FIXED +# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE +# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=2 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=4 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=FIXED KEY_BLOCK_SIZE=1 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=2 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=4 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +# Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 KEY_BLOCK_SIZE=2; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +ALTER TABLE t1 KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=8 +# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE +# ALTER with each ROW_FORMAT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL, + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=COMPACT; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact KEY_BLOCK_SIZE=15 +# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a +valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT +is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPRESSED KEY_BLOCK_SIZE=1 +SET GLOBAL innodb_file_format=Barracuda; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=DYNAMIC +SET GLOBAL innodb_file_format=Barracuda; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +# Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a +valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF +and then used again when innodb_file_per_table=ON. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPRESSED KEY_BLOCK_SIZE=2 +SET GLOBAL innodb_file_per_table=ON; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=DYNAMIC +SET GLOBAL innodb_file_per_table=ON; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +# Cleanup +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/innodb_plugin/r/innodb-zip.result b/mysql-test/suite/innodb_plugin/r/innodb-zip.result index 21396d81ba8..fc35143b305 100644 --- a/mysql-test/suite/innodb_plugin/r/innodb-zip.result +++ b/mysql-test/suite/innodb_plugin/r/innodb-zip.result @@ -83,8 +83,6 @@ test t8 Compact test t9 Compact drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14; alter table t1 key_block_size=0; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0. alter table t1 row_format=dynamic; SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -190,16 +188,9 @@ set global innodb_file_per_table = on; set global innodb_file_format = `1`; set innodb_strict_mode = off; create table t1 (id int primary key) engine = innodb key_block_size = 0; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0. drop table t1; set innodb_strict_mode = on; create table t1 (id int primary key) engine = innodb key_block_size = 0; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -show warnings; -Level Code Message -Warning 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 warnings; @@ -218,6 +209,7 @@ create table t11(id int primary key) engine = innodb row_format = redundant; SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; table_schema table_name row_format +test t1 Compact test t10 Compact test t11 Redundant test t3 Compressed @@ -227,7 +219,7 @@ test t6 Compressed test t7 Compressed test t8 Compressed test t9 Dynamic -drop table t3, t4, t5, t6, t7, t8, t9, t10, t11; +drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11; create table t1 (id int primary key) engine = innodb key_block_size = 8 row_format = compressed; create table t2 (id int primary key) engine = innodb @@ -253,16 +245,12 @@ Warning 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 warnings; -Level Code Message -Warning 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'; table_schema table_name row_format test t1 Compressed -drop table t1; +test t5 Compressed +drop table t1, t5; create table t1 (id int primary key) engine = innodb key_block_size = 9 row_format = redundant; ERROR HY000: Can't create table 'test.t1' (errno: 1478) diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result b/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result deleted file mode 100644 index 14fd32ca469..00000000000 --- a/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result +++ /dev/null @@ -1,91 +0,0 @@ -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; -SET innodb_strict_mode=ON; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug54679 Compressed row_format=COMPRESSED -ALTER TABLE bug54679 ADD COLUMN b INT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug54679 Compressed row_format=COMPRESSED -DROP TABLE bug54679; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug54679 Compact -ALTER TABLE bug54679 KEY_BLOCK_SIZE=1; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug54679 Compressed KEY_BLOCK_SIZE=1 -ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -DROP TABLE bug54679; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug54679 Redundant row_format=REDUNDANT -ALTER TABLE bug54679 KEY_BLOCK_SIZE=2; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug54679 Compressed row_format=REDUNDANT KEY_BLOCK_SIZE=2 -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE bug54679 KEY_BLOCK_SIZE=4; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -DROP TABLE bug54679; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table 'test.bug54679' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.bug54679' (errno: 1478) -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB; -SET GLOBAL innodb_file_format=Barracuda; -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE bug54679 KEY_BLOCK_SIZE=4; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -DROP TABLE bug54679; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table 'test.bug54679' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Error 1005 Can't create table 'test.bug54679' (errno: 1478) -SET GLOBAL innodb_file_per_table=ON; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -DROP TABLE bug54679; -SET GLOBAL innodb_file_format=Antelope; -SET GLOBAL innodb_file_format_check=Antelope; -SET GLOBAL innodb_file_per_table=0; diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug56632.result b/mysql-test/suite/innodb_plugin/r/innodb_bug56632.result deleted file mode 100755 index 8236b37676b..00000000000 --- a/mysql-test/suite/innodb_plugin/r/innodb_bug56632.result +++ /dev/null @@ -1,294 +0,0 @@ -SET storage_engine=InnoDB; -SET GLOBAL innodb_file_format=`Barracuda`; -SET GLOBAL innodb_file_per_table=ON; -SET SESSION innodb_strict_mode = ON; -# Test 1) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither -DROP TABLE IF EXISTS bug56632; -Warnings: -Note 1051 Unknown table 'bug56632' -CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -ERROR HY000: Can't create table 'test.bug56632' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.bug56632' (errno: 1478) -# Test 2) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE -DROP TABLE IF EXISTS bug56632; -Warnings: -Note 1051 Unknown table 'bug56632' -CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact row_format=COMPACT -ALTER TABLE bug56632 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compressed row_format=COMPACT KEY_BLOCK_SIZE=1 -# Test 3) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compressed KEY_BLOCK_SIZE=1 -ALTER TABLE bug56632 ROW_FORMAT=COMPACT; -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compressed KEY_BLOCK_SIZE=1 -# Test 4) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ); -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact -ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact -# Test 5) CREATE with KEY_BLOCK_SIZE=3 (invalid). -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; -ERROR HY000: Can't create table 'test.bug56632' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 3. Valid values are [1, 2, 4, 8, 16] -Error 1005 Can't create table 'test.bug56632' (errno: 1478) -SET SESSION innodb_strict_mode = OFF; -# Test 6) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither -DROP TABLE IF EXISTS bug56632; -Warnings: -Note 1051 Unknown table 'bug56632' -CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 -ALTER TABLE bug56632 ADD COLUMN f1 INT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL, - `f1` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 -# Test 7) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact row_format=COMPACT -ALTER TABLE bug56632 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compressed row_format=COMPACT KEY_BLOCK_SIZE=1 -# Test 8) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compressed KEY_BLOCK_SIZE=1 -ALTER TABLE bug56632 ROW_FORMAT=COMPACT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 -# Test 9) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ); -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact -ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 -# Test 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither. -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact KEY_BLOCK_SIZE=3 -ALTER TABLE bug56632 ADD COLUMN f1 INT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL, - `f1` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact KEY_BLOCK_SIZE=3 -# Test 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT. -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact KEY_BLOCK_SIZE=3 -ALTER TABLE bug56632 ROW_FORMAT=COMPACT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=3 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact row_format=COMPACT KEY_BLOCK_SIZE=3 -# Test 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1. -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3. -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compact KEY_BLOCK_SIZE=3 -ALTER TABLE bug56632 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE bug56632; -Table Create Table -bug56632 CREATE TABLE `bug56632` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -bug56632 Compressed KEY_BLOCK_SIZE=1 -# Cleanup -DROP TABLE IF EXISTS bug56632; diff --git a/mysql-test/suite/innodb_plugin/t/innodb-create-options.test b/mysql-test/suite/innodb_plugin/t/innodb-create-options.test new file mode 100755 index 00000000000..2f95ccc45cb --- /dev/null +++ b/mysql-test/suite/innodb_plugin/t/innodb-create-options.test @@ -0,0 +1,575 @@ +# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE +# Related bugs; +# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact +# Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error +# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED +# Rules for interpreting CREATE_OPTIONS +# 1) Create options on an ALTER are added to the options on the +# previous CREATE or ALTER statements. +# 2) KEY_BLOCK_SIZE=0 is considered a unspecified value. +# If the current ROW_FORMAT has explicitly been set to COMPRESSED, +# InnoDB will use a default value of 8. Otherwise KEY_BLOCK_SIZE +# will not be used. +# 3) ROW_FORMAT=DEFAULT allows InnoDB to choose its own default, COMPACT. +# 4) ROW_FORMAT=DEFAULT and KEY_BLOCK_SIZE=0 can be used at any time to +# unset or erase the values persisted in the MySQL dictionary and +# by SHOW CTREATE TABLE. +# 5) When incompatible values for ROW_FORMAT and KEY_BLOCK_SIZE are +# both explicitly given, the ROW_FORMAT is always used in non-strict +# mode. +# 6) InnoDB will automatically convert a table to COMPRESSED only if a +# valid non-zero KEY_BLOCK_SIZE has been given and ROW_FORMAT=DEFAULT +# or has not been used on a previous CREATE TABLE or ALTER TABLE. +# 7) InnoDB strict mode is designed to prevent incompatible create +# options from being used together. +# 8) The non-strict behavior is intended to permit you to import a +# mysqldump file into a database that does not support compressed +# tables, even if the source database contained compressed tables. +# All invalid values and/or incompatible combinations of ROW_FORMAT +# and KEY_BLOCK_SIZE are automatically corrected +# +# *** innodb_strict_mode=ON *** +# 1) Valid ROW_FORMATs are COMPRESSED, COMPACT, DEFAULT, DYNAMIC +# & REDUNDANT. All others are rejected. +# 2) Valid KEY_BLOCK_SIZEs are 0,1,2,4,8,16. All others are rejected. +# 3) KEY_BLOCK_SIZE=0 can be used to set it to 'unspecified'. +# 4) KEY_BLOCK_SIZE=1,2,4,8 & 16 are incompatible with COMPACT, DYNAMIC & +# REDUNDANT. +# 5) KEY_BLOCK_SIZE=1,2,4,8 & 16 as well as ROW_FORMAT=COMPRESSED and +# ROW_FORMAT=DYNAMIC are incompatible with innodb_file_format=Antelope +# and innodb_file_per_table=OFF +# 6) KEY_BLOCK_SIZE on an ALTER must occur with ROW_FORMAT=COMPRESSED +# or ROW_FORMAT=DEFAULT if the ROW_FORMAT was previously specified +# as COMPACT, DYNAMIC or REDUNDANT. +# 7) KEY_BLOCK_SIZE on an ALTER can occur without a ROW_FORMAT if the +# previous ROW_FORMAT was DEFAULT, COMPRESSED, or unspecified. +# +# *** innodb_strict_mode=OFF *** +# 1. Ignore a bad KEY_BLOCK_SIZE, defaulting it to 8. +# 2. Ignore a bad ROW_FORMAT, defaulting to COMPACT. +# 3. Ignore a valid KEY_BLOCK_SIZE when an incompatible but valid +# ROW_FORMAT is specified. +# 4. If innodb_file_format=Antelope or innodb_file_per_table=OFF +# it will ignore ROW_FORMAT=COMPRESSED or DYNAMIC and it will +# ignore all non-zero KEY_BLOCK_SIZEs. +# +# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors" + +-- source include/have_innodb_plugin.inc +SET storage_engine=InnoDB; + +--disable_query_log +# These values can change during the test +LET $innodb_file_format_orig=`select @@innodb_file_format`; +LET $innodb_file_format_check_orig=`select @@innodb_file_format_check`; +LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`; +LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; +--enable_query_log + +SET GLOBAL innodb_file_format=`Barracuda`; +SET GLOBAL innodb_file_per_table=ON; + +# The first half of these tests are with strict mode ON. +SET SESSION innodb_strict_mode = ON; + +--echo # Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 +--echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' +DROP TABLE IF EXISTS t1; +--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. +--echo # But it is an invalid mode in InnoDB +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + + +--echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE +--echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC +DROP TABLE IF EXISTS t1; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=2; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=4; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=8; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE +--echo # ALTER with each ROW_FORMAT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW CREATE TABLE t1; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=COMPACT; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. +DROP TABLE IF EXISTS t1; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; +SHOW WARNINGS; + +--echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope +--echo # and that they can be set to default values during strict mode. +SET GLOBAL innodb_file_format=Antelope; +DROP TABLE IF EXISTS t1; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=8; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +SET GLOBAL innodb_file_format=Barracuda; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +SET GLOBAL innodb_file_format=Antelope; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ADD COLUMN f1 INT; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SET GLOBAL innodb_file_format=Barracuda; + +--echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with +--echo # innodb_file_per_table=OFF and that they can be set to default +--echo # values during strict mode. +SET GLOBAL innodb_file_per_table=OFF; +DROP TABLE IF EXISTS t1; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=1; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=ON; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +SET GLOBAL innodb_file_per_table=OFF; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ADD COLUMN f1 INT; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SET GLOBAL innodb_file_per_table=ON; + +--echo ################################################## +SET SESSION innodb_strict_mode = OFF; + +--echo # Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 +--echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' +--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. +--echo # It is an invalid mode in InnoDB, use COMPACT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE +--echo # KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE +--echo # ALTER with each ROW_FORMAT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a +--echo valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT +--echo is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_format=Barracuda; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_format=Barracuda; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a +--echo valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF +--echo and then used again when innodb_file_per_table=ON. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=ON; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=ON; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Cleanup +DROP TABLE IF EXISTS t1; + +--disable_query_log +EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig; +EVAL SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig; +EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; +EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig; +--enable_query_log + diff --git a/mysql-test/suite/innodb_plugin/t/innodb-zip.test b/mysql-test/suite/innodb_plugin/t/innodb-zip.test index 4980af437e6..8c1ef1f5467 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb-zip.test +++ b/mysql-test/suite/innodb_plugin/t/innodb-zip.test @@ -173,9 +173,7 @@ set innodb_strict_mode = on; #Test different values of KEY_BLOCK_SIZE ---error ER_CANT_CREATE_TABLE create table t1 (id int primary key) engine = innodb key_block_size = 0; -show warnings; --error ER_CANT_CREATE_TABLE create table t2 (id int primary key) engine = innodb key_block_size = 9; @@ -196,7 +194,7 @@ create table t11(id int primary key) engine = innodb row_format = redundant; SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; -drop table t3, t4, t5, t6, t7, t8, t9, t10, t11; +drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11; #test different values of ROW_FORMAT with KEY_BLOCK_SIZE create table t1 (id int primary key) engine = innodb @@ -217,14 +215,12 @@ create table t4 (id int primary key) engine = innodb key_block_size = 8 row_format = dynamic; show warnings; ---error ER_CANT_CREATE_TABLE create table t5 (id int primary key) engine = innodb key_block_size = 8 row_format = default; -show warnings; SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; -drop table t1; +drop table t1, t5; #test multiple errors --error ER_CANT_CREATE_TABLE diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug54679.test b/mysql-test/suite/innodb_plugin/t/innodb_bug54679.test deleted file mode 100644 index 863d9847ac1..00000000000 --- a/mysql-test/suite/innodb_plugin/t/innodb_bug54679.test +++ /dev/null @@ -1,97 +0,0 @@ -# Test Bug #54679 alter table causes compressed row_format to revert to compact - ---source include/have_innodb_plugin.inc - -let $file_format=`select @@innodb_file_format`; -let $file_format_check=`select @@innodb_file_format_check`; -let $file_per_table=`select @@innodb_file_per_table`; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; -SET innodb_strict_mode=ON; - -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; - -# The ROW_FORMAT of the table should be preserved when it is not specified -# in ALTER TABLE. -ALTER TABLE bug54679 ADD COLUMN b INT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; - -DROP TABLE bug54679; - -# Check that the ROW_FORMAT conversion to/from COMPRESSED works. - -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; - -# KEY_BLOCK_SIZE implies COMPRESSED. -ALTER TABLE bug54679 KEY_BLOCK_SIZE=1; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; - ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -DROP TABLE bug54679; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; - -ALTER TABLE bug54679 KEY_BLOCK_SIZE=2; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables -WHERE TABLE_NAME='bug54679'; - -# This prevents other than REDUNDANT or COMPACT ROW_FORMAT for new tables. -SET GLOBAL innodb_file_format=Antelope; - ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE bug54679 KEY_BLOCK_SIZE=4; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -DROP TABLE bug54679; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB; - -SET GLOBAL innodb_file_format=Barracuda; -# This will prevent ROW_FORMAT=COMPRESSED, because the system tablespace -# cannot be compressed. -SET GLOBAL innodb_file_per_table=OFF; - ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE bug54679 KEY_BLOCK_SIZE=4; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -DROP TABLE bug54679; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -SET GLOBAL innodb_file_per_table=ON; -CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -DROP TABLE bug54679; - -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_format_check=$file_format_check; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug56632.test b/mysql-test/suite/innodb_plugin/t/innodb_bug56632.test deleted file mode 100755 index 7f1c41cddfa..00000000000 --- a/mysql-test/suite/innodb_plugin/t/innodb_bug56632.test +++ /dev/null @@ -1,216 +0,0 @@ -# -# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED -# http://bugs.mysql.com/56632 -# -# Innodb automatically uses compressed mode when the KEY_BLOCK_SIZE -# parameter is used, except if the ROW_FORMAT is also specified, in -# which case the KEY_BLOCK_SIZE is ignored and a warning is shown. -# But Innodb was getting confused when neither of those parameters -# was used on the ALTER statement after they were both used on the -# CREATE. -# -# This will test the results of all 4 combinations of these two -# parameters of the CREATE and ALTER. -# -# Tests 1-5 use INNODB_STRICT_MODE=1 which returns an error -# if there is anything wrong with the statement. -# -# 1) CREATE with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1, ALTER with neither. -# Result; CREATE; fails with error ER_CANT_CREATE_TABLE -# 2) CREATE with ROW_FORMAT=COMPACT, ALTER with KEY_BLOCK_SIZE=1 -# Result; CREATE succeeds, -# ALTER quietly converts ROW_FORMAT to compressed. -# 3) CREATE with KEY_BLOCK_SIZE=1, ALTER with ROW_FORMAT=COMPACT -# Result; CREATE quietly converts ROW_FORMAT to compressed, -# ALTER fails with error ER_CANT_CREATE_TABLE. -# 4) CREATE with neither, ALTER with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1 -# Result; CREATE succeeds, -# ALTER; fails with error ER_CANT_CREATE_TABLE -# 5) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither. -# Result; CREATE; fails with error ER_CANT_CREATE_TABLE -# -# Tests 6-11 use INNODB_STRICT_MODE=0 which automatically makes -# adjustments if the prameters are incompatible. -# -# 6) CREATE with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1, ALTER with neither. -# Result; CREATE succeeds, warns that KEY_BLOCK_SIZE is ignored. -# ALTER succeeds, no warnings. -# 7) CREATE with ROW_FORMAT=COMPACT, ALTER with KEY_BLOCK_SIZE=1 -# Result; CREATE succeeds, -# ALTER quietly converts ROW_FORMAT to compressed. -# 8) CREATE with KEY_BLOCK_SIZE=1, ALTER with ROW_FORMAT=COMPACT -# Result; CREATE quietly converts ROW_FORMAT to compressed, -# ALTER succeeds, warns that KEY_BLOCK_SIZE is ignored. -# 9) CREATE with neither, ALTER with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1 -# Result; CREATE succeeds, -# ALTER succeeds, warns that KEY_BLOCK_SIZE is ignored. -# 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither. -# Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored. -# ALTER succeeds, warns that KEY_BLOCK_SIZE=3 is ignored. -# 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT. -# Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored. -# ALTER succeeds, warns that KEY_BLOCK_SIZE=3 is ignored. -# 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1. -# Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored. -# ALTER succeeds, quietly converts ROW_FORMAT to compressed. - --- source include/have_innodb_plugin.inc - -SET storage_engine=InnoDB; - ---disable_query_log -# These values can change during the test -LET $innodb_file_format_orig=`select @@innodb_file_format`; -LET $innodb_file_format_check_orig=`select @@innodb_file_format_check`; -LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`; -LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; ---enable_query_log - -SET GLOBAL innodb_file_format=`Barracuda`; -SET GLOBAL innodb_file_per_table=ON; - -# Innodb strict mode will cause an error on the CREATE or ALTER when; -# 1. both ROW_FORMAT=COMPACT and KEY_BLOCK_SIZE=1, -# 2. KEY_BLOCK_SIZE is not a valid number (0,1,2,4,8,16). -# With innodb_strict_mode = OFF, These errors are corrected -# and just a warning is returned. -SET SESSION innodb_strict_mode = ON; - ---echo # Test 1) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither -DROP TABLE IF EXISTS bug56632; ---error ER_CANT_CREATE_TABLE -CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; - ---echo # Test 2) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -ALTER TABLE bug56632 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 3) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; ---disable_result_log ---error ER_CANT_CREATE_TABLE -ALTER TABLE bug56632 ROW_FORMAT=COMPACT; ---enable_result_log -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 4) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ); -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; ---disable_result_log ---error ER_CANT_CREATE_TABLE -ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; ---enable_result_log -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 5) CREATE with KEY_BLOCK_SIZE=3 (invalid). -DROP TABLE IF EXISTS bug56632; ---error ER_CANT_CREATE_TABLE -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; -SHOW WARNINGS; - -SET SESSION innodb_strict_mode = OFF; - ---echo # Test 6) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -ALTER TABLE bug56632 ADD COLUMN f1 INT; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 7) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -ALTER TABLE bug56632 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 8) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -ALTER TABLE bug56632 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 9) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ); -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither. -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -ALTER TABLE bug56632 ADD COLUMN f1 INT; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT. -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -ALTER TABLE bug56632 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Test 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1. -DROP TABLE IF EXISTS bug56632; -CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; -ALTER TABLE bug56632 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SHOW CREATE TABLE bug56632; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632'; - ---echo # Cleanup -DROP TABLE IF EXISTS bug56632; - ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig; -EVAL SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig; -EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig; ---enable_query_log - -- cgit v1.2.1 From 866cec611a369be344bafed0d4691ad6b83e4086 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 5 Nov 2010 15:26:38 +0100 Subject: Bug #57840 MTR: parallel execution breaks with smart ordering of test cases There were actually more problems in this area: Slaves (if any) were unconditionally restarted, this appears unnecessary. Sort criteria were suboptimal, included the test name. Added logic to "reserve" a sequence of tests with same config for one thread Got rid of sort_criteria hash, put it into the test case itself Adds little sanity check that expected worker picks up test Fixed some tests that may fail if starting on running server Some of these fail only if *same* test is repeated. Finally, special sorting of tests that do --force-restart --- mysql-test/suite/binlog/t/binlog_index-master.opt | 1 + mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt | 1 + mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt | 1 + mysql-test/suite/rpl/r/rpl_ignore_table.result | 1 + mysql-test/suite/rpl/t/rpl_cross_version-master.opt | 1 + mysql-test/suite/rpl/t/rpl_current_user-master.opt | 1 + mysql-test/suite/rpl/t/rpl_ignore_table.test | 2 ++ mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh | 1 + mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh | 1 + mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist-master.opt | 1 + 10 files changed, 11 insertions(+) create mode 100644 mysql-test/suite/binlog/t/binlog_index-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_current_user-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist-master.opt (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/t/binlog_index-master.opt b/mysql-test/suite/binlog/t/binlog_index-master.opt new file mode 100644 index 00000000000..cef79bc8585 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_index-master.opt @@ -0,0 +1 @@ +--force-restart diff --git a/mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt b/mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt index ad2c6a647b5..377e2114039 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt +++ b/mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt @@ -1 +1,2 @@ -O max_binlog_size=4096 +--force-restart diff --git a/mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt b/mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt index e2cfcb299cf..2a1187d3fe4 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt +++ b/mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt @@ -1 +1,2 @@ --binlog-do-db=b42829 +--force-restart diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index e77be425270..6b845ddcac9 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -141,3 +141,4 @@ HEX(word) SELECT * FROM tmptbl504451f4258$1; ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist DROP TABLE t5; +call mtr.force_restart(); diff --git a/mysql-test/suite/rpl/t/rpl_cross_version-master.opt b/mysql-test/suite/rpl/t/rpl_cross_version-master.opt index 0ea05290c11..2b2d357b124 100644 --- a/mysql-test/suite/rpl/t/rpl_cross_version-master.opt +++ b/mysql-test/suite/rpl/t/rpl_cross_version-master.opt @@ -1 +1,2 @@ --replicate-same-server-id --relay-log=slave-relay-bin --secure-file-priv=$MYSQL_TMP_DIR +--force-restart diff --git a/mysql-test/suite/rpl/t/rpl_current_user-master.opt b/mysql-test/suite/rpl/t/rpl_current_user-master.opt new file mode 100644 index 00000000000..cef79bc8585 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_current_user-master.opt @@ -0,0 +1 @@ +--force-restart diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test index 66f96e8f4e8..b5666ad6e91 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test @@ -174,3 +174,5 @@ SELECT * FROM tmptbl504451f4258$1; connection master; DROP TABLE t5; sync_slave_with_master; + +call mtr.force_restart(); diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh b/mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh index 066f72926af..e5bb3e61d11 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh +++ b/mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh @@ -1 +1,2 @@ +rm -f $MYSQLTEST_VARDIR/std_data_master_link ln -s $MYSQLTEST_VARDIR/std_data $MYSQLTEST_VARDIR/std_data_master_link diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh b/mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh index 218209a2542..7a0c0bb382a 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh +++ b/mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh @@ -1 +1,2 @@ +rm -f $MYSQLTEST_VARDIR/std_data_slave_link ln -s $MYSQLTEST_VARDIR/std_data $MYSQLTEST_VARDIR/std_data_slave_link diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist-master.opt b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist-master.opt new file mode 100644 index 00000000000..cef79bc8585 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist-master.opt @@ -0,0 +1 @@ +--force-restart -- cgit v1.2.1 From bf10c4a583a93997988b0e7fb01d9dda14bbe325 Mon Sep 17 00:00:00 2001 From: "Horst.Hunger" Date: Mon, 8 Nov 2010 16:30:26 +0100 Subject: Fix for bug#52501 consisting of changes of some sys_vars tests including review results. --- mysql-test/suite/sys_vars/README | 3 -- mysql-test/suite/sys_vars/inc/timestamp_basic.inc | 4 -- .../suite/sys_vars/r/general_log_file_basic.result | 5 +-- .../suite/sys_vars/r/general_log_func.result | 2 + .../r/innodb_commit_concurrency_basic.result | 46 +++++++--------------- .../suite/sys_vars/r/log_output_basic.result | 4 +- mysql-test/suite/sys_vars/r/log_output_func.result | 3 +- .../sys_vars/r/slow_query_log_file_basic.result | 4 +- .../suite/sys_vars/r/timestamp_basic_32.result | 12 ++---- .../suite/sys_vars/r/timestamp_basic_64.result | 16 ++++---- .../suite/sys_vars/r/tmp_table_size_basic.result | 2 - .../suite/sys_vars/t/completion_type_func.test | 2 +- mysql-test/suite/sys_vars/t/disabled.def | 13 ++++++ .../suite/sys_vars/t/general_log_file_basic.test | 6 ++- mysql-test/suite/sys_vars/t/general_log_func.test | 2 + .../t/innodb_commit_concurrency_basic-master.opt | 1 + .../t/innodb_commit_concurrency_basic.test | 18 ++++----- mysql-test/suite/sys_vars/t/log_output_func.test | 6 ++- .../t/myisam_data_pointer_size_func-master.opt | 1 + .../sys_vars/t/myisam_data_pointer_size_func.test | 3 ++ .../suite/sys_vars/t/rpl_init_slave_func.test | 2 +- .../sys_vars/t/slow_query_log_file_basic.test | 8 +++- .../suite/sys_vars/t/sql_log_off_func-master.opt | 1 + .../suite/sys_vars/t/timestamp_basic_32.test | 4 ++ .../suite/sys_vars/t/timestamp_basic_64.test | 5 +++ .../suite/sys_vars/t/tmp_table_size_basic.test | 3 +- 26 files changed, 91 insertions(+), 85 deletions(-) delete mode 100644 mysql-test/suite/sys_vars/README create mode 100644 mysql-test/suite/sys_vars/t/disabled.def create mode 100644 mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic-master.opt create mode 100644 mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func-master.opt create mode 100644 mysql-test/suite/sys_vars/t/sql_log_off_func-master.opt (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/sys_vars/README b/mysql-test/suite/sys_vars/README deleted file mode 100644 index a84f00f1f62..00000000000 --- a/mysql-test/suite/sys_vars/README +++ /dev/null @@ -1,3 +0,0 @@ -Some of these tests allocate more than 4GB RAM. -So, assure that the machine on which the suite will be executed has more than 4GB RAM. - diff --git a/mysql-test/suite/sys_vars/inc/timestamp_basic.inc b/mysql-test/suite/sys_vars/inc/timestamp_basic.inc index 9ef57c97043..68ded3e5a97 100644 --- a/mysql-test/suite/sys_vars/inc/timestamp_basic.inc +++ b/mysql-test/suite/sys_vars/inc/timestamp_basic.inc @@ -66,10 +66,6 @@ SET @@timestamp = 0; --echo 'Setting 0 resets timestamp to session default timestamp' -SET @@timestamp = 123456789123456; -SELECT @@timestamp; -SET @@timestamp = 60*60*60*60*365; -SELECT @@timestamp; SET @@timestamp = -1000000000; SELECT @@timestamp; diff --git a/mysql-test/suite/sys_vars/r/general_log_file_basic.result b/mysql-test/suite/sys_vars/r/general_log_file_basic.result index 48a8d90b55e..5c0b93cf4ab 100644 --- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result +++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result @@ -1,7 +1,6 @@ -SET @start_value = @@global.general_log_file; SELECT @start_value; @start_value -test.log +NULL '#---------------------FN_DYNVARS_004_01-------------------------#' SET @@global.general_log_file = DEFAULT; SELECT RIGHT(@@global.general_log_file,10) AS log_file; @@ -17,4 +16,4 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='general_log_file'; @@global.general_log_file = VARIABLE_VALUE 1 -SET @@global.general_log_file= @start_value; +SET @@global.general_log_file= 'test.log'; diff --git a/mysql-test/suite/sys_vars/r/general_log_func.result b/mysql-test/suite/sys_vars/r/general_log_func.result index 39ba90265d5..119991396e0 100644 --- a/mysql-test/suite/sys_vars/r/general_log_func.result +++ b/mysql-test/suite/sys_vars/r/general_log_func.result @@ -26,6 +26,7 @@ SELECT @@general_log; INSERT into t1(name) values('Record_3'); INSERT into t1(name) values('Record_4'); ## There should be a difference ## +SET @start_value= @@global.max_allowed_packet; SET @@global.max_allowed_packet= 1024*1024*1024; SET @orig_file= load_file('MYSQLD_LOGFILE.orig'); SET @copy_file= load_file('MYSQLD_LOGFILE.copy'); @@ -34,3 +35,4 @@ STRCMP(@orig_file, @copy_file) 1 ## Dropping tables ## DROP TABLE t1; +SET @@global.max_allowed_packet= @start_value; diff --git a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result index 301016d4362..201f183ad0e 100644 --- a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result @@ -1,30 +1,23 @@ SET @global_start_value = @@global.innodb_commit_concurrency; SELECT @global_start_value; @global_start_value -0 +10 '#--------------------FN_DYNVARS_046_01------------------------#' -SET @@global.innodb_commit_concurrency = 0; SET @@global.innodb_commit_concurrency = DEFAULT; SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency -0 +10 '#---------------------FN_DYNVARS_046_02-------------------------#' SET innodb_commit_concurrency = 1; ERROR HY000: Variable 'innodb_commit_concurrency' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@innodb_commit_concurrency; @@innodb_commit_concurrency -0 +10 SELECT local.innodb_commit_concurrency; ERROR 42S02: Unknown table 'local' in field list SET global innodb_commit_concurrency = 0; -SELECT @@global.innodb_commit_concurrency; -@@global.innodb_commit_concurrency -0 +ERROR HY000: Incorrect arguments to SET '#--------------------FN_DYNVARS_046_03------------------------#' -SET @@global.innodb_commit_concurrency = 0; -SELECT @@global.innodb_commit_concurrency; -@@global.innodb_commit_concurrency -0 SET @@global.innodb_commit_concurrency = 1; SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency @@ -35,27 +28,17 @@ SELECT @@global.innodb_commit_concurrency; 1000 '#--------------------FN_DYNVARS_046_04-------------------------#' SET @@global.innodb_commit_concurrency = -1; -Warnings: -Warning 1292 Truncated incorrect commit_concurrency value: '18446744073709551615' -SELECT @@global.innodb_commit_concurrency; -@@global.innodb_commit_concurrency -1000 +SELECT @@global.innodb_commit_concurrency IN (4294967295,18446744073709551615); +@@global.innodb_commit_concurrency IN (4294967295,18446744073709551615) +1 SET @@global.innodb_commit_concurrency = "T"; ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency' -SELECT @@global.innodb_commit_concurrency; -@@global.innodb_commit_concurrency -1000 SET @@global.innodb_commit_concurrency = "Y"; ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency' -SELECT @@global.innodb_commit_concurrency; -@@global.innodb_commit_concurrency -1000 SET @@global.innodb_commit_concurrency = 1001; -Warnings: -Warning 1292 Truncated incorrect commit_concurrency value: '1001' SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency -1000 +1001 '#----------------------FN_DYNVARS_046_05------------------------#' SELECT @@global.innodb_commit_concurrency = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES @@ -65,32 +48,33 @@ VARIABLE_VALUE 1 SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency -1000 +1001 SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_commit_concurrency'; VARIABLE_VALUE -1000 +1001 '#---------------------FN_DYNVARS_046_06-------------------------#' SET @@global.innodb_commit_concurrency = OFF; ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency' SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency -1000 +1001 SET @@global.innodb_commit_concurrency = ON; ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency' SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency -1000 +1001 '#---------------------FN_DYNVARS_046_07----------------------#' SET @@global.innodb_commit_concurrency = TRUE; SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 1 SET @@global.innodb_commit_concurrency = FALSE; +ERROR HY000: Incorrect arguments to SET SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency -0 +1 SET @@global.innodb_commit_concurrency = @global_start_value; SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency -0 +10 diff --git a/mysql-test/suite/sys_vars/r/log_output_basic.result b/mysql-test/suite/sys_vars/r/log_output_basic.result index 481d5862074..6f350556ff9 100644 --- a/mysql-test/suite/sys_vars/r/log_output_basic.result +++ b/mysql-test/suite/sys_vars/r/log_output_basic.result @@ -1,7 +1,7 @@ SET @start_value = @@global.log_output; SELECT @start_value; @start_value -FILE,TABLE +FILE '#--------------------FN_DYNVARS_065_01------------------------#' SET @@global.log_output = FILE; SET @@global.log_output = DEFAULT; @@ -172,4 +172,4 @@ TABLE SET @@global.log_output = @start_value; SELECT @@global.log_output; @@global.log_output -FILE,TABLE +FILE diff --git a/mysql-test/suite/sys_vars/r/log_output_func.result b/mysql-test/suite/sys_vars/r/log_output_func.result index 060f930a161..00a8e824f78 100644 --- a/mysql-test/suite/sys_vars/r/log_output_func.result +++ b/mysql-test/suite/sys_vars/r/log_output_func.result @@ -1,6 +1,5 @@ SET @start_value= @@global.log_output; SET @start_general_log= @@global.general_log; -SET @start_general_log_file= @@global.general_log_file; '#--------------------FN_DYNVARS_065_01-------------------------#' SET @@global.log_output = 'NONE'; 'connect (con1,localhost,root,,,,)' @@ -53,7 +52,7 @@ count(*) DROP TABLE t1; connection default; SET @@global.general_log= 'OFF'; -SET @@global.general_log_file= @start_general_log_file; +SET @@global.general_log_file= '/home/horst/bzr/5.1-52501/mysql-test/var/mysqld.1/mysqld.log'; SET @@global.log_output= @start_value; SET @@global.general_log= @start_general_log; SET @@global.general_log= 'ON'; diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result index 925f940a5c4..3cd62187d0b 100644 --- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result +++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result @@ -1,4 +1,4 @@ -SET @start_value = @@global.slow_query_log_file; +slowtest.log '#---------------------FN_DYNVARS_004_01-------------------------#' SET @@global.slow_query_log_file = DEFAULT; SELECT RIGHT(@@global.slow_query_log_file,15); @@ -14,4 +14,4 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='slow_query_log_file'; @@global.slow_query_log_file = VARIABLE_VALUE 1 -SET @@global.slow_query_log_file= @start_value; +SET @@global.slow_query_log_file= 'slowtest.log'; diff --git a/mysql-test/suite/sys_vars/r/timestamp_basic_32.result b/mysql-test/suite/sys_vars/r/timestamp_basic_32.result index a8be2201e68..87c9edc668e 100644 --- a/mysql-test/suite/sys_vars/r/timestamp_basic_32.result +++ b/mysql-test/suite/sys_vars/r/timestamp_basic_32.result @@ -8,14 +8,6 @@ ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with S '#--------------------FN_DYNVARS_001_03------------------------#' SET @@timestamp = 0; 'Setting 0 resets timestamp to session default timestamp' -SET @@timestamp = 123456789123456; -SELECT @@timestamp; -@@timestamp -2249167232 -SET @@timestamp = 60*60*60*60*365; -SELECT @@timestamp; -@@timestamp -435432704 SET @@timestamp = -1000000000; SELECT @@timestamp; @@timestamp @@ -66,3 +58,7 @@ ERROR 42S02: Unknown table 'session' in field list SELECT timestamp = @@session.timestamp; ERROR 42S22: Unknown column 'timestamp' in 'field list' SET @@timestamp = @session_start_value; +SET @@timestamp = 123456789123456; +ERROR HY000: This version of MySQL doesn't support dates later than 2038 +SET @@timestamp = 60*60*60*60*365; +ERROR HY000: This version of MySQL doesn't support dates later than 2038 diff --git a/mysql-test/suite/sys_vars/r/timestamp_basic_64.result b/mysql-test/suite/sys_vars/r/timestamp_basic_64.result index 824a3ea5529..b5d3979610f 100644 --- a/mysql-test/suite/sys_vars/r/timestamp_basic_64.result +++ b/mysql-test/suite/sys_vars/r/timestamp_basic_64.result @@ -8,14 +8,6 @@ ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with S '#--------------------FN_DYNVARS_001_03------------------------#' SET @@timestamp = 0; 'Setting 0 resets timestamp to session default timestamp' -SET @@timestamp = 123456789123456; -SELECT @@timestamp; -@@timestamp -123456789123456 -SET @@timestamp = 60*60*60*60*365; -SELECT @@timestamp; -@@timestamp -4730400000 SET @@timestamp = -1000000000; SELECT @@timestamp; @@timestamp @@ -66,3 +58,11 @@ ERROR 42S02: Unknown table 'session' in field list SELECT timestamp = @@session.timestamp; ERROR 42S22: Unknown column 'timestamp' in 'field list' SET @@timestamp = @session_start_value; +SET @@timestamp = 123456789123456; +SELECT @@timestamp; +@@timestamp +123456789123456 +SET @@timestamp = 60*60*60*60*365; +SELECT @@timestamp; +@@timestamp +4730400000 diff --git a/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result b/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result index 2ebeb8d61d8..06b624ad5c8 100644 --- a/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result +++ b/mysql-test/suite/sys_vars/r/tmp_table_size_basic.result @@ -100,8 +100,6 @@ SELECT @@session.tmp_table_size; SET @@session.tmp_table_size = "Test"; ERROR 42000: Incorrect argument type to variable 'tmp_table_size' SET @@session.tmp_table_size = 12345678901; -Warnings: -Warning 1292 Truncated incorrect tmp_table_size value: '12345678901' SELECT @@session.tmp_table_size IN (12345678901,4294967295); @@session.tmp_table_size IN (12345678901,4294967295) 1 diff --git a/mysql-test/suite/sys_vars/t/completion_type_func.test b/mysql-test/suite/sys_vars/t/completion_type_func.test index 8e363ed2a7d..82e2dc47e54 100644 --- a/mysql-test/suite/sys_vars/t/completion_type_func.test +++ b/mysql-test/suite/sys_vars/t/completion_type_func.test @@ -18,7 +18,7 @@ # server-system-variables.html#option_mysqld_completion_type # # # ################################################################################ - +--source include/not_embedded.inc --source include/have_innodb.inc --disable_warnings diff --git a/mysql-test/suite/sys_vars/t/disabled.def b/mysql-test/suite/sys_vars/t/disabled.def new file mode 100644 index 00000000000..915ea7a6f5c --- /dev/null +++ b/mysql-test/suite/sys_vars/t/disabled.def @@ -0,0 +1,13 @@ +############################################################################## +# +# 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. +# +############################################################################## +sys_vars.max_binlog_cache_size_basic_64 : bug#56408 2010-08-31 Horst +sys_vars.max_binlog_cache_size_basic_32 : bug#56408 2010-08-31 Horst diff --git a/mysql-test/suite/sys_vars/t/general_log_file_basic.test b/mysql-test/suite/sys_vars/t/general_log_file_basic.test index 014108f88d2..35905bad987 100644 --- a/mysql-test/suite/sys_vars/t/general_log_file_basic.test +++ b/mysql-test/suite/sys_vars/t/general_log_file_basic.test @@ -35,7 +35,8 @@ # Saving initial value of general_log_file in a temporary variable # ######################################################################## -SET @start_value = @@global.general_log_file; +#SET @start_value = @@global.general_log_file; +LET $start_value = `SELECT @@global.general_log_file`; SELECT @start_value; @@ -68,7 +69,8 @@ SELECT @@global.general_log_file = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='general_log_file'; -SET @@global.general_log_file= @start_value; +#SET @@global.general_log_file= @start_value; +eval SET @@global.general_log_file= '$start_value'; ##################################################### # END OF general_log_file TESTS # diff --git a/mysql-test/suite/sys_vars/t/general_log_func.test b/mysql-test/suite/sys_vars/t/general_log_func.test index 24d535e88e5..d355d0d619c 100644 --- a/mysql-test/suite/sys_vars/t/general_log_func.test +++ b/mysql-test/suite/sys_vars/t/general_log_func.test @@ -79,6 +79,7 @@ INSERT into t1(name) values('Record_4'); --chmod 0777 $MYSQLD_LOGFILE.orig --echo ## There should be a difference ## +SET @start_value= @@global.max_allowed_packet; SET @@global.max_allowed_packet= 1024*1024*1024; --replace_result $MYSQLD_LOGFILE MYSQLD_LOGFILE eval SET @orig_file= load_file('$MYSQLD_LOGFILE.orig'); @@ -91,3 +92,4 @@ eval SELECT STRCMP(@orig_file, @copy_file); --echo ## Dropping tables ## DROP TABLE t1; +SET @@global.max_allowed_packet= @start_value; diff --git a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic-master.opt b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic-master.opt new file mode 100644 index 00000000000..727bbc4b11b --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic-master.opt @@ -0,0 +1 @@ +--innodb-commit-concurrency=10 diff --git a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test index 1ef69e34999..2c7645f3b25 100644 --- a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test @@ -11,6 +11,10 @@ # Creation Date: 2008-02-07 # # Author: Rizwan # # # +# Modified 2010-09-01 Horst # +# Added amaster.opt with innodb-commit-concurrency > 0 to be able to assign # +# different values <> 0 # +# # #Description:Test Cases of Dynamic System Variable innodb_commit_concurrency # # that checks the behavior of this variable in the following ways # # * Default Value # @@ -43,7 +47,6 @@ SELECT @global_start_value; # Display the DEFAULT value of innodb_commit_concurrency # ######################################################################## -SET @@global.innodb_commit_concurrency = 0; SET @@global.innodb_commit_concurrency = DEFAULT; SELECT @@global.innodb_commit_concurrency; @@ -60,20 +63,14 @@ SELECT @@innodb_commit_concurrency; --Error ER_UNKNOWN_TABLE SELECT local.innodb_commit_concurrency; +--error ER_WRONG_ARGUMENTS SET global innodb_commit_concurrency = 0; -SELECT @@global.innodb_commit_concurrency; - - --echo '#--------------------FN_DYNVARS_046_03------------------------#' ########################################################################## # change the value of innodb_commit_concurrency to a valid value # ########################################################################## - -SET @@global.innodb_commit_concurrency = 0; -SELECT @@global.innodb_commit_concurrency; - SET @@global.innodb_commit_concurrency = 1; SELECT @@global.innodb_commit_concurrency; SET @@global.innodb_commit_concurrency = 1000; @@ -85,15 +82,13 @@ SELECT @@global.innodb_commit_concurrency; ########################################################################### SET @@global.innodb_commit_concurrency = -1; -SELECT @@global.innodb_commit_concurrency; +SELECT @@global.innodb_commit_concurrency IN (4294967295,18446744073709551615); --Error ER_WRONG_TYPE_FOR_VAR SET @@global.innodb_commit_concurrency = "T"; -SELECT @@global.innodb_commit_concurrency; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.innodb_commit_concurrency = "Y"; -SELECT @@global.innodb_commit_concurrency; SET @@global.innodb_commit_concurrency = 1001; SELECT @@global.innodb_commit_concurrency; @@ -131,6 +126,7 @@ SELECT @@global.innodb_commit_concurrency; SET @@global.innodb_commit_concurrency = TRUE; SELECT @@global.innodb_commit_concurrency; +--error ER_WRONG_ARGUMENTS SET @@global.innodb_commit_concurrency = FALSE; SELECT @@global.innodb_commit_concurrency; diff --git a/mysql-test/suite/sys_vars/t/log_output_func.test b/mysql-test/suite/sys_vars/t/log_output_func.test index 007c4f38659..8a2fbe0728b 100644 --- a/mysql-test/suite/sys_vars/t/log_output_func.test +++ b/mysql-test/suite/sys_vars/t/log_output_func.test @@ -26,7 +26,8 @@ SET @start_value= @@global.log_output; SET @start_general_log= @@global.general_log; -SET @start_general_log_file= @@global.general_log_file; +#SET @start_general_log_file= @@global.general_log_file; +LET $start_general_log_file= `SELECT @@global.general_log_file`; --echo '#--------------------FN_DYNVARS_065_01-------------------------#' ################################################################## @@ -113,7 +114,8 @@ file_exists $MYSQLTEST_VARDIR/run/mytest.log ; --echo connection default; connection default; SET @@global.general_log= 'OFF'; -SET @@global.general_log_file= @start_general_log_file; +#SET @@global.general_log_file= @start_general_log_file; +eval SET @@global.general_log_file= '$start_general_log_file'; SET @@global.log_output= @start_value; SET @@global.general_log= @start_general_log; SET @@global.general_log= 'ON'; diff --git a/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func-master.opt b/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func-master.opt new file mode 100644 index 00000000000..d392e2e4262 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func-master.opt @@ -0,0 +1 @@ +--log-error='dummy.log' diff --git a/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test b/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test index 37dd3a5a297..441e9c72982 100644 --- a/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test +++ b/mysql-test/suite/sys_vars/t/myisam_data_pointer_size_func.test @@ -19,6 +19,9 @@ # # ################################################################################ +# due to bug#56486 +--source include/not_windows.inc + --echo '#--------------------FN_DYNVARS_093_01-------------------------#' ############################################################################### # Check if setting myisam_data_pointer_size is changed in every new connection# diff --git a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test index f2c66eb3a0a..2cc31c91388 100644 --- a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test +++ b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test @@ -55,7 +55,7 @@ DROP TABLE t1; eval SELECT @@global.init_slave = $my_init_slave; --echo Expect 1 # wait for the slave threads have set the global variable. -let $wait_timeout= 90; +let $wait_timeout= 240; let $wait_condition= SELECT @@global.max_connections = @start_max_connections; --source include/wait_condition_sp.inc # check that the action in init_slave does not happen immediately diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test index 9125b686cad..810588b8f4e 100644 --- a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test +++ b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test @@ -35,7 +35,9 @@ # Saving initial value of slow_query_log_file in a temporary variable # ########################################################################### -SET @start_value = @@global.slow_query_log_file; +#SET @start_value = @@global.slow_query_log_file; +LET $start_value = `SELECT @@global.slow_query_log_file`; +--echo $start_value --echo '#---------------------FN_DYNVARS_004_01-------------------------#' ############################################### @@ -65,7 +67,9 @@ SELECT @@global.slow_query_log_file = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='slow_query_log_file'; -SET @@global.slow_query_log_file= @start_value; +#SET @@global.slow_query_log_file= @start_value; +eval SET @@global.slow_query_log_file= '$start_value'; +#SELECT @start_value; ##################################################### # END OF slow_query_log_file TESTS # ##################################################### diff --git a/mysql-test/suite/sys_vars/t/sql_log_off_func-master.opt b/mysql-test/suite/sys_vars/t/sql_log_off_func-master.opt new file mode 100644 index 00000000000..875ecc54b55 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/sql_log_off_func-master.opt @@ -0,0 +1 @@ +--general-log --log-output=TABLE,FILE diff --git a/mysql-test/suite/sys_vars/t/timestamp_basic_32.test b/mysql-test/suite/sys_vars/t/timestamp_basic_32.test index a2b6139aef9..11b7535d9ef 100644 --- a/mysql-test/suite/sys_vars/t/timestamp_basic_32.test +++ b/mysql-test/suite/sys_vars/t/timestamp_basic_32.test @@ -7,3 +7,7 @@ --source include/have_32bit.inc --source suite/sys_vars/inc/timestamp_basic.inc +--error ER_UNKNOWN_ERROR +SET @@timestamp = 123456789123456; +--error ER_UNKNOWN_ERROR +SET @@timestamp = 60*60*60*60*365; diff --git a/mysql-test/suite/sys_vars/t/timestamp_basic_64.test b/mysql-test/suite/sys_vars/t/timestamp_basic_64.test index fbc86316ed9..5180c86392a 100644 --- a/mysql-test/suite/sys_vars/t/timestamp_basic_64.test +++ b/mysql-test/suite/sys_vars/t/timestamp_basic_64.test @@ -7,3 +7,8 @@ --source include/have_64bit.inc --source suite/sys_vars/inc/timestamp_basic.inc +SET @@timestamp = 123456789123456; +SELECT @@timestamp; +SET @@timestamp = 60*60*60*60*365; +SELECT @@timestamp; + diff --git a/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test b/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test index c2ff51d50ca..116196ddb07 100644 --- a/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test +++ b/mysql-test/suite/sys_vars/t/tmp_table_size_basic.test @@ -133,8 +133,9 @@ SELECT @@session.tmp_table_size; --Error ER_WRONG_TYPE_FOR_VAR SET @@session.tmp_table_size = "Test"; +--disable_warnings SET @@session.tmp_table_size = 12345678901; - +--enable_warnings # With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295 SELECT @@session.tmp_table_size IN (12345678901,4294967295); -- cgit v1.2.1 From 4b0fe8870871c6af340ad0198dfec1c61700853d Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Wed, 10 Nov 2010 14:32:42 +0600 Subject: Fixed bug#56619 - Assertion failed during ALTER TABLE RENAME, DISABLE KEYS. The code of ALTER TABLE RENAME, DISABLE KEYS could issue a commit while holding LOCK_open mutex. This is a regression introduced by the fix for Bug 54453. This failed an assert guarding us against a potential deadlock with connections trying to execute FLUSH TABLES WITH READ LOCK. The fix is to move acquisition of LOCK_open outside the section that issues ha_autocommit_or_rollback(). LOCK_open is taken to protect against concurrent operations with .frms and the table definition cache, and doesn't need to cover the call to commit. A test case added to innodb_mysql.test. The patch is to be null-merged to 5.5, which already has 54453 null-merged to it. mysql-test/suite/innodb/r/innodb_mysql.result: Added test results for test for bug#56619. mysql-test/suite/innodb/t/innodb_mysql.test: Added test for bug#56619. sql/sql_table.cc: mysql_alter_table() modified: moved acquisition of LOCK_open after call to ha_autocommit_or_rollback. --- mysql-test/suite/innodb/r/innodb_mysql.result | 8 ++++++++ mysql-test/suite/innodb/t/innodb_mysql.test | 13 +++++++++++++ 2 files changed, 21 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 65b7da143a4..6ac3e8e6302 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -2620,3 +2620,11 @@ t2 CREATE TABLE `t2` ( CONSTRAINT `x` FOREIGN KEY (`fk`) REFERENCES `t1` (`pk`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t2, t1; +# +# Test for bug #56619 - Assertion failed during +# ALTER TABLE RENAME, DISABLE KEYS +# +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb; +ALTER TABLE t1 RENAME TO t2, DISABLE KEYS; +DROP TABLE IF EXISTS t1, t2; diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index 09dc4c9f187..e99c3c27673 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -845,3 +845,16 @@ create table t2 (fk int, key x (fk), constraint x foreign key (FK) references t1 (PK)) engine=InnoDB; show create table t2; drop table t2, t1; + +--echo # +--echo # Test for bug #56619 - Assertion failed during +--echo # ALTER TABLE RENAME, DISABLE KEYS +--echo # +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings +CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb; +--disable_warnings +ALTER TABLE t1 RENAME TO t2, DISABLE KEYS; +DROP TABLE IF EXISTS t1, t2; +--enable_warnings -- cgit v1.2.1 From 13bc5b3f3d6babe5b2b60256167b2cae1ef7d4c2 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 11 Nov 2010 13:03:17 +0300 Subject: BUG#58079 - Remove the IBM DB2 storage engine --- mysql-test/suite/ibmdb2i/include/have_i54.inc | 20 - mysql-test/suite/ibmdb2i/include/have_i61.inc | 20 - mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc | 6 - .../suite/ibmdb2i/r/ibmdb2i_bug_44020.result | 11 - .../suite/ibmdb2i/r/ibmdb2i_bug_44025.result | 4 - .../suite/ibmdb2i/r/ibmdb2i_bug_44232.result | 4 - .../suite/ibmdb2i/r/ibmdb2i_bug_44610.result | 18 - .../suite/ibmdb2i/r/ibmdb2i_bug_45196.result | 33 - .../suite/ibmdb2i/r/ibmdb2i_bug_45793.result | 7 - .../suite/ibmdb2i/r/ibmdb2i_bug_45983.result | 20 - .../suite/ibmdb2i/r/ibmdb2i_bug_49329.result | 9 - .../suite/ibmdb2i/r/ibmdb2i_collations.result | 1204 -------------------- mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test | 9 - mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test | 9 - mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44232.test | 8 - mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44610.test | 28 - mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test | 26 - mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test | 11 - mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test | 47 - mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test | 10 - mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test | 44 - 21 files changed, 1548 deletions(-) delete mode 100755 mysql-test/suite/ibmdb2i/include/have_i54.inc delete mode 100644 mysql-test/suite/ibmdb2i/include/have_i61.inc delete mode 100644 mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc delete mode 100644 mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44020.result delete mode 100644 mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44025.result delete mode 100755 mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44232.result delete mode 100755 mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44610.result delete mode 100644 mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result delete mode 100644 mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result delete mode 100644 mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result delete mode 100644 mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_49329.result delete mode 100644 mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result delete mode 100644 mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test delete mode 100644 mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test delete mode 100755 mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44232.test delete mode 100755 mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44610.test delete mode 100644 mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test delete mode 100644 mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test delete mode 100644 mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test delete mode 100644 mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test delete mode 100644 mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/ibmdb2i/include/have_i54.inc b/mysql-test/suite/ibmdb2i/include/have_i54.inc deleted file mode 100755 index 7054e196153..00000000000 --- a/mysql-test/suite/ibmdb2i/include/have_i54.inc +++ /dev/null @@ -1,20 +0,0 @@ -# Check for IBM i 6.1 or later ---disable_query_log -system uname -rv > $MYSQLTEST_VARDIR/tmp/version; ---disable_warnings -drop table if exists uname_vr; ---enable_warnings -create temporary table uname_vr (r int, v int); ---disable_warnings -eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/version" into table uname_vr fields terminated by ' '; ---enable_warnings -let $ok = `select count(*) from uname_vr where v = 5 and r = 4`; -drop table uname_vr; -remove_file $MYSQLTEST_VARDIR/tmp/version; ---enable_query_log -if (!$ok) -{ - skip "Need IBM i 5.4 or later"; -} - - diff --git a/mysql-test/suite/ibmdb2i/include/have_i61.inc b/mysql-test/suite/ibmdb2i/include/have_i61.inc deleted file mode 100644 index 84b9a17c1d8..00000000000 --- a/mysql-test/suite/ibmdb2i/include/have_i61.inc +++ /dev/null @@ -1,20 +0,0 @@ -# Check for IBM i 6.1 or later ---disable_query_log -system uname -rv > $MYSQLTEST_VARDIR/tmp/version; ---disable_warnings -drop table if exists uname_vr; ---enable_warnings -create temporary table uname_vr (r int, v int); ---disable_warnings -eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/version" into table uname_vr fields terminated by ' '; ---enable_warnings -let $ok = `select count(*) from uname_vr where v > 5`; -drop table uname_vr; -remove_file $MYSQLTEST_VARDIR/tmp/version; ---enable_query_log -if (!$ok) -{ - skip "Need IBM i 6.1 or later"; -} - - diff --git a/mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc b/mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc deleted file mode 100644 index f3ef0b4f1ac..00000000000 --- a/mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc +++ /dev/null @@ -1,6 +0,0 @@ -if (!`SELECT count(*) FROM information_schema.engines WHERE - (support = 'YES' OR support = 'DEFAULT') AND - engine = 'ibmdb2i'`) -{ - skip Need ibmdb2i engine; -} diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44020.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44020.result deleted file mode 100644 index ddf92db6bca..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44020.result +++ /dev/null @@ -1,11 +0,0 @@ -create schema `A12345_@$#`; -create table `A12345_@$#`.t1 (i int) engine=ibmdb2i; -show create table `A12345_@$#`.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=IBMDB2I DEFAULT CHARSET=latin1 -select * from `A12345_@$#`.t1; -i -drop table `A12345_@$#`.t1; -drop schema `A12345_@$#`; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44025.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44025.result deleted file mode 100644 index 10a3070fcc4..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44025.result +++ /dev/null @@ -1,4 +0,0 @@ -create table t1 (c char(10) collate utf8_swedish_ci, index(c)) engine=ibmdb2i; -drop table t1; -create table t1 (c char(10) collate ucs2_swedish_ci, index(c)) engine=ibmdb2i; -drop table t1; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44232.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44232.result deleted file mode 100755 index 8276b401073..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44232.result +++ /dev/null @@ -1,4 +0,0 @@ -create table t1 (c char(1) character set armscii8) engine=ibmdb2i; -ERROR HY000: Can't create table 'test.t1' (errno: 2504) -create table t1 (c char(1) character set eucjpms ) engine=ibmdb2i; -ERROR HY000: Can't create table 'test.t1' (errno: 2504) diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44610.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44610.result deleted file mode 100755 index 311e800e1b0..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44610.result +++ /dev/null @@ -1,18 +0,0 @@ -create table ABC (i int) engine=ibmdb2i; -drop table ABC; -create table `1234567890ABC` (i int) engine=ibmdb2i; -drop table `1234567890ABC`; -create table `!@#$%` (i int) engine=ibmdb2i; -drop table `!@#$%`; -create table `ABCD#########` (i int) engine=ibmdb2i; -drop table `ABCD#########`; -create table `_` (i int) engine=ibmdb2i; -drop table `_`; -create table `abc##def` (i int) engine=ibmdb2i; -drop table `abc##def`; -set names utf8; -create table İ (s1 int) engine=ibmdb2i; -drop table İ; -create table İİ (s1 int) engine=ibmdb2i; -drop table İİ; -set names latin1; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result deleted file mode 100644 index 916e1d93ee5..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result +++ /dev/null @@ -1,33 +0,0 @@ -drop table if exists t1; -create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i; -insert into t1 values ("ch"),("h"),("i"); -select * from t1 order by c; -c -h -ch -i -drop table t1; -create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i; -insert into t1 values ("ch"),("h"),("i"); -select * from t1 order by c; -c -h -ch -i -drop table t1; -create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i; -insert into t1 values("abc"),("abcd"),("aaaa"); -select c from t1 order by c; -c -abc -abcd -aaaa -drop table t1; -create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i; -insert into t1 values("abc"),("abcd"),("aaaa"); -select c from t1 order by c; -c -abc -abcd -aaaa -drop table t1; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result deleted file mode 100644 index 2392b746877..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result +++ /dev/null @@ -1,7 +0,0 @@ -drop table if exists t1; -create table t1 (c char(10), index(c)) charset macce engine=ibmdb2i; -insert into t1 values ("test"); -select * from t1 order by c; -c -test -drop table t1; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result deleted file mode 100644 index b9f4dcfc656..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result +++ /dev/null @@ -1,20 +0,0 @@ -set ibmdb2i_create_index_option=1; -drop schema if exists test1; -create schema test1; -use test1; -CREATE TABLE t1 (f int primary key, index(f)) engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (f char(10) collate utf8_bin primary key, index(f)) engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, index(f)) engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, i int, index i(i,f)) engine=ibmdb2i; -drop table t1; -create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i; -select * from fd; -SQSSEQ -*HEX -*HEX -*HEX -*HEX -drop table fd; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_49329.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_49329.result deleted file mode 100644 index d5bfc2579fd..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_49329.result +++ /dev/null @@ -1,9 +0,0 @@ -create table ABC (i int) engine=ibmdb2i; -insert into ABC values(1); -create table abc (i int) engine=ibmdb2i; -insert into abc values (2); -select * from ABC; -i -1 -drop table ABC; -drop table abc; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result deleted file mode 100644 index 4f7d71cab2d..00000000000 --- a/mysql-test/suite/ibmdb2i/r/ibmdb2i_collations.result +++ /dev/null @@ -1,1204 +0,0 @@ -drop table if exists t1, ffd, fd; -CREATE TABLE t1 (armscii8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate armscii8_bin engine=ibmdb2i; -CREATE TABLE t1 (armscii8_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate armscii8_general_ci engine=ibmdb2i; -CREATE TABLE t1 (ascii_bin integer, c char(10), v varchar(20), index(c), index(v)) collate ascii_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (ascii_bin char(10) primary key) collate ascii_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ascii_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ascii_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (ascii_general_ci char(10) primary key) collate ascii_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (big5_bin integer, c char(10), v varchar(20), index(c), index(v)) collate big5_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (big5_bin char(10) primary key) collate big5_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (big5_chinese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate big5_chinese_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (big5_chinese_ci char(10) primary key) collate big5_chinese_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1250_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1250_bin char(10) primary key) collate cp1250_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1250_croatian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_croatian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1250_croatian_ci char(10) primary key) collate cp1250_croatian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1250_czech_cs integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_czech_cs engine=ibmdb2i; -CREATE TABLE t1 (cp1250_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1250_general_ci char(10) primary key) collate cp1250_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1250_polish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1250_polish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1250_polish_ci char(10) primary key) collate cp1250_polish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1251_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1251_bin char(10) primary key) collate cp1251_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1251_bulgarian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_bulgarian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1251_bulgarian_ci char(10) primary key) collate cp1251_bulgarian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1251_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1251_general_ci char(10) primary key) collate cp1251_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1251_general_cs integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_general_cs engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1251_general_cs char(10) primary key) collate cp1251_general_cs engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1251_ukrainian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1251_ukrainian_ci engine=ibmdb2i; -CREATE TABLE t1 (cp1256_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp1256_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1256_bin char(10) primary key) collate cp1256_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1256_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1256_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp1256_general_ci char(10) primary key) collate cp1256_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp1257_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp1257_bin engine=ibmdb2i; -CREATE TABLE t1 (cp1257_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1257_general_ci engine=ibmdb2i; -CREATE TABLE t1 (cp1257_lithuanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp1257_lithuanian_ci engine=ibmdb2i; -CREATE TABLE t1 (cp850_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp850_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp850_bin char(10) primary key) collate cp850_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp850_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp850_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp850_general_ci char(10) primary key) collate cp850_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp852_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp852_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp852_bin char(10) primary key) collate cp852_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp852_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp852_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (cp852_general_ci char(10) primary key) collate cp852_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp866_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp866_bin engine=ibmdb2i; -CREATE TABLE t1 (cp866_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp866_general_ci engine=ibmdb2i; -CREATE TABLE t1 (cp932_bin integer, c char(10), v varchar(20), index(c), index(v)) collate cp932_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (cp932_bin char(10) primary key) collate cp932_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (cp932_japanese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate cp932_japanese_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (cp932_japanese_ci char(10) primary key) collate cp932_japanese_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (dec8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate dec8_bin engine=ibmdb2i; -CREATE TABLE t1 (dec8_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate dec8_swedish_ci engine=ibmdb2i; -CREATE TABLE t1 (eucjpms_bin integer, c char(10), v varchar(20), index(c), index(v)) collate eucjpms_bin engine=ibmdb2i; -CREATE TABLE t1 (eucjpms_japanese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate eucjpms_japanese_ci engine=ibmdb2i; -CREATE TABLE t1 (euckr_bin integer, c char(10), v varchar(20), index(c), index(v)) collate euckr_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (euckr_bin char(10) primary key) collate euckr_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (euckr_korean_ci integer, c char(10), v varchar(20), index(c), index(v)) collate euckr_korean_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (euckr_korean_ci char(10) primary key) collate euckr_korean_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (gb2312_bin integer, c char(10), v varchar(20), index(c), index(v)) collate gb2312_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (gb2312_bin char(10) primary key) collate gb2312_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (gb2312_chinese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate gb2312_chinese_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (gb2312_chinese_ci char(10) primary key) collate gb2312_chinese_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (gbk_bin integer, c char(10), v varchar(20), index(c), index(v)) collate gbk_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (gbk_bin char(10) primary key) collate gbk_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (gbk_chinese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate gbk_chinese_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (gbk_chinese_ci char(10) primary key) collate gbk_chinese_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (geostd8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate geostd8_bin engine=ibmdb2i; -CREATE TABLE t1 (geostd8_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate geostd8_general_ci engine=ibmdb2i; -CREATE TABLE t1 (greek_bin integer, c char(10), v varchar(20), index(c), index(v)) collate greek_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (greek_bin char(10) primary key) collate greek_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (greek_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate greek_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (greek_general_ci char(10) primary key) collate greek_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (hebrew_bin integer, c char(10), v varchar(20), index(c), index(v)) collate hebrew_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (hebrew_bin char(10) primary key) collate hebrew_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (hebrew_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate hebrew_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (hebrew_general_ci char(10) primary key) collate hebrew_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (hp8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate hp8_bin engine=ibmdb2i; -CREATE TABLE t1 (hp8_english_ci integer, c char(10), v varchar(20), index(c), index(v)) collate hp8_english_ci engine=ibmdb2i; -CREATE TABLE t1 (keybcs2_bin integer, c char(10), v varchar(20), index(c), index(v)) collate keybcs2_bin engine=ibmdb2i; -CREATE TABLE t1 (keybcs2_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate keybcs2_general_ci engine=ibmdb2i; -CREATE TABLE t1 (koi8r_bin integer, c char(10), v varchar(20), index(c), index(v)) collate koi8r_bin engine=ibmdb2i; -CREATE TABLE t1 (koi8r_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate koi8r_general_ci engine=ibmdb2i; -CREATE TABLE t1 (koi8u_bin integer, c char(10), v varchar(20), index(c), index(v)) collate koi8u_bin engine=ibmdb2i; -CREATE TABLE t1 (koi8u_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate koi8u_general_ci engine=ibmdb2i; -CREATE TABLE t1 (latin1_bin integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin1_bin char(10) primary key) collate latin1_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin1_danish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_danish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin1_danish_ci char(10) primary key) collate latin1_danish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin1_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin1_general_ci char(10) primary key) collate latin1_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin1_general_cs integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_general_cs engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin1_general_cs char(10) primary key) collate latin1_general_cs engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin1_german1_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_german1_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin1_german1_ci char(10) primary key) collate latin1_german1_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin1_german2_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_german2_ci engine=ibmdb2i; -CREATE TABLE t1 (latin1_spanish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_spanish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin1_spanish_ci char(10) primary key) collate latin1_spanish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin1_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin1_swedish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin1_swedish_ci char(10) primary key) collate latin1_swedish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin2_bin integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin2_bin char(10) primary key) collate latin2_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin2_croatian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_croatian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin2_croatian_ci char(10) primary key) collate latin2_croatian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin2_czech_cs integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_czech_cs engine=ibmdb2i; -CREATE TABLE t1 (latin2_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin2_general_ci char(10) primary key) collate latin2_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin2_hungarian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin2_hungarian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin2_hungarian_ci char(10) primary key) collate latin2_hungarian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin5_bin integer, c char(10), v varchar(20), index(c), index(v)) collate latin5_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin5_bin char(10) primary key) collate latin5_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin5_turkish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin5_turkish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (latin5_turkish_ci char(10) primary key) collate latin5_turkish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (latin7_bin integer, c char(10), v varchar(20), index(c), index(v)) collate latin7_bin engine=ibmdb2i; -CREATE TABLE t1 (latin7_estonian_cs integer, c char(10), v varchar(20), index(c), index(v)) collate latin7_estonian_cs engine=ibmdb2i; -CREATE TABLE t1 (latin7_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate latin7_general_ci engine=ibmdb2i; -CREATE TABLE t1 (latin7_general_cs integer, c char(10), v varchar(20), index(c), index(v)) collate latin7_general_cs engine=ibmdb2i; -CREATE TABLE t1 (macce_bin integer, c char(10), v varchar(20), index(c), index(v)) collate macce_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (macce_bin char(10) primary key) collate macce_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (macce_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate macce_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (macce_general_ci char(10) primary key) collate macce_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (macroman_bin integer, c char(10), v varchar(20), index(c), index(v)) collate macroman_bin engine=ibmdb2i; -CREATE TABLE t1 (macroman_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate macroman_general_ci engine=ibmdb2i; -CREATE TABLE t1 (sjis_bin integer, c char(10), v varchar(20), index(c), index(v)) collate sjis_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (sjis_bin char(10) primary key) collate sjis_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (sjis_japanese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate sjis_japanese_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (sjis_japanese_ci char(10) primary key) collate sjis_japanese_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (swe7_bin integer, c char(10), v varchar(20), index(c), index(v)) collate swe7_bin engine=ibmdb2i; -CREATE TABLE t1 (swe7_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate swe7_swedish_ci engine=ibmdb2i; -CREATE TABLE t1 (tis620_bin integer, c char(10), v varchar(20), index(c), index(v)) collate tis620_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (tis620_bin char(10) primary key) collate tis620_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (tis620_thai_ci integer, c char(10), v varchar(20), index(c), index(v)) collate tis620_thai_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 11 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 23 NULL 6 Using where -drop table t1; -create table t1 (tis620_thai_ci char(10) primary key) collate tis620_thai_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_bin integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_bin char(10) primary key) collate ucs2_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_czech_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_czech_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_czech_ci char(10) primary key) collate ucs2_czech_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_danish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_danish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_danish_ci char(10) primary key) collate ucs2_danish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_esperanto_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_esperanto_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_esperanto_ci char(10) primary key) collate ucs2_esperanto_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_estonian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_estonian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_estonian_ci char(10) primary key) collate ucs2_estonian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_general_ci char(10) primary key) collate ucs2_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_hungarian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_hungarian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_hungarian_ci char(10) primary key) collate ucs2_hungarian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_icelandic_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_icelandic_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_icelandic_ci char(10) primary key) collate ucs2_icelandic_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_latvian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_latvian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_latvian_ci char(10) primary key) collate ucs2_latvian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_lithuanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_lithuanian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_lithuanian_ci char(10) primary key) collate ucs2_lithuanian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_persian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_persian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_persian_ci char(10) primary key) collate ucs2_persian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_polish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_polish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_polish_ci char(10) primary key) collate ucs2_polish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_romanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_romanian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_romanian_ci char(10) primary key) collate ucs2_romanian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_roman_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_roman_ci engine=ibmdb2i; -CREATE TABLE t1 (ucs2_slovak_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_slovak_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_slovak_ci char(10) primary key) collate ucs2_slovak_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_slovenian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_slovenian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_slovenian_ci char(10) primary key) collate ucs2_slovenian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_spanish2_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_spanish2_ci engine=ibmdb2i; -CREATE TABLE t1 (ucs2_spanish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_spanish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_spanish_ci char(10) primary key) collate ucs2_spanish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_swedish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_swedish_ci char(10) primary key) collate ucs2_swedish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_turkish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_turkish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_turkish_ci char(10) primary key) collate ucs2_turkish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ucs2_unicode_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ucs2_unicode_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 21 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 43 NULL 6 Using where -drop table t1; -create table t1 (ucs2_unicode_ci char(10) primary key) collate ucs2_unicode_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ujis_bin integer, c char(10), v varchar(20), index(c), index(v)) collate ujis_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (ujis_bin char(10) primary key) collate ujis_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (ujis_japanese_ci integer, c char(10), v varchar(20), index(c), index(v)) collate ujis_japanese_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (ujis_japanese_ci char(10) primary key) collate ujis_japanese_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_bin integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_bin engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_bin char(10) primary key) collate utf8_bin engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_czech_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_czech_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_czech_ci char(10) primary key) collate utf8_czech_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_danish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_danish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_danish_ci char(10) primary key) collate utf8_danish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_esperanto_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_esperanto_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_esperanto_ci char(10) primary key) collate utf8_esperanto_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_estonian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_estonian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_estonian_ci char(10) primary key) collate utf8_estonian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_general_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_general_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_general_ci char(10) primary key) collate utf8_general_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_hungarian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_hungarian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_hungarian_ci char(10) primary key) collate utf8_hungarian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_icelandic_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_icelandic_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_icelandic_ci char(10) primary key) collate utf8_icelandic_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_latvian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_latvian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_latvian_ci char(10) primary key) collate utf8_latvian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_lithuanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_lithuanian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_lithuanian_ci char(10) primary key) collate utf8_lithuanian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_persian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_persian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_persian_ci char(10) primary key) collate utf8_persian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_polish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_polish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_polish_ci char(10) primary key) collate utf8_polish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_romanian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_romanian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_romanian_ci char(10) primary key) collate utf8_romanian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_roman_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_roman_ci engine=ibmdb2i; -CREATE TABLE t1 (utf8_slovak_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_slovak_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_slovak_ci char(10) primary key) collate utf8_slovak_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_slovenian_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_slovenian_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_slovenian_ci char(10) primary key) collate utf8_slovenian_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_spanish2_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_spanish2_ci engine=ibmdb2i; -CREATE TABLE t1 (utf8_spanish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_spanish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_spanish_ci char(10) primary key) collate utf8_spanish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_swedish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_swedish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_swedish_ci char(10) primary key) collate utf8_swedish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_turkish_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_turkish_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_turkish_ci char(10) primary key) collate utf8_turkish_ci engine=ibmdb2i; -drop table t1; -CREATE TABLE t1 (utf8_unicode_ci integer, c char(10), v varchar(20), index(c), index(v)) collate utf8_unicode_ci engine=ibmdb2i; -insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); -insert into t1 select * from t1; -explain select c,v from t1 force index(c) where c like "ab%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 31 NULL 6 Using where -explain select c,v from t1 force index(v) where v like "de%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 63 NULL 6 Using where -drop table t1; -create table t1 (utf8_unicode_ci char(10) primary key) collate utf8_unicode_ci engine=ibmdb2i; -drop table t1; -create table ffd (WHCHD1 CHAR(20), WHCSID decimal(5,0)) engine=ibmdb2i; -create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i; -create temporary table intermed (row integer key auto_increment, cs char(30), ccsid integer); -insert into intermed (cs, ccsid) select * from ffd; -create temporary table intermed2 (row integer key auto_increment, srtseq char(10)); -insert into intermed2 (srtseq) select * from fd; -select ccsid, cs, srtseq from intermed inner join intermed2 on intermed.row = intermed2.row; -ccsid cs srtseq -500 "ascii_bin" QBLA101F4U -500 "ascii_general_ci" QALA101F4S -1200 "big5_bin" QBCHT04B0U -1200 "big5_chinese_ci" QACHT04B0S -1153 "cp1250_bin" QELA20481U -1153 "cp1250_croatian_ci" QALA20481S -1153 "cp1250_general_ci" QCLA20481S -1153 "cp1250_polish_ci" QDLA20481S -1025 "cp1251_bin" QCCYR0401U -1025 "cp1251_bulgarian_ci QACYR0401S -1025 "cp1251_general_ci" QBCYR0401S -1025 "cp1251_general_cs" QBCYR0401U -420 "cp1256_bin" QBARA01A4U -420 "cp1256_general_ci" QAARA01A4S -500 "cp850_bin" QDLA101F4U -500 "cp850_general_ci" QCLA101F4S -870 "cp852_bin" QBLA20366U -870 "cp852_general_ci" QALA20366S -1200 "cp932_bin" QBJPN04B0U -1200 "cp932_japanese_ci" QAJPN04B0S -1200 "euckr_bin" QBKOR04B0U -1200 "euckr_korean_ci" QAKOR04B0S -1200 "gb2312_bin" QBCHS04B0U -1200 "gb2312_chinese_ci" QACHS04B0S -1200 "gbk_bin" QDCHS04B0U -1200 "gbk_chinese_ci" QCCHS04B0S -875 "greek_bin" QBELL036BU -875 "greek_general_ci" QAELL036BS -424 "hebrew_bin" QBHEB01A8U -424 "hebrew_general_ci" QAHEB01A8S -1148 "latin1_bin" QFLA1047CU -1148 "latin1_danish_ci" QALA1047CS -1148 "latin1_general_ci" QBLA1047CS -1148 "latin1_general_cs" QBLA1047CU -1148 "latin1_german1_ci" QCLA1047CS -1148 "latin1_spanish_ci" QDLA1047CS -1148 "latin1_swedish_ci" QELA1047CS -870 "latin2_bin" QGLA20366U -870 "latin2_croatian_ci" QCLA20366S -870 "latin2_general_ci" QELA20366S -870 "latin2_hungarian_ci QFLA20366S -1026 "latin5_bin" QBTRK0402U -1026 "latin5_turkish_ci" QATRK0402S -870 "macce_bin" QILA20366U -870 "macce_general_ci" QHLA20366S -1200 "sjis_bin" QDJPN04B0U -1200 "sjis_japanese_ci" QCJPN04B0S -838 "tis620_bin" QBTHA0346U -838 "tis620_thai_ci" QATHA0346S -13488 "ucs2_bin" *HEX -13488 "ucs2_czech_ci" I34ACS_CZ -13488 "ucs2_danish_ci" I34ADA_DK -13488 "ucs2_esperanto_ci" I34AEO -13488 "ucs2_estonian_ci" I34AET -13488 "ucs2_general_ci" QAUCS04B0S -13488 "ucs2_hungarian_ci" I34AHU -13488 "ucs2_icelandic_ci" I34AIS -13488 "ucs2_latvian_ci" I34ALV -13488 "ucs2_lithuanian_ci" I34ALT -13488 "ucs2_persian_ci" I34AFA -13488 "ucs2_polish_ci" I34APL -13488 "ucs2_romanian_ci" I34ARO -13488 "ucs2_slovak_ci" I34ASK -13488 "ucs2_slovenian_ci" I34ASL -13488 "ucs2_spanish_ci" I34AES -13488 "ucs2_swedish_ci" I34ASW -13488 "ucs2_turkish_ci" I34ATR -13488 "ucs2_unicode_ci" I34AEN -1200 "ujis_bin" QFJPN04B0U -1200 "ujis_japanese_ci" QEJPN04B0S -1208 "utf8_bin" *HEX -1208 "utf8_czech_ci" I34ACS_CZ -1208 "utf8_danish_ci" I34ADA_DK -1208 "utf8_esperanto_ci" I34AEO -1208 "utf8_estonian_ci" I34AET -1200 "utf8_general_ci" QAUCS04B0S -1208 "utf8_hungarian_ci" I34AHU -1208 "utf8_icelandic_ci" I34AIS -1208 "utf8_latvian_ci" I34ALV -1208 "utf8_lithuanian_ci" I34ALT -1208 "utf8_persian_ci" I34AFA -1208 "utf8_polish_ci" I34APL -1208 "utf8_romanian_ci" I34ARO -1208 "utf8_slovak_ci" I34ASK -1208 "utf8_slovenian_ci" I34ASL -1208 "utf8_spanish_ci" I34AES -1208 "utf8_swedish_ci" I34ASW -1208 "utf8_turkish_ci" I34ATR -1208 "utf8_unicode_ci" I34AEN -drop table ffd, fd; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test deleted file mode 100644 index 09a7c75cfc0..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test +++ /dev/null @@ -1,9 +0,0 @@ -source suite/ibmdb2i/include/have_ibmdb2i.inc; -source include/have_case_sensitive_file_system.inc; - -create schema `A12345_@$#`; -create table `A12345_@$#`.t1 (i int) engine=ibmdb2i; -show create table `A12345_@$#`.t1; -select * from `A12345_@$#`.t1; -drop table `A12345_@$#`.t1; -drop schema `A12345_@$#`; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test deleted file mode 100644 index 9b033a2298f..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test +++ /dev/null @@ -1,9 +0,0 @@ -source suite/ibmdb2i/include/have_ibmdb2i.inc; -source suite/ibmdb2i/include/have_i61.inc; - - -create table t1 (c char(10) collate utf8_swedish_ci, index(c)) engine=ibmdb2i; -drop table t1; - -create table t1 (c char(10) collate ucs2_swedish_ci, index(c)) engine=ibmdb2i; -drop table t1; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44232.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44232.test deleted file mode 100755 index ea29b5abcd4..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44232.test +++ /dev/null @@ -1,8 +0,0 @@ ---source suite/ibmdb2i/include/have_ibmdb2i.inc ---source suite/ibmdb2i/include/have_i54.inc - ---error 1005 -create table t1 (c char(1) character set armscii8) engine=ibmdb2i; - ---error 1005 -create table t1 (c char(1) character set eucjpms ) engine=ibmdb2i; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44610.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44610.test deleted file mode 100755 index da69b5d9148..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44610.test +++ /dev/null @@ -1,28 +0,0 @@ -source suite/ibmdb2i/include/have_ibmdb2i.inc; - -# Test RCDFMT generation for a variety of kinds of table names -create table ABC (i int) engine=ibmdb2i; -drop table ABC; - -create table `1234567890ABC` (i int) engine=ibmdb2i; -drop table `1234567890ABC`; - -create table `!@#$%` (i int) engine=ibmdb2i; -drop table `!@#$%`; - -create table `ABCD#########` (i int) engine=ibmdb2i; -drop table `ABCD#########`; - -create table `_` (i int) engine=ibmdb2i; -drop table `_`; - -create table `abc##def` (i int) engine=ibmdb2i; -drop table `abc##def`; - -set names utf8; -create table İ (s1 int) engine=ibmdb2i; -drop table İ; - -create table İİ (s1 int) engine=ibmdb2i; -drop table İİ; -set names latin1; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test deleted file mode 100644 index 17b1d658975..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test +++ /dev/null @@ -1,26 +0,0 @@ -source suite/ibmdb2i/include/have_ibmdb2i.inc; -source suite/ibmdb2i/include/have_i61.inc; - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i; -insert into t1 values ("ch"),("h"),("i"); -select * from t1 order by c; -drop table t1; - -create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i; -insert into t1 values ("ch"),("h"),("i"); -select * from t1 order by c; -drop table t1; - -create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i; -insert into t1 values("abc"),("abcd"),("aaaa"); -select c from t1 order by c; -drop table t1; - -create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i; -insert into t1 values("abc"),("abcd"),("aaaa"); -select c from t1 order by c; -drop table t1; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test deleted file mode 100644 index 93fb78ff421..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test +++ /dev/null @@ -1,11 +0,0 @@ -source suite/ibmdb2i/include/have_ibmdb2i.inc; -source suite/ibmdb2i/include/have_i61.inc; - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 (c char(10), index(c)) charset macce engine=ibmdb2i; -insert into t1 values ("test"); -select * from t1 order by c; -drop table t1; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test deleted file mode 100644 index 695d8e90ada..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test +++ /dev/null @@ -1,47 +0,0 @@ -source suite/ibmdb2i/include/have_ibmdb2i.inc; - -# Confirm that ibmdb2i_create_index_option causes additional *HEX sorted indexes to be created for all non-binary keys. - -set ibmdb2i_create_index_option=1; ---disable_warnings -drop schema if exists test1; -create schema test1; -use test1; ---enable_warnings - ---disable_abort_on_error ---error 0,255 -exec system "DLTF QGPL/FDOUT" > /dev/null; ---enable_abort_on_error - -#No additional index because no string fields in key -CREATE TABLE t1 (f int primary key, index(f)) engine=ibmdb2i; ---error 255 -exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; ---error 255 -exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; -drop table t1; - -#No additional index because binary sorting -CREATE TABLE t1 (f char(10) collate utf8_bin primary key, index(f)) engine=ibmdb2i; ---error 255 -exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; ---error 255 -exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; -drop table t1; - -CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, index(f)) engine=ibmdb2i; -exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; -exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; -drop table t1; - -CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, i int, index i(i,f)) engine=ibmdb2i; -exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; -exec system "DSPFD FILE(\"test1\"/\"i___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; -drop table t1; - - -create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i; -system system "CPYF FROMFILE(QGPL/FDOUT) TOFILE(\"test1\"/\"fd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null; -select * from fd; -drop table fd; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test deleted file mode 100644 index 615df284d8f..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_49329.test +++ /dev/null @@ -1,10 +0,0 @@ -source suite/ibmdb2i/include/have_ibmdb2i.inc; -source include/have_case_sensitive_file_system.inc; - -create table ABC (i int) engine=ibmdb2i; -insert into ABC values(1); -create table abc (i int) engine=ibmdb2i; -insert into abc values (2); -select * from ABC; -drop table ABC; -drop table abc; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test deleted file mode 100644 index 899f330d360..00000000000 --- a/mysql-test/suite/ibmdb2i/t/ibmdb2i_collations.test +++ /dev/null @@ -1,44 +0,0 @@ -source suite/ibmdb2i/include/have_ibmdb2i.inc; -source suite/ibmdb2i/include/have_i61.inc; ---disable_warnings -drop table if exists t1, ffd, fd; ---enable_warnings - ---disable_abort_on_error ---error 0,255 -exec system "DLTF QGPL/FFDOUT" > /dev/null; ---error 0,255 -exec system "DLTF QGPL/FDOUT" > /dev/null; ---enable_abort_on_error -let $count= query_get_value(select count(*) from information_schema.COLLATIONS where COLLATION_NAME <> "binary", count(*),1); - -while ($count) -{ - let $collation = query_get_value(select COLLATION_NAME from information_schema.COLLATIONS where COLLATION_NAME <> "binary" order by COLLATION_NAME desc, COLLATION_NAME, $count); - error 0,1005,2504,2028; - eval CREATE TABLE t1 ($collation integer, c char(10), v varchar(20), index(c), index(v)) collate $collation engine=ibmdb2i; - if (!$mysql_errno) - { - insert into t1 (c,v) values ("abc","def"),("abcd", "def"),("abcde","defg"),("aaaa","bbbb"); - insert into t1 select * from t1; - explain select c,v from t1 force index(c) where c like "ab%"; - explain select c,v from t1 force index(v) where v like "de%"; - drop table t1; - eval create table t1 ($collation char(10) primary key) collate $collation engine=ibmdb2i; - system system "DSPFFD FILE(\"test\"/\"t1\") OUTPUT(*OUTFILE) OUTFILE(QGPL/FFDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; - system system "DSPFD FILE(\"test\"/\"t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null; - drop table t1; - } - dec $count; -} - -create table ffd (WHCHD1 CHAR(20), WHCSID decimal(5,0)) engine=ibmdb2i; -system system "CPYF FROMFILE(QGPL/FFDOUT) TOFILE(\"test\"/\"ffd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null; -create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i; -system system "CPYF FROMFILE(QGPL/FDOUT) TOFILE(\"test\"/\"fd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null; -create temporary table intermed (row integer key auto_increment, cs char(30), ccsid integer); -insert into intermed (cs, ccsid) select * from ffd; -create temporary table intermed2 (row integer key auto_increment, srtseq char(10)); -insert into intermed2 (srtseq) select * from fd; -select ccsid, cs, srtseq from intermed inner join intermed2 on intermed.row = intermed2.row; -drop table ffd, fd; -- cgit v1.2.1 From e0a8c25438dac90ec697f5edaa712d9681acf96b Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Thu, 11 Nov 2010 11:34:55 +0100 Subject: Bug#57890: Assertion failed: next_insert_id == 0 with on duplicate key update There was a missed corner case in the partitioning handler, which caused the next_insert_id to be changed in the second level handlers (i.e the hander of a partition), which caused this debug assertion. The solution was to always ensure that only the partitioning level generates auto_increment values, since if it was done within a partition, it may fail to match the partition function. mysql-test/suite/parts/inc/partition_auto_increment.inc: Added tests mysql-test/suite/parts/r/partition_auto_increment_blackhole.result: updated results mysql-test/suite/parts/r/partition_auto_increment_innodb.result: updated results mysql-test/suite/parts/r/partition_auto_increment_memory.result: updated results mysql-test/suite/parts/r/partition_auto_increment_myisam.result: updated results sql/ha_partition.cc: In ::write_row the auto_inc value is generated through handler::update_auto_increment (which calls ::get_auto_increment() if needed). If: * INSERT_ID was set to 0 * it was updated to 0 by 'INSERT ... ON DUPLICATE KEY UPDATE' and changed partitions for the row Then it would try to generate a auto_increment value in the ::write_row, which will trigger the assert. So the solution is to prevent this by, in ha_partition::write_row set auto_inc_field_not_null and add MODE_NO_AUTO_VALUE_ON_ZERO in ha_partition::update_row (when changing partition) temporary set table->next_number_field to NULL which calling the partitions ::write_row(). --- .../suite/parts/inc/partition_auto_increment.inc | 49 +++++++++++++++ .../r/partition_auto_increment_blackhole.result | 32 ++++++++++ .../parts/r/partition_auto_increment_innodb.result | 72 ++++++++++++++++++++++ .../parts/r/partition_auto_increment_memory.result | 72 ++++++++++++++++++++++ .../parts/r/partition_auto_increment_myisam.result | 72 ++++++++++++++++++++++ 5 files changed, 297 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc index 102e57d3d04..034460d49ac 100644 --- a/mysql-test/suite/parts/inc/partition_auto_increment.inc +++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc @@ -105,6 +105,30 @@ OPTIMIZE TABLE t1; SHOW CREATE TABLE t1; DROP TABLE t1; +if (!$skip_update) +{ +eval CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, + UNIQUE KEY (a)) +ENGINE=$engine; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +SELECT * FROM t1; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +SELECT * FROM t1; +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +SELECT * FROM t1; +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +SELECT * FROM t1; +DROP TABLE t1; +SET INSERT_ID = 1; +} + -- echo # Simple test with NULL eval CREATE TABLE t1 ( c1 INT NOT NULL AUTO_INCREMENT, @@ -831,5 +855,30 @@ SELECT * FROM t ORDER BY c1 ASC; DROP TABLE t; +if (!$skip_update) +{ +eval CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, + UNIQUE KEY (a)) +ENGINE=$engine +PARTITION BY KEY(a) PARTITIONS 2; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +SELECT * FROM t1; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +SELECT * FROM t1; +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +SELECT * FROM t1; +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +SELECT * FROM t1; +DROP TABLE t1; +} + + --echo ############################################################################## } diff --git a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result index d6ea8ba0fe4..2344f03ce3f 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result @@ -120,6 +120,38 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 DROP TABLE t1; +CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, +UNIQUE KEY (a)) +ENGINE='Blackhole'; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +DROP TABLE t1; +SET INSERT_ID = 1; # Simple test with NULL CREATE TABLE t1 ( c1 INT NOT NULL AUTO_INCREMENT, diff --git a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result index 4cd7aa57417..5fd576322d5 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result @@ -136,6 +136,42 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 DROP TABLE t1; +CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, +UNIQUE KEY (a)) +ENGINE='InnoDB'; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +1 +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +DROP TABLE t1; +SET INSERT_ID = 1; # Simple test with NULL CREATE TABLE t1 ( c1 INT NOT NULL AUTO_INCREMENT, @@ -1023,4 +1059,40 @@ c1 c2 2 20 127 40 DROP TABLE t; +CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, +UNIQUE KEY (a)) +ENGINE='InnoDB' +PARTITION BY KEY(a) PARTITIONS 2; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +1 +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +DROP TABLE t1; ############################################################################## diff --git a/mysql-test/suite/parts/r/partition_auto_increment_memory.result b/mysql-test/suite/parts/r/partition_auto_increment_memory.result index 1a27d1c2e52..c3a5073b029 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result @@ -136,6 +136,42 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=MEMORY AUTO_INCREMENT=102 DEFAULT CHARSET=latin1 DROP TABLE t1; +CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, +UNIQUE KEY (a)) +ENGINE='Memory'; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +1 +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +DROP TABLE t1; +SET INSERT_ID = 1; # Simple test with NULL CREATE TABLE t1 ( c1 INT NOT NULL AUTO_INCREMENT, @@ -1051,4 +1087,40 @@ c1 c2 2 20 127 40 DROP TABLE t; +CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, +UNIQUE KEY (a)) +ENGINE='Memory' +PARTITION BY KEY(a) PARTITIONS 2; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +1 +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +DROP TABLE t1; ############################################################################## diff --git a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result index 9885c78a921..ad440155d33 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result @@ -136,6 +136,42 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=MyISAM AUTO_INCREMENT=102 DEFAULT CHARSET=latin1 DROP TABLE t1; +CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, +UNIQUE KEY (a)) +ENGINE='MyISAM'; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +1 +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +DROP TABLE t1; +SET INSERT_ID = 1; # Simple test with NULL CREATE TABLE t1 ( c1 INT NOT NULL AUTO_INCREMENT, @@ -1070,4 +1106,40 @@ c1 c2 2 20 127 40 DROP TABLE t; +CREATE TABLE t1 +(a INT NULL AUTO_INCREMENT, +UNIQUE KEY (a)) +ENGINE='MyISAM' +PARTITION BY KEY(a) PARTITIONS 2; +SET LAST_INSERT_ID = 999; +SET INSERT_ID = 0; +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +1 +INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = 1 WHERE a IS NULL; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +UPDATE t1 SET a = NULL WHERE a = 1; +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +999 +SELECT * FROM t1; +a +0 +DROP TABLE t1; ############################################################################## -- cgit v1.2.1 From 47b514ffce0c5b1bdda27f745d1129496dff037f Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Mon, 15 Nov 2010 16:17:38 +0100 Subject: Bug#58197: main.variables-big fails on windows The test result differs on windows, since it writes out 'localhost:' instead of only 'localhost', since it uses tcp/ip instead of unix sockets on windows. Fixed by replacing that column. Also requires --big-test from some long running tests and added a weekly run of all test requiring --big-test. mysql-test/collections/default.weekly: Added a run of big-test (already exists in 5.5). mysql-test/r/variables-big.result: Updated results mysql-test/suite/parts/t/part_supported_sql_func_innodb.test: requiring --big-test since the test takes long time mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test: requiring --big-test since the test takes long time mysql-test/suite/parts/t/partition_alter1_2_innodb.test: requiring --big-test since the test takes long time mysql-test/suite/parts/t/partition_alter4_innodb.test: requiring --big-test since the test takes long time mysql-test/t/disabled.def: Disabled two tests since they fail and was already reported as bugs (but was never run since they requires --big-test flag). mysql-test/t/variables-big.test: Replacing column 3 in process list since it is not the same on windows as in unix. --- mysql-test/suite/parts/t/part_supported_sql_func_innodb.test | 3 +++ mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test | 3 +++ mysql-test/suite/parts/t/partition_alter1_2_innodb.test | 3 +++ mysql-test/suite/parts/t/partition_alter4_innodb.test | 3 +++ 4 files changed, 12 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test b/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test index e8d263e369c..002da3c8f37 100644 --- a/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test +++ b/mysql-test/suite/parts/t/part_supported_sql_func_innodb.test @@ -28,6 +28,9 @@ let $do_long_tests= 1; # The server must support partitioning. --source include/have_partition.inc +# This test takes long time, so only run it with the --big mtr-flag. +--source include/big_test.inc + #------------------------------------------------------------------------------# # Engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test b/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test index 8e3dde286cf..6ac1803a972 100644 --- a/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test +++ b/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test @@ -46,6 +46,9 @@ let $more_pk_ui_tests= 0; # The server must support partitioning. --source include/have_partition.inc +# This test takes long time, so only run it with the --big mtr-flag. +--source include/big_test.inc + #------------------------------------------------------------------------------# # Engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_alter1_2_innodb.test b/mysql-test/suite/parts/t/partition_alter1_2_innodb.test index 76fe7eb0223..2cbe0ab77ab 100644 --- a/mysql-test/suite/parts/t/partition_alter1_2_innodb.test +++ b/mysql-test/suite/parts/t/partition_alter1_2_innodb.test @@ -46,6 +46,9 @@ let $more_pk_ui_tests= 0; # The server must support partitioning. --source include/have_partition.inc +# This test takes long time, so only run it with the --big mtr-flag. +--source include/big_test.inc + #------------------------------------------------------------------------------# # Engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_alter4_innodb.test b/mysql-test/suite/parts/t/partition_alter4_innodb.test index 3061e5c9e7f..1e28a2fc812 100644 --- a/mysql-test/suite/parts/t/partition_alter4_innodb.test +++ b/mysql-test/suite/parts/t/partition_alter4_innodb.test @@ -43,6 +43,9 @@ let $more_pk_ui_tests= 0; # The server must support partitioning. --source include/have_partition.inc +# This test takes long time, so only run it with the --big mtr-flag. +--source include/big_test.inc + #------------------------------------------------------------------------------# # Engine specific settings and requirements -- cgit v1.2.1 From cf0cc723aaa08bf6929c3b0bb0ccd3fdca626af0 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Tue, 23 Nov 2010 13:18:47 +0300 Subject: Bug#56862 Execution of a query that uses index merge returns a wrong result In case of low memory sort buffer QUICK_INDEX_MERGE_SELECT creates temporary file where is stores row ids which meet QUICK_SELECT ranges except of clustered pk range, clustered range is processed separately. In init_read_record we check if temporary file is used and choose appropriate record access method. It does not take into account that temporary file contains partial result in case of QUICK_INDEX_MERGE_SELECT with clustered pk range. The fix is always to use rr_quick if QUICK_INDEX_MERGE_SELECT with clustered pk range is used. mysql-test/suite/innodb/r/innodb_mysql.result: test case mysql-test/suite/innodb/t/innodb_mysql.test: test case mysql-test/suite/innodb_plugin/r/innodb_mysql.result: test case mysql-test/suite/innodb_plugin/t/innodb_mysql.test: test case sql/opt_range.h: added new method sql/records.cc: The fix is always to use rr_quick if QUICK_INDEX_MERGE_SELECT with clustered pk range is used. --- mysql-test/suite/innodb/r/innodb_mysql.result | 40 ++++++++++++++++++++ mysql-test/suite/innodb/t/innodb_mysql.test | 42 +++++++++++++++++++++ .../suite/innodb_plugin/r/innodb_mysql.result | 38 +++++++++++++++++++ mysql-test/suite/innodb_plugin/t/innodb_mysql.test | 43 ++++++++++++++++++++++ 4 files changed, 163 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 6ac3e8e6302..fa26b8b1d01 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -2599,6 +2599,46 @@ rows 3 Extra Using index DROP TABLE t1; # +# Bug#56862 Execution of a query that uses index merge returns a wrong result +# +CREATE TABLE t1 ( +pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, +a int, +b int, +INDEX idx(a)) +ENGINE=INNODB; +INSERT INTO t1(a,b) VALUES +(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), +(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), +(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), +(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); +SET SESSION sort_buffer_size = 1024*36; +EXPLAIN +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 3537 Using sort_union(idx,PRIMARY); Using where +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +COUNT(*) +1537 +SET SESSION sort_buffer_size = DEFAULT; +DROP TABLE t1; End of 5.1 tests # # Test for bug #39932 "create table fails if column for FK is in different diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index e99c3c27673..cb6082be0d0 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -824,6 +824,48 @@ CREATE INDEX b ON t1(a,b,c,d); DROP TABLE t1; --echo # +--echo # Bug#56862 Execution of a query that uses index merge returns a wrong result +--echo # + +CREATE TABLE t1 ( + pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, + a int, + b int, + INDEX idx(a)) +ENGINE=INNODB; + +INSERT INTO t1(a,b) VALUES + (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), + (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), + (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), + (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); + +SET SESSION sort_buffer_size = 1024*36; + +EXPLAIN +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SET SESSION sort_buffer_size = DEFAULT; + +DROP TABLE t1; --echo End of 5.1 tests diff --git a/mysql-test/suite/innodb_plugin/r/innodb_mysql.result b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result index 54a8854ecaf..448bf54ce51 100644 --- a/mysql-test/suite/innodb_plugin/r/innodb_mysql.result +++ b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result @@ -2400,4 +2400,42 @@ PACK_KEYS=0; CREATE INDEX a ON t1 (a); CREATE INDEX c on t1 (c); DROP TABLE t1; +CREATE TABLE t1 ( +pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, +a int, +b int, +INDEX idx(a)) +ENGINE=INNODB; +INSERT INTO t1(a,b) VALUES +(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), +(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), +(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), +(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); +SET SESSION sort_buffer_size = 1024*36; +EXPLAIN +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 3537 Using sort_union(idx,PRIMARY); Using where +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +COUNT(*) +1537 +SET SESSION sort_buffer_size = DEFAULT; +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/suite/innodb_plugin/t/innodb_mysql.test b/mysql-test/suite/innodb_plugin/t/innodb_mysql.test index 3d078062d43..08d77ba448a 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb_mysql.test +++ b/mysql-test/suite/innodb_plugin/t/innodb_mysql.test @@ -645,5 +645,48 @@ CREATE INDEX c on t1 (c); DROP TABLE t1; +# +# Bug#56862 Execution of a query that uses index merge returns a wrong result +# + +CREATE TABLE t1 ( + pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, + a int, + b int, + INDEX idx(a)) +ENGINE=INNODB; + +INSERT INTO t1(a,b) VALUES + (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), + (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), + (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), + (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); + +SET SESSION sort_buffer_size = 1024*36; + +EXPLAIN +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SET SESSION sort_buffer_size = DEFAULT; + +DROP TABLE t1; --echo End of 5.1 tests -- cgit v1.2.1 From 698c9c3a380c8f73286c5c6e3853417c56aa7f3a Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Tue, 23 Nov 2010 16:35:40 +0300 Subject: binlog.binlog_row_failure_mixing_engines test disabled. See bug #58416. --- mysql-test/suite/binlog/t/disabled.def | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/t/disabled.def b/mysql-test/suite/binlog/t/disabled.def index d261364756e..85313982869 100644 --- a/mysql-test/suite/binlog/t/disabled.def +++ b/mysql-test/suite/binlog/t/disabled.def @@ -10,5 +10,4 @@ # ############################################################################## binlog_truncate_innodb : BUG#57291 2010-10-20 anitha Originally disabled due to BUG#42643. Product bug fixed, but test changes needed - - +binlog_row_failure_mixing_engines : BUG#58416 2010-11-23 ramil Fails on win x86 debug_max -- cgit v1.2.1 From 61c2b12da7eaaa0f586025fb4613195ca03d4bb1 Mon Sep 17 00:00:00 2001 From: Sunny Bains Date: Wed, 24 Nov 2010 14:07:43 +1100 Subject: Fix bug# 18274 InnoDB auto_increment field reset on OPTIMIZE TABLE OPTIMIZE TABLE recreates the whole table. That is why the counter gets reset. Making the next autoinc column persistent is a separate issue from resetting the value after an OPTIMIZE TABLE. We already have a check for ALTER TABLE and CREATE INDEX to preserve the value on table recreate. We should be able to add an additional check for OPTIMIZE TABLE to preserve the next value. rb://519 Approved by Jimmy Yang. --- .../innodb_plugin/r/innodb-autoinc-18274.result | 26 +++++++++++++++++++ .../innodb_plugin/t/innodb-autoinc-18274.test | 29 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result create mode 100644 mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result b/mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result new file mode 100644 index 00000000000..22afc65a649 --- /dev/null +++ b/mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result @@ -0,0 +1,26 @@ +drop table if exists t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 +DELETE FROM t1; +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +c1 +2 +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test new file mode 100644 index 00000000000..8734311dd7a --- /dev/null +++ b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test @@ -0,0 +1,29 @@ +-- source include/have_innodb_plugin.inc +# embedded server ignores 'delayed', so skip this +-- source include/not_embedded.inc + +let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Bug #18274 InnoDB auto_increment field reset on OPTIMIZE TABLE +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +SHOW CREATE TABLE t1; +DELETE FROM t1; +OPTIMIZE TABLE t1; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +DROP TABLE t1; + +# +# restore environment to the state it was before this test execution +# + +-- disable_query_log +eval set global innodb_file_format_check=$innodb_file_format_check_orig; -- cgit v1.2.1 From 067710eba1e3c958fb64fe569fae027afc65fd90 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 26 Nov 2010 13:59:39 +0100 Subject: Bug #58515 Tests: use use exec echo, not write_file to write mysqld.1.expect Fixed as suggested in the .inc file and two tests Could not reproduce problem, but tested tests on Windows --- mysql-test/suite/rpl/t/rpl_trigger.test | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test index e296da01bad..afa80e9c3f5 100644 --- a/mysql-test/suite/rpl/t/rpl_trigger.test +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -313,9 +313,7 @@ FLUSH LOGS; # Stop master server --echo --> Stop master server ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -wait -EOF +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --shutdown_server 10 --source include/wait_until_disconnected.inc # Replace binlog @@ -323,9 +321,7 @@ remove_file $MYSQLD_DATADIR/master-bin.000001; copy_file $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLD_DATADIR/master-bin.000001; --echo --> Start master server ---append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -restart -EOF +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --enable_reconnect --source include/wait_until_connected_again.inc let $binlog_version= query_get_value(SHOW BINLOG EVENTS, Info, 1); -- cgit v1.2.1 From 4edea18f8daa9b1c1e5614560753a03cfdcb1adb Mon Sep 17 00:00:00 2001 From: Christopher Powers Date: Mon, 29 Nov 2010 22:46:43 -0600 Subject: Bug#35333, "If Federated table can't connect to remote host, can't retrieve metadata" Improved error handling such that queries against Information_Schema.Tables won't fail if a federated table can't make a remote connection. mysql-test/r/merge.result: Updated with warnings that were previously masked. mysql-test/r/show_check.result: Updated with warnings that were previously masked. mysql-test/r/view.result: Updated with warnings that were previously masked. sql/sql_show.cc: If get_schema_tables_record() encounters an error, push a warning, set the TABLE COMMENT column with the error text, and clear the error so that the operation can continue. --- .../suite/federated/federated_bug_35333.result | 67 ++++++++++++++++++++ .../suite/federated/federated_bug_35333.test | 74 ++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 mysql-test/suite/federated/federated_bug_35333.result create mode 100644 mysql-test/suite/federated/federated_bug_35333.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/federated/federated_bug_35333.result b/mysql-test/suite/federated/federated_bug_35333.result new file mode 100644 index 00000000000..7ea1b374712 --- /dev/null +++ b/mysql-test/suite/federated/federated_bug_35333.result @@ -0,0 +1,67 @@ +# +# Bug 35333 "If a Federated table can't connect to the remote hose, can't retrieve metadata" +# +# Queries such as SHOW TABLE STATUS and SELECT * FROM INFORMATION_SCHEMA.TABLES fail +# when encountering a federated table that cannot connect to its remote table. +# +# The fix is to store the error text in the TABLE COMMENTS column of I_S.TABLES, clear +# the remote connection error and push a warning instead. This allows the SELECT operation +# to complete while still indicating a problem. This fix applies to any non-fatal system +# error that occurs during a query against I_S.TABLES.de +CREATE DATABASE federated; +CREATE DATABASE federated; +CREATE DATABASE IF NOT EXISTS realdb; +DROP TABLE IF EXISTS realdb.t0; +DROP TABLE IF EXISTS federated.t0; +# +# Create the base table to be referenced +# +CREATE TABLE realdb.t0 (a text, b text) ENGINE=MYISAM; +# +# Create a federated table with a bogus port number +# +CREATE TABLE federated.t0 (a text, b text) ENGINE=FEDERATED +CONNECTION='mysql://root@127.0.0.1:63333/realdb/t0'; +# +# Trigger a federated system error during a INFORMATION_SCHEMA.TABLES query +# +SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT +FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'realdb' or TABLE_SCHEMA = 'federated'; +TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE ROW_FORMAT TABLE_ROWS DATA_LENGTH TABLE_COMMENT +federated t0 BASE TABLE FEDERATED NULL 0 Unable to connect to foreign data source: Can't connect to MySQL server on '127. +realdb t0 BASE TABLE MyISAM Dynamic 0 0 +Warnings: +Warning 1429 Unable to connect to foreign data source: Can't connect to MySQL server on '127.0.0.1' (socket errno) +SHOW WARNINGS; +Level Code Message +Warning 1429 Unable to connect to foreign data source: Can't connect to MySQL server on '127.0.0.1' (socket errno) +# +# Create a MyISAM table then corrupt the file +# +USE realdb; +CREATE TABLE t1 (c1 int) ENGINE=MYISAM; +# +# Corrupt the MyISAM table by deleting the base file +# +# +# Trigger a MyISAM system error during an INFORMATION_SCHEMA.TABLES query +# +SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT +FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE ROW_FORMAT TABLE_ROWS DATA_LENGTH TABLE_COMMENT +realdb t1 BASE TABLE NULL NULL NULL NULL Can't find file: 't1' (errno: 2) +Warnings: +Warning 1017 Can't find file: 't1' (errno: 2) +SHOW WARNINGS; +Level Code Message +Warning 1017 Can't find file: 't1' (errno: 2) +# +# Cleanup +# +DROP TABLE IF EXISTS realdb.t0; +DROP TABLE IF EXISTS federated.t0; +DROP DATABASE realdb; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE federated; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE federated; diff --git a/mysql-test/suite/federated/federated_bug_35333.test b/mysql-test/suite/federated/federated_bug_35333.test new file mode 100644 index 00000000000..58c217d24f2 --- /dev/null +++ b/mysql-test/suite/federated/federated_bug_35333.test @@ -0,0 +1,74 @@ +--echo # +--echo # Bug 35333 "If a Federated table can't connect to the remote hose, can't retrieve metadata" +--echo # +--echo # Queries such as SHOW TABLE STATUS and SELECT * FROM INFORMATION_SCHEMA.TABLES fail +--echo # when encountering a federated table that cannot connect to its remote table. +--echo # +--echo # The fix is to store the error text in the TABLE COMMENTS column of I_S.TABLES, clear +--echo # the remote connection error and push a warning instead. This allows the SELECT operation +--echo # to complete while still indicating a problem. This fix applies to any non-fatal system +--echo # error that occurs during a query against I_S.TABLES.de + +--source federated.inc + +--disable_warnings +CREATE DATABASE IF NOT EXISTS realdb; +# Federated database exists +DROP TABLE IF EXISTS realdb.t0; +DROP TABLE IF EXISTS federated.t0; +--enable_warnings + +--echo # +--echo # Create the base table to be referenced +--echo # +CREATE TABLE realdb.t0 (a text, b text) ENGINE=MYISAM; + +--echo # +--echo # Create a federated table with a bogus port number +--echo # +CREATE TABLE federated.t0 (a text, b text) ENGINE=FEDERATED + CONNECTION='mysql://root@127.0.0.1:63333/realdb/t0'; + +#--warning ER_CONNECT_TO_FOREIGN_DATA_SOURCE + +--echo # +--echo # Trigger a federated system error during a INFORMATION_SCHEMA.TABLES query +--echo # +# Remove O/S-specific socket error +--replace_regex /\(.*\)/(socket errno)/ +SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT + FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'realdb' or TABLE_SCHEMA = 'federated'; + +# Remove O/S-specific socket error +--replace_regex /\(.*\)/(socket errno)/ +SHOW WARNINGS; + +--echo # +--echo # Create a MyISAM table then corrupt the file +--echo # +USE realdb; +CREATE TABLE t1 (c1 int) ENGINE=MYISAM; +--echo # +--echo # Corrupt the MyISAM table by deleting the base file +--echo # +let $MYSQLD_DATADIR= `SELECT @@datadir`; +--remove_file $MYSQLD_DATADIR/realdb/t1.MYD +--remove_file $MYSQLD_DATADIR/realdb/t1.MYI + +--echo # +--echo # Trigger a MyISAM system error during an INFORMATION_SCHEMA.TABLES query +--echo # +SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT + FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; + +SHOW WARNINGS; +--echo # +--echo # Cleanup +--echo # +--disable_warnings +DROP TABLE IF EXISTS realdb.t0; +DROP TABLE IF EXISTS federated.t0; +DROP DATABASE realdb; +--enable_warnings + +--source federated_cleanup.inc -- cgit v1.2.1 From 6ce0bd8aff9c26fa9eaeee421b1cfaa9ac38e6ae Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Sat, 27 Nov 2010 11:51:07 +0000 Subject: BUG#58416: binlog.binlog_row_failure_mixing_engines fails on win x86 debug_max The windows MTR run exhibited a different test execution ordering (due to the fact that in these platforms MTR is invoked with --parallel > 1). This uncovered a bug in the aforementioned test case, which is triggered by the following conditions: 1. server is not restarted between two different tests; 2. the test before binlog.binlog_row_failure_mixing_engines issues flush logs; 3. binlog.binlog_row_failure_mixing_engines uses binlog positions to limit the output of show_binlog_events; 4. binlog.binlog_row_failure_mixing_engines does not state which binlog file to use, thence it uses a wrong binlog file with the correct position. There are two possible fixes: 1. make sure that the test start from a clean slate - binlog wise; 2. in addition to the position, also state the binary log file before sourcing show_binlog_events.inc . We go for fix #1, ie, deploy a RESET MASTER before the test is actually started. --- mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result | 1 + mysql-test/suite/binlog/r/binlog_row_failure_mixing_engines.result | 1 + 2 files changed, 2 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result b/mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result index dfc08d76a6a..4078103b1f7 100644 --- a/mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result +++ b/mysql-test/suite/binlog/r/binlog_mixed_failure_mixing_engines.result @@ -1,3 +1,4 @@ +RESET MASTER; ################################################################################### # CONFIGURATION ################################################################################### diff --git a/mysql-test/suite/binlog/r/binlog_row_failure_mixing_engines.result b/mysql-test/suite/binlog/r/binlog_row_failure_mixing_engines.result index 45c8640d3e3..2d493397ffd 100644 --- a/mysql-test/suite/binlog/r/binlog_row_failure_mixing_engines.result +++ b/mysql-test/suite/binlog/r/binlog_row_failure_mixing_engines.result @@ -1,3 +1,4 @@ +RESET MASTER; ################################################################################### # CONFIGURATION ################################################################################### -- cgit v1.2.1 From f225470b3904a93fdec6966c9c093f545bf260b2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Nov 2010 17:43:36 +0800 Subject: BUG#54903 BINLOG statement toggles session variables When using BINLOG statement to execute rows log events, session variables foreign_key_checks and unique_checks are changed temporarily. As each rows log event has their own special session environment and its own foreign_key_checks and unique_checks can be different from current session which executing the BINLOG statement. But these variables are not restored correctly after BINLOG statement. This problem will cause that the following statements fail or generate unexpected data. In this patch, code is added to backup and restore these two variables. So BINLOG statement will not affect current session's variables again. mysql-test/extra/binlog_tests/binlog.test: Add test to verify this patch. mysql-test/suite/binlog/r/binlog_row_binlog.result: Add test to verify this patch. mysql-test/suite/binlog/r/binlog_stm_binlog.result: Add test to verify this patch. sql/sql_binlog.cc: Add code to backup and restore thd->options. --- mysql-test/suite/binlog/r/binlog_row_binlog.result | 59 ++++++++++++++++++++++ mysql-test/suite/binlog/r/binlog_stm_binlog.result | 59 ++++++++++++++++++++++ 2 files changed, 118 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index d612e7adde1..1678f8add58 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -1330,3 +1330,62 @@ Log_name Pos Event_type Server_id End_log_pos Info # # Write_rows 1 # table_id: # flags: STMT_END_F # # Query 1 # COMMIT DROP TABLE t1; + +# BUG#54903 BINLOG statement toggles session variables +# ---------------------------------------------------------------------- +# This test verify that BINLOG statement doesn't change current session's +# variables foreign_key_checks and unique_checks. + +CREATE TABLE t1 (c1 INT KEY); +SET @@SESSION.foreign_key_checks= ON; +SET @@SESSION.unique_checks= ON; +# INSERT INTO t1 VALUES (1) +# foreign_key_checks=0 and unique_checks=0 +BINLOG ' +dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA== +'; +SELECT * FROM t1; +c1 +1 +# Their values should be ON +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks ON +unique_checks ON + +SET @@SESSION.foreign_key_checks= OFF; +SET @@SESSION.unique_checks= OFF; +# INSERT INTO t1 VALUES(2) +# foreign_key_checks=1 and unique_checks=1 +BINLOG ' +dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== +'; +SELECT * FROM t1; +c1 +1 +2 +# Their values should be OFF +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks OFF +unique_checks OFF +# INSERT INTO t1 VALUES(2) +# foreign_key_checks=1 and unique_checks=1 +# It should not change current session's variables, even error happens +BINLOG ' +dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== +'; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +SELECT * FROM t1; +c1 +1 +2 +# Their values should be OFF +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks OFF +unique_checks OFF +DROP TABLE t1; diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index f5ba4524c61..872a93bef43 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -801,3 +801,62 @@ Log_name Pos Event_type Server_id End_log_pos Info # # Write_rows 1 # table_id: # flags: STMT_END_F # # Query 1 # COMMIT DROP TABLE t1; + +# BUG#54903 BINLOG statement toggles session variables +# ---------------------------------------------------------------------- +# This test verify that BINLOG statement doesn't change current session's +# variables foreign_key_checks and unique_checks. + +CREATE TABLE t1 (c1 INT KEY); +SET @@SESSION.foreign_key_checks= ON; +SET @@SESSION.unique_checks= ON; +# INSERT INTO t1 VALUES (1) +# foreign_key_checks=0 and unique_checks=0 +BINLOG ' +dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA== +'; +SELECT * FROM t1; +c1 +1 +# Their values should be ON +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks ON +unique_checks ON + +SET @@SESSION.foreign_key_checks= OFF; +SET @@SESSION.unique_checks= OFF; +# INSERT INTO t1 VALUES(2) +# foreign_key_checks=1 and unique_checks=1 +BINLOG ' +dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== +'; +SELECT * FROM t1; +c1 +1 +2 +# Their values should be OFF +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks OFF +unique_checks OFF +# INSERT INTO t1 VALUES(2) +# foreign_key_checks=1 and unique_checks=1 +# It should not change current session's variables, even error happens +BINLOG ' +dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== +'; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +SELECT * FROM t1; +c1 +1 +2 +# Their values should be OFF +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks OFF +unique_checks OFF +DROP TABLE t1; -- cgit v1.2.1 From a699e4fce85a055e3ee55db12e9891e3b26ef720 Mon Sep 17 00:00:00 2001 From: Sunny Bains Date: Tue, 30 Nov 2010 20:11:26 +1100 Subject: Fix Bug# 56228 - Dropping tables from within an active statement crashes server InnoDB AUTOINC code expects the locks to be released in strict reverse order at the end of the statement. However, nested stored proedures and partition tables break this rule. We now allow the locks to be deleted from the trx->autoinc_locks vector in any order but optimise for the common (old) case. rb://441 Approved by Marko Makela --- .../innodb_plugin/r/innodb-autoinc-56228.result | 30 ++++++++++++++++ .../t/innodb-autoinc-56228-master.opt | 1 + .../innodb_plugin/t/innodb-autoinc-56228.test | 42 ++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 mysql-test/suite/innodb_plugin/r/innodb-autoinc-56228.result create mode 100644 mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228-master.opt create mode 100644 mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb_plugin/r/innodb-autoinc-56228.result b/mysql-test/suite/innodb_plugin/r/innodb-autoinc-56228.result new file mode 100644 index 00000000000..2ff2bd2800a --- /dev/null +++ b/mysql-test/suite/innodb_plugin/r/innodb-autoinc-56228.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS t1_56228; +Warnings: +Note 1051 Unknown table 't1_56228' +DROP TABLE IF EXISTS t2_56228; +Warnings: +Note 1051 Unknown table 't2_56228' +DROP FUNCTION IF EXISTS bug56228; +Warnings: +Note 1305 FUNCTION bug56228 does not exist +CREATE TEMPORARY TABLE t1_56228( +c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +CREATE TEMPORARY TABLE t2_56228( +c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +CREATE FUNCTION bug56228() RETURNS INT DETERMINISTIC +BEGIN +INSERT INTO t1_56228 VALUES(NULL); +INSERT INTO t2_56228 VALUES(NULL); +INSERT INTO t1_56228 VALUES(NULL); +INSERT INTO t2_56228 VALUES(NULL); +DROP TEMPORARY TABLE t1_56228; +RETURN 42; +END // +SELECT bug56228(); +bug56228() +42 +DROP FUNCTION bug56228; +DROP TEMPORARY TABLE t2_56228; +DROP TEMPORARY TABLE IF EXISTS t1_56228; +Warnings: +Note 1051 Unknown table 't1_56228' diff --git a/mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228-master.opt b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228-master.opt new file mode 100644 index 00000000000..0eed7aaadad --- /dev/null +++ b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228-master.opt @@ -0,0 +1 @@ +--innodb_autoinc_lock_mode=0 diff --git a/mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228.test b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228.test new file mode 100644 index 00000000000..eb38b21861d --- /dev/null +++ b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228.test @@ -0,0 +1,42 @@ +-- source include/have_innodb_plugin.inc + +let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; + +## +# Bug #56228: dropping tables from within an active statement crashes server +# +DROP TABLE IF EXISTS t1_56228; +DROP TABLE IF EXISTS t2_56228; +DROP FUNCTION IF EXISTS bug56228; + +CREATE TEMPORARY TABLE t1_56228( + c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +CREATE TEMPORARY TABLE t2_56228( + c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; + +DELIMITER //; + +CREATE FUNCTION bug56228() RETURNS INT DETERMINISTIC +BEGIN + INSERT INTO t1_56228 VALUES(NULL); + INSERT INTO t2_56228 VALUES(NULL); + INSERT INTO t1_56228 VALUES(NULL); + INSERT INTO t2_56228 VALUES(NULL); + DROP TEMPORARY TABLE t1_56228; + RETURN 42; +END // + +DELIMITER ;// + +SELECT bug56228(); + +DROP FUNCTION bug56228; +DROP TEMPORARY TABLE t2_56228; +DROP TEMPORARY TABLE IF EXISTS t1_56228; + +# +# restore environment to the state it was before this test execution +# + +-- disable_query_log +eval set global innodb_file_format_check=$innodb_file_format_check_orig; -- cgit v1.2.1 From 647c619393f713ad6725d990128a8d1911e956f8 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 30 Nov 2010 23:32:51 +0000 Subject: BUG#46166: MYSQL_BIN_LOG::new_file_impl is not propagating error when generating new name. If find_uniq_filename returns an error, then this error is not being propagated upwards, and execution does not report error to the user (although a entry in the error log is generated). Additionally, some more errors were ignored in new_file_impl: - when writing the rotate event - when reopening the index and binary log file This patch addresses this by propagating the error up in the execution stack. Furthermore, when rotation of the binary log fails, an incident event is written, because there may be a chance that some changes for a given statement, were not properly logged. For example, in SBR, LOAD DATA INFILE statement requires more than one event to be logged, should rotation fail while logging part of the LOAD DATA events, then the logged data would become inconsistent with the data in the storage engine. mysql-test/include/restart_mysqld.inc: Refactored restart_mysqld so that it is not hardcoded for mysqld.1, but rather for the current server. mysql-test/suite/binlog/t/binlog_index.test: The error on open of index and binary log on new_file_impl is now caught. Thence the user will get an error message. We need to accomodate this change in the test case for the failing FLUSH LOGS. mysql-test/suite/rpl/t/rpl_binlog_errors-master.opt: Sets max_binlog_size to 4096. mysql-test/suite/rpl/t/rpl_binlog_errors.test: Added some test cases for asserting that the error is found and reported. sql/handler.cc: Catching error now returned by unlog (in ha_commit_trans) and returning it. sql/log.cc: Propagating errors from new_file_impl upwards. The errors that new_file_impl catches now are: - error on generate_new_name - error on writing the rotate event - error when opening the index or the binary log file. sql/log.h: Changing declaration of: - rotate_and_purge - new_file - new_file_without_locking - new_file_impl - unlog They now return int instead of void. sql/mysql_priv.h: Change signature of reload_acl_and_cache so that write_to_binlog is an int instead of bool. sql/mysqld.cc: Redeclaring not_used var as int instead of bool. sql/rpl_injector.cc: Changes to catch the return from rotate_and_purge. sql/slave.cc: Changes to catch the return values for new_file and rotate_relay_log. sql/slave.h: Changes to rotate_relay_log declaration (now returns int instead of void). sql/sql_load.cc: In SBR, some logging of LOAD DATA events goes through IO_CACHE_CALLBACK invocation at mf_iocache.c:_my_b_get. The IO_CACHE implementation is ignoring the return value for from these callbacks (pre_read and post_read), so we need to find out at the end of the execution if the error is set or not in THD. sql/sql_parse.cc: Catching the rotate_relay_log and rotate_and_purge return values. Semantic change in reload_acl_and_cache so that we report errors in binlog interactions through the write_to_binlog output parameter. If there was any failure while rotating the binary log, we should then report the error to the client when handling SQLCOMM_FLUSH. --- mysql-test/suite/binlog/r/binlog_index.result | 36 +- mysql-test/suite/binlog/t/binlog_index.test | 26 +- mysql-test/suite/rpl/r/rpl_binlog_errors.result | 274 ++++++++++++++ .../suite/rpl/t/rpl_binlog_errors-master.opt | 1 + mysql-test/suite/rpl/t/rpl_binlog_errors.test | 413 +++++++++++++++++++++ 5 files changed, 748 insertions(+), 2 deletions(-) create mode 100644 mysql-test/suite/rpl/r/rpl_binlog_errors.result create mode 100644 mysql-test/suite/rpl/t/rpl_binlog_errors-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_binlog_errors.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result index 52d698e9f96..6b422b82191 100644 --- a/mysql-test/suite/binlog/r/binlog_index.result +++ b/mysql-test/suite/binlog/r/binlog_index.result @@ -2,7 +2,9 @@ call mtr.add_suppression('Attempting backtrace'); call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.'); call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file'); call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.'); +call mtr.add_suppression('Could not open .*'); call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); +RESET MASTER; flush logs; flush logs; flush logs; @@ -116,11 +118,31 @@ master-bin.000011 # This should put the server in unsafe state and stop # accepting any command. If we inject a fault at this # point and continue the execution the server crashes. -# Besides the flush command does not report an error. # +SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); +SELECT @index; +@index +master-bin.000006 +master-bin.000007 +master-bin.000008 +master-bin.000009 +master-bin.000010 +master-bin.000011 + # fault_injection_registering_index SET SESSION debug="+d,fault_injection_registering_index"; flush logs; +ERROR HY000: Can't open file: './master-bin.000012' (errno: 1) +SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); +SELECT @index; +@index +master-bin.000006 +master-bin.000007 +master-bin.000008 +master-bin.000009 +master-bin.000010 +master-bin.000011 + SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); SELECT @index; @index @@ -135,6 +157,18 @@ master-bin.000012 # fault_injection_updating_index SET SESSION debug="+d,fault_injection_updating_index"; flush logs; +ERROR HY000: Can't open file: './master-bin.000013' (errno: 1) +SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); +SELECT @index; +@index +master-bin.000006 +master-bin.000007 +master-bin.000008 +master-bin.000009 +master-bin.000010 +master-bin.000011 +master-bin.000012 + SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); SELECT @index; @index diff --git a/mysql-test/suite/binlog/t/binlog_index.test b/mysql-test/suite/binlog/t/binlog_index.test index 9d4a49602a6..d2b34083182 100644 --- a/mysql-test/suite/binlog/t/binlog_index.test +++ b/mysql-test/suite/binlog/t/binlog_index.test @@ -10,9 +10,12 @@ call mtr.add_suppression('Attempting backtrace'); call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.'); call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file'); call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.'); +call mtr.add_suppression('Could not open .*'); call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); let $old=`select @@debug`; +RESET MASTER; + let $MYSQLD_DATADIR= `select @@datadir`; let $INDEX=$MYSQLD_DATADIR/master-bin.index; @@ -205,12 +208,25 @@ SELECT @index; --echo # This should put the server in unsafe state and stop --echo # accepting any command. If we inject a fault at this --echo # point and continue the execution the server crashes. ---echo # Besides the flush command does not report an error. --echo # +--chmod 0644 $INDEX +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval SET @index=LOAD_FILE('$index') +-- replace_regex /\.[\\\/]master/master/ +SELECT @index; + --echo # fault_injection_registering_index SET SESSION debug="+d,fault_injection_registering_index"; +-- error ER_CANT_OPEN_FILE flush logs; + +--chmod 0644 $INDEX +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval SET @index=LOAD_FILE('$index') +-- replace_regex /\.[\\\/]master/master/ +SELECT @index; + --source include/restart_mysqld.inc --chmod 0644 $INDEX @@ -221,7 +237,15 @@ SELECT @index; --echo # fault_injection_updating_index SET SESSION debug="+d,fault_injection_updating_index"; +-- error ER_CANT_OPEN_FILE flush logs; + +--chmod 0644 $INDEX +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval SET @index=LOAD_FILE('$index') +-- replace_regex /\.[\\\/]master/master/ +SELECT @index; + --source include/restart_mysqld.inc --chmod 0644 $INDEX diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result new file mode 100644 index 00000000000..e67b60860ca --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.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; +####################################################################### +####################### PART 1: MASTER TESTS ########################## +####################################################################### +include/stop_slave.inc +call mtr.add_suppression("Can't generate a unique log-filename"); +call mtr.add_suppression("Writing one row to the row-based binary log failed.*"); +call mtr.add_suppression("Error writing file .*"); +SET @old_debug= @@global.debug; +SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data'; +SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data'; +RESET MASTER; +###################### TEST #1 +FLUSH LOGS; +# assert: must show two binlogs +show binary logs; +Log_name File_size +master-bin.000001 # +master-bin.000002 # +###################### TEST #2 +RESET MASTER; +SET GLOBAL debug="+d,error_unique_log_filename"; +FLUSH LOGS; +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +# assert: must show one binlog +show binary logs; +Log_name File_size +master-bin.000001 # +SET GLOBAL debug=""; +RESET MASTER; +###################### TEST #3 +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a TEXT) Engine=InnoDB; +CREATE TABLE t4 (a TEXT); +INSERT INTO t1 VALUES (1); +RESET MASTER; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; +# assert: must show two binlog +show binary logs; +Log_name File_size +master-bin.000001 # +master-bin.000002 # +SET GLOBAL debug="-d,error_unique_log_filename"; +DELETE FROM t2; +RESET MASTER; +###################### TEST #4 +SET GLOBAL debug="+d,error_unique_log_filename"; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +# assert: must show one entry +SELECT count(*) FROM t2; +count(*) +1 +SET GLOBAL debug="-d,error_unique_log_filename"; +DELETE FROM t2; +RESET MASTER; +###################### TEST #5 +SET GLOBAL debug="+d,error_unique_log_filename"; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data' INTO TABLE t2; +# assert: must show one entry +SELECT count(*) FROM t2; +count(*) +1 +SET GLOBAL debug="-d,error_unique_log_filename"; +DELETE FROM t2; +RESET MASTER; +###################### TEST #6 +SET GLOBAL debug="+d,error_unique_log_filename"; +SET AUTOCOMMIT=0; +INSERT INTO t2 VALUES ('muse'); +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; +INSERT INTO t2 VALUES ('muse'); +COMMIT; +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +# assert: must show three entries +SELECT count(*) FROM t2; +count(*) +3 +SET AUTOCOMMIT= 1; +SET GLOBAL debug="-d,error_unique_log_filename"; +DELETE FROM t2; +RESET MASTER; +###################### TEST #7 +SET GLOBAL debug="+d,error_unique_log_filename"; +SELECT count(*) FROM t4; +count(*) +0 +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4; +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +# assert: must show 1 entry +SELECT count(*) FROM t4; +count(*) +1 +### check that the incident event is written to the current log +SET GLOBAL debug="-d,error_unique_log_filename"; +FLUSH LOGS; +SHOW BINLOG EVENTS IN 'BINLOG_FILE' FROM LIMIT 1; +Log_name Pos Event_type Server_id End_log_pos Info +BINLOG_FILE # Incident # # #1 (LOST_EVENTS) +DELETE FROM t4; +RESET MASTER; +###################### TEST #8 +SET GLOBAL debug="+d,error_unique_log_filename"; +# must show 0 entries +SELECT count(*) FROM t4; +count(*) +0 +SELECT count(*) FROM t2; +count(*) +0 +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4; +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'); +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +# INFO: Count(*) Before Offending DELETEs +# assert: must show 1 entry +SELECT count(*) FROM t4; +count(*) +1 +# assert: must show 4 entries +SELECT count(*) FROM t2; +count(*) +4 +DELETE FROM t4; +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +DELETE FROM t2; +ERROR HY000: Can't generate a unique log-filename master-bin.(1-999) + +# INFO: Count(*) After Offending DELETEs +# assert: must show zero entries +SELECT count(*) FROM t4; +count(*) +0 +SELECT count(*) FROM t2; +count(*) +0 +SET GLOBAL debug="-d,error_unique_log_filename"; +###################### TEST #9 +SET GLOBAL debug="+d,error_unique_log_filename"; +SET SQL_LOG_BIN=0; +INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'), ('ddd'); +INSERT INTO t4 VALUES ('eee'), ('fff'), ('ggg'), ('hhh'); +# assert: must show four entries +SELECT count(*) FROM t2; +count(*) +4 +SELECT count(*) FROM t4; +count(*) +4 +DELETE FROM t2; +DELETE FROM t4; +# assert: must show zero entries +SELECT count(*) FROM t2; +count(*) +0 +SELECT count(*) FROM t4; +count(*) +0 +SET SQL_LOG_BIN=1; +SET GLOBAL debug="-d,error_unique_log_filename"; +###################### TEST #10 +call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file."); +call mtr.add_suppression("Could not open .*"); +RESET MASTER; +SHOW WARNINGS; +Level Code Message +SET GLOBAL debug="+d,fault_injection_registering_index"; +FLUSH LOGS; +ERROR HY000: Can't open file: './master-bin.000002' (errno: 1) +SET GLOBAL debug="-d,fault_injection_registering_index"; +SHOW BINARY LOGS; +ERROR HY000: You are not using binary logging +CREATE TABLE t5 (a INT); +INSERT INTO t4 VALUES ('bbbbb'); +INSERT INTO t2 VALUES ('aaaaa'); +DELETE FROM t4; +DELETE FROM t2; +DROP TABLE t5; +###################### TEST #11 +SET GLOBAL debug="+d,fault_injection_openning_index"; +FLUSH LOGS; +ERROR HY000: Can't open file: './master-bin.index' (errno: 1) +SET GLOBAL debug="-d,fault_injection_openning_index"; +RESET MASTER; +ERROR HY000: Binlog closed, cannot RESET MASTER +CREATE TABLE t5 (a INT); +INSERT INTO t4 VALUES ('bbbbb'); +INSERT INTO t2 VALUES ('aaaaa'); +DELETE FROM t4; +DELETE FROM t2; +DROP TABLE t5; +###################### TEST #12 +SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; +FLUSH LOGS; +ERROR HY000: Can't open file: 'master-bin' (errno: 0) +SET GLOBAL debug="-d,fault_injection_new_file_rotate_event"; +RESET MASTER; +ERROR HY000: Binlog closed, cannot RESET MASTER +CREATE TABLE t5 (a INT); +INSERT INTO t4 VALUES ('bbbbb'); +INSERT INTO t2 VALUES ('aaaaa'); +DELETE FROM t4; +DELETE FROM t2; +DROP TABLE t5; +SET GLOBAL debug= @old_debug; +DROP TABLE t1, t2, t4; +RESET MASTER; +include/start_slave.inc +####################################################################### +####################### PART 2: SLAVE TESTS ########################### +####################################################################### +stop slave; +drop table if exists t1,t2,t3,t4,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("Slave I/O: Relay log write failure: could not queue event from master.*"); +call mtr.add_suppression("Error writing file .*"); +call mtr.add_suppression("Could not open .*"); +call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file."); +call mtr.add_suppression("Can't generate a unique log-filename .*"); +###################### TEST #13 +SET @old_debug=@@global.debug; +include/stop_slave.inc +SET GLOBAL debug="+d,error_unique_log_filename"; +START SLAVE io_thread; +Last_IO_Error = Relay log write failure: could not queue event from master +SET GLOBAL debug="-d,error_unique_log_filename"; +SET GLOBAL debug=@old_debug; +###################### TEST #14 +SET @old_debug=@@global.debug; +include/stop_slave.inc +SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; +START SLAVE io_thread; +Last_IO_Error = Relay log write failure: could not queue event from master +SET GLOBAL debug="-d,fault_injection_new_file_rotate_event"; +SET GLOBAL debug=@old_debug; +###################### TEST #15 +SET @old_debug=@@global.debug; +include/stop_slave.inc +SET GLOBAL debug="+d,fault_injection_registering_index"; +START SLAVE io_thread; +Last_IO_Error = Relay log write failure: could not queue event from master +SET GLOBAL debug="-d,fault_injection_registering_index"; +SET GLOBAL debug=@old_debug; +###################### TEST #16 +SET @old_debug=@@global.debug; +include/stop_slave.inc +SET GLOBAL debug="+d,fault_injection_openning_index"; +START SLAVE io_thread; +Last_IO_Error = Relay log write failure: could not queue event from master +SET GLOBAL debug="-d,fault_injection_openning_index"; +SET GLOBAL debug=@old_debug; +include/stop_slave.inc +SET GLOBAL debug=@old_debug; +RESET SLAVE; +RESET MASTER; +include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_errors-master.opt b/mysql-test/suite/rpl/t/rpl_binlog_errors-master.opt new file mode 100644 index 00000000000..f8e46a44854 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_binlog_errors-master.opt @@ -0,0 +1 @@ +--max_binlog_size=4096 diff --git a/mysql-test/suite/rpl/t/rpl_binlog_errors.test b/mysql-test/suite/rpl/t/rpl_binlog_errors.test new file mode 100644 index 00000000000..ae83659a38a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_binlog_errors.test @@ -0,0 +1,413 @@ +# BUG#46166: MYSQL_BIN_LOG::new_file_impl is not propagating error +# when generating new name. +# +# WHY +# === +# +# We want to check whether error is reported or not when +# new_file_impl fails (this may happen when rotation is not +# possible because there is some problem finding an +# unique filename). +# +# HOW +# === +# +# Test cases are documented inline. + +-- source include/master-slave.inc +-- source include/have_innodb.inc +-- source include/have_debug.inc + +-- echo ####################################################################### +-- echo ####################### PART 1: MASTER TESTS ########################## +-- echo ####################################################################### + + +### ACTION: stopping slave as it is not needed for the first part of +### the test + +-- connection slave +-- source include/stop_slave.inc +-- connection master + +call mtr.add_suppression("Can't generate a unique log-filename"); +call mtr.add_suppression("Writing one row to the row-based binary log failed.*"); +call mtr.add_suppression("Error writing file .*"); + +SET @old_debug= @@global.debug; + +### ACTION: create a large file (> 4096 bytes) that will be later used +### in LOAD DATA INFILE to check binlog errors in its vacinity +-- let $load_file= $MYSQLTEST_VARDIR/tmp/bug_46166.data +-- let $MYSQLD_DATADIR= `select @@datadir` +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval SELECT repeat('x',8192) INTO OUTFILE '$load_file' + +### ACTION: create a small file (< 4096 bytes) that will be later used +### in LOAD DATA INFILE to check for absence of binlog errors +### when file loading this file does not force flushing and +### rotating the binary log +-- let $load_file2= $MYSQLTEST_VARDIR/tmp/bug_46166-2.data +-- let $MYSQLD_DATADIR= `select @@datadir` +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval SELECT repeat('x',10) INTO OUTFILE '$load_file2' + +RESET MASTER; + +-- echo ###################### TEST #1 + +### ASSERTION: no problem flushing logs (should show two binlogs) +FLUSH LOGS; +-- echo # assert: must show two binlogs +-- source include/show_binary_logs.inc + +-- echo ###################### TEST #2 + +### ASSERTION: check that FLUSH LOGS actually fails and reports +### failure back to the user if find_uniq_filename fails +### (should show just one binlog) + +RESET MASTER; +SET GLOBAL debug="+d,error_unique_log_filename"; +-- error ER_NO_UNIQUE_LOGFILE +FLUSH LOGS; +-- echo # assert: must show one binlog +-- source include/show_binary_logs.inc + +### ACTION: clean up and move to next test +SET GLOBAL debug=""; +RESET MASTER; + +-- echo ###################### TEST #3 + +### ACTION: create some tables (t1, t2, t4) and insert some values in +### table t1 +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a TEXT) Engine=InnoDB; +CREATE TABLE t4 (a TEXT); +INSERT INTO t1 VALUES (1); +RESET MASTER; + +### ASSERTION: we force rotation of the binary log because it exceeds +### the max_binlog_size option (should show two binary +### logs) + +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval LOAD DATA INFILE '$load_file' INTO TABLE t2 + +# shows two binary logs +-- echo # assert: must show two binlog +-- source include/show_binary_logs.inc + +# clean up the table and the binlog to be used in next part of test +SET GLOBAL debug="-d,error_unique_log_filename"; +DELETE FROM t2; +RESET MASTER; + +-- echo ###################### TEST #4 + +### ASSERTION: load the big file into a transactional table and check +### that it reports error. The table will contain the +### changes performed despite the fact that it reported an +### error. + +SET GLOBAL debug="+d,error_unique_log_filename"; +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- error ER_NO_UNIQUE_LOGFILE +-- eval LOAD DATA INFILE '$load_file' INTO TABLE t2 + +# show table +-- echo # assert: must show one entry +SELECT count(*) FROM t2; + +# clean up the table and the binlog to be used in next part of test +SET GLOBAL debug="-d,error_unique_log_filename"; +DELETE FROM t2; +RESET MASTER; + +-- echo ###################### TEST #5 + +### ASSERTION: load the small file into a transactional table and +### check that it succeeds + +SET GLOBAL debug="+d,error_unique_log_filename"; +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval LOAD DATA INFILE '$load_file2' INTO TABLE t2 + +# show table +-- echo # assert: must show one entry +SELECT count(*) FROM t2; + +# clean up the table and the binlog to be used in next part of test +SET GLOBAL debug="-d,error_unique_log_filename"; +DELETE FROM t2; +RESET MASTER; + +-- echo ###################### TEST #6 + +### ASSERTION: check that even if one is using a transactional table +### and explicit transactions (no autocommit) if rotation +### fails we get the error. Transaction is not rolledback +### because rotation happens after the commit. + +SET GLOBAL debug="+d,error_unique_log_filename"; +SET AUTOCOMMIT=0; +INSERT INTO t2 VALUES ('muse'); +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- eval LOAD DATA INFILE '$load_file' INTO TABLE t2 +INSERT INTO t2 VALUES ('muse'); +-- error ER_NO_UNIQUE_LOGFILE +COMMIT; + +### ACTION: Show the contents of the table after the test +-- echo # assert: must show three entries +SELECT count(*) FROM t2; + +### ACTION: clean up and move to the next test +SET AUTOCOMMIT= 1; +SET GLOBAL debug="-d,error_unique_log_filename"; +DELETE FROM t2; +RESET MASTER; + +-- echo ###################### TEST #7 + +### ASSERTION: check that on a non-transactional table, if rotation +### fails then an error is reported and an incident event +### is written to the current binary log. + +SET GLOBAL debug="+d,error_unique_log_filename"; +SELECT count(*) FROM t4; +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- error ER_NO_UNIQUE_LOGFILE +-- eval LOAD DATA INFILE '$load_file' INTO TABLE t4 + +-- echo # assert: must show 1 entry +SELECT count(*) FROM t4; + +-- echo ### check that the incident event is written to the current log +SET GLOBAL debug="-d,error_unique_log_filename"; +-- let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1) +-- let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) + +# 53 is the size of the incident event, so we start from 22 bytes before the +# current position +-- let $binlog_start = `SELECT $binlog_start - 53` +FLUSH LOGS; +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start $binlog_file BINLOG_FILE +-- replace_column 2 # 4 # 5 # +-- eval SHOW BINLOG EVENTS IN '$binlog_file' FROM $binlog_start LIMIT 1 + +# clean up and move to next test +DELETE FROM t4; +RESET MASTER; + +-- echo ###################### TEST #8 + +### ASSERTION: check that statements end up in error but they succeed +### on changing the data. + +SET GLOBAL debug="+d,error_unique_log_filename"; +-- echo # must show 0 entries +SELECT count(*) FROM t4; +SELECT count(*) FROM t2; + +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- error ER_NO_UNIQUE_LOGFILE +-- eval LOAD DATA INFILE '$load_file' INTO TABLE t4 +-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +-- error ER_NO_UNIQUE_LOGFILE +-- eval LOAD DATA INFILE '$load_file' INTO TABLE t2 +-- error ER_NO_UNIQUE_LOGFILE +INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'); + +-- echo # INFO: Count(*) Before Offending DELETEs +-- echo # assert: must show 1 entry +SELECT count(*) FROM t4; +-- echo # assert: must show 4 entries +SELECT count(*) FROM t2; + +-- error ER_NO_UNIQUE_LOGFILE +DELETE FROM t4; +-- error ER_NO_UNIQUE_LOGFILE +DELETE FROM t2; + +-- echo # INFO: Count(*) After Offending DELETEs +-- echo # assert: must show zero entries +SELECT count(*) FROM t4; +SELECT count(*) FROM t2; + +# remove fault injection +SET GLOBAL debug="-d,error_unique_log_filename"; + +-- echo ###################### TEST #9 + +### ASSERTION: check that if we disable binlogging, then statements +### succeed. +SET GLOBAL debug="+d,error_unique_log_filename"; +SET SQL_LOG_BIN=0; +INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'), ('ddd'); +INSERT INTO t4 VALUES ('eee'), ('fff'), ('ggg'), ('hhh'); +-- echo # assert: must show four entries +SELECT count(*) FROM t2; +SELECT count(*) FROM t4; +DELETE FROM t2; +DELETE FROM t4; +-- echo # assert: must show zero entries +SELECT count(*) FROM t2; +SELECT count(*) FROM t4; +SET SQL_LOG_BIN=1; +SET GLOBAL debug="-d,error_unique_log_filename"; + +-- echo ###################### TEST #10 + +### ASSERTION: check that error is reported if there is a failure +### while registering the index file and the binary log +### file or failure to write the rotate event. + +call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file."); +call mtr.add_suppression("Could not open .*"); + +RESET MASTER; +SHOW WARNINGS; + +# +d,fault_injection_registering_index => injects fault on MYSQL_BIN_LOG::open +SET GLOBAL debug="+d,fault_injection_registering_index"; +-- error ER_CANT_OPEN_FILE +FLUSH LOGS; +SET GLOBAL debug="-d,fault_injection_registering_index"; + +-- error ER_NO_BINARY_LOGGING +SHOW BINARY LOGS; + +# issue some statements and check that they don't fail +CREATE TABLE t5 (a INT); +INSERT INTO t4 VALUES ('bbbbb'); +INSERT INTO t2 VALUES ('aaaaa'); +DELETE FROM t4; +DELETE FROM t2; +DROP TABLE t5; + +-- echo ###################### TEST #11 + +### ASSERTION: check that error is reported if there is a failure +### while opening the index file and the binary log file or +### failure to write the rotate event. + +# restart the server so that we have binlog again +--source include/restart_mysqld.inc + +# +d,fault_injection_openning_index => injects fault on MYSQL_BIN_LOG::open_index_file +SET GLOBAL debug="+d,fault_injection_openning_index"; +-- error ER_CANT_OPEN_FILE +FLUSH LOGS; +SET GLOBAL debug="-d,fault_injection_openning_index"; + +-- error ER_FLUSH_MASTER_BINLOG_CLOSED +RESET MASTER; + +# issue some statements and check that they don't fail +CREATE TABLE t5 (a INT); +INSERT INTO t4 VALUES ('bbbbb'); +INSERT INTO t2 VALUES ('aaaaa'); +DELETE FROM t4; +DELETE FROM t2; +DROP TABLE t5; + +# restart the server so that we have binlog again +-- source include/restart_mysqld.inc + +-- echo ###################### TEST #12 + +### ASSERTION: check that error is reported if there is a failure +### while writing the rotate event when creating a new log +### file. + +# +d,fault_injection_new_file_rotate_event => injects fault on MYSQL_BIN_LOG::MYSQL_BIN_LOG::new_file_impl +SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; +-- error ER_ERROR_ON_WRITE +FLUSH LOGS; +SET GLOBAL debug="-d,fault_injection_new_file_rotate_event"; + +-- error ER_FLUSH_MASTER_BINLOG_CLOSED +RESET MASTER; + +# issue some statements and check that they don't fail +CREATE TABLE t5 (a INT); +INSERT INTO t4 VALUES ('bbbbb'); +INSERT INTO t2 VALUES ('aaaaa'); +DELETE FROM t4; +DELETE FROM t2; +DROP TABLE t5; + +# restart the server so that we have binlog again +-- source include/restart_mysqld.inc + +## clean up +SET GLOBAL debug= @old_debug; +DROP TABLE t1, t2, t4; +RESET MASTER; + +# restart slave again +-- connection slave +-- source include/start_slave.inc +-- connection master + +-- echo ####################################################################### +-- echo ####################### PART 2: SLAVE TESTS ########################### +-- echo ####################################################################### + +### setup +-- connection master +# master-slave-reset starts the slave automatically +-- source include/master-slave-reset.inc +-- connection slave + +# slave suppressions + +call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*"); +call mtr.add_suppression("Error writing file .*"); +call mtr.add_suppression("Could not open .*"); +call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file."); +call mtr.add_suppression("Can't generate a unique log-filename .*"); +-- echo ###################### TEST #13 + +#### ASSERTION: check against unique log filename error +-- let $io_thd_injection_fault_flag= error_unique_log_filename +-- let $slave_io_errno= 1595 +-- let $show_slave_io_error= 1 +-- source include/io_thd_fault_injection.inc + +-- echo ###################### TEST #14 + +#### ASSERTION: check against rotate failing +-- let $io_thd_injection_fault_flag= fault_injection_new_file_rotate_event +-- let $slave_io_errno= 1595 +-- let $show_slave_io_error= 1 +-- source include/io_thd_fault_injection.inc + +-- echo ###################### TEST #15 + +#### ASSERTION: check against relay log open failure +-- let $io_thd_injection_fault_flag= fault_injection_registering_index +-- let $slave_io_errno= 1595 +-- let $show_slave_io_error= 1 +-- source include/io_thd_fault_injection.inc + +-- echo ###################### TEST #16 + +#### ASSERTION: check against relay log index open failure +-- let $io_thd_injection_fault_flag= fault_injection_openning_index +-- let $slave_io_errno= 1595 +-- let $show_slave_io_error= 1 +-- source include/io_thd_fault_injection.inc + +### clean up +-- disable_warnings +-- source include/stop_slave.inc +-- enable_warnings +SET GLOBAL debug=@old_debug; +RESET SLAVE; +RESET MASTER; +-- source include/start_slave.inc +-- connection master +-- source include/master-slave-end.inc -- cgit v1.2.1 From 844138c90b9ca1ebaee04d1ea7c8731b933f7550 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Fri, 3 Dec 2010 17:17:45 +0000 Subject: BUG#46697: Table name in error message is not populated When a query fails with a different error on the slave, the sql thread outputs a message (M) containing: 1. the error message format for the master error code 2. the master error code 3. the error message for the slave's error code 4. the slave error code Given that the slave has no information on the error message itself that the master outputs, it can only print its own version of the message format (but stripped from the additional data if the message format requires). This may confuse users. To fix this we augment the slave's message (M) to explicitly state that the master's message is actually an error message format, the one associated with the given master error code and that the slave server knows about. --- mysql-test/suite/rpl/r/rpl_stm_EE_err2.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result index e69952787fb..da24c4f5db1 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result +++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result @@ -11,6 +11,6 @@ set sql_log_bin=1; insert into t1 values(1),(2); ERROR 23000: Duplicate entry '2' for key 'a' drop table t1; -Error: "Query caused different errors on master and slave. Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) +Error: "Query caused different errors on master and slave. Error on master: message format='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) Errno: "0" (expected 0) drop table t1; -- cgit v1.2.1 From 1faf910eeb4e8f40253bf34b634af5332f367dc5 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Mon, 13 Dec 2010 14:48:12 +0300 Subject: Bug#39828 : Autoinc wraps around when offset and increment > 1 Auto increment value wraps when performing a bulk insert with auto_increment_increment and auto_increment_offset greater than one. The fix: If overflow happened then return MAX_ULONGLONG value as an indication of overflow and check this before storing the value into the field in update_auto_increment(). mysql-test/r/auto_increment.result: test case mysql-test/suite/innodb/r/innodb-autoinc.result: test case fix mysql-test/suite/innodb/t/innodb-autoinc.test: test case fix mysql-test/suite/innodb_plugin/r/innodb-autoinc.result: test case fix mysql-test/suite/innodb_plugin/t/innodb-autoinc.test: test case fix mysql-test/t/auto_increment.test: test case sql/handler.cc: If overflow happened then return MAX_ULONGLONG value as an indication of overflow and check this before storing the value into the field in update_auto_increment(). --- mysql-test/suite/innodb/r/innodb-autoinc.result | 18 +++----- mysql-test/suite/innodb/t/innodb-autoinc.test | 49 +++------------------- .../suite/innodb_plugin/r/innodb-autoinc.result | 18 +++----- .../suite/innodb_plugin/t/innodb-autoinc.test | 49 +++------------------- 4 files changed, 24 insertions(+), 110 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result index 350c7ebd541..0c8d16f27fb 100644 --- a/mysql-test/suite/innodb/r/innodb-autoinc.result +++ b/mysql-test/suite/innodb/r/innodb-autoinc.result @@ -471,17 +471,12 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 2 auto_increment_offset 10 -INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +ERROR HY000: Failed to read auto-increment value from storage engine SELECT * FROM t1; c1 1 18446744073709551603 -18446744073709551604 -18446744073709551606 -18446744073709551608 -18446744073709551610 -18446744073709551612 -18446744073709551614 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; @@ -504,13 +499,12 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 5 auto_increment_offset 7 -INSERT INTO t1 VALUES (NULL),(NULL); +INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +ERROR HY000: Failed to read auto-increment value from storage engine SELECT * FROM t1; c1 1 18446744073709551603 -18446744073709551607 -18446744073709551612 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; @@ -572,12 +566,12 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 65535 auto_increment_offset 65535 -INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (NULL),(NULL); +ERROR 22003: Out of range value for column 't1' at row 167 SELECT * FROM t1; c1 1 18446744073709551610 -18446744073709551615 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test index 10602499222..c3b64c7c963 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc.test @@ -291,21 +291,8 @@ INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; SHOW VARIABLES LIKE "%auto_inc%"; -# This should fail because of overflow but it doesn't, it seems to be -# a MySQL server bug. It wraps around to 0 for the last value. -# See MySQL Bug# 39828 -# -# Instead of wrapping around, it asserts when MySQL is compiled --with-debug -# (see sql/handler.cc:handler::update_auto_increment()). Don't test for -# overflow until Bug #39828 is fixed. -# -# Since this asserts when compiled --with-debug, we can't properly test this -# until Bug #39828 is fixed. For now, this test is meaningless. -#if Bug #39828 is fixed -#INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); -#else -INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); -#endif +--error ER_AUTOINC_READ_FAILED +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); SELECT * FROM t1; DROP TABLE t1; @@ -323,20 +310,8 @@ INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7; SHOW VARIABLES LIKE "%auto_inc%"; -# This should fail because of overflow but it doesn't. It fails with -# a duplicate entry message because of a MySQL server bug, it wraps -# around. See MySQL Bug# 39828, once MySQL fix the bug we can replace -# the ER_DUP_ENTRY, 1062 below with the appropriate error message -# -# Since this asserts when compiled --with-debug, we can't properly test this -# until Bug #39828 is fixed. For now, this test is meaningless. -#if Bug #39828 is fixed -# Still need to fix this error code, error should mention overflow -#-- error ER_DUP_ENTRY,1062 -#INSERT INTO t1 VALUES (NULL),(NULL), (NULL); -#else -INSERT INTO t1 VALUES (NULL),(NULL); -#endif +--error ER_AUTOINC_READ_FAILED +INSERT INTO t1 VALUES (NULL),(NULL), (NULL); SELECT * FROM t1; DROP TABLE t1; @@ -374,20 +349,8 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976; SHOW VARIABLES LIKE "%auto_inc%"; -# This should fail because of overflow but it doesn't. It wraps around -# and the autoinc values look bogus too. -# See MySQL Bug# 39828, once MySQL fix the bug we can enable the error -# code expected test. -# -- error ER_AUTOINC_READ_FAILED,1467 -# -# Since this asserts when compiled --with-debug, we can't properly test this -# until Bug #39828 is fixed. For now, this test is meaningless. -#if Bug #39828 is fixed -#-- error ER_AUTOINC_READ_FAILED,1467 -#INSERT INTO t1 VALUES (NULL),(NULL); -#else -INSERT INTO t1 VALUES (NULL); -#endif +--error ER_WARN_DATA_OUT_OF_RANGE +INSERT INTO t1 VALUES (NULL),(NULL); SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/suite/innodb_plugin/r/innodb-autoinc.result b/mysql-test/suite/innodb_plugin/r/innodb-autoinc.result index 350c7ebd541..0c8d16f27fb 100644 --- a/mysql-test/suite/innodb_plugin/r/innodb-autoinc.result +++ b/mysql-test/suite/innodb_plugin/r/innodb-autoinc.result @@ -471,17 +471,12 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 2 auto_increment_offset 10 -INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +ERROR HY000: Failed to read auto-increment value from storage engine SELECT * FROM t1; c1 1 18446744073709551603 -18446744073709551604 -18446744073709551606 -18446744073709551608 -18446744073709551610 -18446744073709551612 -18446744073709551614 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; @@ -504,13 +499,12 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 5 auto_increment_offset 7 -INSERT INTO t1 VALUES (NULL),(NULL); +INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +ERROR HY000: Failed to read auto-increment value from storage engine SELECT * FROM t1; c1 1 18446744073709551603 -18446744073709551607 -18446744073709551612 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; @@ -572,12 +566,12 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 65535 auto_increment_offset 65535 -INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (NULL),(NULL); +ERROR 22003: Out of range value for column 't1' at row 167 SELECT * FROM t1; c1 1 18446744073709551610 -18446744073709551615 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; diff --git a/mysql-test/suite/innodb_plugin/t/innodb-autoinc.test b/mysql-test/suite/innodb_plugin/t/innodb-autoinc.test index 997c503d2d3..4967a6efbb9 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb-autoinc.test +++ b/mysql-test/suite/innodb_plugin/t/innodb-autoinc.test @@ -293,21 +293,8 @@ INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; SHOW VARIABLES LIKE "%auto_inc%"; -# This should fail because of overflow but it doesn't, it seems to be -# a MySQL server bug. It wraps around to 0 for the last value. -# See MySQL Bug# 39828 -# -# Instead of wrapping around, it asserts when MySQL is compiled --with-debug -# (see sql/handler.cc:handler::update_auto_increment()). Don't test for -# overflow until Bug #39828 is fixed. -# -# Since this asserts when compiled --with-debug, we can't properly test this -# until Bug #39828 is fixed. For now, this test is meaningless. -#if Bug #39828 is fixed -#INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); -#else -INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); -#endif +--error ER_AUTOINC_READ_FAILED +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); SELECT * FROM t1; DROP TABLE t1; @@ -325,20 +312,8 @@ INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7; SHOW VARIABLES LIKE "%auto_inc%"; -# This should fail because of overflow but it doesn't. It fails with -# a duplicate entry message because of a MySQL server bug, it wraps -# around. See MySQL Bug# 39828, once MySQL fix the bug we can replace -# the ER_DUP_ENTRY, 1062 below with the appropriate error message -# -# Since this asserts when compiled --with-debug, we can't properly test this -# until Bug #39828 is fixed. For now, this test is meaningless. -#if Bug #39828 is fixed -# Still need to fix this error code, error should mention overflow -#-- error ER_DUP_ENTRY,1062 -#INSERT INTO t1 VALUES (NULL),(NULL), (NULL); -#else -INSERT INTO t1 VALUES (NULL),(NULL); -#endif +--error ER_AUTOINC_READ_FAILED +INSERT INTO t1 VALUES (NULL),(NULL), (NULL); SELECT * FROM t1; DROP TABLE t1; @@ -376,20 +351,8 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976; SHOW VARIABLES LIKE "%auto_inc%"; -# This should fail because of overflow but it doesn't. It wraps around -# and the autoinc values look bogus too. -# See MySQL Bug# 39828, once MySQL fix the bug we can enable the error -# code expected test. -# -- error ER_AUTOINC_READ_FAILED,1467 -# -# Since this asserts when compiled --with-debug, we can't properly test this -# until Bug #39828 is fixed. For now, this test is meaningless. -#if Bug #39828 is fixed -#-- error ER_AUTOINC_READ_FAILED,1467 -#INSERT INTO t1 VALUES (NULL),(NULL); -#else -INSERT INTO t1 VALUES (NULL); -#endif +--error ER_WARN_DATA_OUT_OF_RANGE +INSERT INTO t1 VALUES (NULL),(NULL); SELECT * FROM t1; DROP TABLE t1; -- cgit v1.2.1 From fcb83cbf15653bbed15936d8eafb4fc7de3e743b Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Tue, 14 Dec 2010 12:33:03 +0300 Subject: Fixed following problems: --Bug#52157 various crashes and assertions with multi-table update, stored function --Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb --Bug#57703 create view cause Assertion failed: 0, file .\item_subselect.cc, line 846 --Bug#57352 valgrind warnings when creating view --Recently discovered problem when a nested materialized derived table is used before being populated and it leads to incorrect result We have several modes when we should disable subquery evaluation. The reasons for disabling are different. It could be uselessness of the evaluation as in case of 'CREATE VIEW' or 'PREPARE stmt', or we should disable subquery evaluation if tables are not locked yet as it happens in bug#54475, or too early evaluation of subqueries can lead to wrong result as it happened in Bug#19077. Main problem is that if subquery items are treated as const they are evaluated in ::fix_fields(), ::fix_length_and_dec() of the parental items as a lot of these methods have Item::val_...() calls inside. We have to make subqueries non-const to prevent unnecessary subquery evaluation. At the moment we have different methods for this. Here is a list of these modes: 1. PREPARE stmt; We use UNCACHEABLE_PREPARE flag. It is set during parsing in sql_parse.cc, mysql_new_select() for each SELECT_LEX object and cleared at the end of PREPARE in sql_prepare.cc, init_stmt_after_parse(). If this flag is set subquery becomes non-const and evaluation does not happen. 2. CREATE|ALTER VIEW, SHOW CREATE VIEW, I_S tables which process FRM files We use LEX::view_prepare_mode field. We set it before view preparation and check this flag in ::fix_fields(), ::fix_length_and_dec(). Some bugs are fixed using this approach, some are not(Bug#57352, Bug#57703). The problem here is that we have a lot of ::fix_fields(), ::fix_length_and_dec() where we use Item::val_...() calls for const items. 3. Derived tables with subquery = wrong result(Bug19077) The reason of this bug is too early subquery evaluation. It was fixed by adding Item::with_subselect field The check of this field in appropriate places prevents const item evaluation if the item have subquery. The fix for Bug19077 fixes only the problem with convert_constant_item() function and does not cover other places(::fix_fields(), ::fix_length_and_dec() again) where subqueries could be evaluated. Example: CREATE TABLE t1 (i INT, j BIGINT); INSERT INTO t1 VALUES (1, 2), (2, 2), (3, 2); SELECT * FROM (SELECT MIN(i) FROM t1 WHERE j = SUBSTRING('12', (SELECT * FROM (SELECT MIN(j) FROM t1) t2))) t3; DROP TABLE t1; 4. Derived tables with subquery where subquery is evaluated before table locking(Bug#54475, Bug#52157) Suggested solution is following: -Introduce new field LEX::context_analysis_only with the following possible flags: #define CONTEXT_ANALYSIS_ONLY_PREPARE 1 #define CONTEXT_ANALYSIS_ONLY_VIEW 2 #define CONTEXT_ANALYSIS_ONLY_DERIVED 4 -Set/clean these flags when we perform context analysis operation -Item_subselect::const_item() returns result depending on LEX::context_analysis_only. If context_analysis_only is set then we return FALSE that means that subquery is non-const. As all subquery types are wrapped by Item_subselect it allow as to make subquery non-const when it's necessary. mysql-test/r/derived.result: test case mysql-test/r/multi_update.result: test case mysql-test/r/view.result: test case mysql-test/suite/innodb/r/innodb_multi_update.result: test case mysql-test/suite/innodb/t/innodb_multi_update.test: test case mysql-test/suite/innodb_plugin/r/innodb_multi_update.result: test case mysql-test/suite/innodb_plugin/t/innodb_multi_update.test: test case mysql-test/t/derived.test: test case mysql-test/t/multi_update.test: test case mysql-test/t/view.test: test case sql/item.cc: --removed unnecessary code sql/item_cmpfunc.cc: --removed unnecessary checks --THD::is_context_analysis_only() is replaced with LEX::is_ps_or_view_context_analysis() sql/item_func.cc: --refactored context analysis checks sql/item_row.cc: --removed unnecessary checks sql/item_subselect.cc: --removed unnecessary code --added DBUG_ASSERT into Item_subselect::exec() which asserts that subquery execution can not happen if LEX::context_analysis_only is set, i.e. at context analysis stage. --Item_subselect::const_item() Return FALSE if LEX::context_analysis_only is set. It prevents subquery evaluation in ::fix_fields & ::fix_length_and_dec at context analysis stage. sql/item_subselect.h: --removed unnecessary code sql/mysql_priv.h: --Added new set of flags. sql/sql_class.h: --removed unnecessary code sql/sql_derived.cc: --added LEX::context_analysis_only analysis intialization/cleanup sql/sql_lex.cc: --init LEX::context_analysis_only field sql/sql_lex.h: --New LEX::context_analysis_only field sql/sql_parse.cc: --removed unnecessary code sql/sql_prepare.cc: --removed unnecessary code --added LEX::context_analysis_only analysis intialization/cleanup sql/sql_select.cc: --refactored context analysis checks sql/sql_show.cc: --added LEX::context_analysis_only analysis intialization/cleanup sql/sql_view.cc: --added LEX::context_analysis_only analysis intialization/cleanup --- mysql-test/suite/innodb/r/innodb_multi_update.result | 8 ++++++++ mysql-test/suite/innodb/t/innodb_multi_update.test | 11 +++++++++++ mysql-test/suite/innodb_plugin/r/innodb_multi_update.result | 8 ++++++++ mysql-test/suite/innodb_plugin/t/innodb_multi_update.test | 11 +++++++++++ 4 files changed, 38 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/r/innodb_multi_update.result b/mysql-test/suite/innodb/r/innodb_multi_update.result index 7af9b030d1f..558fc3938a8 100644 --- a/mysql-test/suite/innodb/r/innodb_multi_update.result +++ b/mysql-test/suite/innodb/r/innodb_multi_update.result @@ -74,3 +74,11 @@ a b 4 14 5 15 drop table bug38999_1,bug38999_2; +# +# Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb +# +CREATE TABLE t1(f1 INT) ENGINE=INNODB; +INSERT INTO t1 VALUES(1); +UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1; +ERROR 21000: Operand should contain 1 column(s) +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb_multi_update.test b/mysql-test/suite/innodb/t/innodb_multi_update.test index 7ab17ccf70a..8356c20c88f 100644 --- a/mysql-test/suite/innodb/t/innodb_multi_update.test +++ b/mysql-test/suite/innodb/t/innodb_multi_update.test @@ -27,3 +27,14 @@ select * from bug38999_1; select * from bug38999_2; drop table bug38999_1,bug38999_2; + + +--echo # +--echo # Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb +--echo # +CREATE TABLE t1(f1 INT) ENGINE=INNODB; +INSERT INTO t1 VALUES(1); +--error ER_OPERAND_COLUMNS +UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1; +DROP TABLE t1; + diff --git a/mysql-test/suite/innodb_plugin/r/innodb_multi_update.result b/mysql-test/suite/innodb_plugin/r/innodb_multi_update.result index 7af9b030d1f..558fc3938a8 100644 --- a/mysql-test/suite/innodb_plugin/r/innodb_multi_update.result +++ b/mysql-test/suite/innodb_plugin/r/innodb_multi_update.result @@ -74,3 +74,11 @@ a b 4 14 5 15 drop table bug38999_1,bug38999_2; +# +# Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb +# +CREATE TABLE t1(f1 INT) ENGINE=INNODB; +INSERT INTO t1 VALUES(1); +UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1; +ERROR 21000: Operand should contain 1 column(s) +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_plugin/t/innodb_multi_update.test b/mysql-test/suite/innodb_plugin/t/innodb_multi_update.test index 890889301e6..3d9a9a53193 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb_multi_update.test +++ b/mysql-test/suite/innodb_plugin/t/innodb_multi_update.test @@ -27,3 +27,14 @@ select * from bug38999_1; select * from bug38999_2; drop table bug38999_1,bug38999_2; + + +--echo # +--echo # Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb +--echo # +CREATE TABLE t1(f1 INT) ENGINE=INNODB; +INSERT INTO t1 VALUES(1); +--error ER_OPERAND_COLUMNS +UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1; +DROP TABLE t1; + -- cgit v1.2.1 From e988de279fc0102293844f87a29727910dd477ab Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 14 Dec 2010 11:38:19 +0200 Subject: Speed up innodb_bug57255.test Submitted by: Stewart Smith (via internals@lists.mysql.com) --- mysql-test/suite/innodb/t/innodb_bug57255.test | 2 ++ mysql-test/suite/innodb_plugin/t/innodb_bug57255.test | 2 ++ 2 files changed, 4 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/t/innodb_bug57255.test b/mysql-test/suite/innodb/t/innodb_bug57255.test index 2b37a0a6092..0bf686578b2 100644 --- a/mysql-test/suite/innodb/t/innodb_bug57255.test +++ b/mysql-test/suite/innodb/t/innodb_bug57255.test @@ -12,6 +12,7 @@ create table C(id int not null auto_increment primary key, f1 int not null, fore insert into A values(1), (2); --disable_query_log +begin; let $i=257; while ($i) { @@ -24,6 +25,7 @@ while ($i) insert into C(f1) values(2); dec $i; } +commit; --enable_query_log # Following Deletes should not report error diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug57255.test b/mysql-test/suite/innodb_plugin/t/innodb_bug57255.test index 96184c355b6..e5056d3e23c 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb_bug57255.test +++ b/mysql-test/suite/innodb_plugin/t/innodb_bug57255.test @@ -12,6 +12,7 @@ create table C(id int not null auto_increment primary key, f1 int not null, fore insert into A values(1), (2); --disable_query_log +begin; let $i=257; while ($i) { @@ -24,6 +25,7 @@ while ($i) insert into C(f1) values(2); dec $i; } +commit; --enable_query_log # Following Deletes should not report error -- cgit v1.2.1 From 21c146d5ca51949258bc4fbabc1ef1b76cd6cebc Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Tue, 14 Dec 2010 12:13:35 +0100 Subject: Bug#45717: A few test cases are disabled due to closed Bug#30577 Backport from 5.5. OK from Anitha G. to push to 5.1. Removed floor(float_col) tests, enabled floor(decimal_col) tests --- .../parts/inc/part_supported_sql_funcs_main.inc | 23 ----- mysql-test/suite/parts/inc/partition_decimal.inc | 9 +- mysql-test/suite/parts/inc/partition_double.inc | 51 ---------- mysql-test/suite/parts/inc/partition_float.inc | 50 ---------- .../suite/parts/r/partition_decimal_innodb.result | 108 +++++++++++++++++++++ .../suite/parts/r/partition_decimal_myisam.result | 108 +++++++++++++++++++++ 6 files changed, 218 insertions(+), 131 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc b/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc index 25a9774d2a1..45d77225a23 100644 --- a/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc +++ b/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc @@ -39,29 +39,6 @@ let $val3 = 17 ; let $val4 = 15 ; --source suite/parts/inc/partition_supported_sql_funcs.inc - -let $sqlfunc = ceiling(col1); -let $valsqlfunc = ceiling(15); -let $coltype = float(7,4); -let $infile = part_supported_sql_funcs_int_float.inc; -let $val1 = 5.1230; -let $val2 = 13.345; -let $val3 = 17.987; -let $val4 = 15.654 ; -# DISABLED due to bug 30577 -#--source suite/parts/inc/partition_supported_sql_funcs.inc - -let $sqlfunc = floor(col1); -let $valsqlfunc = floor(15.123); -let $coltype = float(7,4); -let $infile = part_supported_sql_funcs_int_float.inc; -let $val1 = 5.1230; -let $val2 = 13.345; -let $val3 = 17.987; -let $val4 = 15.654 ; -# DISABLED due to bug 30577 -#--source suite/parts/inc/partition_supported_sql_funcs.inc - let $sqlfunc = mod(col1,10); let $valsqlfunc = mod(15,10); let $coltype = int; diff --git a/mysql-test/suite/parts/inc/partition_decimal.inc b/mysql-test/suite/parts/inc/partition_decimal.inc index 17cef08e275..7d3fe058de9 100644 --- a/mysql-test/suite/parts/inc/partition_decimal.inc +++ b/mysql-test/suite/parts/inc/partition_decimal.inc @@ -37,10 +37,8 @@ drop table t2; # Bug 30577: FLOOR() and CEILING() not usable as partition functions # Partition functions are required to return INT_RESULT; FLOOR() and -# CEILING() do not, unless they have an INT argument. Disable this -# portion of the test until bug 30577 is fixed. +# CEILING() do not, unless they have an INT or DECIMAL argument. ---disable_parsing eval create table t3 (a decimal(18,9) not null, primary key(a)) engine=$engine partition by range (floor(a)) subpartition by key (a) subpartitions 2 ( @@ -65,7 +63,7 @@ select count(*) from t3; drop table t3; eval create table t4 (a decimal(18,9) not null, primary key(a)) engine=$engine -partition by list (floor(a)) subpartition by key (a) subpartitions 2 ( +partition by list (ceiling(a)) subpartition by key (a) subpartitions 2 ( partition pa2 values in (1,2), partition pa4 values in (3,4), partition pa6 values in (5,6), @@ -85,6 +83,3 @@ dec $count; --enable_query_log select count(*) from t4; drop table t4; - -# Disabled due to Bug 30577 ---enable_parsing diff --git a/mysql-test/suite/parts/inc/partition_double.inc b/mysql-test/suite/parts/inc/partition_double.inc index befbe860b86..cfae95022ce 100644 --- a/mysql-test/suite/parts/inc/partition_double.inc +++ b/mysql-test/suite/parts/inc/partition_double.inc @@ -34,54 +34,3 @@ dec $count; --enable_query_log select count(*) from t2; drop table t2; - - -# Bug 30577: FLOOR() and CEILING() not usable as partition functions -# Partition functions are required to return INT_RESULT; FLOOR() and -# CEILING() do not, unless they have an INT argument. Disable this -# portion of the test until bug 30577 is fixed. - ---disable_parsing - -eval create table t3 (a double not null, primary key(a)) engine=$engine -partition by range (floor(a)) subpartition by key (a) subpartitions 3 ( -partition pa1 values less than (3), -partition pa3 values less than (6), -partition pa10 values less than (10) -); -show create table t3; -let $count=9; ---echo $count*3 inserts; -while ($count) -{ -eval insert into t3 values ($count); -eval insert into t3 values ($count+0.33); -eval insert into t3 values ($count+0.75); -dec $count; -} -select count(*) from t3; -select * from t3; -drop table t3; - -eval create table t4 (a double not null, primary key(a)) engine=$engine -partition by list (floor(a)) subpartition by key (a) subpartitions 3 ( -partition pa1 values in (1,2,3), -partition pa3 values in (4,5,6), -partition pa10 values in (7,8,9,10) -); -show create table t4; -let $count=9; ---echo $count*3 inserts; -while ($count) -{ -eval insert into t4 values ($count); -eval insert into t4 values ($count+0.33); -eval insert into t4 values ($count+0.75); -dec $count; -} -select count(*) from t4; -select * from t4; -drop table t4; - -# Disabled due to Bug 30577 ---enable_parsing diff --git a/mysql-test/suite/parts/inc/partition_float.inc b/mysql-test/suite/parts/inc/partition_float.inc index 34f14137d4d..7fa6b3043be 100644 --- a/mysql-test/suite/parts/inc/partition_float.inc +++ b/mysql-test/suite/parts/inc/partition_float.inc @@ -38,53 +38,3 @@ dec $count; --enable_query_log select count(*) from t2; drop table t2; - -# Bug 30577: FLOOR() and CEILING() not usable as partition functions -# Partition functions are required to return INT_RESULT; FLOOR() and -# CEILING() do not, unless they have an INT argument. Disable this -# portion of the test until bug 30577 is fixed. - ---disable_parsing - -eval create table t3 (a float not null, primary key(a)) engine=$engine -partition by range (floor(a)) subpartition by key (a) subpartitions 3 ( -partition pa1 values less than (3), -partition pa3 values less than (6), -partition pa10 values less than (10) -); -show create table t3; -let $count=9; ---echo $count*3 inserts; -while ($count) -{ -eval insert into t3 values ($count); -eval insert into t3 values ($count+0.33); -eval insert into t3 values ($count+0.75); -dec $count; -} -select count(*) from t3; -select * from t3; -drop table t3; - -eval create table t4 (a float not null, primary key(a)) engine=$engine -partition by list (floor(a)) subpartition by key (a) subpartitions 3 ( -partition pa1 values in (1,2,3), -partition pa3 values in (4,5,6), -partition pa10 values in (7,8,9,10) -); -show create table t4; -let $count=9; ---echo $count*3 inserts; -while ($count) -{ -eval insert into t4 values ($count); -eval insert into t4 values ($count+0.33); -eval insert into t4 values ($count+0.75); -dec $count; -} -select count(*) from t4; -select * from t4; -drop table t4; - -# Disabled due to Bug 30577 ---enable_parsing diff --git a/mysql-test/suite/parts/r/partition_decimal_innodb.result b/mysql-test/suite/parts/r/partition_decimal_innodb.result index 70debf3c595..c69c880cc6f 100644 --- a/mysql-test/suite/parts/r/partition_decimal_innodb.result +++ b/mysql-test/suite/parts/r/partition_decimal_innodb.result @@ -86,3 +86,111 @@ select count(*) from t2; count(*) 3072 drop table t2; +create table t3 (a decimal(18,9) not null, primary key(a)) engine='InnoDB' +partition by range (floor(a)) subpartition by key (a) subpartitions 2 ( +partition pa2 values less than (2), +partition pa4 values less than (4), +partition pa6 values less than (6), +partition pa8 values less than (8), +partition pa10 values less than (10) +); +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `a` decimal(18,9) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (floor(a)) +SUBPARTITION BY KEY (a) +SUBPARTITIONS 2 +(PARTITION pa2 VALUES LESS THAN (2) ENGINE = InnoDB, + PARTITION pa4 VALUES LESS THAN (4) ENGINE = InnoDB, + PARTITION pa6 VALUES LESS THAN (6) ENGINE = InnoDB, + PARTITION pa8 VALUES LESS THAN (8) ENGINE = InnoDB, + PARTITION pa10 VALUES LESS THAN (10) ENGINE = InnoDB) */ +9*3 inserts; +insert into t3 values (9); +insert into t3 values (9+0.333333333); +insert into t3 values (9+0.755555555); +insert into t3 values (8); +insert into t3 values (8+0.333333333); +insert into t3 values (8+0.755555555); +insert into t3 values (7); +insert into t3 values (7+0.333333333); +insert into t3 values (7+0.755555555); +insert into t3 values (6); +insert into t3 values (6+0.333333333); +insert into t3 values (6+0.755555555); +insert into t3 values (5); +insert into t3 values (5+0.333333333); +insert into t3 values (5+0.755555555); +insert into t3 values (4); +insert into t3 values (4+0.333333333); +insert into t3 values (4+0.755555555); +insert into t3 values (3); +insert into t3 values (3+0.333333333); +insert into t3 values (3+0.755555555); +insert into t3 values (2); +insert into t3 values (2+0.333333333); +insert into t3 values (2+0.755555555); +insert into t3 values (1); +insert into t3 values (1+0.333333333); +insert into t3 values (1+0.755555555); +select count(*) from t3; +count(*) +27 +drop table t3; +create table t4 (a decimal(18,9) not null, primary key(a)) engine='InnoDB' +partition by list (ceiling(a)) subpartition by key (a) subpartitions 2 ( +partition pa2 values in (1,2), +partition pa4 values in (3,4), +partition pa6 values in (5,6), +partition pa8 values in (7,8), +partition pa10 values in (9,10) +); +show create table t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `a` decimal(18,9) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY LIST (ceiling(a)) +SUBPARTITION BY KEY (a) +SUBPARTITIONS 2 +(PARTITION pa2 VALUES IN (1,2) ENGINE = InnoDB, + PARTITION pa4 VALUES IN (3,4) ENGINE = InnoDB, + PARTITION pa6 VALUES IN (5,6) ENGINE = InnoDB, + PARTITION pa8 VALUES IN (7,8) ENGINE = InnoDB, + PARTITION pa10 VALUES IN (9,10) ENGINE = InnoDB) */ +9*3 inserts; +insert into t4 values (9); +insert into t4 values (9+0.333333333); +insert into t4 values (9+0.755555555); +insert into t4 values (8); +insert into t4 values (8+0.333333333); +insert into t4 values (8+0.755555555); +insert into t4 values (7); +insert into t4 values (7+0.333333333); +insert into t4 values (7+0.755555555); +insert into t4 values (6); +insert into t4 values (6+0.333333333); +insert into t4 values (6+0.755555555); +insert into t4 values (5); +insert into t4 values (5+0.333333333); +insert into t4 values (5+0.755555555); +insert into t4 values (4); +insert into t4 values (4+0.333333333); +insert into t4 values (4+0.755555555); +insert into t4 values (3); +insert into t4 values (3+0.333333333); +insert into t4 values (3+0.755555555); +insert into t4 values (2); +insert into t4 values (2+0.333333333); +insert into t4 values (2+0.755555555); +insert into t4 values (1); +insert into t4 values (1+0.333333333); +insert into t4 values (1+0.755555555); +select count(*) from t4; +count(*) +27 +drop table t4; diff --git a/mysql-test/suite/parts/r/partition_decimal_myisam.result b/mysql-test/suite/parts/r/partition_decimal_myisam.result index f9f7a1e4fe2..cdafb721ea4 100644 --- a/mysql-test/suite/parts/r/partition_decimal_myisam.result +++ b/mysql-test/suite/parts/r/partition_decimal_myisam.result @@ -86,3 +86,111 @@ select count(*) from t2; count(*) 196605 drop table t2; +create table t3 (a decimal(18,9) not null, primary key(a)) engine='MYISAM' +partition by range (floor(a)) subpartition by key (a) subpartitions 2 ( +partition pa2 values less than (2), +partition pa4 values less than (4), +partition pa6 values less than (6), +partition pa8 values less than (8), +partition pa10 values less than (10) +); +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `a` decimal(18,9) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (floor(a)) +SUBPARTITION BY KEY (a) +SUBPARTITIONS 2 +(PARTITION pa2 VALUES LESS THAN (2) ENGINE = MyISAM, + PARTITION pa4 VALUES LESS THAN (4) ENGINE = MyISAM, + PARTITION pa6 VALUES LESS THAN (6) ENGINE = MyISAM, + PARTITION pa8 VALUES LESS THAN (8) ENGINE = MyISAM, + PARTITION pa10 VALUES LESS THAN (10) ENGINE = MyISAM) */ +9*3 inserts; +insert into t3 values (9); +insert into t3 values (9+0.333333333); +insert into t3 values (9+0.755555555); +insert into t3 values (8); +insert into t3 values (8+0.333333333); +insert into t3 values (8+0.755555555); +insert into t3 values (7); +insert into t3 values (7+0.333333333); +insert into t3 values (7+0.755555555); +insert into t3 values (6); +insert into t3 values (6+0.333333333); +insert into t3 values (6+0.755555555); +insert into t3 values (5); +insert into t3 values (5+0.333333333); +insert into t3 values (5+0.755555555); +insert into t3 values (4); +insert into t3 values (4+0.333333333); +insert into t3 values (4+0.755555555); +insert into t3 values (3); +insert into t3 values (3+0.333333333); +insert into t3 values (3+0.755555555); +insert into t3 values (2); +insert into t3 values (2+0.333333333); +insert into t3 values (2+0.755555555); +insert into t3 values (1); +insert into t3 values (1+0.333333333); +insert into t3 values (1+0.755555555); +select count(*) from t3; +count(*) +27 +drop table t3; +create table t4 (a decimal(18,9) not null, primary key(a)) engine='MYISAM' +partition by list (ceiling(a)) subpartition by key (a) subpartitions 2 ( +partition pa2 values in (1,2), +partition pa4 values in (3,4), +partition pa6 values in (5,6), +partition pa8 values in (7,8), +partition pa10 values in (9,10) +); +show create table t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `a` decimal(18,9) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY LIST (ceiling(a)) +SUBPARTITION BY KEY (a) +SUBPARTITIONS 2 +(PARTITION pa2 VALUES IN (1,2) ENGINE = MyISAM, + PARTITION pa4 VALUES IN (3,4) ENGINE = MyISAM, + PARTITION pa6 VALUES IN (5,6) ENGINE = MyISAM, + PARTITION pa8 VALUES IN (7,8) ENGINE = MyISAM, + PARTITION pa10 VALUES IN (9,10) ENGINE = MyISAM) */ +9*3 inserts; +insert into t4 values (9); +insert into t4 values (9+0.333333333); +insert into t4 values (9+0.755555555); +insert into t4 values (8); +insert into t4 values (8+0.333333333); +insert into t4 values (8+0.755555555); +insert into t4 values (7); +insert into t4 values (7+0.333333333); +insert into t4 values (7+0.755555555); +insert into t4 values (6); +insert into t4 values (6+0.333333333); +insert into t4 values (6+0.755555555); +insert into t4 values (5); +insert into t4 values (5+0.333333333); +insert into t4 values (5+0.755555555); +insert into t4 values (4); +insert into t4 values (4+0.333333333); +insert into t4 values (4+0.755555555); +insert into t4 values (3); +insert into t4 values (3+0.333333333); +insert into t4 values (3+0.755555555); +insert into t4 values (2); +insert into t4 values (2+0.333333333); +insert into t4 values (2+0.755555555); +insert into t4 values (1); +insert into t4 values (1+0.333333333); +insert into t4 values (1+0.755555555); +select count(*) from t4; +count(*) +27 +drop table t4; -- cgit v1.2.1 From 92a0463edb5795e1bfb0be2d09fe745daf2b7115 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 14 Dec 2010 16:43:25 +0000 Subject: BUG 46697 Addressing review comments. --- mysql-test/suite/rpl/r/rpl_stm_EE_err2.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result index da24c4f5db1..4bbbc0e99c6 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result +++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result @@ -11,6 +11,6 @@ set sql_log_bin=1; insert into t1 values(1),(2); ERROR 23000: Duplicate entry '2' for key 'a' drop table t1; -Error: "Query caused different errors on master and slave. Error on master: message format='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) +Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) Errno: "0" (expected 0) drop table t1; -- cgit v1.2.1 From 21da523f1796555fb61d5053ec8509ca3d74a2f6 Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Thu, 16 Dec 2010 11:49:40 +0100 Subject: Bug58747 57359 patch: breaks secure_file_priv+not secure yet+still accesses other folders "load data infile .." allowed for access to unautohorized tables. Due to a faulty if-statement it was possible to circumvent the secure_file_priv restriction. mysql-test/mysql-test-run.pl: * Add SECURE_LOAD_PATH environment variable to mtr test cases. mysql-test/suite/sys_vars/r/secure_file_priv2.result: * add test for bug58747 mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt: * add test for bug58747 mysql-test/suite/sys_vars/t/secure_file_priv2.test: * add test for bug58747 sql/sql_load.cc: * Correct faulty if-statement * fix indentation * move my_stat() block to after is_secure_file_path() check. --- .../suite/sys_vars/r/secure_file_priv2.result | 6 ++++++ .../suite/sys_vars/t/secure_file_priv2-master.opt | 1 + mysql-test/suite/sys_vars/t/secure_file_priv2.test | 23 ++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 mysql-test/suite/sys_vars/r/secure_file_priv2.result create mode 100644 mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt create mode 100644 mysql-test/suite/sys_vars/t/secure_file_priv2.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/sys_vars/r/secure_file_priv2.result b/mysql-test/suite/sys_vars/r/secure_file_priv2.result new file mode 100644 index 00000000000..ec91b6037d0 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/secure_file_priv2.result @@ -0,0 +1,6 @@ +CREATE TABLE t1 (c1 INT); +LOAD DATA INFILE "t1.MYI" into table t1; +ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement +LOAD DATA INFILE "/test" into table t1; +ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement +DROP TABLE t1; diff --git a/mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt b/mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt new file mode 100644 index 00000000000..1d9a49c8f75 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/secure_file_priv2-master.opt @@ -0,0 +1 @@ +--secure_file_priv=$SECURE_LOAD_PATH diff --git a/mysql-test/suite/sys_vars/t/secure_file_priv2.test b/mysql-test/suite/sys_vars/t/secure_file_priv2.test new file mode 100644 index 00000000000..0ca0a1839e1 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/secure_file_priv2.test @@ -0,0 +1,23 @@ +# +# Bug58747 breaks secure_file_priv+not secure yet+still accesses other folders +# +CREATE TABLE t1 (c1 INT); +# +# Before the patch this statement failed with +# Linux: +# -> errno 13: 'Can't get stat of ' +# Windows: +# -> Warning 1366 Incorrect integer value: '■■☺' for +# -> column 'c1' at row 1 +# Now it should consistently fail with ER_OPTION_PREVENTS_STATEMENT +# on all platforms. +--error ER_OPTION_PREVENTS_STATEMENT +LOAD DATA INFILE "t1.MYI" into table t1; + +# +# The following test makes the assuption that /test isn't a valid path in any +# operating system running the test suite. +--error ER_OPTION_PREVENTS_STATEMENT +LOAD DATA INFILE "/test" into table t1; + +DROP TABLE t1; -- cgit v1.2.1 From 4c0c5525825714ccd91c3c07e303c068bcc12ce5 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Fri, 17 Dec 2010 01:17:03 +0000 Subject: BUG#46166 Post-push fixes: - fixed platform dependent result files - appeasing valgrind warnings: Fault injection was also uncovering a previously existing potential mem leaks. For BUG#46166 testing purposes, fixed by forcing handling the leak when injecting faults. --- mysql-test/suite/binlog/r/binlog_index.result | 4 ++-- mysql-test/suite/binlog/t/binlog_index.test | 2 ++ mysql-test/suite/rpl/r/rpl_binlog_errors.result | 12 ++++++------ mysql-test/suite/rpl/t/rpl_binlog_errors.test | 8 +++++--- 4 files changed, 15 insertions(+), 11 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result index 6b422b82191..11cf43b8a5e 100644 --- a/mysql-test/suite/binlog/r/binlog_index.result +++ b/mysql-test/suite/binlog/r/binlog_index.result @@ -132,7 +132,7 @@ master-bin.000011 # fault_injection_registering_index SET SESSION debug="+d,fault_injection_registering_index"; flush logs; -ERROR HY000: Can't open file: './master-bin.000012' (errno: 1) +ERROR HY000: Can't open file: 'master-bin.000012' (errno: 1) SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); SELECT @index; @index @@ -157,7 +157,7 @@ master-bin.000012 # fault_injection_updating_index SET SESSION debug="+d,fault_injection_updating_index"; flush logs; -ERROR HY000: Can't open file: './master-bin.000013' (errno: 1) +ERROR HY000: Can't open file: 'master-bin.000013' (errno: 1) SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index'); SELECT @index; @index diff --git a/mysql-test/suite/binlog/t/binlog_index.test b/mysql-test/suite/binlog/t/binlog_index.test index d2b34083182..b735574fdb9 100644 --- a/mysql-test/suite/binlog/t/binlog_index.test +++ b/mysql-test/suite/binlog/t/binlog_index.test @@ -218,6 +218,7 @@ SELECT @index; --echo # fault_injection_registering_index SET SESSION debug="+d,fault_injection_registering_index"; +-- replace_regex /\.[\\\/]master/master/ -- error ER_CANT_OPEN_FILE flush logs; @@ -237,6 +238,7 @@ SELECT @index; --echo # fault_injection_updating_index SET SESSION debug="+d,fault_injection_updating_index"; +-- replace_regex /\.[\\\/]master/master/ -- error ER_CANT_OPEN_FILE flush logs; diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result index e67b60860ca..6c8c750bc79 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result @@ -35,9 +35,9 @@ master-bin.000001 # SET GLOBAL debug=""; RESET MASTER; ###################### TEST #3 -CREATE TABLE t1 (a int); -CREATE TABLE t2 (a TEXT) Engine=InnoDB; -CREATE TABLE t4 (a TEXT); +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a VARCHAR(16384)) Engine=InnoDB; +CREATE TABLE t4 (a VARCHAR(16384)); INSERT INTO t1 VALUES (1); RESET MASTER; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2; @@ -181,7 +181,7 @@ SHOW WARNINGS; Level Code Message SET GLOBAL debug="+d,fault_injection_registering_index"; FLUSH LOGS; -ERROR HY000: Can't open file: './master-bin.000002' (errno: 1) +ERROR HY000: Can't open file: 'master-bin.000002' (errno: 1) SET GLOBAL debug="-d,fault_injection_registering_index"; SHOW BINARY LOGS; ERROR HY000: You are not using binary logging @@ -194,7 +194,7 @@ DROP TABLE t5; ###################### TEST #11 SET GLOBAL debug="+d,fault_injection_openning_index"; FLUSH LOGS; -ERROR HY000: Can't open file: './master-bin.index' (errno: 1) +ERROR HY000: Can't open file: 'master-bin.index' (errno: 1) SET GLOBAL debug="-d,fault_injection_openning_index"; RESET MASTER; ERROR HY000: Binlog closed, cannot RESET MASTER @@ -207,7 +207,7 @@ DROP TABLE t5; ###################### TEST #12 SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; FLUSH LOGS; -ERROR HY000: Can't open file: 'master-bin' (errno: 0) +ERROR HY000: Can't open file: 'master-bin' (errno: 2) SET GLOBAL debug="-d,fault_injection_new_file_rotate_event"; RESET MASTER; ERROR HY000: Binlog closed, cannot RESET MASTER diff --git a/mysql-test/suite/rpl/t/rpl_binlog_errors.test b/mysql-test/suite/rpl/t/rpl_binlog_errors.test index ae83659a38a..e4eb212e1cd 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_errors.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_errors.test @@ -82,9 +82,9 @@ RESET MASTER; ### ACTION: create some tables (t1, t2, t4) and insert some values in ### table t1 -CREATE TABLE t1 (a int); -CREATE TABLE t2 (a TEXT) Engine=InnoDB; -CREATE TABLE t4 (a TEXT); +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a VARCHAR(16384)) Engine=InnoDB; +CREATE TABLE t4 (a VARCHAR(16384)); INSERT INTO t1 VALUES (1); RESET MASTER; @@ -272,6 +272,7 @@ SHOW WARNINGS; # +d,fault_injection_registering_index => injects fault on MYSQL_BIN_LOG::open SET GLOBAL debug="+d,fault_injection_registering_index"; +-- replace_regex /\.[\\\/]master/master/ -- error ER_CANT_OPEN_FILE FLUSH LOGS; SET GLOBAL debug="-d,fault_injection_registering_index"; @@ -298,6 +299,7 @@ DROP TABLE t5; # +d,fault_injection_openning_index => injects fault on MYSQL_BIN_LOG::open_index_file SET GLOBAL debug="+d,fault_injection_openning_index"; +-- replace_regex /\.[\\\/]master/master/ -- error ER_CANT_OPEN_FILE FLUSH LOGS; SET GLOBAL debug="-d,fault_injection_openning_index"; -- cgit v1.2.1 From 122cde4c38ed821a262c58462a8a85663288344e Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 17 Dec 2010 10:20:44 +0200 Subject: post-merge test suite update --- mysql-test/suite/binlog/r/binlog_unsafe.result | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 6b2a83c9483..b851e472689 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -28,6 +28,7 @@ Warnings: Note 1592 Statement may not be safe to log in statement format. INSERT INTO t2 VALUES (@@hostname); Warnings: +Warning 1265 Data truncated for column 'a' at row 1 Note 1592 Statement may not be safe to log in statement format. ---- Insert from stored procedure ---- CREATE PROCEDURE proc() @@ -48,6 +49,7 @@ 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. +Warning 1265 Data truncated for column 'a' at row 6 Note 1592 Statement may not be safe to log in statement format. ---- Insert from stored function ---- CREATE FUNCTION func() @@ -72,6 +74,7 @@ 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. +Warning 1265 Data truncated for column 'a' at row 6 Note 1592 Statement may not be safe to log in statement format. ---- Insert from trigger ---- CREATE TRIGGER trig @@ -94,6 +97,7 @@ 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. +Warning 1265 Data truncated for column 'a' at row 6 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 ---- @@ -124,6 +128,7 @@ Warnings: Note 1592 Statement may not be safe to log in statement format. EXECUTE p7; Warnings: +Warning 1265 Data truncated for column 'a' at row 1 Note 1592 Statement may not be safe to log in statement format. ---- Insert from nested call of triggers / functions / procedures ---- CREATE PROCEDURE proc1() @@ -160,6 +165,7 @@ 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. +Warning 1265 Data truncated for column 'a' at row 6 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); @@ -303,6 +309,8 @@ INSERT INTO t2 VALUES (@@global.init_slave); INSERT INTO t2 VALUES (@@hostname); END| INSERT INTO trigger_table VALUES ('bye.'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 6 DROP FUNCTION fun_check_log_bin; DROP FUNCTION func6; DROP FUNCTION func7; -- cgit v1.2.1 From 8b27f9a05e2f49191b57b8717a31753573981fe7 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Sun, 19 Dec 2010 18:07:28 +0100 Subject: BUG#49978: Replication tests don't clean up replication state at the end Major replication test framework cleanup. This does the following: - Ensure that all tests clean up the replication state when they finish, by making check-testcase check the output of SHOW SLAVE STATUS. This implies: - Slave must not be running after test finished. This is good because it removes the risk for sporadic errors in subsequent tests when a test forgets to sync correctly. - Slave SQL and IO errors must be cleared when test ends. This is good because we will notice if a test gets an unexpected error in the slave threads near the end. - We no longer have to clean up before a test starts. - Ensure that all tests that wait for an error in one of the slave threads waits for a specific error. It is no longer possible to source wait_for_slave_[sql|io]_to_stop.inc when there is an error in one of the slave threads. This is good because: - If a test expects an error but there is a bug that causes another error to happen, or if it stops the slave thread without an error, then we will notice. - When developing tests, wait_for_*_to_[start|stop].inc will fail immediately if there is an error in the relevant slave thread. Before this patch, we had to wait for the timeout. - Remove duplicated and repeated code for setting up unusual replication topologies. Now, there is a single file that is capable of setting up arbitrary topologies (include/rpl_init.inc, but include/master-slave.inc is still available for the most common topology). Tests can now end with include/rpl_end.inc, which will clean up correctly no matter what topology is used. The topology can be changed with include/rpl_change_topology.inc. - Improved debug information when tests fail. This includes: - debug info is printed on all servers configured by include/rpl_init.inc - User can set $rpl_debug=1, which makes auxiliary replication files print relevant debug info. - Improved documentation for all auxiliary replication files. Now they describe purpose, usage, parameters, and side effects. - Many small code cleanups: - Made have_innodb.inc output a sensible error message. - Moved contents of rpl000017-slave.sh into rpl000017.test - Added mysqltest variables that expose the current state of disable_warnings/enable_warnings and friends. - Too many to list here: see per-file comments for details. client/mysqltest.cc: Added the following variables: $ENABLED_WARNINGS $ENABLED_QUERY_LOG $ENABLED_RESULT_LOG $ENABLED_ABORT_ON_ERROR $ENABLED_INFO $ENABLED_METADATA Each variable is 0 or 1, depending on if the corresponding mysqltest feature is on or off. mysql-test/extra/rpl_tests/rpl_EE_err.test: Made test clean up after itself and removed outdated comments. mysql-test/extra/rpl_tests/rpl_auto_increment.test: - Use rpl_reset.inc instead of master-slave-reset.inc - diff_tables.inc now takes only one parameter. Made test clean up after itself and removed outdated comments. mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test: diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test: diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test: diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_charset.test: Made test clean up after itself and removed unnecessary cleanup in beginning. mysql-test/extra/rpl_tests/rpl_commit_after_flush.test: cosmetic fixes mysql-test/extra/rpl_tests/rpl_conflicts.test: cosmetic fixes mysql-test/extra/rpl_tests/rpl_ddl.test: Don't clean up replication here since this file does not setup replication. The main test now has to both setup and clean up replication. cosmetic fixes mysql-test/extra/rpl_tests/rpl_deadlock.test: make test clean up after itself mysql-test/extra/rpl_tests/rpl_extra_col_master.test: cosmetic fixes mysql-test/extra/rpl_tests/rpl_extra_col_slave.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_failed_optimize.test: made test clean up after itself mysql-test/extra/rpl_tests/rpl_flsh_tbls.test: made test clean up after itself mysql-test/extra/rpl_tests/rpl_foreign_key.test: made test clean up after itself mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test: - Replace 'start slave; wait_for_slave_to_start.inc' by include/start_slave.inc. - Use new file rpl_connect.inc to reconnect on all connections, since the connections are used by rpl_end.inc. - Use wait_for_slave_param.inc instead of wait_for_slave_io_to_start.inc, since wait_for_slave_io_to_start.inc now fails if the IO thread has an error. In this particular test case, it is normal that the IO thread has an error. - Changed wait_for_slave_io_error.inc so that it waits for the IO thread to stop. However, in this test case, the IO thread only gets a non-fatal error, so it does not stop. So we set $slave_io_error_is_nonfatal=1 to prevent wait_for_slave_io_error.inc from waiting. mysql-test/extra/rpl_tests/rpl_insert_id.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_insert_id_pk.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_loaddata.test: - Use wait_for_slave_sql_error.inc to wait for errors instead of wait_for_slave_sql_to_stop.inc - Use check_slave_no_error.inc instead of print errors to the log. - Use rpl_reset.inc instead of master-slave-reset.inc This means we have to clear the error from the slave threads by calling RESET SLAVE explicitly. - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_log.test: replace master-slave-reset.inc by rpl_reset.inc mysql-test/extra/rpl_tests/rpl_max_relay_size.test: made test clean up after itself cosmetic fix mysql-test/extra/rpl_tests/rpl_multi_query.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_multi_update.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test: replace master-slave-reset.inc by rpl_reset.inc mysql-test/extra/rpl_tests/rpl_not_null.test: - replace master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_record_compare.test: - replace master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_reset_slave.test: - replace wait_for_slave_io_error.inc+stop_slave.inc by wait_for_slave_io_error_and_stop.inc+stop_slave_sql.inc since stop_slave.inc now fails when the io thread has an error. - replace stop_slave.inc by STOP SLAVE + wait_for_slave_sql_to_stop.inc + wait_for_slave_param. stop_slave.inc would fail since the IO thread has an error. - add include/rpl_end.inc to clean up replication state mysql-test/extra/rpl_tests/rpl_row_UUID.test: Don't clean up replication here since this file does not setup replication. The main test now has to both setup and clean up replication. mysql-test/extra/rpl_tests/rpl_row_basic.test: - replaced reset_master_and_slave.inc by rpl_reset.inc - replaced sequence of reset master+reset slave by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_row_sp002.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_row_sp007.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_set_null.test: - replaced master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test: - Made test clean up replication state. mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test: replaced rpl_diff_tables.inc by diff_tables.inc mysql-test/extra/rpl_tests/rpl_stop_slave.test: changed protocol for diff_tables.inc mysql-test/extra/rpl_tests/rpl_sv_relay_space.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_test_framework.inc: Auxiliary file used by rpl_test_framework.test. This checks that rpl_change_topology.inc works correctly. mysql-test/extra/rpl_tests/rpl_truncate.test: made test clean up after itself cosmetic fixes mysql-test/extra/rpl_tests/rpl_truncate_helper.test: - replace reset_master_and_slave.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/include/analyze-sync_with_master.test: - improved debug output printed when sync_slave_with_master or sync_with_master fails - Added documentation mysql-test/include/assert.inc: Added file to facilitate assertions. mysql-test/include/begin_include_file.inc: New auxiliary file to be used by replication helper files like rpl_init.inc, stop_slave.inc, wait_for_slave_*.inc, etc. Such helper files should source rpl_begin_include_file.inc at the beginning and rpl_end_include_file.inc at the end. That adds the following features: - When a test sources the file, the file name is printed to the result file. This is good because it makes result files easier to follow. - When a helper file sources a second helper file recursively, then the name of the second file is not printed. This is good because it would make the result file harder to follow if all the internal calls of all helper files were printed. - When $rpl_debug is set, all internal calls are printed to the result file. This is good because it helps when debugging test cases. (With $rpl_debug=1, many of the helper files now print other relevant debug info too.) - When a file needs to turn off the query log or the warning log (disable_query_log/disable_warnings), then the file can tell rpl_begin_include_file.inc about it. Then rpl_begin_include_file.inc will turn off the log correctly, and rpl_end_include_file.inc will turn on the log correctly. Note that if rpl_a.inc sources rpl_b.inc and both files need to turn off the log, then the log is not turned on when rpl_b.inc ends (because rpl_a.inc still needs the log off). This makes it easier to program replication helper files. mysql-test/include/check-testcase.test: Made check-testcase ensure that the slave status is reset after the test has finished. mysql-test/include/check_slave_is_running.inc: - Use existing framework (check_slave_param.inc) instead of ad-hoc code to check value of slave parameters. - Use rpl_begin_include_file.inc to improve debug capabilities. - improve documentation. mysql-test/include/check_slave_no_error.inc: - Use rpl_begin_include_file.inc to improve debug capabilities. - improve documentation. mysql-test/include/check_slave_param.inc: - Use rpl_begin_include_file.inc to improve debug capabilities. - improve documentation. mysql-test/include/cleanup_fake_relay_log.inc: - Use RESET SLAVE instead of manual file removal. This also resets other replication state. - verify that RESET SLAVE correctly removed files. mysql-test/include/diff_tables.inc: - Use rpl_begin_include_file.inc to improve debug capabilities. - Improved documentation. - file now supports an arbitrary number of tables (not just two). The tables are now given as a comma-separated list instead of as two variables. - You no longer have to specify database name for each table. If no database is specified, it defaults to the current database. - File now restores the connection at the end. mysql-test/include/end_include_file.inc: New file to be sourced at the end of auxiliary replication include files. See include/rpl_begin_include_file.inc for details. mysql-test/include/file_does_not_exist.inc: Added .inc file to check that a given file is removed. mysql-test/include/force_restart.inc: Added file to force server restart after test mysql-test/include/force_restart_if_skipped.inc: Added file to force server restart after test, if the test is skipped mysql-test/include/have_innodb.inc: Made have_innodb.inc print sensible message when innodb is not supported. mysql-test/include/io_thd_fault_injection.inc: Use rpl_server_restart.inc instead of restart_mysqld.inc in rpl tests mysql-test/include/kill_query_and_diff_master_slave.inc: Renamed diff_master_slave.inc to rpl_diff.inc mysql-test/include/master-slave.inc: - Use new rpl_init.inc file - Now, we don't do 'drop table' in master-slave.inc any more. That's good because drop table has nothing to do with configuring replication servers. - master-slave.inc now supports the additional parameter $rpl_server_count. By default, master-slave.inc only configures two servers; if $rpl_server_count is set, it configures that many servers. Only the second server is a slave; the rest are not part of the replication topology. mysql-test/include/mtr_check.sql: Removed unneeded SP (use include/force_restart.inc instead) mysql-test/include/mysqldump.inc: diff_tables.inc now takes only one parameter. mysql-test/include/ndb_master-slave.inc: use master-slave.inc instead of ad-hoc calls to 'connect' mysql-test/include/ndb_master-slave_2ch.inc: use rpl_init.inc instead of ad-hoc setup mysql-test/include/ndb_not_readonly.inc: turn off query log while executing this script. this was previously done by the caller. now it's done in the script. mysql-test/include/report-features.test: add newline at end of file mysql-test/include/reset_master_and_slave.inc: rpl_reset.inc replaces this file mysql-test/include/restart_mysqld.inc: force caller to use rpl_restart_server.inc instead if replication is configured mysql-test/include/rpl_change_topology.inc: New file to change replication topology on the fly. This is used by rpl_init.inc internally, but is also used by test cases that need to change topology (e.g., rpl.rpl_circular_for_4_hosts, which reconfigures the topology to make a failover). mysql-test/include/rpl_connect.inc: New file to create a named connection. This file knows about a number of "standard" connections (master, slave, server_1, etc), and knows how each of them should normally be created. This is mostly used internally (e.g., by rpl_init.inc, master-slave.inc, ndb_master-slave_2ch.inc etc), but can also be used by tests that need to bring a connection up after disconnecting. mysql-test/include/rpl_connection.inc: New file to change connection. This prints the name of the connection. However, for files that source rpl_begin_include_file.inc, it does not print the name of the connection unless $rpl_debug=1. This is good because printing something every time the .inc file changed connection would make the result log harder to read. mysql-test/include/rpl_diff.inc: - Made file capable to compare many servers - Hence renamed it to rpl_diff.inc - If no server list is specified, use all servers from server_1 to server_$rpl_server_count - It now writes the statement to file before executing it. That means it will be subject to SQL string interpolation, but not shell string interpolation (which may be platform-dependent) mysql-test/include/rpl_diff_tables.inc: Removed this file, since its functionality has been merged into diff_tables.inc. mysql-test/include/rpl_end.inc: Renamed master-slave-end.inc to rpl_end.inc, and made it work with arbitrary replication topologies (as configured with rpl_init.inc and possibly rpl_change_topology.inc). Also made it assert that no slave thread has an error. Made it assert that no slave thread is stopped, unless $rpl_only_running_threads=1. mysql-test/include/rpl_for_each_slave.inc: New test script that executes a command once for each slave. This is used by include/rpl_start_slaves.inc and include/rpl_stop_slaves.inc and could possibly be useful for other custom scripts too. mysql-test/include/rpl_generate_sync_chain.inc: New file that computes the variable $rpl_sync_chain. This variable determines in what order slaves are synced by include/rpl_sync.inc. The variable is recomputed the first time that include/rpl_sync.inc is called after rpl_change_topology.inc. mysql-test/include/rpl_init.inc: Made file work for arbitrary topologies instead of just 4-server circle. This file is used by master-slave.inc, rpl_master-slave_2ch.inc etc, and also by tests that need other specific replication topologies. mysql-test/include/rpl_reconnect.inc: New auxiliary file that will reconnect many clients to a given server. All clients configured by rpl_init.inc will reconnect. mysql-test/include/rpl_reset.inc: Made file work for arbitrary replication topologies, check for errors, and sync all threads. Also removed 'drop table' because that has nothing to do with replication. mysql-test/include/rpl_restart_server.inc: New auxiliary file that restarts a server. mysql-test/include/rpl_start_server.inc: New auxiliary file that starts a server that has been shut down. mysql-test/include/rpl_start_slaves.inc: New auxiliary file to start all slaves configured by rpl_init.inc This is used internally by rpl_init.inc but may also be used by tests that want to bring all slaves up. mysql-test/include/rpl_stop_server.inc: New auxiliary file that shuts down a server. mysql-test/include/rpl_stop_slaves.inc: New auxiliary file to stop all slaves configured rpl_init.inc. This is used internally by rpl_end.inc, but may also be used by tests that want to stop all slaves. mysql-test/include/rpl_sync.inc: Made file work for arbitrary replication topologies (as configured by rpl_init.inc and possibly rpl_change_topology.inc) instead of just 4-server circle. mysql-test/include/save_master_pos.inc: Auxiliary file to save the master position. mysql-test/include/setup_fake_relay_log.inc: - Moved complicated logic to write to file into write_var_to_file.inc, so that it can be re-used by other tests. - Added call to show_rpl_debug_info and die in error case. mysql-test/include/show_rpl_debug_info.inc: - Made file print NOW() - Made file print both SHOW MASTER STATUS, SHOW SLAVE HOSTS, and SHOW SLAVE STATUS. - Made file print debug info for all servers configured by rpl_init.inc mysql-test/include/show_slave_status.inc: - Made file use echo instead of SELECT to print variables. - Improved comments. - Use variable names that are less likely to be used by other tests. mysql-test/include/start_slave.inc: - Made test use rpl_begin_include_file.inc to improve debug capabilities. - improved documentation mysql-test/include/stop_slave.inc: - Made script capable to detect which threads are running and stop only those. - Improved documentation mysql-test/include/stop_slave_io.inc: Added file to stop the slave IO thread. mysql-test/include/stop_slave_sql.inc: Added file to stop the slave SQL thread. mysql-test/include/sync_io_with_master.inc: Added file to sync the IO thread of the current connection, up to a previously saved position. mysql-test/include/sync_slave_io_with_master.inc: - Made file work with arbitrarily-named connections. - Made file use rpl_begin_include_file.inc to improve debug capabilities. mysql-test/include/sync_slave_sql_with_io.inc: Added file to sync only the SQL thread, up to the position copied in the IO thread. mysql-test/include/wait_for_query_to_fail.inc: Added file to wait for a query to fail. mysql-test/include/wait_for_slave_io_error.inc: - Use rpl_begin_include_file.inc to improve debug capabilities. - Use existing atom include/show_slave_status.inc to print error message. - Improve comments. ****** - This file now waits until the slave IO thread has completely stopped (to avoid races in tests). - Some IO thread errors are non-fatal and don't cause the slave IO thread to stop. To allow tests to wait for such errors, we add the parameters $slave_io_error_is_nonfatal. If $slave_io_error_is_nonfatal is set, this script does not wait for the IO thread to stop. mysql-test/include/wait_for_slave_io_to_start.inc: - Made script fail if the IO thread has an error. - Use rpl_begin_include_file.inc to improve debug capabilities. - Improved documentation. mysql-test/include/wait_for_slave_io_to_stop.inc: - Fail if server is not configured as slave. Previously, the script accepted servers not configured as slave because there was cleanup code called from master-slave.inc that would execute STOP SLAVE on both master and slave. Now all tests have to clean up after themselves, so we don't have to call stop slave at the beginning of tests. Hence, we disallow calling this script on servers not configured as slaves. - Use rpl_begin_include_file.inc to improve debug capabilities. - Improved documentation. mysql-test/include/wait_for_slave_param.inc: - Added $slave_error_param. This variable can be set to Slave_IO_Errno or Slave_SQL_Errno, in which case the script fails if the corresponding column in the output from SHOW SLAVE STATUS is nonzero. - Replaced exit by die. - Made it print timeout seconds correctly in error message. - Removed $slave_error_message. This is not needed. - Use rpl_begin_include_file.inc for better debug capabilities. mysql-test/include/wait_for_slave_sql_error.inc: - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation - Use existing atom show_slave_status.inc to print error. mysql-test/include/wait_for_slave_sql_error_and_skip.inc: - Use rpl_begin_include_file.inc and rpl_connection.inc for better debug capabilities. - Improve documentation mysql-test/include/wait_for_slave_sql_to_start.inc: - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation mysql-test/include/wait_for_slave_sql_to_stop.inc: - Fail if Last_SQL_Errno is nonzero. - Fail if server is not configured as slave. Previously, the script accepted servers not configured as slave because there was cleanup code called from master-slave.inc that would execute STOP SLAVE on both master and slave. Now all tests have to clean up after themselves, so we don't have to call stop slave at the beginning of tests. Hence, we disallow calling this script on servers not configured as slaves. - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation mysql-test/include/wait_for_slave_to_start.inc: - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation mysql-test/include/wait_for_slave_to_stop.inc: - Use rpl_begin_include_file.inc for better debug capabilities. - Improve documentation mysql-test/include/write_var_to_file.inc: Added file to write contents of a mysqltest variable to file. (This was previously in setup_fake_relay_log.inc) mysql-test/mysql-test-run.pl: Allow tests to require restart in case the test is skipped. mysql-test/r/init_file.result: updated result file mysql-test/r/mysqldump_restore.result: update result file mysql-test/suite/binlog/r/binlog_drop_if_exists.result: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/r/binlog_old_versions.result: updated result file mysql-test/suite/binlog/r/binlog_query_filter_rules.result: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/r/binlog_server_id.result: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/r/binlog_sf.result: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/r/binlog_sql_mode.result: updated result file mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt: This test replicates, so it should be in the rpl suite. Then we can remove this .opt file too. mysql-test/suite/binlog/t/binlog_drop_if_exists.test: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/t/binlog_old_versions.test: cosmetic fixes mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/t/binlog_query_filter_rules.test: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/t/binlog_server_id.test: Moved test that does not use replication to binlog suite. mysql-test/suite/binlog/t/binlog_sf.test: Moved test that does not use replication to binlog suite. Since test sets binlog_format internally, it's useless to re-run it. Hence we source have_binlog_format_statement.inc mysql-test/suite/binlog/t/binlog_sql_mode.test: - Test does not use replication, so we remove master-slave.inc. - mysqltest magically adds --force-if-open to $MYSQL_BINLOG in test files that source master-slave.inc. So now we have to add --force-if-open explicitly. mysql-test/suite/bugs/t/rpl_bug12691.test: made test clean up after itself cosmetic fixes mysql-test/suite/bugs/t/rpl_bug23533.test: made test clean up after itself cosmetic fixes mysql-test/suite/bugs/t/rpl_bug31582.test: made test clean up after itself mysql-test/suite/bugs/t/rpl_bug31583.test: made test clean up after itself mysql-test/suite/bugs/t/rpl_bug33029.test: made test clean up after itself mysql-test/suite/bugs/t/rpl_bug36391.test: made test clean up after itself cosmetic fixes mysql-test/suite/bugs/t/rpl_bug37426.test: made test clean up after itself cosmetic fixes mysql-test/suite/bugs/t/rpl_bug38205.test: made test clean up after itself mysql-test/suite/manual/t/rpl_replication_delay.test: made test clean up after itself cosmetic fixes mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test: made test clean up after itself cosmetic fixes mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test: made test clean up after itself mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test: made test clean up after itself cosmetic fixes mysql-test/suite/parts/r/rpl_partition.result: updated result file mysql-test/suite/parts/t/rpl_partition.test: Make test clean up replication state. cosmetic fixes mysql-test/suite/rpl/include/rpl_mixed_ddl.inc: made test clean up after itself cosmetic fixes mysql-test/suite/rpl/include/rpl_mixed_dml.inc: made test clean up after itself cosmetic fixes mysql-test/suite/rpl/r/rpl_000010.result: update result file mysql-test/suite/rpl/r/rpl_000011.result: update result file mysql-test/suite/rpl/r/rpl_000013.result: update result file mysql-test/suite/rpl/r/rpl_000017.result: update result file mysql-test/suite/rpl/r/rpl_EE_err.result: update result file mysql-test/suite/rpl/r/rpl_LD_INFILE.result: update result file mysql-test/suite/rpl/r/rpl_alter.result: update result file mysql-test/suite/rpl/r/rpl_alter_db.result: update result file mysql-test/suite/rpl/r/rpl_auto_increment.result: update result file mysql-test/suite/rpl/r/rpl_auto_increment_11932.result: update result file mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result: update result file mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result: update result file mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result: update result file mysql-test/suite/rpl/r/rpl_binlog_corruption.result: Updated result file mysql-test/suite/rpl/r/rpl_binlog_errors.result: updated result file mysql-test/suite/rpl/r/rpl_binlog_grant.result: update result file mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result: Updated result file mysql-test/suite/rpl/r/rpl_bit.result: update result file mysql-test/suite/rpl/r/rpl_bit_npk.result: update result file mysql-test/suite/rpl/r/rpl_blackhole.result: update result file mysql-test/suite/rpl/r/rpl_bug26395.result: update result file mysql-test/suite/rpl/r/rpl_bug31076.result: update result file mysql-test/suite/rpl/r/rpl_bug33931.result: updated result file mysql-test/suite/rpl/r/rpl_bug38694.result: update result file mysql-test/suite/rpl/r/rpl_change_master.result: update result file mysql-test/suite/rpl/r/rpl_charset.result: update result file mysql-test/suite/rpl/r/rpl_charset_sjis.result: update result file mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result: Updated result file mysql-test/suite/rpl/r/rpl_colSize.result: update result file mysql-test/suite/rpl/r/rpl_commit_after_flush.result: update result file mysql-test/suite/rpl/r/rpl_concurrency_error.result: update result file mysql-test/suite/rpl/r/rpl_conditional_comments.result: update result file mysql-test/suite/rpl/r/rpl_create_database.result: update result file mysql-test/suite/rpl/r/rpl_create_if_not_exists.result: update result file mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result: update result file mysql-test/suite/rpl/r/rpl_cross_version.result: Updated result file mysql-test/suite/rpl/r/rpl_current_user.result: update result file mysql-test/suite/rpl/r/rpl_deadlock_innodb.result: update result file mysql-test/suite/rpl/r/rpl_delete_no_where.result: update result file mysql-test/suite/rpl/r/rpl_do_grant.result: updated result file mysql-test/suite/rpl/r/rpl_drop.result: update result file mysql-test/suite/rpl/r/rpl_drop_db.result: update result file mysql-test/suite/rpl/r/rpl_drop_temp.result: update result file mysql-test/suite/rpl/r/rpl_drop_view.result: update result file mysql-test/suite/rpl/r/rpl_dual_pos_advance.result: update result file mysql-test/suite/rpl/r/rpl_empty_master_crash.result: update result file mysql-test/suite/rpl/r/rpl_err_ignoredtable.result: update result file mysql-test/suite/rpl/r/rpl_events.result: update result file mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result: update result file mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result: update result file mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result: update result file mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result: update result file mysql-test/suite/rpl/r/rpl_failed_optimize.result: update result file mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result: update result file mysql-test/suite/rpl/r/rpl_flushlog_loop.result: update result file mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result: update result file mysql-test/suite/rpl/r/rpl_found_rows.result: update result file mysql-test/suite/rpl/r/rpl_free_items.result: update result file mysql-test/suite/rpl/r/rpl_geometry.result: update result file mysql-test/suite/rpl/r/rpl_get_lock.result: update result file mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result: update result file mysql-test/suite/rpl/r/rpl_grant.result: update result file mysql-test/suite/rpl/r/rpl_idempotency.result: update result file mysql-test/suite/rpl/r/rpl_ignore_grant.result: update result file mysql-test/suite/rpl/r/rpl_ignore_revoke.result: update result file mysql-test/suite/rpl/r/rpl_ignore_table.result: update result file mysql-test/suite/rpl/r/rpl_ignore_table_update.result: update result file mysql-test/suite/rpl/r/rpl_incident.result: update result file mysql-test/suite/rpl/r/rpl_init_slave.result: update result file mysql-test/suite/rpl/r/rpl_init_slave_errors.result: update result file mysql-test/suite/rpl/r/rpl_innodb.result: update result file mysql-test/suite/rpl/r/rpl_innodb_bug28430.result: update result file mysql-test/suite/rpl/r/rpl_innodb_bug30888.result: update result file mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result: update result file mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: update result file mysql-test/suite/rpl/r/rpl_insert.result: update result file mysql-test/suite/rpl/r/rpl_insert_id.result: update result file mysql-test/suite/rpl/r/rpl_insert_id_pk.result: update result file mysql-test/suite/rpl/r/rpl_insert_ignore.result: update result file mysql-test/suite/rpl/r/rpl_insert_select.result: update result file mysql-test/suite/rpl/r/rpl_invoked_features.result: update result file mysql-test/suite/rpl/r/rpl_killed_ddl.result: update result file mysql-test/suite/rpl/r/rpl_known_bugs_detection.result: update result file mysql-test/suite/rpl/r/rpl_load_from_master.result: update result file mysql-test/suite/rpl/r/rpl_load_table_from_master.result: update result file mysql-test/suite/rpl/r/rpl_loaddata.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_charset.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_fatal.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_m.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_map.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_s.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_simple.result: update result file mysql-test/suite/rpl/r/rpl_loaddata_symlink.result: update result file mysql-test/suite/rpl/r/rpl_loaddatalocal.result: update result file mysql-test/suite/rpl/r/rpl_loadfile.result: update result file mysql-test/suite/rpl/r/rpl_locale.result: update result file mysql-test/suite/rpl/r/rpl_log_pos.result: update result file mysql-test/suite/rpl/r/rpl_manual_change_index_file.result: update result file mysql-test/suite/rpl/r/rpl_many_optimize.result: update result file mysql-test/suite/rpl/r/rpl_master_pos_wait.result: update result file mysql-test/suite/rpl/r/rpl_misc_functions.result: update result file mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result: update result file mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result: update result file mysql-test/suite/rpl/r/rpl_multi_delete.result: update result file mysql-test/suite/rpl/r/rpl_multi_delete2.result: update result file mysql-test/suite/rpl/r/rpl_multi_engine.result: update result file mysql-test/suite/rpl/r/rpl_multi_update.result: update result file mysql-test/suite/rpl/r/rpl_multi_update2.result: update result file mysql-test/suite/rpl/r/rpl_multi_update3.result: update result file mysql-test/suite/rpl/r/rpl_multi_update4.result: update result file mysql-test/suite/rpl/r/rpl_mysql_upgrade.result: update result file mysql-test/suite/rpl/r/rpl_name_const.result: update result file mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result: update result file mysql-test/suite/rpl/r/rpl_not_null_innodb.result: update result file mysql-test/suite/rpl/r/rpl_not_null_myisam.result: update result file mysql-test/suite/rpl/r/rpl_optimize.result: update result file mysql-test/suite/rpl/r/rpl_packet.result: update result file mysql-test/suite/rpl/r/rpl_plugin_load.result: update result file mysql-test/suite/rpl/r/rpl_ps.result: update result file mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result: update result file mysql-test/suite/rpl/r/rpl_read_only.result: update result file mysql-test/suite/rpl/r/rpl_relay_space_innodb.result: update result file mysql-test/suite/rpl/r/rpl_relay_space_myisam.result: update result file mysql-test/suite/rpl/r/rpl_relayrotate.result: update result file mysql-test/suite/rpl/r/rpl_relayspace.result: update result file mysql-test/suite/rpl/r/rpl_replicate_do.result: update result file mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result: update result file mysql-test/suite/rpl/r/rpl_report.result: update result file mysql-test/suite/rpl/r/rpl_rewrt_db.result: update result file mysql-test/suite/rpl/r/rpl_rotate_logs.result: update result file mysql-test/suite/rpl/r/rpl_row_001.result: update result file mysql-test/suite/rpl/r/rpl_row_4_bytes.result: update result file mysql-test/suite/rpl/r/rpl_row_NOW.result: update result file mysql-test/suite/rpl/r/rpl_row_USER.result: update result file mysql-test/suite/rpl/r/rpl_row_UUID.result: update result file mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: update result file mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result: update result file mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_basic_8partition.result: update result file mysql-test/suite/rpl/r/rpl_row_blob_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_blob_myisam.result: update result file mysql-test/suite/rpl/r/rpl_row_colSize.result: update result file mysql-test/suite/rpl/r/rpl_row_conflicts.result: update result file mysql-test/suite/rpl/r/rpl_row_delayed_ins.result: update result file mysql-test/suite/rpl/r/rpl_row_drop.result: update result file mysql-test/suite/rpl/r/rpl_row_find_row.result: update result file mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: update result file mysql-test/suite/rpl/r/rpl_row_func001.result: update result file mysql-test/suite/rpl/r/rpl_row_func002.result: update result file mysql-test/suite/rpl/r/rpl_row_func003.result: update result file mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: updated result file mysql-test/suite/rpl/r/rpl_row_insert_delayed.result: update result file mysql-test/suite/rpl/r/rpl_row_log.result: update result file mysql-test/suite/rpl/r/rpl_row_log_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_max_relay_size.result: update result file mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result: update result file mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result: update result file mysql-test/suite/rpl/r/rpl_row_reset_slave.result: update result file mysql-test/suite/rpl/r/rpl_row_sp001.result: update result file mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_sp003.result: update result file mysql-test/suite/rpl/r/rpl_row_sp005.result: update result file mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result: update result file mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_sp008.result: update result file mysql-test/suite/rpl/r/rpl_row_sp009.result: update result file mysql-test/suite/rpl/r/rpl_row_sp010.result: update result file mysql-test/suite/rpl/r/rpl_row_sp011.result: update result file mysql-test/suite/rpl/r/rpl_row_sp012.result: update result file mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result: update result file mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result: update result file mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result: update result file mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result: update result file mysql-test/suite/rpl/r/rpl_row_trig001.result: update result file mysql-test/suite/rpl/r/rpl_row_trig002.result: update result file mysql-test/suite/rpl/r/rpl_row_trig003.result: update result file mysql-test/suite/rpl/r/rpl_row_trig004.result: update result file mysql-test/suite/rpl/r/rpl_row_trunc_temp.result: update result file mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result: update result file mysql-test/suite/rpl/r/rpl_row_until.result: update result file mysql-test/suite/rpl/r/rpl_row_view01.result: update result file mysql-test/suite/rpl/r/rpl_row_wide_table.result: update result file mysql-test/suite/rpl/r/rpl_server_id1.result: update result file mysql-test/suite/rpl/r/rpl_server_id2.result: update result file mysql-test/suite/rpl/r/rpl_session_var.result: update result file mysql-test/suite/rpl/r/rpl_set_charset.result: update result file mysql-test/suite/rpl/r/rpl_set_null_innodb.result: update result file mysql-test/suite/rpl/r/rpl_set_null_myisam.result: update result file mysql-test/suite/rpl/r/rpl_show_slave_running.result: update result file mysql-test/suite/rpl/r/rpl_skip_error.result: update result file mysql-test/suite/rpl/r/rpl_slave_grp_exec.result: update result file mysql-test/suite/rpl/r/rpl_slave_load_in.result: update result file mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result: Updated result file mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result: updated result file mysql-test/suite/rpl/r/rpl_slave_skip.result: update result file mysql-test/suite/rpl/r/rpl_slave_status.result: update result file mysql-test/suite/rpl/r/rpl_slow_query_log.result: update result file mysql-test/suite/rpl/r/rpl_sp.result: update result file mysql-test/suite/rpl/r/rpl_sp004.result: update result file mysql-test/suite/rpl/r/rpl_sp_effects.result: update result file mysql-test/suite/rpl/r/rpl_sporadic_master.result: update result file mysql-test/suite/rpl/r/rpl_ssl.result: update result file mysql-test/suite/rpl/r/rpl_ssl1.result: update result file mysql-test/suite/rpl/r/rpl_start_stop_slave.result: update result file mysql-test/suite/rpl/r/rpl_stm_000001.result: update result file mysql-test/suite/rpl/r/rpl_stm_EE_err2.result: updated result file mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result: update result file mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result: update result file mysql-test/suite/rpl/r/rpl_stm_conflicts.result: update result file mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result: update result file mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result: update result file mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result: update result file mysql-test/suite/rpl/r/rpl_stm_loadfile.result: update result file mysql-test/suite/rpl/r/rpl_stm_log.result: update result file mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result: update result file mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result: update result file mysql-test/suite/rpl/r/rpl_stm_multi_query.result: update result file mysql-test/suite/rpl/r/rpl_stm_no_op.result: update result file mysql-test/suite/rpl/r/rpl_stm_reset_slave.result: update result file mysql-test/suite/rpl/r/rpl_stm_sql_mode.result: update result file mysql-test/suite/rpl/r/rpl_stm_until.result: update result file mysql-test/suite/rpl/r/rpl_stop_slave.result: update result file mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result: update result file mysql-test/suite/rpl/r/rpl_temp_table.result: update result file mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result: update result file mysql-test/suite/rpl/r/rpl_temporary.result: update result file mysql-test/suite/rpl/r/rpl_temporary_errors.result: update result file mysql-test/suite/rpl/r/rpl_test_framework.result: updated result file mysql-test/suite/rpl/r/rpl_timezone.result: Updated result file mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result: update result file mysql-test/suite/rpl/r/rpl_trigger.result: update result file mysql-test/suite/rpl/r/rpl_trunc_temp.result: update result file mysql-test/suite/rpl/r/rpl_truncate_2myisam.result: update result file mysql-test/suite/rpl/r/rpl_truncate_3innodb.result: update result file mysql-test/suite/rpl/r/rpl_typeconv_innodb.result: update result file mysql-test/suite/rpl/r/rpl_udf.result: update result file mysql-test/suite/rpl/r/rpl_user.result: update result file mysql-test/suite/rpl/r/rpl_user_variables.result: update result file mysql-test/suite/rpl/r/rpl_variables.result: update result file mysql-test/suite/rpl/r/rpl_variables_stm.result: update result file mysql-test/suite/rpl/r/rpl_view.result: update result file mysql-test/suite/rpl/t/rpl000017-slave.sh: Moved contents of -slave.sh into test. mysql-test/suite/rpl/t/rpl_000010-slave.opt: make all rpl tests use prefix rpl_ mysql-test/suite/rpl/t/rpl_000010.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_000011.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_000013.test: Made test clean up replication state. Replaced save_master_pos/connection slave/sync_with_master by sync_slave_with_master. mysql-test/suite/rpl/t/rpl_000017-slave.opt: make all rpl tests use prefix rpl_ mysql-test/suite/rpl/t/rpl_000017.test: Moved contents of -slave.sh into .test Made test clean up replication state. mysql-test/suite/rpl/t/rpl_EE_err.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_LD_INFILE.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_alter.test: made test clean up after itself replaced rpl_diff_tables by diff_tables cosmetic fixes mysql-test/suite/rpl/t/rpl_alter_db.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_auto_increment.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_auto_increment_11932.test: Made test clean up replication state. don't drop database twice mysql-test/suite/rpl/t/rpl_auto_increment_bug33029.test: - This test replicates, so moved it to rpl suite. - This test uses a fake relay log, so use include/setup_fake_relay_log.inc and cleanup_fake_relay_log.inc instead of ad-hoc code. - Made test clean up replication state (rpl_end.inc) mysql-test/suite/rpl/t/rpl_auto_increment_update_failure.test: - Made test clean up replication state. - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test: renamed rpl_end.inc to master-slave-end.inc mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt: Got rid of useless -master.opt file. mysql-test/suite/rpl/t/rpl_binlog_corruption.test: Made test clean up replication state. Made test execute on slave connection instead of on master connection. This allows us to get rid of -master.opt file. mysql-test/suite/rpl/t/rpl_binlog_errors.test: made test use rpl_restart_server.inc instead of restart_mysqld.inc mysql-test/suite/rpl/t/rpl_binlog_grant.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test: - Made test clean up replication state. - replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error_and_skip.inc - renamed diff_master_slave.inc to rpl_diff.inc and renamed $diff_statement to $rpl_diff_statement mysql-test/suite/rpl/t/rpl_bit.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_bit_npk.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_blackhole.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_bug26395.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_bug31076.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_bug33931.test: Made test clean up replication state. Made test use source include/master-slave.inc instead of ad-hoc setup. mysql-test/suite/rpl/t/rpl_bug38694.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_change_master.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_charset.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_charset_sjis.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf: Use new names of mtr variables (introduced by the changes in include/circular_rpl_init.inc). mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test: - Use rpl_init.inc instead of circular_rpl_for_4_hosts.inc. Connections have been renamed (server_[1234] instead of master_[abcd]), we use rpl_sync.inc instead of circular_rpl_for_4_hosts_sync.inc, we use the new rpl_end.inc to clean up instead of doing it manually, and we use rpl_change_topology.inc instead of manual reconfiguration. - Added comment to make test understandable. - the test contained a race condition. server_4 was not sync'ed. This could cause sql_slave_skip_counter to have the value 1 when the test ended, so check-testcase would complain. Added 'sync_slave_with_master server_4'. mysql-test/suite/rpl/t/rpl_colSize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_commit_after_flush.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_concurrency_error.test: - Made test clean up replication state. - renamed diff_master_slave.inc to rpl_diff.inc and renamed $diff_statement to $rpl_diff_statement mysql-test/suite/rpl/t/rpl_conditional_comments.test: made test clean up after itself new protocol for diff_tables.inc mysql-test/suite/rpl/t/rpl_create_database.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_create_if_not_exists.test: renamed master-slave-end.inc to rpl_end.inc mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test: renamed master-slave-end.inc to rpl_end.inc mysql-test/suite/rpl/t/rpl_critical_errors.test: Made test clean up replication state. Fixed syntax error in test. mysql-test/suite/rpl/t/rpl_cross_version.test: Made test clean up replication state. Made test execute on slave connection instead of on master connection. This allows us to get rid of -master.opt file. mysql-test/suite/rpl/t/rpl_current_user.cnf: use environment variables recognized by rpl_init.inc mysql-test/suite/rpl/t/rpl_current_user.test: - Use rpl_init.inc instead of ad-hoc three-server setup. Hence, rename connection slave2 to server_3 - don't drop lots of things at the beginning of the test - rpl_diff_tables.inc does not sync any more, so we have to sync here instead - renamed $diff_table to $rpl_diff_table and $diff_table_list to $rpl_diff_table_list - use diff_tables.inc instead of rpl_diff_tables.inc mysql-test/suite/rpl/t/rpl_ddl.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_deadlock_innodb.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_delete_no_where.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_do_grant.test: Made test clean up replication state. renamed master-slave-end.inc to rpl_end.inc use include/check_slave_no_error.inc instead of ad-hoc construction mysql-test/suite/rpl/t/rpl_drop.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_drop_db.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_drop_temp.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_drop_view.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Made test use the new framework for circular replication, instead of ad-hoc setup. mysql-test/suite/rpl/t/rpl_empty_master_crash.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_err_ignoredtable.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_events.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_failed_optimize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test: renamed master-slave-end.inc to rpl_end.inc mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt: Removed useless options from -master.opt file. mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh: Removed useless -master.sh file mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt: Removed useless options from -slave.opt file mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh: Removed useless -slave.sh file mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Made test use new framework for circular replication, instead of ad-hoc setup. Made test clean up replication state. mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_found_rows.test: Made test clean up replication state. replaced reset_master_and_slave.inc by rpl_reset.inc mysql-test/suite/rpl/t/rpl_free_items.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_geometry.test: replaced master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_get_lock.test: Made test clean up replication state. Replaced save_master_pos+connection slave+sync_with_master by sync_slave_with_master. mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test: Made test clean up replication state. Removed last part of test, because it was verbatim identical to rpl_server_id1.test mysql-test/suite/rpl/t/rpl_grant.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_idempotency.test: use check_slave_no_error.inc instead of ad-hoc tests use wait_for_slave_sql_error.inc instead of wait_for_slave_to_stop.inc replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_ignore_grant.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ignore_revoke.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ignore_table.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ignore_table_update.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_incident.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_init_slave.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_init_slave_errors.test: Made test clean up replication state. Also replaced call to wait_for_slave_sql_to_stop.inc by call to wait_for_slave_sql_error.inc mysql-test/suite/rpl/t/rpl_innodb.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_innodb_bug28430.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_innodb_bug30888.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_insert.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_insert_id.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_insert_id_pk.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_insert_ignore.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_insert_select.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_invoked_features.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_killed_ddl.test: - Made test clean up replication state. - renamed diff_master_slave.inc to rpl_diff.inc and renamed $diff_statement to $rpl_diff_statement mysql-test/suite/rpl/t/rpl_known_bugs_detection.test: - Made test clean up replication state. - removed wait_for_slave_sql_to_stop.inc, because it already does wait_for_slave_sql_error.inc mysql-test/suite/rpl/t/rpl_load_from_master.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_load_table_from_master.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_loaddata_charset.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_m.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_map.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_s.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_simple.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddata_symlink.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loaddatalocal.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_loadfile.test: - Made test clean up replication state. - replace reset_master_and_slave.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. - diff_tables.inc also restores the connection to what it was before, so in this test we have to manually change connection after sourcing diff_tables.inc mysql-test/suite/rpl/t/rpl_locale.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_log_pos.test: Made test clean up replication state. replace stop_slave.inc by stop_slave_sql.inc since the io thread is already stopped. mysql-test/suite/rpl/t/rpl_manual_change_index_file.test: use wait_for_slave_io_error.inc instead of wait_for_slave_to_stop.inc replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_many_optimize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_master_pos_wait.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_misc_functions.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_delete.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_delete2.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_engine.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_update.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_multi_update2.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_update3.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_multi_update4.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_mysql_upgrade.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_name_const.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test: - Made test clean up replication state. - diff_tables.inc now takes only one parameter. - diff_tables.inc also restores the connection to what it was before, so in this test we have to manually change connection after sourcing diff_tables.inc mysql-test/suite/rpl/t/rpl_not_null_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_not_null_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_optimize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_packet.test: - Made test clean up replication state. - replace wait_for_slave_io_to_stop.inc by wait_for_slave_io_error.inc - replace master-slave-reset.inc by rpl_reset.inc + drop table t1. - replaced save_master_pos/connection slave/sync_with_master by sync_slave_with_master. - added comment explaining why we need stop_slave_sql.inc (we shouldn't need it, it's a bug) mysql-test/suite/rpl/t/rpl_plugin_load.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_ps.test: Made test clean up replication state. removed lots os useless junk mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_read_only.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_relay_space_innodb.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_relay_space_myisam.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_relayrotate.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_relayspace.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_replicate_do.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_report.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_rewrt_db.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt: Got rid of unnecessary -slave.opt file mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh: Got rid of unnecessary -slave.sh file mysql-test/suite/rpl/t/rpl_rotate_logs.test: - Made test clean up replication state. - replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error_and_skip.inc - removed useless cleanup at beginning of test - did not make test use the standard replication framework (master-slave.inc + rpl_end.inc), because it won't work. i don't know why. mysql-test/suite/rpl/t/rpl_row_001.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_4_bytes.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_NOW.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_USER.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_UUID.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test: Made test clean up replication state. Removed unnecessary 'set binlog_format'. replaced master-slave-reset.inc by rpl_reset.inc mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_basic_8partition.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_blob_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_blob_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_colSize.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_conflicts.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_row_create_table.test: replace master-slave-end.inc by rpl_end.inc replace master-slave-reset.inc by rpl_reset.inc replace long sequence of reset master+reset slave by rpl_reset.inc mysql-test/suite/rpl/t/rpl_row_delayed_ins.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_row_drop.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_find_row.test: - Made test clean up replication state. - replace master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_row_func001.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_func002.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_func003.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test: Made test clean up replication state. replace wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error.inc mysql-test/suite/rpl/t/rpl_row_insert_delayed.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_log.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_log_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test: Made test clean up replication state mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test: - replace master-slave-reset.inc by rpl_reset.inc - Made test clean up replication state - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_row_sp001.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_row_sp003.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp005.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_row_sp008.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp009.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp010.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp011.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_sp012.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test: - replaced master-slave-reset.inc by rpl_reset.inc - replaced master-slave-end.inc by rpl_end.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_row_trig001.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_trig002.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_trig003.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_trig004.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_trunc_temp.test: replaced master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_until.test: Made test clean up replication state. Removed unused mtr variable $VERSION. mysql-test/suite/rpl/t/rpl_row_view01.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_row_wide_table.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_server_id1.test: - Replaced ad-hoc setup of circular replication by call to rpl_init.inc - Made test clean up replication state. - Replaced ad-hoc use of wait_for_slave_param.inc by wait_for_slave_io_error.inc mysql-test/suite/rpl/t/rpl_server_id2.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_session_var.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_set_charset.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_set_null_innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_set_null_myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_show_slave_running.test: made test clean up replication state mysql-test/suite/rpl/t/rpl_skip_error.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_slave_grp_exec.test: - Made test clean up replication state. - replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error.inc - replaced stop_slave.inc by stop_slave_io.inc where the sql thread was already stopped. mysql-test/suite/rpl/t/rpl_slave_load_in.test: - Made test clean up replication state. - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test: - Made test clean up replication state. - Replaced call to wait_for_slave_sql_to_stop.inc by call to wait_for_slave_sql_error.inc - Replaced ad-hoc repliction setup by call to master-slave.inc mysql-test/suite/rpl/t/rpl_slave_skip.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_slave_status.test: Made test clean up replication state. replaced check that IO thread has stopped by wait_for_slave_io_error.inc simplified cleanup code mysql-test/suite/rpl/t/rpl_slow_query_log.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_sp.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_sp004.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_sp_effects.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_sporadic_master.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ssl.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_ssl1.test: Made test clean up replication state. Replaced save_master_pos+connection slave+sync_slave_with_master by sync_slave_with_master mysql-test/suite/rpl/t/rpl_start_stop_slave.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_000001.test: The include file extra/rpl_tests/rpl_stm_000001.test was only sourced once, in suite/rpl/t/rpl_stm_000001.test. Moved extra/rpl_tests/rpl_stm_000001.test to suite/rpl/t/rpl_stm_000001.test and removed the old suite/rpl/t/rpl_stm_000001.test. Also made test clean up replication state, and replaced wait_for_slave_sql_to_stop.inc by wait_for_slave_sql_error_and_skip.inc mysql-test/suite/rpl/t/rpl_stm_000001.test: - The include file extra/rpl_tests/rpl_stm_000001.test was only sourced once, in suite/rpl/t/rpl_stm_000001.test. Moved extra/rpl_tests/rpl_stm_000001.test to suite/rpl/t/rpl_stm_000001.test and removed the old suite/rpl/t/rpl_stm_000001.test. mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_conflicts.test: replaced master-slave-end.inc by rpl_end.inc cosmetic fixes mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test: use rpl_end instead of master-slave-end. mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_loadfile.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_log.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test: - replaced master-slave-end.inc by rpl_end.inc - replaced master-slave-reset.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_stm_multi_query.test: cosmetic fixes mysql-test/suite/rpl/t/rpl_stm_no_op.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_stm_sql_mode.test: made test clean up replication state mysql-test/suite/rpl/t/rpl_stm_until.test: - Made test clean up replication state. - replaced master-slave-reset.inc by rpl_reset.inc - the relay log is now called slave-relay-bin.000003 instead of .000004, because master-slave.inc doesn't rotate it as much as before. mysql-test/suite/rpl/t/rpl_stop_slave.test: use rpl_end instead of master-slav-end mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_temp_table.test: Made test clean up replication state. Replaced save_master_pos/connection slave/sync_with_master by sync_slave_with_master. mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test: Made test clean up replication state. replaced ad-hoc call to 'connect' by include/rpl_connect.inc replaced master-slave-reset.inc by rpl_reset.inc mysql-test/suite/rpl/t/rpl_temporary.test: - Made test clean up replication state. - This test sources include/delete_anonymous_users.inc on master. This means it updates the user table in the mysql database manually on the master. This causes failure in the slave sql thread when binlog_format=row. Hence, we stop the slave first and source include/delete_anonymous_users.inc on both master and slave. mysql-test/suite/rpl/t/rpl_temporary_errors.test: Made test clean up replication state. cosmetic fixes mysql-test/suite/rpl/t/rpl_test_framework.cnf: new cfg file for new test mysql-test/suite/rpl/t/rpl_test_framework.test: new test case that verifies that include/rpl_change_topology.inc works mysql-test/suite/rpl/t/rpl_timezone.test: - Made test clean up replication state. - stop slave before last sub-test, because that test does not use the slave connection. mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_trigger.test: - Made test clean up replication state. - replace master-slave-reset.inc by rpl_reset.inc - use new file rpl_reconnect.inc instead of ad-hoc code - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_trunc_temp.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_truncate_2myisam.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_truncate_3innodb.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_typeconv_innodb.test: - made test clean up replication state - removed unnecessary call to master-slave-reset.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_udf.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_user.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_user_variables.test: Made test clean up replication state. mysql-test/suite/rpl/t/rpl_variables.test: - Made test clean up replication state. - replaced reset_master_and_slave.inc by rpl_reset.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_variables_stm.test: - Made test clean up replication state. - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl/t/rpl_view.test: Made test clean up replication state. mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result: updated result file mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result: updated result file mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test: - replaced master-slave-end.inc by rpl_end.inc - removed wait_for_slave_sql_to_stop since it is followed by wait_for_slave_sql_error.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test: made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test: made test use rpl_init.inc to setup circular replication, instead of ad-hoc setup made test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf: removed automatic configuration of server as slave. this is not needed because rpl_init.inc does it. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test: - made test clean up replication state - it seems that sync_slave_with_master does not work deterministically here, so instead we wait for 'drop table' to replicate by checking when the table disappears on slave. - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test: make test clean up replication state use rpl_change_topology.inc to reconfigure replication topology, instead of ad-hoc call to change master mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test: - replace master-slave-end.inc by rpl_end.inc - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test: - make test clean up replication state - diff_tables.inc now takes only one parameter. mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test: - make test clean up replication state - use rpl_change_topology.inc to change replication topology, instead of ad-hoc calls to change master mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test: make test clean up replication state mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test: replace master-slave-end.inc by rpl_end.inc mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test: make test clean up replication state mysql-test/suite/sys_vars/t/rpl_init_slave_func.test: made test clean up after itself mysql-test/t/init_file.test: use new file force_restart.inc instead of SP --- .../binlog/r/binlog_auto_increment_bug33029.result | 42 - .../suite/binlog/r/binlog_drop_if_exists.result | 98 + .../suite/binlog/r/binlog_old_versions.result | 1 - .../binlog/r/binlog_query_filter_rules.result | 11 + mysql-test/suite/binlog/r/binlog_server_id.result | 34 + mysql-test/suite/binlog/r/binlog_sf.result | 68 + mysql-test/suite/binlog/r/binlog_sql_mode.result | 8 +- .../t/binlog_auto_increment_bug33029-master.opt | 1 - .../binlog/t/binlog_auto_increment_bug33029.test | 61 - .../suite/binlog/t/binlog_drop_if_exists.test | 115 + mysql-test/suite/binlog/t/binlog_old_versions.test | 4 +- .../binlog/t/binlog_query_filter_rules-master.opt | 1 + .../suite/binlog/t/binlog_query_filter_rules.test | 32 + mysql-test/suite/binlog/t/binlog_server_id.test | 29 + mysql-test/suite/binlog/t/binlog_sf.test | 191 ++ mysql-test/suite/binlog/t/binlog_sql_mode.test | 5 +- mysql-test/suite/bugs/t/rpl_bug12691.test | 4 +- mysql-test/suite/bugs/t/rpl_bug23533.test | 9 +- mysql-test/suite/bugs/t/rpl_bug31582.test | 2 +- mysql-test/suite/bugs/t/rpl_bug31583.test | 2 +- mysql-test/suite/bugs/t/rpl_bug33029.test | 1 + mysql-test/suite/bugs/t/rpl_bug36391.test | 3 +- mysql-test/suite/bugs/t/rpl_bug37426.test | 3 +- mysql-test/suite/bugs/t/rpl_bug38205.test | 2 +- .../suite/manual/t/rpl_replication_delay.test | 12 +- .../suite/ndb_team/t/rpl_ndb_dd_advance.test | 8 +- .../suite/ndb_team/t/rpl_ndb_extraColMaster.test | 2 + .../suite/ndb_team/t/rpl_ndb_mix_innodb.test | 3 +- mysql-test/suite/parts/r/rpl_partition.result | 21 +- mysql-test/suite/parts/t/rpl_partition.test | 18 +- mysql-test/suite/rpl/include/rpl_mixed_ddl.inc | 3 +- mysql-test/suite/rpl/include/rpl_mixed_dml.inc | 3 +- mysql-test/suite/rpl/r/rpl000010.result | 14 - mysql-test/suite/rpl/r/rpl000011.result | 16 - mysql-test/suite/rpl/r/rpl000013.result | 28 - mysql-test/suite/rpl/r/rpl000017.result | 18 - mysql-test/suite/rpl/r/rpl_000010.result | 11 + mysql-test/suite/rpl/r/rpl_000011.result | 13 + mysql-test/suite/rpl/r/rpl_000013.result | 25 + mysql-test/suite/rpl/r/rpl_000017.result | 13 + mysql-test/suite/rpl/r/rpl_EE_err.result | 9 +- mysql-test/suite/rpl/r/rpl_LD_INFILE.result | 9 +- mysql-test/suite/rpl/r/rpl_alter.result | 14 +- mysql-test/suite/rpl/r/rpl_alter_db.result | 9 +- mysql-test/suite/rpl/r/rpl_auto_increment.result | 24 +- .../suite/rpl/r/rpl_auto_increment_11932.result | 10 +- .../suite/rpl/r/rpl_auto_increment_bug33029.result | 45 + .../rpl/r/rpl_auto_increment_update_failure.result | 65 +- .../suite/rpl/r/rpl_begin_commit_rollback.result | 12 +- .../suite/rpl/r/rpl_binlog_corruption.result | 9 +- mysql-test/suite/rpl/r/rpl_binlog_errors.result | 40 +- mysql-test/suite/rpl/r/rpl_binlog_grant.result | 9 +- .../suite/rpl/r/rpl_binlog_max_cache_size.result | 34 +- .../rpl/r/rpl_binlog_query_filter_rules.result | 11 - mysql-test/suite/rpl/r/rpl_bit.result | 9 +- mysql-test/suite/rpl/r/rpl_bit_npk.result | 9 +- mysql-test/suite/rpl/r/rpl_blackhole.result | 9 +- mysql-test/suite/rpl/r/rpl_bug26395.result | 10 +- mysql-test/suite/rpl/r/rpl_bug31076.result | 9 +- mysql-test/suite/rpl/r/rpl_bug33931.result | 10 +- mysql-test/suite/rpl/r/rpl_bug38694.result | 9 +- mysql-test/suite/rpl/r/rpl_change_master.result | 10 +- mysql-test/suite/rpl/r/rpl_charset.result | 11 +- mysql-test/suite/rpl/r/rpl_charset_sjis.result | 9 +- .../suite/rpl/r/rpl_circular_for_4_hosts.result | 80 +- mysql-test/suite/rpl/r/rpl_colSize.result | 9 +- .../suite/rpl/r/rpl_commit_after_flush.result | 9 +- .../suite/rpl/r/rpl_concurrency_error.result | 13 +- .../suite/rpl/r/rpl_conditional_comments.result | 15 +- mysql-test/suite/rpl/r/rpl_create_database.result | 9 +- .../suite/rpl/r/rpl_create_if_not_exists.result | 9 +- .../r/rpl_create_tmp_table_if_not_exists.result | 9 +- mysql-test/suite/rpl/r/rpl_cross_version.result | 11 +- mysql-test/suite/rpl/r/rpl_current_user.result | 86 +- mysql-test/suite/rpl/r/rpl_deadlock_innodb.result | 17 +- mysql-test/suite/rpl/r/rpl_delete_no_where.result | 9 +- mysql-test/suite/rpl/r/rpl_do_grant.result | 45 +- mysql-test/suite/rpl/r/rpl_drop.result | 10 +- mysql-test/suite/rpl/r/rpl_drop_db.result | 10 +- mysql-test/suite/rpl/r/rpl_drop_if_exists.result | 98 - mysql-test/suite/rpl/r/rpl_drop_temp.result | 9 +- mysql-test/suite/rpl/r/rpl_drop_view.result | 9 +- mysql-test/suite/rpl/r/rpl_dual_pos_advance.result | 18 +- .../suite/rpl/r/rpl_empty_master_crash.result | 9 +- mysql-test/suite/rpl/r/rpl_err_ignoredtable.result | 9 +- mysql-test/suite/rpl/r/rpl_events.result | 9 +- mysql-test/suite/rpl/r/rpl_extraCol_innodb.result | 603 ----- mysql-test/suite/rpl/r/rpl_extraCol_myisam.result | 603 ----- .../suite/rpl/r/rpl_extraColmaster_innodb.result | 2625 -------------------- .../suite/rpl/r/rpl_extraColmaster_myisam.result | 2625 -------------------- .../suite/rpl/r/rpl_extra_col_master_innodb.result | 2616 +++++++++++++++++++ .../suite/rpl/r/rpl_extra_col_master_myisam.result | 2616 +++++++++++++++++++ .../suite/rpl/r/rpl_extra_col_slave_innodb.result | 590 +++++ .../suite/rpl/r/rpl_extra_col_slave_myisam.result | 590 +++++ mysql-test/suite/rpl/r/rpl_failed_optimize.result | 9 +- .../suite/rpl/r/rpl_filter_tables_not_exist.result | 105 +- mysql-test/suite/rpl/r/rpl_flushlog_loop.result | 22 +- .../suite/rpl/r/rpl_foreign_key_innodb.result | 9 +- mysql-test/suite/rpl/r/rpl_found_rows.result | 15 +- mysql-test/suite/rpl/r/rpl_free_items.result | 9 +- mysql-test/suite/rpl/r/rpl_geometry.result | 9 +- mysql-test/suite/rpl/r/rpl_get_lock.result | 9 +- .../rpl/r/rpl_get_master_version_and_clock.result | 31 +- mysql-test/suite/rpl/r/rpl_grant.result | 9 +- mysql-test/suite/rpl/r/rpl_idempotency.result | 39 +- mysql-test/suite/rpl/r/rpl_ignore_grant.result | 9 +- mysql-test/suite/rpl/r/rpl_ignore_revoke.result | 9 +- mysql-test/suite/rpl/r/rpl_ignore_table.result | 10 +- .../suite/rpl/r/rpl_ignore_table_update.result | 9 +- mysql-test/suite/rpl/r/rpl_incident.result | 14 +- mysql-test/suite/rpl/r/rpl_init_slave.result | 10 +- .../suite/rpl/r/rpl_init_slave_errors.result | 18 +- mysql-test/suite/rpl/r/rpl_innodb.result | 9 +- mysql-test/suite/rpl/r/rpl_innodb_bug28430.result | 9 +- mysql-test/suite/rpl/r/rpl_innodb_bug30888.result | 9 +- mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result | 9 +- mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result | 9 +- mysql-test/suite/rpl/r/rpl_insert.result | 9 +- mysql-test/suite/rpl/r/rpl_insert_id.result | 10 +- mysql-test/suite/rpl/r/rpl_insert_id_pk.result | 9 +- mysql-test/suite/rpl/r/rpl_insert_ignore.result | 9 +- mysql-test/suite/rpl/r/rpl_insert_select.result | 9 +- mysql-test/suite/rpl/r/rpl_invoked_features.result | 9 +- mysql-test/suite/rpl/r/rpl_killed_ddl.result | 59 +- .../suite/rpl/r/rpl_known_bugs_detection.result | 19 +- mysql-test/suite/rpl/r/rpl_load_from_master.result | 9 +- .../suite/rpl/r/rpl_load_table_from_master.result | 9 +- mysql-test/suite/rpl/r/rpl_loaddata.result | 47 +- mysql-test/suite/rpl/r/rpl_loaddata_charset.result | 9 +- .../suite/rpl/r/rpl_loaddata_concurrent.result | 47 +- mysql-test/suite/rpl/r/rpl_loaddata_fatal.result | 15 +- mysql-test/suite/rpl/r/rpl_loaddata_m.result | 9 +- mysql-test/suite/rpl/r/rpl_loaddata_map.result | 9 +- mysql-test/suite/rpl/r/rpl_loaddata_s.result | 9 +- mysql-test/suite/rpl/r/rpl_loaddata_simple.result | 9 +- mysql-test/suite/rpl/r/rpl_loaddata_symlink.result | 9 +- mysql-test/suite/rpl/r/rpl_loaddatalocal.result | 9 +- mysql-test/suite/rpl/r/rpl_loadfile.result | 17 +- mysql-test/suite/rpl/r/rpl_locale.result | 9 +- mysql-test/suite/rpl/r/rpl_log_pos.result | 16 +- .../rpl/r/rpl_manual_change_index_file.result | 14 +- mysql-test/suite/rpl/r/rpl_many_optimize.result | 9 +- mysql-test/suite/rpl/r/rpl_master_pos_wait.result | 9 +- mysql-test/suite/rpl/r/rpl_misc_functions.result | 9 +- mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result | 9 +- mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result | 9 +- mysql-test/suite/rpl/r/rpl_multi_delete.result | 9 +- mysql-test/suite/rpl/r/rpl_multi_delete2.result | 9 +- mysql-test/suite/rpl/r/rpl_multi_engine.result | 9 +- mysql-test/suite/rpl/r/rpl_multi_update.result | 9 +- mysql-test/suite/rpl/r/rpl_multi_update2.result | 9 +- mysql-test/suite/rpl/r/rpl_multi_update3.result | 9 +- mysql-test/suite/rpl/r/rpl_multi_update4.result | 9 +- mysql-test/suite/rpl/r/rpl_mysql_upgrade.result | 10 +- mysql-test/suite/rpl/r/rpl_name_const.result | 9 +- .../rpl/r/rpl_nondeterministic_functions.result | 11 +- mysql-test/suite/rpl/r/rpl_not_null_innodb.result | 17 +- mysql-test/suite/rpl/r/rpl_not_null_myisam.result | 17 +- mysql-test/suite/rpl/r/rpl_optimize.result | 9 +- mysql-test/suite/rpl/r/rpl_packet.result | 31 +- mysql-test/suite/rpl/r/rpl_plugin_load.result | 9 +- mysql-test/suite/rpl/r/rpl_ps.result | 37 +- mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result | 9 +- mysql-test/suite/rpl/r/rpl_read_only.result | 9 +- .../suite/rpl/r/rpl_relay_space_innodb.result | 9 +- .../suite/rpl/r/rpl_relay_space_myisam.result | 9 +- mysql-test/suite/rpl/r/rpl_relayrotate.result | 9 +- mysql-test/suite/rpl/r/rpl_relayspace.result | 10 +- mysql-test/suite/rpl/r/rpl_replicate_do.result | 11 +- .../suite/rpl/r/rpl_replicate_ignore_db.result | 9 +- mysql-test/suite/rpl/r/rpl_report.result | 9 +- mysql-test/suite/rpl/r/rpl_rewrt_db.result | 9 +- mysql-test/suite/rpl/r/rpl_rotate_logs.result | 25 +- mysql-test/suite/rpl/r/rpl_row_001.result | 9 +- mysql-test/suite/rpl/r/rpl_row_4_bytes.result | 9 +- mysql-test/suite/rpl/r/rpl_row_NOW.result | 9 +- mysql-test/suite/rpl/r/rpl_row_USER.result | 9 +- mysql-test/suite/rpl/r/rpl_row_UUID.result | 9 +- mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result | 45 +- .../suite/rpl/r/rpl_row_basic_2myisam.result | 57 +- .../suite/rpl/r/rpl_row_basic_3innodb.result | 57 +- .../suite/rpl/r/rpl_row_basic_8partition.result | 9 +- mysql-test/suite/rpl/r/rpl_row_blob_innodb.result | 9 +- mysql-test/suite/rpl/r/rpl_row_blob_myisam.result | 9 +- mysql-test/suite/rpl/r/rpl_row_colSize.result | 48 +- mysql-test/suite/rpl/r/rpl_row_conflicts.result | 17 +- mysql-test/suite/rpl/r/rpl_row_delayed_ins.result | 9 +- mysql-test/suite/rpl/r/rpl_row_drop.result | 9 +- mysql-test/suite/rpl/r/rpl_row_find_row.result | 25 +- mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result | 11 +- mysql-test/suite/rpl/r/rpl_row_func001.result | 9 +- mysql-test/suite/rpl/r/rpl_row_func002.result | 9 +- mysql-test/suite/rpl/r/rpl_row_func003.result | 9 +- mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result | 14 +- .../suite/rpl/r/rpl_row_insert_delayed.result | 9 +- mysql-test/suite/rpl/r/rpl_row_log.result | 18 +- mysql-test/suite/rpl/r/rpl_row_log_innodb.result | 18 +- .../suite/rpl/r/rpl_row_max_relay_size.result | 19 +- mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result | 9 +- .../suite/rpl/r/rpl_row_rec_comp_innodb.result | 36 +- .../suite/rpl/r/rpl_row_rec_comp_myisam.result | 45 +- mysql-test/suite/rpl/r/rpl_row_reset_slave.result | 34 +- mysql-test/suite/rpl/r/rpl_row_sp001.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result | 27 +- mysql-test/suite/rpl/r/rpl_row_sp003.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp005.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result | 15 +- mysql-test/suite/rpl/r/rpl_row_sp008.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp009.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp010.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp011.result | 9 +- mysql-test/suite/rpl/r/rpl_row_sp012.result | 9 +- .../suite/rpl/r/rpl_row_stop_middle_update.result | 11 +- .../suite/rpl/r/rpl_row_tabledefs_2myisam.result | 31 +- .../suite/rpl/r/rpl_row_tabledefs_3innodb.result | 31 +- mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result | 38 +- mysql-test/suite/rpl/r/rpl_row_trig001.result | 9 +- mysql-test/suite/rpl/r/rpl_row_trig002.result | 9 +- mysql-test/suite/rpl/r/rpl_row_trig003.result | 9 +- mysql-test/suite/rpl/r/rpl_row_trig004.result | 9 +- mysql-test/suite/rpl/r/rpl_row_trunc_temp.result | 9 +- mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result | 9 +- mysql-test/suite/rpl/r/rpl_row_until.result | 21 +- mysql-test/suite/rpl/r/rpl_row_view01.result | 9 +- mysql-test/suite/rpl/r/rpl_row_wide_table.result | 9 +- mysql-test/suite/rpl/r/rpl_server_id.result | 34 - mysql-test/suite/rpl/r/rpl_server_id1.result | 20 +- mysql-test/suite/rpl/r/rpl_server_id2.result | 11 +- mysql-test/suite/rpl/r/rpl_session_var.result | 9 +- mysql-test/suite/rpl/r/rpl_set_charset.result | 9 +- mysql-test/suite/rpl/r/rpl_set_null_innodb.result | 31 +- mysql-test/suite/rpl/r/rpl_set_null_myisam.result | 31 +- mysql-test/suite/rpl/r/rpl_sf.result | 68 - .../suite/rpl/r/rpl_show_slave_running.result | 11 +- mysql-test/suite/rpl/r/rpl_skip_error.result | 13 +- mysql-test/suite/rpl/r/rpl_slave_grp_exec.result | 18 +- mysql-test/suite/rpl/r/rpl_slave_load_in.result | 13 +- .../rpl/r/rpl_slave_load_remove_tmpfile.result | 13 +- .../rpl/r/rpl_slave_load_tmpdir_not_exist.result | 11 +- mysql-test/suite/rpl/r/rpl_slave_skip.result | 13 +- mysql-test/suite/rpl/r/rpl_slave_status.result | 16 +- mysql-test/suite/rpl/r/rpl_slow_query_log.result | 16 +- mysql-test/suite/rpl/r/rpl_sp.result | 9 +- mysql-test/suite/rpl/r/rpl_sp004.result | 9 +- mysql-test/suite/rpl/r/rpl_sp_effects.result | 9 +- mysql-test/suite/rpl/r/rpl_sporadic_master.result | 9 +- mysql-test/suite/rpl/r/rpl_ssl.result | 41 +- mysql-test/suite/rpl/r/rpl_ssl1.result | 53 +- mysql-test/suite/rpl/r/rpl_start_stop_slave.result | 11 +- mysql-test/suite/rpl/r/rpl_stm_000001.result | 12 +- mysql-test/suite/rpl/r/rpl_stm_EE_err2.result | 12 +- .../rpl/r/rpl_stm_auto_increment_bug33029.result | 9 +- .../suite/rpl/r/rpl_stm_binlog_direct.result | 9 +- mysql-test/suite/rpl/r/rpl_stm_conflicts.result | 11 +- .../rpl/r/rpl_stm_create_if_not_exists.result | 29 +- mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result | 11 +- .../suite/rpl/r/rpl_stm_insert_delayed.result | 9 +- mysql-test/suite/rpl/r/rpl_stm_loadfile.result | 9 +- mysql-test/suite/rpl/r/rpl_stm_log.result | 18 +- .../suite/rpl/r/rpl_stm_max_relay_size.result | 19 +- .../suite/rpl/r/rpl_stm_mixing_engines.result | 18 +- mysql-test/suite/rpl/r/rpl_stm_multi_query.result | 11 +- mysql-test/suite/rpl/r/rpl_stm_no_op.result | 9 +- mysql-test/suite/rpl/r/rpl_stm_reset_slave.result | 34 +- mysql-test/suite/rpl/r/rpl_stm_sql_mode.result | 9 +- mysql-test/suite/rpl/r/rpl_stm_until.result | 37 +- mysql-test/suite/rpl/r/rpl_stop_slave.result | 25 +- .../suite/rpl/r/rpl_switch_stm_row_mixed.result | 9 +- mysql-test/suite/rpl/r/rpl_temp_table.result | 9 +- .../suite/rpl/r/rpl_temp_table_mix_row.result | 20 +- mysql-test/suite/rpl/r/rpl_temporary.result | 12 +- mysql-test/suite/rpl/r/rpl_temporary_errors.result | 14 +- mysql-test/suite/rpl/r/rpl_test_framework.result | 170 ++ mysql-test/suite/rpl/r/rpl_timezone.result | 10 +- .../suite/rpl/r/rpl_tmp_table_and_DDL.result | 9 +- mysql-test/suite/rpl/r/rpl_trigger.result | 24 +- mysql-test/suite/rpl/r/rpl_trunc_temp.result | 9 +- mysql-test/suite/rpl/r/rpl_truncate_2myisam.result | 29 +- mysql-test/suite/rpl/r/rpl_truncate_3innodb.result | 29 +- mysql-test/suite/rpl/r/rpl_typeconv_innodb.result | 16 +- mysql-test/suite/rpl/r/rpl_udf.result | 9 +- mysql-test/suite/rpl/r/rpl_user.result | 9 +- mysql-test/suite/rpl/r/rpl_user_variables.result | 10 +- mysql-test/suite/rpl/r/rpl_variables.result | 26 +- mysql-test/suite/rpl/r/rpl_variables_stm.result | 19 +- mysql-test/suite/rpl/r/rpl_view.result | 9 +- mysql-test/suite/rpl/t/rpl000010-slave.opt | 1 - mysql-test/suite/rpl/t/rpl000010.test | 19 - mysql-test/suite/rpl/t/rpl000011.test | 17 - mysql-test/suite/rpl/t/rpl000013.test | 53 - mysql-test/suite/rpl/t/rpl000017-slave.opt | 1 - mysql-test/suite/rpl/t/rpl000017-slave.sh | 12 - mysql-test/suite/rpl/t/rpl000017.test | 22 - mysql-test/suite/rpl/t/rpl_000010-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_000010.test | 20 + mysql-test/suite/rpl/t/rpl_000011.test | 18 + mysql-test/suite/rpl/t/rpl_000013.test | 51 + mysql-test/suite/rpl/t/rpl_000017-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_000017.test | 48 + mysql-test/suite/rpl/t/rpl_EE_err.test | 4 - mysql-test/suite/rpl/t/rpl_LD_INFILE.test | 1 + mysql-test/suite/rpl/t/rpl_alter.test | 15 +- mysql-test/suite/rpl/t/rpl_alter_db.test | 1 + mysql-test/suite/rpl/t/rpl_auto_increment.test | 4 - .../suite/rpl/t/rpl_auto_increment_11932.test | 2 +- .../suite/rpl/t/rpl_auto_increment_bug33029.test | 56 + .../rpl/t/rpl_auto_increment_update_failure.test | 13 +- .../suite/rpl/t/rpl_begin_commit_rollback.test | 2 +- .../suite/rpl/t/rpl_binlog_corruption-master.opt | 1 - mysql-test/suite/rpl/t/rpl_binlog_corruption.test | 9 +- mysql-test/suite/rpl/t/rpl_binlog_errors.test | 24 +- mysql-test/suite/rpl/t/rpl_binlog_grant.test | 1 + .../suite/rpl/t/rpl_binlog_max_cache_size.test | 56 +- .../rpl/t/rpl_binlog_query_filter_rules-master.opt | 1 - .../suite/rpl/t/rpl_binlog_query_filter_rules.test | 32 - mysql-test/suite/rpl/t/rpl_bit.test | 1 + mysql-test/suite/rpl/t/rpl_bit_npk.test | 1 + mysql-test/suite/rpl/t/rpl_blackhole.test | 1 + mysql-test/suite/rpl/t/rpl_bug26395.test | 2 + mysql-test/suite/rpl/t/rpl_bug31076.test | 1 + mysql-test/suite/rpl/t/rpl_bug33931.test | 25 +- mysql-test/suite/rpl/t/rpl_bug38694.test | 1 + mysql-test/suite/rpl/t/rpl_change_master.test | 1 + mysql-test/suite/rpl/t/rpl_charset.test | 1 - mysql-test/suite/rpl/t/rpl_charset_sjis.test | 1 + .../suite/rpl/t/rpl_circular_for_4_hosts.cnf | 11 +- .../suite/rpl/t/rpl_circular_for_4_hosts.test | 285 ++- mysql-test/suite/rpl/t/rpl_colSize.test | 1 + mysql-test/suite/rpl/t/rpl_commit_after_flush.test | 8 +- mysql-test/suite/rpl/t/rpl_concurrency_error.test | 11 +- .../suite/rpl/t/rpl_conditional_comments.test | 20 +- mysql-test/suite/rpl/t/rpl_create_database.test | 1 + .../suite/rpl/t/rpl_create_if_not_exists.test | 2 +- .../rpl/t/rpl_create_tmp_table_if_not_exists.test | 2 +- mysql-test/suite/rpl/t/rpl_critical_errors.test | 3 +- mysql-test/suite/rpl/t/rpl_cross_version.test | 10 +- mysql-test/suite/rpl/t/rpl_current_user.cnf | 7 +- mysql-test/suite/rpl/t/rpl_current_user.test | 131 +- mysql-test/suite/rpl/t/rpl_ddl.test | 1 + mysql-test/suite/rpl/t/rpl_deadlock_innodb.test | 7 - mysql-test/suite/rpl/t/rpl_delete_no_where.test | 1 + mysql-test/suite/rpl/t/rpl_do_grant.test | 22 +- mysql-test/suite/rpl/t/rpl_drop.test | 11 +- mysql-test/suite/rpl/t/rpl_drop_db.test | 3 +- mysql-test/suite/rpl/t/rpl_drop_if_exists.test | 115 - mysql-test/suite/rpl/t/rpl_drop_temp.test | 1 + mysql-test/suite/rpl/t/rpl_drop_view.test | 1 + mysql-test/suite/rpl/t/rpl_dual_pos_advance.test | 41 +- mysql-test/suite/rpl/t/rpl_empty_master_crash.test | 1 + mysql-test/suite/rpl/t/rpl_err_ignoredtable.test | 3 + mysql-test/suite/rpl/t/rpl_events.test | 1 + mysql-test/suite/rpl/t/rpl_extraCol_innodb.test | 13 - mysql-test/suite/rpl/t/rpl_extraCol_myisam.test | 12 - .../suite/rpl/t/rpl_extraColmaster_innodb.test | 16 - .../suite/rpl/t/rpl_extraColmaster_myisam.test | 15 - .../suite/rpl/t/rpl_extra_col_master_innodb.test | 17 + .../suite/rpl/t/rpl_extra_col_master_myisam.test | 16 + .../suite/rpl/t/rpl_extra_col_slave_innodb.test | 6 + .../suite/rpl/t/rpl_extra_col_slave_myisam.test | 5 + mysql-test/suite/rpl/t/rpl_failed_optimize.test | 7 - .../suite/rpl/t/rpl_filter_tables_not_exist.test | 2 +- .../suite/rpl/t/rpl_flushlog_loop-master.opt | 2 +- mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh | 5 - mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt | 2 +- mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh | 4 - mysql-test/suite/rpl/t/rpl_flushlog_loop.test | 39 +- mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test | 7 - mysql-test/suite/rpl/t/rpl_found_rows.test | 4 +- mysql-test/suite/rpl/t/rpl_free_items.test | 1 + mysql-test/suite/rpl/t/rpl_geometry.test | 2 +- mysql-test/suite/rpl/t/rpl_get_lock.test | 11 +- .../rpl/t/rpl_get_master_version_and_clock.test | 21 +- mysql-test/suite/rpl/t/rpl_grant.test | 2 + mysql-test/suite/rpl/t/rpl_idempotency.test | 80 +- mysql-test/suite/rpl/t/rpl_ignore_grant.test | 1 + mysql-test/suite/rpl/t/rpl_ignore_revoke.test | 1 + mysql-test/suite/rpl/t/rpl_ignore_table.test | 4 +- .../suite/rpl/t/rpl_ignore_table_update.test | 1 + mysql-test/suite/rpl/t/rpl_incident.test | 1 + mysql-test/suite/rpl/t/rpl_init_slave.test | 2 +- mysql-test/suite/rpl/t/rpl_init_slave_errors.test | 26 +- mysql-test/suite/rpl/t/rpl_innodb.test | 2 +- mysql-test/suite/rpl/t/rpl_innodb_bug28430.test | 2 +- mysql-test/suite/rpl/t/rpl_innodb_bug30888.test | 2 +- mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test | 5 - mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test | 5 - mysql-test/suite/rpl/t/rpl_insert.test | 1 + mysql-test/suite/rpl/t/rpl_insert_id.test | 4 - mysql-test/suite/rpl/t/rpl_insert_id_pk.test | 4 - mysql-test/suite/rpl/t/rpl_insert_ignore.test | 1 + mysql-test/suite/rpl/t/rpl_insert_select.test | 1 + mysql-test/suite/rpl/t/rpl_invoked_features.test | 1 + mysql-test/suite/rpl/t/rpl_killed_ddl.test | 21 +- .../suite/rpl/t/rpl_known_bugs_detection.test | 12 +- mysql-test/suite/rpl/t/rpl_load_from_master.test | 1 + .../suite/rpl/t/rpl_load_table_from_master.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata.test | 4 - mysql-test/suite/rpl/t/rpl_loaddata_charset.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_fatal.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_m.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_map.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_s.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_simple.test | 1 + mysql-test/suite/rpl/t/rpl_loaddata_symlink.test | 1 + mysql-test/suite/rpl/t/rpl_loaddatalocal.test | 1 + mysql-test/suite/rpl/t/rpl_loadfile.test | 10 +- mysql-test/suite/rpl/t/rpl_locale.test | 1 + mysql-test/suite/rpl/t/rpl_log_pos.test | 3 +- .../suite/rpl/t/rpl_manual_change_index_file.test | 10 +- mysql-test/suite/rpl/t/rpl_many_optimize.test | 1 + mysql-test/suite/rpl/t/rpl_master_pos_wait.test | 2 + mysql-test/suite/rpl/t/rpl_misc_functions.test | 1 + mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test | 1 + mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test | 1 + mysql-test/suite/rpl/t/rpl_multi_delete.test | 1 + mysql-test/suite/rpl/t/rpl_multi_delete2.test | 1 + mysql-test/suite/rpl/t/rpl_multi_engine.test | 1 + mysql-test/suite/rpl/t/rpl_multi_update.test | 4 - mysql-test/suite/rpl/t/rpl_multi_update2.test | 1 + mysql-test/suite/rpl/t/rpl_multi_update3.test | 1 + mysql-test/suite/rpl/t/rpl_multi_update4.test | 1 + mysql-test/suite/rpl/t/rpl_mysql_upgrade.test | 2 + mysql-test/suite/rpl/t/rpl_name_const.test | 1 + .../rpl/t/rpl_nondeterministic_functions.test | 5 +- mysql-test/suite/rpl/t/rpl_not_null_innodb.test | 1 + mysql-test/suite/rpl/t/rpl_not_null_myisam.test | 1 + mysql-test/suite/rpl/t/rpl_optimize.test | 1 + mysql-test/suite/rpl/t/rpl_packet.test | 49 +- mysql-test/suite/rpl/t/rpl_plugin_load.test | 2 +- mysql-test/suite/rpl/t/rpl_ps.test | 43 +- mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test | 1 + mysql-test/suite/rpl/t/rpl_read_only.test | 1 + mysql-test/suite/rpl/t/rpl_relay_space_innodb.test | 18 - mysql-test/suite/rpl/t/rpl_relay_space_myisam.test | 18 - mysql-test/suite/rpl/t/rpl_relayrotate.test | 1 + mysql-test/suite/rpl/t/rpl_relayspace.test | 1 + mysql-test/suite/rpl/t/rpl_replicate_do.test | 1 + .../suite/rpl/t/rpl_replicate_ignore_db.test | 1 + mysql-test/suite/rpl/t/rpl_report.test | 1 + mysql-test/suite/rpl/t/rpl_rewrt_db.test | 1 + mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt | 1 - mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh | 2 - mysql-test/suite/rpl/t/rpl_rotate_logs.test | 17 +- mysql-test/suite/rpl/t/rpl_row_001.test | 1 + mysql-test/suite/rpl/t/rpl_row_4_bytes.test | 1 + mysql-test/suite/rpl/t/rpl_row_NOW.test | 1 + mysql-test/suite/rpl/t/rpl_row_USER.test | 1 + mysql-test/suite/rpl/t/rpl_row_UUID.test | 1 + mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test | 33 +- mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test | 1 + mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test | 1 + .../suite/rpl/t/rpl_row_basic_8partition.test | 1 + mysql-test/suite/rpl/t/rpl_row_blob_innodb.test | 1 + mysql-test/suite/rpl/t/rpl_row_blob_myisam.test | 1 + mysql-test/suite/rpl/t/rpl_row_colSize.test | 1 + mysql-test/suite/rpl/t/rpl_row_conflicts.test | 4 +- mysql-test/suite/rpl/t/rpl_row_create_table.test | 34 +- mysql-test/suite/rpl/t/rpl_row_delayed_ins.test | 4 - mysql-test/suite/rpl/t/rpl_row_drop.test | 1 + mysql-test/suite/rpl/t/rpl_row_find_row.test | 9 +- mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test | 1 - mysql-test/suite/rpl/t/rpl_row_func001.test | 1 + mysql-test/suite/rpl/t/rpl_row_func002.test | 1 + mysql-test/suite/rpl/t/rpl_row_func003.test | 1 + mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test | 12 +- mysql-test/suite/rpl/t/rpl_row_insert_delayed.test | 1 + mysql-test/suite/rpl/t/rpl_row_log.test | 1 + mysql-test/suite/rpl/t/rpl_row_log_innodb.test | 1 + mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test | 1 + .../suite/rpl/t/rpl_row_rec_comp_innodb.test | 1 + .../suite/rpl/t/rpl_row_rec_comp_myisam.test | 6 +- mysql-test/suite/rpl/t/rpl_row_sp001.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test | 7 - mysql-test/suite/rpl/t/rpl_row_sp003.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp005.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test | 7 - mysql-test/suite/rpl/t/rpl_row_sp008.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp009.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp010.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp011.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp012.test | 1 + .../suite/rpl/t/rpl_row_stop_middle_update.test | 3 +- .../suite/rpl/t/rpl_row_tabledefs_2myisam.test | 1 + .../suite/rpl/t/rpl_row_tabledefs_3innodb.test | 1 + mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test | 10 +- mysql-test/suite/rpl/t/rpl_row_trig001.test | 1 + mysql-test/suite/rpl/t/rpl_row_trig002.test | 1 + mysql-test/suite/rpl/t/rpl_row_trig003.test | 1 + mysql-test/suite/rpl/t/rpl_row_trig004.test | 1 + mysql-test/suite/rpl/t/rpl_row_trunc_temp.test | 2 +- mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test | 1 + mysql-test/suite/rpl/t/rpl_row_until.test | 10 +- mysql-test/suite/rpl/t/rpl_row_view01.test | 1 + mysql-test/suite/rpl/t/rpl_row_wide_table.test | 1 + mysql-test/suite/rpl/t/rpl_server_id.test | 29 - mysql-test/suite/rpl/t/rpl_server_id1.test | 30 +- mysql-test/suite/rpl/t/rpl_server_id2.test | 1 + mysql-test/suite/rpl/t/rpl_session_var.test | 1 + mysql-test/suite/rpl/t/rpl_set_charset.test | 1 + mysql-test/suite/rpl/t/rpl_set_null_innodb.test | 1 + mysql-test/suite/rpl/t/rpl_set_null_myisam.test | 1 + mysql-test/suite/rpl/t/rpl_sf.test | 187 -- mysql-test/suite/rpl/t/rpl_show_slave_running.test | 1 + mysql-test/suite/rpl/t/rpl_skip_error.test | 1 + mysql-test/suite/rpl/t/rpl_slave_grp_exec.test | 19 +- mysql-test/suite/rpl/t/rpl_slave_load_in.test | 7 +- .../suite/rpl/t/rpl_slave_load_remove_tmpfile.test | 6 +- .../rpl/t/rpl_slave_load_tmpdir_not_exist.test | 25 +- mysql-test/suite/rpl/t/rpl_slave_skip.test | 1 + mysql-test/suite/rpl/t/rpl_slave_status.test | 17 +- mysql-test/suite/rpl/t/rpl_slow_query_log.test | 3 +- mysql-test/suite/rpl/t/rpl_sp.test | 1 + mysql-test/suite/rpl/t/rpl_sp004.test | 1 + mysql-test/suite/rpl/t/rpl_sp_effects.test | 1 + mysql-test/suite/rpl/t/rpl_sporadic_master.test | 1 + mysql-test/suite/rpl/t/rpl_ssl.test | 10 + mysql-test/suite/rpl/t/rpl_ssl1.test | 27 +- mysql-test/suite/rpl/t/rpl_start_stop_slave.test | 1 + mysql-test/suite/rpl/t/rpl_stm_000001.test | 130 +- .../rpl/t/rpl_stm_auto_increment_bug33029.test | 1 + mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test | 1 + mysql-test/suite/rpl/t/rpl_stm_conflicts.test | 7 +- .../suite/rpl/t/rpl_stm_create_if_not_exists.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test | 3 - mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test | 1 + mysql-test/suite/rpl/t/rpl_stm_loadfile.test | 1 + mysql-test/suite/rpl/t/rpl_stm_log.test | 1 + mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test | 3 - mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test | 7 +- mysql-test/suite/rpl/t/rpl_stm_multi_query.test | 5 - mysql-test/suite/rpl/t/rpl_stm_no_op.test | 1 + mysql-test/suite/rpl/t/rpl_stm_sql_mode.test | 1 + mysql-test/suite/rpl/t/rpl_stm_until.test | 11 +- mysql-test/suite/rpl/t/rpl_stop_slave.test | 2 +- .../suite/rpl/t/rpl_switch_stm_row_mixed.test | 1 + mysql-test/suite/rpl/t/rpl_temp_table.test | 7 +- mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test | 17 +- mysql-test/suite/rpl/t/rpl_temporary.test | 15 +- mysql-test/suite/rpl/t/rpl_temporary_errors.test | 8 +- mysql-test/suite/rpl/t/rpl_test_framework.cnf | 46 + mysql-test/suite/rpl/t/rpl_test_framework.test | 143 ++ mysql-test/suite/rpl/t/rpl_timezone.test | 5 + mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test | 1 + mysql-test/suite/rpl/t/rpl_trigger.test | 27 +- mysql-test/suite/rpl/t/rpl_trunc_temp.test | 3 + mysql-test/suite/rpl/t/rpl_truncate_2myisam.test | 1 - mysql-test/suite/rpl/t/rpl_truncate_3innodb.test | 2 - mysql-test/suite/rpl/t/rpl_typeconv_innodb.test | 7 +- mysql-test/suite/rpl/t/rpl_udf.test | 1 + mysql-test/suite/rpl/t/rpl_user.test | 1 + mysql-test/suite/rpl/t/rpl_user_variables.test | 3 +- mysql-test/suite/rpl/t/rpl_variables.test | 30 +- mysql-test/suite/rpl/t/rpl_variables_stm.test | 25 +- mysql-test/suite/rpl/t/rpl_view.test | 1 + mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_apply_status.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result | 12 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result | 17 +- .../suite/rpl_ndb/r/rpl_ndb_circular_2ch.result | 31 +- .../rpl_ndb/r/rpl_ndb_circular_simplex.result | 15 +- .../rpl_ndb/r/rpl_ndb_commit_afterflush.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_dd_partitions.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result | 57 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_idempotent.result | 14 +- .../suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_innodb_trans.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_insert_ignore.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result | 18 +- .../r/rpl_ndb_mixed_engines_transactions.result | 15 +- .../suite/rpl_ndb/r/rpl_ndb_mixed_tables.result | 21 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result | 17 +- .../suite/rpl_ndb/r/rpl_ndb_multi_update2.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_multi_update3.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_rep_ignore.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result | 31 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result | 9 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result | 9 +- .../suite/rpl_ndb/r/rpl_ndb_stm_innodb.result | 16 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result | 11 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result | 9 +- .../suite/rpl_ndb/r/rpl_row_basic_7ndb.result | 57 +- .../suite/rpl_ndb/r/rpl_truncate_7ndb.result | 9 +- mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_apply_status.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test | 3 +- mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test | 18 +- .../suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf | 7 - .../suite/rpl_ndb/t/rpl_ndb_circular_2ch.test | 21 +- .../suite/rpl_ndb/t/rpl_ndb_circular_simplex.test | 7 +- .../suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test | 2 +- .../suite/rpl_ndb/t/rpl_ndb_dd_partitions.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test | 2 +- mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test | 2 +- mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_innodb_trans.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_insert_ignore.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test | 1 + .../t/rpl_ndb_mixed_engines_transactions.test | 11 +- .../suite/rpl_ndb/t/rpl_ndb_mixed_tables.test | 19 +- mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test | 23 +- .../suite/rpl_ndb/t/rpl_ndb_multi_update2.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_multi_update3.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test | 1 + .../suite/rpl_ndb/t/rpl_ndb_relayrotate.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test | 2 + mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test | 1 + mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test | 2 +- mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test | 2 +- .../suite/rpl_ndb/t/rpl_truncate_7ndb_2.test | 1 + .../suite/sys_vars/t/rpl_init_slave_func.test | 1 + 648 files changed, 10364 insertions(+), 11235 deletions(-) delete mode 100644 mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result create mode 100644 mysql-test/suite/binlog/r/binlog_drop_if_exists.result create mode 100644 mysql-test/suite/binlog/r/binlog_query_filter_rules.result create mode 100644 mysql-test/suite/binlog/r/binlog_server_id.result create mode 100644 mysql-test/suite/binlog/r/binlog_sf.result delete mode 100644 mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt delete mode 100644 mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test create mode 100644 mysql-test/suite/binlog/t/binlog_drop_if_exists.test create mode 100644 mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt create mode 100644 mysql-test/suite/binlog/t/binlog_query_filter_rules.test create mode 100644 mysql-test/suite/binlog/t/binlog_server_id.test create mode 100644 mysql-test/suite/binlog/t/binlog_sf.test delete mode 100644 mysql-test/suite/rpl/r/rpl000010.result delete mode 100644 mysql-test/suite/rpl/r/rpl000011.result delete mode 100644 mysql-test/suite/rpl/r/rpl000013.result delete mode 100644 mysql-test/suite/rpl/r/rpl000017.result create mode 100644 mysql-test/suite/rpl/r/rpl_000010.result create mode 100644 mysql-test/suite/rpl/r/rpl_000011.result create mode 100644 mysql-test/suite/rpl/r/rpl_000013.result create mode 100644 mysql-test/suite/rpl/r/rpl_000017.result create mode 100644 mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result delete mode 100644 mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result delete mode 100644 mysql-test/suite/rpl/r/rpl_drop_if_exists.result delete mode 100644 mysql-test/suite/rpl/r/rpl_extraCol_innodb.result delete mode 100644 mysql-test/suite/rpl/r/rpl_extraCol_myisam.result delete mode 100644 mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result delete mode 100644 mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result create mode 100644 mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result create mode 100644 mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result delete mode 100644 mysql-test/suite/rpl/r/rpl_server_id.result delete mode 100644 mysql-test/suite/rpl/r/rpl_sf.result create mode 100644 mysql-test/suite/rpl/r/rpl_test_framework.result delete mode 100644 mysql-test/suite/rpl/t/rpl000010-slave.opt delete mode 100644 mysql-test/suite/rpl/t/rpl000010.test delete mode 100644 mysql-test/suite/rpl/t/rpl000011.test delete mode 100644 mysql-test/suite/rpl/t/rpl000013.test delete mode 100644 mysql-test/suite/rpl/t/rpl000017-slave.opt delete mode 100755 mysql-test/suite/rpl/t/rpl000017-slave.sh delete mode 100644 mysql-test/suite/rpl/t/rpl000017.test create mode 100644 mysql-test/suite/rpl/t/rpl_000010-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_000010.test create mode 100644 mysql-test/suite/rpl/t/rpl_000011.test create mode 100644 mysql-test/suite/rpl/t/rpl_000013.test create mode 100644 mysql-test/suite/rpl/t/rpl_000017-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_000017.test create mode 100644 mysql-test/suite/rpl/t/rpl_auto_increment_bug33029.test delete mode 100644 mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt delete mode 100644 mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt delete mode 100644 mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test delete mode 100644 mysql-test/suite/rpl/t/rpl_drop_if_exists.test delete mode 100644 mysql-test/suite/rpl/t/rpl_extraCol_innodb.test delete mode 100644 mysql-test/suite/rpl/t/rpl_extraCol_myisam.test delete mode 100644 mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test delete mode 100644 mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test create mode 100644 mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test create mode 100644 mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test delete mode 100755 mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh delete mode 100755 mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh delete mode 100644 mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt delete mode 100755 mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh delete mode 100644 mysql-test/suite/rpl/t/rpl_server_id.test delete mode 100644 mysql-test/suite/rpl/t/rpl_sf.test create mode 100644 mysql-test/suite/rpl/t/rpl_test_framework.cnf create mode 100644 mysql-test/suite/rpl/t/rpl_test_framework.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result deleted file mode 100644 index 8226469fcf7..00000000000 --- a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result +++ /dev/null @@ -1,42 +0,0 @@ -SET @old_relay_log_purge= @@global.relay_log_purge; -change master to -MASTER_HOST='dummy.localdomain', -RELAY_LOG_FILE='slave-relay-bin.000001', -RELAY_LOG_POS=4; -start slave sql_thread; -select MASTER_POS_WAIT('master-bin.000001', 3776); -# Result on slave -SELECT * FROM t1; -id -5 -6 -7 -8 -9 -10 -11 -SELECT * FROM t2; -id -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -DROP TABLE IF EXISTS t1, t2; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP FUNCTION IF EXISTS f1; -DROP TRIGGER IF EXISTS tr1; -stop slave sql_thread; -reset slave; -SET @@global.relay_log_purge= @old_relay_log_purge; diff --git a/mysql-test/suite/binlog/r/binlog_drop_if_exists.result b/mysql-test/suite/binlog/r/binlog_drop_if_exists.result new file mode 100644 index 00000000000..e2d4c727c98 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_drop_if_exists.result @@ -0,0 +1,98 @@ +RESET MASTER; +DROP PROCEDURE IF EXISTS db_bug_13684.p; +DROP FUNCTION IF EXISTS db_bug_13684.f; +DROP TRIGGER IF EXISTS db_bug_13684.tr; +DROP VIEW IF EXISTS db_bug_13684.v; +DROP EVENT IF EXISTS db_bug_13684.e; +DROP TABLE IF EXISTS db_bug_13684.t; +DROP DATABASE IF EXISTS db_bug_13684; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p +master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f +master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr +master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v +master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t +master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 +CREATE DATABASE db_bug_13684; +CREATE TABLE db_bug_13684.t (a int); +CREATE EVENT db_bug_13684.e +ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR +DO +UPDATE db_bug_13684.t SET a = a + 1; +CREATE VIEW db_bug_13684.v +AS SELECT * FROM db_bug_13684.t; +CREATE TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t +FOR EACH ROW BEGIN +END; +CREATE PROCEDURE db_bug_13684.p (OUT p1 INT) +BEGIN +END; +CREATE FUNCTION db_bug_13684.f (s CHAR(20)) +RETURNS CHAR(50) DETERMINISTIC +RETURN s; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p +master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f +master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr +master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v +master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t +master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 +master-bin.000001 # Query # # CREATE DATABASE db_bug_13684 +master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int) +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e +ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR +DO +UPDATE db_bug_13684.t SET a = a + 1 +master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `db_bug_13684`.`v` AS SELECT * FROM db_bug_13684.t +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t +FOR EACH ROW BEGIN +END +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `db_bug_13684`.`p`(OUT p1 INT) +BEGIN +END +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `db_bug_13684`.`f`(s CHAR(20)) RETURNS char(50) CHARSET latin1 + DETERMINISTIC +RETURN s +DROP PROCEDURE IF EXISTS db_bug_13684.p; +DROP FUNCTION IF EXISTS db_bug_13684.f; +DROP TRIGGER IF EXISTS db_bug_13684.tr; +DROP VIEW IF EXISTS db_bug_13684.v; +DROP EVENT IF EXISTS db_bug_13684.e; +DROP TABLE IF EXISTS db_bug_13684.t; +DROP DATABASE IF EXISTS db_bug_13684; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p +master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f +master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr +master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v +master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t +master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 +master-bin.000001 # Query # # CREATE DATABASE db_bug_13684 +master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int) +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e +ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR +DO +UPDATE db_bug_13684.t SET a = a + 1 +master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `db_bug_13684`.`v` AS SELECT * FROM db_bug_13684.t +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t +FOR EACH ROW BEGIN +END +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `db_bug_13684`.`p`(OUT p1 INT) +BEGIN +END +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `db_bug_13684`.`f`(s CHAR(20)) RETURNS char(50) CHARSET latin1 + DETERMINISTIC +RETURN s +master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p +master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f +master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr +master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v +master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t +master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 diff --git a/mysql-test/suite/binlog/r/binlog_old_versions.result b/mysql-test/suite/binlog/r/binlog_old_versions.result index 77289252b4c..a4850b835c8 100644 --- a/mysql-test/suite/binlog/r/binlog_old_versions.result +++ b/mysql-test/suite/binlog/r/binlog_old_versions.result @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1, t2, t3; ==== Read modern binlog (version 5.1.23) ==== SELECT * FROM t1 ORDER BY a; a b diff --git a/mysql-test/suite/binlog/r/binlog_query_filter_rules.result b/mysql-test/suite/binlog/r/binlog_query_filter_rules.result new file mode 100644 index 00000000000..520d500ed7c --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_query_filter_rules.result @@ -0,0 +1,11 @@ +drop table if exists t1; +reset master; +create table t1 (a int); +insert into t1 values (1); +flush logs; +drop table t1; +*** must be 1 *** +select * from t1; +a +1 +drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_server_id.result b/mysql-test/suite/binlog/r/binlog_server_id.result new file mode 100644 index 00000000000..1e74394c122 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_server_id.result @@ -0,0 +1,34 @@ +set global server_id=1; +reset master; +drop table if exists t1,t2,t3; +create table t1 (a int); +select @@server_id; +@@server_id +1 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3 +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +set global server_id=2; +create table t2 (b int); +select @@server_id; +@@server_id +2 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3 +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 2 # use `test`; create table t2 (b int) +set global server_id=3; +create table t3 (c int); +select @@server_id; +@@server_id +3 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3 +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 2 # use `test`; create table t2 (b int) +master-bin.000001 # Query 3 # use `test`; create table t3 (c int) +set global server_id=1; +drop table t1,t2,t3; diff --git a/mysql-test/suite/binlog/r/binlog_sf.result b/mysql-test/suite/binlog/r/binlog_sf.result new file mode 100644 index 00000000000..085ba1ebb8a --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_sf.result @@ -0,0 +1,68 @@ +set global log_bin_trust_function_creators=0; +set binlog_format=STATEMENT; +create function fn16456() +returns int +begin +return unix_timestamp(); +end| +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +set global log_bin_trust_function_creators=1; +create function fn16456() +returns int +begin +return unix_timestamp(); +end| +set global log_bin_trust_function_creators=0; +set binlog_format=ROW; +select fn16456(); +fn16456() +timestamp +set binlog_format=STATEMENT; +select fn16456(); +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +drop function fn16456; +set global log_bin_trust_function_creators=0; +create function fn16456() +returns int deterministic +begin +return unix_timestamp(); +end| +set binlog_format=ROW; +select fn16456(); +fn16456() +timestamp +set binlog_format=STATEMENT; +select fn16456(); +fn16456() +timestamp +drop function fn16456; +set global log_bin_trust_function_creators=0; +create function fn16456() +returns int no sql +begin +return unix_timestamp(); +end| +set binlog_format=ROW; +select fn16456(); +fn16456() +timestamp +set binlog_format=STATEMENT; +select fn16456(); +fn16456() +timestamp +drop function fn16456; +set global log_bin_trust_function_creators=0; +create function fn16456() +returns int reads sql data +begin +return unix_timestamp(); +end| +set binlog_format=ROW; +select fn16456(); +fn16456() +timestamp +set binlog_format=STATEMENT; +select fn16456(); +fn16456() +timestamp +drop function fn16456; diff --git a/mysql-test/suite/binlog/r/binlog_sql_mode.result b/mysql-test/suite/binlog/r/binlog_sql_mode.result index e306040502d..4477c94a95e 100644 --- a/mysql-test/suite/binlog/r/binlog_sql_mode.result +++ b/mysql-test/suite/binlog/r/binlog_sql_mode.result @@ -1,9 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; SET @old_sql_mode= @@global.sql_mode; SET @old_binlog_format=@@session.binlog_format; SET SESSION sql_mode=8; @@ -27,7 +21,7 @@ DO BEGIN UPDATE t1 SET id = id +1; END;| -Chceck Result +Check Result select (@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) is not null; diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt deleted file mode 100644 index 74e71a8e558..00000000000 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-same-server-id --relay-log=slave-relay-bin --skip-slave-start diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test deleted file mode 100644 index 5297767675c..00000000000 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test +++ /dev/null @@ -1,61 +0,0 @@ -# BUG#33029 5.0 to 5.1 replication fails on dup key when inserting -# using a trig in SP - -# For all 5.0 up to 5.0.58 exclusive, and 5.1 up to 5.1.12 exclusive, -# if one statement in a SP generated AUTO_INCREMENT value by the top -# statement, all statements after it would be considered generated -# AUTO_INCREMENT value by the top statement, and a erroneous INSERT_ID -# value might be associated with these statement, which could cause -# duplicate entry error and stop the slave. - -# Test if the slave can replicate from such a buggy master - -# The bug33029-slave-relay-bin.000001 file is the -# slave-replay-bin.000003 file generated by run the -# rpl_auto_increment_bug33029.test with clean up statements at the end -# of the test case removed on a buggy 5.0 server - -source include/have_log_bin.inc; - -# Need to restore this at the end; CHANGE MASTER modifies it (see the -# manual for CHANGE MASTER). -SET @old_relay_log_purge= @@global.relay_log_purge; - -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 - -change master to - MASTER_HOST='dummy.localdomain', - RELAY_LOG_FILE='slave-relay-bin.000001', - RELAY_LOG_POS=4; - -start slave sql_thread; -disable_result_log; -select MASTER_POS_WAIT('master-bin.000001', 3776); -enable_result_log; - -echo # Result on slave; -SELECT * FROM t1; -SELECT * FROM t2; - -# clean up -disable_warnings; -DROP TABLE IF EXISTS t1, t2; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP FUNCTION IF EXISTS f1; -DROP TRIGGER IF EXISTS tr1; -enable_warnings; - -stop slave sql_thread; -reset slave; -source include/wait_for_slave_sql_to_stop.inc; -remove_file $MYSQLD_DATADIR/slave-relay-bin.000001; -remove_file $MYSQLD_DATADIR/slave-relay-bin.index; - -SET @@global.relay_log_purge= @old_relay_log_purge; diff --git a/mysql-test/suite/binlog/t/binlog_drop_if_exists.test b/mysql-test/suite/binlog/t/binlog_drop_if_exists.test new file mode 100644 index 00000000000..6b2b37ae791 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_drop_if_exists.test @@ -0,0 +1,115 @@ +# BUG#13684: +# SP: DROP PROCEDURE|FUNCTION IF EXISTS not binlogged if routine +# does not exist +# +# There is an inconsistency with DROP DATABASE IF EXISTS, DROP +# TABLE IF EXISTS and DROP VIEW IF EXISTS: those are binlogged even +# if the DB or TABLE does not exist, whereas DROP PROCEDURE IF +# EXISTS does not. It would be nice or at least consistent if DROP +# PROCEDURE/STATEMENT worked the same too. +# +# Description: +# DROP PROCEDURE|FUNCTION IF EXISTS does not get binlogged whereas DROP +# DATABASE|TABLE|TRIGGER|... IF EXISTS do. +# +# Fixed DROP PROCEDURE|FUNCTION IF EXISTS by adding a call to +# write_bin_log in mysql_execute_command. Checked also if all +# documented "DROP (...) IF EXISTS" get binlogged. Left out DROP +# SERVER IF EXISTS because it seems that it only gets binlogged when +# using row event (see BUG#25705). +# +# TODO: add DROP SERVER IF EXISTS to the test case when its +# binlogging procedure gets fixed (BUG#25705). Furthermore, when +# logging in RBR format the events that get logged are effectively in +# RBR format and not in STATEMENT format meaning that one must needs +# to be extra careful when writing a test for it, or change the CREATE +# SERVER logging to always log as STATEMENT. You can quickly check this +# by enabling the flag below $fixed_bug_25705=1 and watch the diff on +# the STDOUT. More detail may be found on the generated reject file. +# +# Test is implemented as follows: +# +# i) test each "drop if exists" (DDL), found in MySQL 5.1 manual, +# on inexistent objects (except for DROP SERVER); +# ii) show binlog events; +# iii) create an object for each drop if exists statement; +# iv) issue "drop if exists" in existent objects. +# v) show binlog events; +# +# References: +# http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-data-definition.html +# +--source include/have_log_bin.inc +RESET MASTER; + +disable_warnings; + +# test all "drop if exists" in manual with inexistent objects +DROP PROCEDURE IF EXISTS db_bug_13684.p; +DROP FUNCTION IF EXISTS db_bug_13684.f; +DROP TRIGGER IF EXISTS db_bug_13684.tr; +DROP VIEW IF EXISTS db_bug_13684.v; +DROP EVENT IF EXISTS db_bug_13684.e; +DROP TABLE IF EXISTS db_bug_13684.t; +DROP DATABASE IF EXISTS db_bug_13684; + +let $fixed_bug_25705 = 0; + +if($fixed_bug_25705) +{ + DROP SERVER IF EXISTS s_bug_13684; +} +--source include/show_binlog_events.inc + +# test drop with existing values + +# create +CREATE DATABASE db_bug_13684; + +CREATE TABLE db_bug_13684.t (a int); + +CREATE EVENT db_bug_13684.e + ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR + DO + UPDATE db_bug_13684.t SET a = a + 1; + +CREATE VIEW db_bug_13684.v + AS SELECT * FROM db_bug_13684.t; + +CREATE TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t + FOR EACH ROW BEGIN + END; + +CREATE PROCEDURE db_bug_13684.p (OUT p1 INT) + BEGIN + END; + +CREATE FUNCTION db_bug_13684.f (s CHAR(20)) + RETURNS CHAR(50) DETERMINISTIC + RETURN s; + +if($fixed_bug_25705) +{ + CREATE SERVER s_bug_13684 + FOREIGN DATA WRAPPER mysql + OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test'); +} + +--source include/show_binlog_events.inc + +# drop existing +DROP PROCEDURE IF EXISTS db_bug_13684.p; +DROP FUNCTION IF EXISTS db_bug_13684.f; +DROP TRIGGER IF EXISTS db_bug_13684.tr; +DROP VIEW IF EXISTS db_bug_13684.v; +DROP EVENT IF EXISTS db_bug_13684.e; +DROP TABLE IF EXISTS db_bug_13684.t; +DROP DATABASE IF EXISTS db_bug_13684; +if($fixed_bug_25705) +{ + DROP SERVER IF EXISTS s_bug_13684; +} + +--source include/show_binlog_events.inc + +enable_warnings; diff --git a/mysql-test/suite/binlog/t/binlog_old_versions.test b/mysql-test/suite/binlog/t/binlog_old_versions.test index 0ccea406a82..b294adbc69d 100644 --- a/mysql-test/suite/binlog/t/binlog_old_versions.test +++ b/mysql-test/suite/binlog/t/binlog_old_versions.test @@ -24,9 +24,6 @@ source include/not_embedded.inc; ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; - --echo ==== Read modern binlog (version 5.1.23) ==== @@ -161,3 +158,4 @@ DROP TABLE t1, t2, t3; #SELECT * FROM t1 ORDER BY a; #SELECT * FROM t2 ORDER BY a; #SELECT COUNT(*) FROM t3; +#--source include/rpl_end.inc diff --git a/mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt b/mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt new file mode 100644 index 00000000000..33632bf98e8 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_query_filter_rules-master.opt @@ -0,0 +1 @@ +--replicate-do-db='impossible_database' diff --git a/mysql-test/suite/binlog/t/binlog_query_filter_rules.test b/mysql-test/suite/binlog/t/binlog_query_filter_rules.test new file mode 100644 index 00000000000..d56a32ce2bd --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_query_filter_rules.test @@ -0,0 +1,32 @@ +# regression test for +# Bug#36099 replicate-do-db affects replaying RBR events with mysqlbinlog +# The test verifies that the slave side filtering rule does not affect +# applying of row-events on master via mysqlbinlog + +-- source include/have_log_bin.inc +-- source include/not_embedded.inc +-- source include/have_binlog_format_row.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +reset master; + +create table t1 (a int); +insert into t1 values (1); + +let $MYSQLD_DATADIR= `select @@datadir`; +flush logs; +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug36099.sql + +drop table t1; +--exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/bug36099.sql" + +--echo *** must be 1 *** +select * from t1; + +# cleanup + +drop table t1; +remove_file $MYSQLTEST_VARDIR/tmp/bug36099.sql; diff --git a/mysql-test/suite/binlog/t/binlog_server_id.test b/mysql-test/suite/binlog/t/binlog_server_id.test new file mode 100644 index 00000000000..6e98ec6ee6d --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_server_id.test @@ -0,0 +1,29 @@ +# Test for BUG#28908 Replication: set global server_id is not setting the session server_id + +-- source include/have_log_bin.inc + +let $saved_server_id=`select @@server_id`; +set global server_id=1; +reset master; + +-- disable_warnings +drop table if exists t1,t2,t3; +-- enable_warnings + +create table t1 (a int); +select @@server_id; +source include/show_binlog_events2.inc; + +set global server_id=2; +create table t2 (b int); +select @@server_id; +source include/show_binlog_events2.inc; + +set global server_id=3; +create table t3 (c int); +select @@server_id; +source include/show_binlog_events2.inc; + +# cleanup +eval set global server_id=$saved_server_id; +drop table t1,t2,t3; diff --git a/mysql-test/suite/binlog/t/binlog_sf.test b/mysql-test/suite/binlog/t/binlog_sf.test new file mode 100644 index 00000000000..05b31afcb58 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_sf.test @@ -0,0 +1,191 @@ +-- source include/have_log_bin.inc + +# We change binlog format inside the test, so no need to re-run with +# more than one binlog_format. +-- source include/have_binlog_format_statement.inc + +# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR +# BUG#41166 stored function requires "deterministic" if binlog_format is "statement" + +# save status + +let $oblf=`select @@SESSION.BINLOG_FORMAT`; +let $otfc=`select @@log_bin_trust_function_creators`; + +set global log_bin_trust_function_creators=0; + + + +# fail *on definition* + +set binlog_format=STATEMENT; + +delimiter |; +--error ER_BINLOG_UNSAFE_ROUTINE +create function fn16456() + returns int +begin + return unix_timestamp(); +end| +delimiter ;| + + + +# force in definition, so we can see whether we fail on call + +set global log_bin_trust_function_creators=1; + +delimiter |; +create function fn16456() + returns int +begin + return unix_timestamp(); +end| +delimiter ;| + +set global log_bin_trust_function_creators=0; + + + +# allow funcall in RBR + +set binlog_format=ROW; + +--replace_column 1 timestamp +select fn16456(); + + + +# fail funcall in SBR + +set binlog_format=STATEMENT; + +--error ER_BINLOG_UNSAFE_ROUTINE +select fn16456(); + + + +# clean + +drop function fn16456; + + + +# success in definition with deterministic + +set global log_bin_trust_function_creators=0; + +delimiter |; +create function fn16456() + returns int deterministic +begin + return unix_timestamp(); +end| +delimiter ;| + + + +# allow funcall in RBR + +set binlog_format=ROW; + +--replace_column 1 timestamp +select fn16456(); + + + +# allow funcall in SBR + +set binlog_format=STATEMENT; + +--replace_column 1 timestamp +select fn16456(); + + + +# clean + +drop function fn16456; + + +# success in definition with NO SQL + +set global log_bin_trust_function_creators=0; + +delimiter |; +create function fn16456() + returns int no sql +begin + return unix_timestamp(); +end| +delimiter ;| + + + +# allow funcall in RBR + +set binlog_format=ROW; + +--replace_column 1 timestamp +select fn16456(); + + + +# allow funcall in SBR + +set binlog_format=STATEMENT; + +--replace_column 1 timestamp +select fn16456(); + + +# clean + +drop function fn16456; + + + +# success in definition with reads sql data + +set global log_bin_trust_function_creators=0; + +delimiter |; +create function fn16456() + returns int reads sql data +begin + return unix_timestamp(); +end| +delimiter ;| + + + +# allow funcall in RBR + +set binlog_format=ROW; + +--replace_column 1 timestamp +select fn16456(); + + + +# allow funcall in SBR + +set binlog_format=STATEMENT; + +--replace_column 1 timestamp +select fn16456(); + + + +# clean + +drop function fn16456; + + + +# restore status + +--disable_query_log +eval set binlog_format=$oblf; +eval set global log_bin_trust_function_creators=$otfc; +--enable_query_log diff --git a/mysql-test/suite/binlog/t/binlog_sql_mode.test b/mysql-test/suite/binlog/t/binlog_sql_mode.test index 1777f8cb561..ab4f6450543 100644 --- a/mysql-test/suite/binlog/t/binlog_sql_mode.test +++ b/mysql-test/suite/binlog/t/binlog_sql_mode.test @@ -8,7 +8,6 @@ # Scan binlog file to check if the sql_mode is still set to 0 before generating binlog event # --- source include/master-slave.inc -- source include/have_log_bin.inc # BUG#39526 sql_mode not retained in binary log for CREATE PROCEDURE @@ -50,10 +49,10 @@ CREATE EVENT testEvent ON SCHEDULE END;| DELIMITER ;| ---echo Chceck Result +--echo Check Result let $MYSQLD_DATADIR= `select @@datadir`; ---exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog +--exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog")) diff --git a/mysql-test/suite/bugs/t/rpl_bug12691.test b/mysql-test/suite/bugs/t/rpl_bug12691.test index 28d7f16935e..038f3e57b75 100644 --- a/mysql-test/suite/bugs/t/rpl_bug12691.test +++ b/mysql-test/suite/bugs/t/rpl_bug12691.test @@ -1,6 +1,4 @@ # Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER -# Date: 01/31/2008 -# Added: Serge Kozlov --source include/master-slave.inc --connection master @@ -47,5 +45,5 @@ SELECT COUNT(*) FROM t1; --echo --echo **** On Master **** DROP TABLE t1; ---sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug23533.test b/mysql-test/suite/bugs/t/rpl_bug23533.test index 397f1102f0e..337dddcef3d 100644 --- a/mysql-test/suite/bugs/t/rpl_bug23533.test +++ b/mysql-test/suite/bugs/t/rpl_bug23533.test @@ -1,7 +1,4 @@ ############################################################# -# Author: Serge Kozlov -# Date: 02/26/2008 -# Purpose: testing bug report # Bug#23533: CREATE SELECT max_binlog_cache_size test # case needed ############################################################# @@ -10,11 +7,6 @@ --source include/have_binlog_format_row.inc --source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2; ---enable_warnings - SET AUTOCOMMIT=0; SET GLOBAL max_binlog_cache_size=4096; SHOW VARIABLES LIKE 'max_binlog_cache_size'; @@ -41,3 +33,4 @@ SHOW TABLES LIKE 't%'; # 5.1 End of Test +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug31582.test b/mysql-test/suite/bugs/t/rpl_bug31582.test index 7ba15eec8ce..6bff8ef4172 100644 --- a/mysql-test/suite/bugs/t/rpl_bug31582.test +++ b/mysql-test/suite/bugs/t/rpl_bug31582.test @@ -21,5 +21,5 @@ SELECT * FROM t1 ORDER BY a; connection master; DROP TABLE t1; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug31583.test b/mysql-test/suite/bugs/t/rpl_bug31583.test index 657e4984b77..ee5b7698016 100644 --- a/mysql-test/suite/bugs/t/rpl_bug31583.test +++ b/mysql-test/suite/bugs/t/rpl_bug31583.test @@ -21,5 +21,5 @@ SELECT * FROM t1 ORDER BY a; connection master; DROP TABLE t1; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug33029.test b/mysql-test/suite/bugs/t/rpl_bug33029.test index 494cef42ce0..f5aad4de8df 100644 --- a/mysql-test/suite/bugs/t/rpl_bug33029.test +++ b/mysql-test/suite/bugs/t/rpl_bug33029.test @@ -23,3 +23,4 @@ insert into `t1` values (); sync_slave_with_master; select * from t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug36391.test b/mysql-test/suite/bugs/t/rpl_bug36391.test index 8bca9a46c5a..3961082273d 100644 --- a/mysql-test/suite/bugs/t/rpl_bug36391.test +++ b/mysql-test/suite/bugs/t/rpl_bug36391.test @@ -15,8 +15,6 @@ --source include/master-slave.inc -drop table if exists t1; - create table t1(id int); show tables; @@ -28,3 +26,4 @@ flush logs; --exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test drop table t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug37426.test b/mysql-test/suite/bugs/t/rpl_bug37426.test index d2bad0fa0c1..4c7729ab837 100644 --- a/mysql-test/suite/bugs/t/rpl_bug37426.test +++ b/mysql-test/suite/bugs/t/rpl_bug37426.test @@ -1,6 +1,4 @@ ############################################################# -# Author: Mats Kindahl -# Date: 2008-06-18 # Purpose: Test for BUG#37426 # RBR breaks for CHAR() UTF8 fields > 85 chars ############################################################# @@ -20,3 +18,4 @@ SELECT * FROM char128_utf8; sync_slave_with_master; SELECT * FROM char128_utf8; +--source include/rpl_end.inc diff --git a/mysql-test/suite/bugs/t/rpl_bug38205.test b/mysql-test/suite/bugs/t/rpl_bug38205.test index 52b36636e79..550746719f4 100644 --- a/mysql-test/suite/bugs/t/rpl_bug38205.test +++ b/mysql-test/suite/bugs/t/rpl_bug38205.test @@ -163,4 +163,4 @@ start slave sql_thread; connection master; drop table t1i, t2m; -sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/manual/t/rpl_replication_delay.test b/mysql-test/suite/manual/t/rpl_replication_delay.test index fc1db9bfe18..f2b2da6f53c 100644 --- a/mysql-test/suite/manual/t/rpl_replication_delay.test +++ b/mysql-test/suite/manual/t/rpl_replication_delay.test @@ -7,9 +7,8 @@ source include/master-slave.inc; -connection master; -#connection slave; -sync_slave_with_master; +connection slave; + --echo # Second_behind reports 0 let $status_items= Seconds_Behind_Master; source include/show_slave_status.inc; @@ -61,9 +60,4 @@ unlock tables; connection master; drop table t1; -#connection slave; -sync_slave_with_master; - - -# End of tests - +--source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test b/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test index e08b1b6f701..5d6c915307a 100644 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test +++ b/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test @@ -1,6 +1,4 @@ ############################################### -# Author: JBM # -# Date: 2006-03-07 # # Purpose: To test advance DD and replication # ############################################### @@ -11,11 +9,6 @@ --source include/not_embedded.inc --source include/ndb_master-slave.inc -#### Test start cleanup section ##### ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - ###################################################### # Requirment: Cluster DD and replication must be able# # to handle ALTER tables and indexes and must rpl # @@ -408,3 +401,4 @@ remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql; remove_file $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test b/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test index d78eda7eef1..f5625f841b0 100644 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test +++ b/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test @@ -12,3 +12,5 @@ set binlog_format=row; set binlog_format=mixed; -- source extra/rpl_tests/rpl_extraMaster_Col.test + +--source include/rpl_end.inc diff --git a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test index b730bcc08e0..87bd1aecd30 100644 --- a/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test +++ b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test @@ -1,6 +1,4 @@ ############################################# -#Authors: TU and Jeb -#Date: 2007/04 #Purpose: Generic replication to cluster # and ensuring that the ndb_apply_status # table is updated. @@ -34,3 +32,4 @@ let $off_set = 9; let $rpl_format = 'MIX'; --source extra/rpl_tests/rpl_ndb_apply_status.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result index 9c5ac34b1b0..00247f218e4 100644 --- a/mysql-test/suite/parts/r/rpl_partition.result +++ b/mysql-test/suite/parts/r/rpl_partition.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set @old_global_binlog_format= @@global.binlog_format; set @old_session_binlog_format= @@session.binlog_format; SET GLOBAL binlog_format = 'ROW'; @@ -11,10 +7,6 @@ SET SESSION binlog_format = 'ROW'; select @@global.binlog_format, @@session.binlog_format; @@global.binlog_format ROW @@session.binlog_format ROW -DROP TABLE IF EXISTS t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, fkid MEDIUMINT, filler VARCHAR(255), @@ -138,7 +130,7 @@ SUBPARTITIONS 2 PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT count(*) "Slave norm" FROM t1; Slave norm 500 SELECT count(*) "Slave bykey" FROM t2; @@ -148,6 +140,7 @@ Slave byrange 500 set @@global.binlog_format= @old_global_binlog_format; set @@session.binlog_format= @old_session_binlog_format; DROP TABLE t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; +include/rpl_end.inc diff --git a/mysql-test/suite/parts/t/rpl_partition.test b/mysql-test/suite/parts/t/rpl_partition.test index 15cd85463b1..32a3d8ee346 100644 --- a/mysql-test/suite/parts/t/rpl_partition.test +++ b/mysql-test/suite/parts/t/rpl_partition.test @@ -12,13 +12,6 @@ SET GLOBAL binlog_format = 'ROW'; SET SESSION binlog_format = 'ROW'; select @@global.binlog_format, @@session.binlog_format; ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; ---enable_warnings - eval CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, fkid MEDIUMINT, filler VARCHAR(255), @@ -140,7 +133,6 @@ SELECT count(*) as "Master bykey" FROM t2; CALL p3(); SELECT count(*) as "Master byrange" FROM t3; -#--source include/master-slave-end.inc --sync_slave_with_master connection slave; show create table t3; @@ -153,11 +145,9 @@ connection master; set @@global.binlog_format= @old_global_binlog_format; set @@session.binlog_format= @old_session_binlog_format; DROP TABLE t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; -save_master_pos; -connection slave; -sync_with_master; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP PROCEDURE p3; # End of 5.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc b/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc index 79825016448..89db1c3545d 100644 --- a/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc +++ b/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -82,3 +80,4 @@ sync_slave_with_master; # the files your self to see what is not matching --diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc index d953397c0cb..dc245b8d38c 100644 --- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc +++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -342,3 +340,4 @@ sync_slave_with_master; # the files your self to see what is not matching --diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl000010.result b/mysql-test/suite/rpl/r/rpl000010.result deleted file mode 100644 index 65191ea411f..00000000000 --- a/mysql-test/suite/rpl/r/rpl000010.result +++ /dev/null @@ -1,14 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (n int not null auto_increment primary key); -insert into t1 values(NULL); -insert into t1 values(2); -select n from t1; -n -1 -2 -drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl000011.result b/mysql-test/suite/rpl/r/rpl000011.result deleted file mode 100644 index dd0fa2fbe74..00000000000 --- a/mysql-test/suite/rpl/r/rpl000011.result +++ /dev/null @@ -1,16 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1 (n int); -insert into t1 values(1); -stop slave; -start slave; -insert into t1 values(2); -select * from t1; -n -1 -2 -drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl000013.result b/mysql-test/suite/rpl/r/rpl000013.result deleted file mode 100644 index 37838bb88e0..00000000000 --- a/mysql-test/suite/rpl/r/rpl000013.result +++ /dev/null @@ -1,28 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t2(n int); -create temporary table t1 (n int); -insert into t1 values(1),(2),(3); -insert into t2 select * from t1; -create temporary table t1 (n int); -insert into t1 values (4),(5); -insert into t2 select * from t1 as t10; -insert into t2 values(6); -select * from t2; -n -1 -2 -3 -4 -5 -6 -show status like 'Slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 0 -drop table if exists t1,t2; -Warnings: -Note 1051 Unknown table 't1' diff --git a/mysql-test/suite/rpl/r/rpl000017.result b/mysql-test/suite/rpl/r/rpl000017.result deleted file mode 100644 index 1c611357e64..00000000000 --- a/mysql-test/suite/rpl/r/rpl000017.result +++ /dev/null @@ -1,18 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; -grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; -start slave; -drop table if exists t1; -create table t1(n int); -insert into t1 values(24); -select * from t1; -n -24 -drop table t1; -delete from mysql.user where user="replicate"; diff --git a/mysql-test/suite/rpl/r/rpl_000010.result b/mysql-test/suite/rpl/r/rpl_000010.result new file mode 100644 index 00000000000..4bb87a765cd --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_000010.result @@ -0,0 +1,11 @@ +include/master-slave.inc +[connection master] +create table t1 (n int not null auto_increment primary key); +insert into t1 values(NULL); +insert into t1 values(2); +select n from t1; +n +1 +2 +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_000011.result b/mysql-test/suite/rpl/r/rpl_000011.result new file mode 100644 index 00000000000..9160d1952c2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_000011.result @@ -0,0 +1,13 @@ +include/master-slave.inc +[connection master] +create table t1 (n int); +insert into t1 values(1); +stop slave; +start slave; +insert into t1 values(2); +select * from t1; +n +1 +2 +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_000013.result b/mysql-test/suite/rpl/r/rpl_000013.result new file mode 100644 index 00000000000..e94a469e970 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_000013.result @@ -0,0 +1,25 @@ +include/master-slave.inc +[connection master] +create table t2(n int); +create temporary table t1 (n int); +insert into t1 values(1),(2),(3); +insert into t2 select * from t1; +create temporary table t1 (n int); +insert into t1 values (4),(5); +insert into t2 select * from t1 as t10; +insert into t2 values(6); +select * from t2; +n +1 +2 +3 +4 +5 +6 +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 +drop table if exists t1,t2; +Warnings: +Note 1051 Unknown table 't1' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_000017.result b/mysql-test/suite/rpl/r/rpl_000017.result new file mode 100644 index 00000000000..1b4f9f1e8a3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_000017.result @@ -0,0 +1,13 @@ +include/master-slave.inc +[connection master] +grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; +grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; +include/start_slave.inc +create table t1(n int); +insert into t1 values(24); +select * from t1; +n +24 +drop table t1; +delete from mysql.user where user="replicate"; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result index 16fa931e303..3795deedee3 100644 --- a/mysql-test/suite/rpl/r/rpl_EE_err.result +++ b/mysql-test/suite/rpl/r/rpl_EE_err.result @@ -1,11 +1,8 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (a int) engine=myisam; flush tables; drop table if exists t1; Warnings: Error 2 Can't find file: 't1' (errno: 2) +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result index b092dd9e088..3280d4bbaf7 100644 --- a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result +++ b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a)); LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1; @@ -115,3 +111,4 @@ abasement abased abase DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_alter.result b/mysql-test/suite/rpl/r/rpl_alter.result index cedb6854239..d60f1b68082 100644 --- a/mysql-test/suite/rpl/r/rpl_alter.result +++ b/mysql-test/suite/rpl/r/rpl_alter.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop database if exists mysqltest; +include/master-slave.inc +[connection master] create database mysqltest; create table mysqltest.t1 ( n int); alter table mysqltest.t1 add m int; @@ -35,7 +30,8 @@ ALTER TABLE t1 CHANGE b c INT; ALTER TABLE t2 CHANGE b c VARCHAR(255); INSERT INTO t1 (a) VALUES(2); -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_alter_db.result b/mysql-test/suite/rpl/r/rpl_alter_db.result index 60c07d0dede..55adbfeda79 100644 --- a/mysql-test/suite/rpl/r/rpl_alter_db.result +++ b/mysql-test/suite/rpl/r/rpl_alter_db.result @@ -1,12 +1,9 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ==== Verify that alter database does not stop replication ==== create database temp_db; use temp_db; alter database collate latin1_bin; ==== Clean up ==== drop database temp_db; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index fdd94264041..2ab515c8d93 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3; insert into t1 values (NULL,1),(NULL,2),(NULL,3); select * from t1; @@ -244,12 +240,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 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; +include/rpl_reset.inc DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb; @@ -303,12 +294,13 @@ id INSERT INTO t1 VALUES(4); INSERT INTO t2 VALUES(4); FLUSH LOGS; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1; DROP TABLE t2; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1; DROP TABLE t2; SET SQL_MODE=''; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result index 25eda6ee454..62ff28e7159 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists test1; create database test1; use test1; @@ -44,4 +40,4 @@ id fname 1 testtest 1 2 test drop database test1; -drop database test1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result b/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result new file mode 100644 index 00000000000..71c6ff57f80 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_bug33029.result @@ -0,0 +1,45 @@ +include/master-slave.inc +[connection master] +==== Initialize ==== +SET @old_relay_log_purge= @@global.relay_log_purge; +include/setup_fake_relay_log.inc +Setting up fake replication from MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 +==== Test ==== +start slave sql_thread; +include/wait_for_slave_param.inc [Exec_Master_Log_Pos] +# Result on slave +SELECT * FROM t1; +id +5 +6 +7 +8 +9 +10 +11 +SELECT * FROM t2; +id +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +==== Clean up ==== +stop slave sql_thread; +include/cleanup_fake_relay_log.inc +DROP TABLE t1, t2; +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION f1; +SET @@global.relay_log_purge= @old_relay_log_purge; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result index b2cc92491c3..af84978dc80 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] # Test case1: INVOKES A TRIGGER with after insert action create table t1(a int, b int) engine=innodb; create table t2(i1 int not null auto_increment, a int, primary key(i1)) engine=innodb; @@ -110,9 +106,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -226,9 +222,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -342,9 +338,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after update action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -458,9 +454,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before update action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -574,9 +570,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after delete action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -690,9 +686,9 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before delete action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t4 and slave:test.t4 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t4, slave:t4] +include/diff_tables.inc [master:t6, slave:t6] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -761,8 +757,8 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'CALLS A FUNCTION which INVOKES A TRIGGER with after insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t3, slave:t3] drop table t1; drop table t2; drop table t3; @@ -828,8 +824,8 @@ master-bin.000001 # Xid # # COMMIT /* XID */ commit; #Test if the results are consistent on master and slave #for 'CALLS A FUNCTION which INVOKES A TRIGGER with before insert action' -Comparing tables master:test.t2 and slave:test.t2 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t2, slave:t2] +include/diff_tables.inc [master:t3, slave:t3] drop table t1; drop table t2; drop table t3; @@ -853,7 +849,7 @@ INSERT INTO v16(c1) VALUES (25), (26); commit; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -877,7 +873,7 @@ INSERT INTO v16(c1) VALUES (25), (26); commit; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; @@ -980,8 +976,8 @@ master-bin.000001 # Query # # use `test`; insert into t2(a,b) values(3,3) master-bin.000001 # Xid # # COMMIT /* XID */ #Test if the results are consistent on master and slave #for 'UPDATE MORE THAN ONE TABLES ON TOP-STATEMENT' -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; # Test case14: INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES @@ -1034,8 +1030,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO v15(c2) VALUES (25), (26) master-bin.000001 # Xid # # COMMIT /* XID */ #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES' -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; drop view v15; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result index f826136e81e..1fdbb5a7786 100644 --- a/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result +++ b/mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP DATABASE IF EXISTS db1; DROP DATABASE IF EXISTS db2; CREATE DATABASE db1; @@ -49,6 +45,7 @@ before call db1.p1() after call db1.p1() [on slave] start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS; +include/wait_for_slave_sql_to_stop.inc # # If we got non-zero here, then we're suffering BUG#43263 # @@ -87,6 +84,7 @@ executed db1.p2() after call db1.p2() [on slave] start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS; +include/wait_for_slave_sql_to_stop.inc # # If we got non-zero here, then we're suffering BUG#43263 # @@ -105,6 +103,7 @@ s before call db1.p1() executed db1.p2() START SLAVE; +include/wait_for_slave_sql_to_start.inc # # SAVEPOINT and ROLLBACK TO have the same problem in BUG#43263 # This was reported by BUG#50407 @@ -167,3 +166,4 @@ a # DROP DATABASE db1; DROP DATABASE db2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result index f94d2833603..4f1eca42e1a 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result @@ -1,8 +1,15 @@ +include/master-slave.inc +[connection master] call mtr.add_suppression('Found invalid event in binary log'); ==== Initialize ==== +include/stop_slave.inc +RESET SLAVE; +include/setup_fake_relay_log.inc Setting up fake replication from MYSQL_TEST_DIR/std_data/bug40482-bin.000001 ==== Test ==== START SLAVE SQL_THREAD; +include/wait_for_slave_sql_error.inc [errno=1594] Last_SQL_Error = Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. ==== Clean up ==== -Cleaning up after setup_fake_relay_log.inc +include/cleanup_fake_relay_log.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result index 6c8c750bc79..be1b3b150bc 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ####################################################################### ####################### PART 1: MASTER TESTS ########################## ####################################################################### @@ -192,6 +188,7 @@ DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; ###################### TEST #11 +include/rpl_restart_server.inc [server_number=1] SET GLOBAL debug="+d,fault_injection_openning_index"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin.index' (errno: 1) @@ -204,6 +201,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +include/rpl_restart_server.inc [server_number=1] ###################### TEST #12 SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; FLUSH LOGS; @@ -217,6 +215,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +include/rpl_restart_server.inc [server_number=1] SET GLOBAL debug= @old_debug; DROP TABLE t1, t2, t4; RESET MASTER; @@ -224,12 +223,7 @@ include/start_slave.inc ####################################################################### ####################### PART 2: SLAVE TESTS ########################### ####################################################################### -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*"); call mtr.add_suppression("Error writing file .*"); call mtr.add_suppression("Could not open .*"); @@ -240,35 +234,45 @@ SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,error_unique_log_filename"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,error_unique_log_filename"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #14 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_new_file_rotate_event"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_new_file_rotate_event"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #15 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_registering_index"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_registering_index"; SET GLOBAL debug=@old_debug; +include/rpl_restart_server.inc [server_number=2] ###################### TEST #16 SET @old_debug=@@global.debug; include/stop_slave.inc SET GLOBAL debug="+d,fault_injection_openning_index"; START SLAVE io_thread; -Last_IO_Error = Relay log write failure: could not queue event from master +include/wait_for_slave_io_error.inc [errno=1595] +Last_IO_Error = 'Relay log write failure: could not queue event from master' SET GLOBAL debug="-d,fault_injection_openning_index"; SET GLOBAL debug=@old_debug; -include/stop_slave.inc +include/rpl_restart_server.inc [server_number=2] +include/stop_slave_sql.inc +Warnings: +Note 1255 Slave already has been stopped SET GLOBAL debug=@old_debug; RESET SLAVE; RESET MASTER; -include/start_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index 7a2e3183d5b..93138fa5b43 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists d1; create database d1; use d1; @@ -30,3 +26,4 @@ Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' drop user x@y; drop database d1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result index f9e492db6bc..a7e8b86ac79 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET GLOBAL max_binlog_cache_size = 4096; SET GLOBAL binlog_cache_size = 4096; CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; @@ -17,14 +13,11 @@ Got one of the listed errors *** Single statement on non-transactional table *** *** After WL#2687 the difference between STATEMENT/MIXED and ROW will not exist. *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] *** Single statement on both transactional and non-transactional tables. *** *** After WL#2687 we will be able to change the order of the tables. *** Got one of the listed errors ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] TRUNCATE TABLE t1; TRUNCATE TABLE t2; TRUNCATE TABLE t3; @@ -39,7 +32,7 @@ Got one of the listed errors BEGIN; Got one of the listed errors Got one of the listed errors -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 3 - BEGIN - COMMIT ######################################################################################## @@ -51,7 +44,7 @@ Got one of the listed errors Got one of the listed errors Got one of the listed errors COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 4 - BEGIN - ROLLBACK ######################################################################################## @@ -65,7 +58,7 @@ Got one of the listed errors ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 5 - PROCEDURE ######################################################################################## @@ -89,7 +82,7 @@ TRUNCATE TABLE t1; BEGIN; Got one of the listed errors ROLLBACK; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 6 - XID ######################################################################################## @@ -104,7 +97,7 @@ ROLLBACK TO sv; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back COMMIT; -source include/diff_master_slave.inc; +include/diff_tables.inc [master:t1,slave:t1] ######################################################################################## # 7 - NON-TRANS TABLE ######################################################################################## @@ -121,9 +114,7 @@ COMMIT; BEGIN; Got one of the listed errors COMMIT; ---source include/wait_for_slave_sql_error_and_skip.inc -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1590] ######################################################################## # 8 - Bug#55375(Regression Bug) Transaction bigger than # max_binlog_cache_size crashes slave @@ -140,6 +131,7 @@ SET GLOBAL binlog_cache_size= ORIGINAL_VALUE; BEGIN; Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times COMMIT; +include/wait_for_slave_sql_error.inc [errno=1197] SELECT count(*) FROM t1; count(*) 0 @@ -159,6 +151,6 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; DROP TABLE IF EXISTS t4; -DROP TABLE IF EXISTS t5; -DROP TABLE IF EXISTS t6; +DROP TABLE t5; DROP PROCEDURE p1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result b/mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result deleted file mode 100644 index 520d500ed7c..00000000000 --- a/mysql-test/suite/rpl/r/rpl_binlog_query_filter_rules.result +++ /dev/null @@ -1,11 +0,0 @@ -drop table if exists t1; -reset master; -create table t1 (a int); -insert into t1 values (1); -flush logs; -drop table t1; -*** must be 1 *** -select * from t1; -a -1 -drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_bit.result b/mysql-test/suite/rpl/r/rpl_bit.result index 924de8a65f8..fa935cd9e56 100644 --- a/mysql-test/suite/rpl/r/rpl_bit.result +++ b/mysql-test/suite/rpl/r/rpl_bit.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 ( dummyKey INTEGER NOT NULL, @@ -136,3 +132,4 @@ hex(bit3) 24 35 DROP TABLE IF EXISTS test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bit_npk.result b/mysql-test/suite/rpl/r/rpl_bit_npk.result index 9599660f18f..13c9985614e 100644 --- a/mysql-test/suite/rpl/r/rpl_bit_npk.result +++ b/mysql-test/suite/rpl/r/rpl_bit_npk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 ( dummyKey INTEGER NOT NULL, @@ -167,3 +163,4 @@ a b DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_blackhole.result b/mysql-test/suite/rpl/r/rpl_blackhole.result index 954589267c5..566fb828fc7 100644 --- a/mysql-test/suite/rpl/r/rpl_blackhole.result +++ b/mysql-test/suite/rpl/r/rpl_blackhole.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (a INT, b INT, c INT); CREATE TABLE t2 (a INT, b INT, c INT); ALTER TABLE t1 ENGINE=BLACKHOLE; @@ -99,3 +95,4 @@ COUNT(*) 0 >>> Something was written to binary log <<< DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug26395.result b/mysql-test/suite/rpl/r/rpl_bug26395.result index c6dd2d01ed3..a3725f34a55 100644 --- a/mysql-test/suite/rpl/r/rpl_bug26395.result +++ b/mysql-test/suite/rpl/r/rpl_bug26395.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE tinnodb (a INT) ENGINE = INNODB; @@ -20,6 +16,7 @@ SELECT * FROM tinnodb ORDER BY a; a 1 [on slave] +include/sync_slave_io_with_master.inc ==== Verify results on slave ==== include/stop_slave.inc SELECT "" AS Slave_IO_State; @@ -39,3 +36,4 @@ DROP TABLE tinnodb; set @@debug= @old_debug; [on slave] DROP TABLE tinnodb; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug31076.result b/mysql-test/suite/rpl/r/rpl_bug31076.result index fd66ca85d57..09330b35fbd 100644 --- a/mysql-test/suite/rpl/r/rpl_bug31076.result +++ b/mysql-test/suite/rpl/r/rpl_bug31076.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE DATABASE track; USE track; CREATE TABLE `visits` ( @@ -67,3 +63,4 @@ event_id visit_id timestamp src data visits_events_id 20000 21231038 2007-09-18 03:59:02 Downloads/MySQL-4.1/mysql-4.1.12a-win32.zip 33712207 DROP DATABASE track; End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result index 292922a1afd..d27308db1d5 100644 --- a/mysql-test/suite/rpl/r/rpl_bug33931.result +++ b/mysql-test/suite/rpl/r/rpl_bug33931.result @@ -1,8 +1,12 @@ -reset master; +include/master-slave.inc +[connection master] call mtr.add_suppression("Failed during slave I/O thread initialization"); -stop slave; +include/stop_slave.inc reset slave; SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; -Last_SQL_Error = Failed during slave thread initialization +include/wait_for_slave_sql_error.inc [errno=1593] +Last_SQL_Error = 'Failed during slave thread initialization' SET GLOBAL debug=""; +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug38694.result b/mysql-test/suite/rpl/r/rpl_bug38694.result index 711c4a91c03..b666d9a9155 100644 --- a/mysql-test/suite/rpl/r/rpl_bug38694.result +++ b/mysql-test/suite/rpl/r/rpl_bug38694.result @@ -1,6 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result index 883feb42b3f..6674ab168ef 100644 --- a/mysql-test/suite/rpl/r/rpl_change_master.result +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -1,15 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(n int); select * from t1; n stop slave sql_thread; insert into t1 values(1); insert into t1 values(2); +include/wait_for_slave_param.inc [Read_Master_Log_Pos] include/stop_slave.inc change master to master_user='root'; start slave; @@ -18,3 +15,4 @@ n 1 2 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_charset.result b/mysql-test/suite/rpl/r/rpl_charset.result index ae5cf3b0fd1..fff11542f6b 100644 --- a/mysql-test/suite/rpl/r/rpl_charset.result +++ b/mysql-test/suite/rpl/r/rpl_charset.result @@ -1,12 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set timestamp=1000000000; -drop database if exists mysqltest2; -drop database if exists mysqltest3; create database mysqltest2 character set latin2; set @@character_set_server=latin5; create database mysqltest3; @@ -142,3 +136,4 @@ primary key (`pk`) set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_charset_sjis.result b/mysql-test/suite/rpl/r/rpl_charset_sjis.result index 770ad0588d1..b31bad28a59 100644 --- a/mysql-test/suite/rpl/r/rpl_charset_sjis.result +++ b/mysql-test/suite/rpl/r/rpl_charset_sjis.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t1; drop procedure if exists p1; create table t1 (a varchar(255) character set sjis); @@ -24,3 +20,4 @@ hex(a) 965C drop table t1; drop procedure p1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result index c3ccc76d1bc..fb1d3f8258e 100644 --- a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result +++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result @@ -1,60 +1,10 @@ -*** Set up circular ring by schema A->B->C->D->A *** -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -SET auto_increment_increment = 4; -SET auto_increment_offset = 1; -RESET MASTER; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_A_PORT,master_user='root',MASTER_LOG_FILE='MASTER_A_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 2; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',MASTER_LOG_FILE='MASTER_B_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 3; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',MASTER_LOG_FILE='MASTER_C_LOG_FILE'; -SET auto_increment_increment = 4; -SET auto_increment_offset = 4; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_D_PORT,master_user='root',MASTER_LOG_FILE='MASTER_D_LOG_FILE'; -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 1 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 2 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 3 -SHOW VARIABLES LIKE 'auto_increment_%'; -Variable_name Value -auto_increment_increment 4 -auto_increment_offset 4 -1 -START SLAVE; -START SLAVE; -START SLAVE; -START SLAVE; +*** Set up circular replication on four servers *** +include/rpl_init.inc [topology=1->2->3->4->1] *** Preparing data *** CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; +include/rpl_sync.inc *** Testing schema A->B->C->D->A *** @@ -62,6 +12,7 @@ INSERT INTO t1(b,c) VALUES('A',1); INSERT INTO t1(b,c) VALUES('B',1); INSERT INTO t1(b,c) VALUES('C',1); INSERT INTO t1(b,c) VALUES('D',1); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b; Master A a b Master A 1 A @@ -95,6 +46,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; include/start_slave.inc INSERT INTO t1 VALUES(6,'C',2); INSERT INTO t1(b,c) VALUES('B',2); +include/wait_for_slave_sql_error.inc [errno=1062] INSERT INTO t1(b,c) VALUES('A',2); INSERT INTO t1(b,c) VALUES('D',2); @@ -116,9 +68,9 @@ Master D a b Master D 8 D * Reconfigure replication to schema A->B->D->A * -STOP SLAVE; -STOP SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_B_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS; +include/stop_slave_io.inc +include/stop_slave.inc +include/rpl_change_topology.inc [new topology=1->2->4->1,2->3] include/start_slave.inc * Check data inserted before failure * @@ -145,6 +97,7 @@ Master D 8 D INSERT INTO t1(b,c) VALUES('A',3); INSERT INTO t1(b,c) VALUES('B',3); INSERT INTO t1(b,c) VALUES('D',3); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b; Master A a b Master A 9 A @@ -171,8 +124,9 @@ DELETE FROM t1 WHERE a = 6; START SLAVE; RESET MASTER; RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_C_PORT,master_user='root',master_log_file='LOG_FILE',master_log_pos=LOG_POS; +include/rpl_change_topology.inc [new topology=1->2->3->4->1] START SLAVE; +include/rpl_sync.inc * Check data inserted before restoring schema A->B->C->D->A * SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; @@ -213,6 +167,7 @@ INSERT INTO t1(b,c) VALUES('A',4); INSERT INTO t1(b,c) VALUES('B',4); INSERT INTO t1(b,c) VALUES('C',4); INSERT INTO t1(b,c) VALUES('D',4); +include/rpl_sync.inc SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b; Master A a b Master A 13 A @@ -241,6 +196,7 @@ Master D 16 D * Transactions with commits * BEGIN; BEGIN; +include/rpl_sync.inc SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; Master A b COUNT(*) Master A A 100 @@ -269,6 +225,7 @@ Master D D 100 * Transactions with rollbacks * BEGIN; BEGIN; +include/rpl_sync.inc SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; Master A b COUNT(*) Master A B 100 @@ -288,11 +245,4 @@ Master D D 100 *** Clean up *** DROP TABLE t1,t2; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; -STOP SLAVE; -RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_colSize.result b/mysql-test/suite/rpl/r/rpl_colSize.result index 91456742833..8147ab2db37 100644 --- a/mysql-test/suite/rpl/r/rpl_colSize.result +++ b/mysql-test/suite/rpl/r/rpl_colSize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; **** Testing WL#3228 changes. **** *** Create "wider" table on slave *** @@ -177,3 +173,4 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 *** Cleanup *** DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_commit_after_flush.result b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result index eaddda63b6a..b91b273e64e 100644 --- a/mysql-test/suite/rpl/r/rpl_commit_after_flush.result +++ b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (a INT) ENGINE=innodb; begin; insert into t1 values(1); @@ -11,3 +7,4 @@ flush tables with read lock; commit; unlock tables; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_concurrency_error.result b/mysql-test/suite/rpl/r/rpl_concurrency_error.result index 83e5f66a9c4..c6bd8dc6062 100644 --- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result +++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ######################################################################## # Environment ######################################################################## @@ -101,11 +97,12 @@ master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown") master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ -source include/diff_master_slave.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc +include/rpl_diff.inc ######################################################################## # Cleanup ######################################################################## DROP TRIGGER tr; DROP TABLE t; DROP TABLE n; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_conditional_comments.result b/mysql-test/suite/rpl/r/rpl_conditional_comments.result index 105d3bc59f3..f520ac04bb4 100644 --- a/mysql-test/suite/rpl/r/rpl_conditional_comments.result +++ b/mysql-test/suite/rpl/r/rpl_conditional_comments.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1(c1 INT); show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info @@ -17,7 +13,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/ -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Case 2: # ----------------------------------------------------------------- @@ -28,7 +24,7 @@ EXECUTE stmt; DROP TABLE t1; CREATE TABLE t1(c1 INT); EXECUTE stmt; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] SET @value=62; PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; @@ -46,7 +42,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALU master-bin.000001 # Query # # use `test`; DROP TABLE t1 master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/ -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Case 3: # ----------------------------------------------------------------- @@ -55,3 +51,4 @@ Comparing tables master:test.t1 and slave:test.t1 SELECT c1 FROM /*!99999 t1 WHEREN; 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 '/*!99999 t1 WHEREN' at line 1 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_database.result b/mysql-test/suite/rpl/r/rpl_create_database.result index 9780b65f334..6bb950483ed 100644 --- a/mysql-test/suite/rpl/r/rpl_create_database.result +++ b/mysql-test/suite/rpl/r/rpl_create_database.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_sisyfos; DROP DATABASE IF EXISTS mysqltest_bob; @@ -60,3 +56,4 @@ t2 DROP DATABASE IF EXISTS mysqltest_prometheus; DROP DATABASE IF EXISTS mysqltest_sisyfos; DROP DATABASE IF EXISTS mysqltest_bob; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result index e3cddf4c606..dbb48f734b8 100644 --- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest; CREATE DATABASE IF NOT EXISTS mysqltest; USE mysqltest; @@ -74,3 +70,4 @@ CREATE TABLE IF NOT EXISTS t1 AS SELECT SLEEP(3); KILL QUERY master1; DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result index de44a1e5d2a..b31a6d399e2 100644 --- a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest; CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int); CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int); @@ -25,3 +21,4 @@ master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS ` ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`tmp2` (`c1`) SELECT * FROM tmp master-bin.000001 # Query # # COMMIT +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_cross_version.result b/mysql-test/suite/rpl/r/rpl_cross_version.result index de5dd134516..ddb97ffa8c5 100644 --- a/mysql-test/suite/rpl/r/rpl_cross_version.result +++ b/mysql-test/suite/rpl/r/rpl_cross_version.result @@ -1,12 +1,19 @@ +include/master-slave.inc +[connection master] ==== Initialize ==== +include/stop_slave.inc +RESET SLAVE; +include/setup_fake_relay_log.inc Setting up fake replication from MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001 ==== Test ==== start slave sql_thread; +include/wait_for_slave_param.inc [Exec_Master_Log_Pos] ==== a prove that the fake has been processed successfully ==== SELECT COUNT(*) - 17920 as zero FROM t3; zero 0 ==== Clean up ==== -stop slave sql_thread; -Cleaning up after setup_fake_relay_log.inc +include/stop_slave_sql.inc +include/cleanup_fake_relay_log.inc drop table t1, t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_current_user.result b/mysql-test/suite/rpl/r/rpl_current_user.result index 85490c2571c..7d8fc4e492e 100644 --- a/mysql-test/suite/rpl/r/rpl_current_user.result +++ b/mysql-test/suite/rpl/r/rpl_current_user.result @@ -1,25 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -# On slave2 -# Connect slave2 to slave -CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_MYPORT;, -MASTER_LOG_FILE='slave-bin.000001', MASTER_USER='root'; -START SLAVE; - -# [On master] -DROP VIEW IF EXISTS v_user; -DROP VIEW IF EXISTS v_tables_priv; -DROP VIEW IF EXISTS v_procs_priv; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS my_grant; -DROP PROCEDURE IF EXISTS my_revoke; -DROP FUNCTION IF EXISTS my_user; -DROP EVENT IF EXISTS e1; +include/rpl_init.inc [topology=1->2->3] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating slave] CREATE TABLE t1(c1 char(100)); CREATE VIEW test.v_user AS SELECT * FROM mysql.user WHERE User LIKE 'bug48321%'; CREATE VIEW test.v_tables_priv AS SELECT * FROM mysql.tables_priv WHERE User LIKE 'bug48321%'; @@ -41,76 +22,76 @@ ERROR HY000: String '01234567890123456789012345678901234567890123456789012345678 # [On conn1] # Verify 'REVOKE ALL' statement REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'GRANT ... ON TABLE ...' statement GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'GRANT ... ON PROCEDURE...' statement GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER(); -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'GRANT ... ON *.* ...' statement GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() WITH GRANT OPTION; -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'REVOKE ... ON TABLE ...' statement REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'REVOKE ... ON PROCEDURE...' statement REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); -Comparing tables master:test.v_procs_priv and slave:test.v_procs_priv -Comparing tables master:test.v_procs_priv and slave2:test.v_procs_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] # Verify 'REVOKE ... ON *.* ...' statement REVOKE ALL PRIVILEGES ON *.* FROM CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'GRANT ...' statement in the procedure CREATE PROCEDURE my_grant() GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); call my_grant; -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'REVOKE ... ON TABLE ...' statement in the procedure CREATE PROCEDURE my_revoke() REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); call my_revoke; -Comparing tables master:test.v_tables_priv and slave:test.v_tables_priv -Comparing tables master:test.v_tables_priv and slave2:test.v_tables_priv +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] # Verify 'RENAME USER ...' statement RENAME USER CURRENT_USER TO 'bug48321_2'@'localhost'; -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'DROP USER ...' statement GRANT CREATE USER ON *.* TO 'bug48321_2'@'localhost'; DROP USER CURRENT_USER(); -Comparing tables master:test.v_user and slave:test.v_user -Comparing tables master:test.v_user and slave2:test.v_user +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] # Verify 'ALTER EVENT...' statement CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1; # Explicitly assign CURRENT_USER() to definer ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE; -Comparing tables master:test.v_event and slave:test.v_event -Comparing tables master:test.v_event and slave2:test.v_event +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event] # Session user will be set as definer, if the statement does not assign # a definer ALTER EVENT e1 ENABLE; -Comparing tables master:test.v_event and slave:test.v_event -Comparing tables master:test.v_event and slave2:test.v_event +include/rpl_sync.inc +include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event] # Verify that this patch does not affect the calling of CURRENT_USER() # in the other statements @@ -127,7 +108,7 @@ SELECT * FROM t1; c1 @ 1234 -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -145,7 +126,7 @@ SELECT * FROM t1; c1 @ @ -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -159,7 +140,7 @@ c1 # [On slave] SELECT * FROM t1; c1 -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 # [On master] @@ -187,7 +168,7 @@ c1 SELECT * FROM t2; c1 @ -# [On slave2] +# [On server_3] SELECT * FROM t1; c1 @ @@ -203,3 +184,4 @@ DROP PROCEDURE my_grant; DROP PROCEDURE my_revoke; DROP FUNCTION my_user; DROP EVENT e1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result index 1485389204b..c399b408d5c 100644 --- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] *** Prepare tables and data *** CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb; CREATE TABLE t2 (a INT) ENGINE=innodb; @@ -50,7 +46,7 @@ a SELECT * FROM t3; a 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Test lock wait timeout *** include/stop_slave.inc @@ -61,6 +57,7 @@ SELECT * FROM t1 FOR UPDATE; a 1 START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1205] SELECT COUNT(*) FROM t2; COUNT(*) 0 @@ -74,7 +71,7 @@ SELECT * FROM t3; a 3 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Test lock wait timeout and purged relay logs *** SET @my_max_relay_log_size= @@global.max_relay_log_size; @@ -88,6 +85,7 @@ a 1 1 START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1205] SELECT COUNT(*) FROM t2; COUNT(*) 0 @@ -103,9 +101,10 @@ a 3 3 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc *** Clean up *** DROP TABLE t1,t2,t3; SET global max_relay_log_size= @my_max_relay_log_size; End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_delete_no_where.result b/mysql-test/suite/rpl/r/rpl_delete_no_where.result index 78edf4bf3fa..923cd428aec 100644 --- a/mysql-test/suite/rpl/r/rpl_delete_no_where.result +++ b/mysql-test/suite/rpl/r/rpl_delete_no_where.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int, b int) engine=myisam; insert into t1 values(1,1); select * from t1; @@ -13,3 +9,4 @@ delete from t1; select * from t1; a b drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 6472294fe9d..dea58316287 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] delete from mysql.user where user=_binary'rpl_do_grant'; delete from mysql.db where user=_binary'rpl_do_grant'; flush privileges; @@ -167,20 +163,10 @@ DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; DROP USER 'create_rout_db'@'localhost'; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc +USE test; ######## BUG#49119 ####### ### i) test case from the 'how to repeat section' -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; CREATE TABLE t1(c1 INT); CREATE PROCEDURE p1() SELECT * FROM t1 | REVOKE EXECUTE ON PROCEDURE p1 FROM 'root'@'localhost'; @@ -188,12 +174,7 @@ ERROR 42000: There is no such grant defined for user 'root' on host 'localhost' DROP TABLE t1; DROP PROCEDURE p1; ### ii) Test case in which REVOKE partially succeeds -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1(c1 INT); CREATE PROCEDURE p1() SELECT * FROM t1 | CREATE USER 'user49119'@'localhost'; @@ -246,12 +227,7 @@ GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION DROP TABLE t1; DROP PROCEDURE p1; DROP USER 'user49119'@'localhost'; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc grant all on *.* to foo@"1.2.3.4"; revoke all privileges, grant option from "foo"; ERROR HY000: Can't revoke all privileges for one or more of the requested users @@ -259,15 +235,11 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; grant all on *.* to foo@"1.2.3.4" master-bin.000001 # Query # # use `test`; revoke all privileges, grant option from "foo" +include/check_slave_no_error.inc DROP USER foo@"1.2.3.4"; # Bug#27606 GRANT statement should be replicated with DEFINER information -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc GRANT SELECT, INSERT ON mysql.user TO user_bug27606@localhost; SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; Grantor @@ -284,3 +256,4 @@ Grantor root@localhost DROP USER user_bug27606@localhost; "End of test" +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop.result b/mysql-test/suite/rpl/r/rpl_drop.result index 5ebbc4f9ce7..a32d3fd5fc7 100644 --- a/mysql-test/suite/rpl/r/rpl_drop.result +++ b/mysql-test/suite/rpl/r/rpl_drop.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop table if exists t1, t2; +include/master-slave.inc +[connection master] create table t1 (a int); drop table t1, t2; ERROR 42S02: Unknown table 't2' @@ -32,3 +27,4 @@ DROP FUNCTION f1; DROP TABLE t2, t3; SET @@global.binlog_format= @old_binlog_format; SET @@global.binlog_format= @old_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_db.result b/mysql-test/suite/rpl/r/rpl_drop_db.result index 8825797f80d..8a88f01a444 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_db.result +++ b/mysql-test/suite/rpl/r/rpl_drop_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; create table mysqltest1.t1 (n int); @@ -34,4 +30,4 @@ n use test; drop table t1; drop database mysqltest1; -include/stop_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_if_exists.result b/mysql-test/suite/rpl/r/rpl_drop_if_exists.result deleted file mode 100644 index e2d4c727c98..00000000000 --- a/mysql-test/suite/rpl/r/rpl_drop_if_exists.result +++ /dev/null @@ -1,98 +0,0 @@ -RESET MASTER; -DROP PROCEDURE IF EXISTS db_bug_13684.p; -DROP FUNCTION IF EXISTS db_bug_13684.f; -DROP TRIGGER IF EXISTS db_bug_13684.tr; -DROP VIEW IF EXISTS db_bug_13684.v; -DROP EVENT IF EXISTS db_bug_13684.e; -DROP TABLE IF EXISTS db_bug_13684.t; -DROP DATABASE IF EXISTS db_bug_13684; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p -master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f -master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr -master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v -master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t -master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 -CREATE DATABASE db_bug_13684; -CREATE TABLE db_bug_13684.t (a int); -CREATE EVENT db_bug_13684.e -ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR -DO -UPDATE db_bug_13684.t SET a = a + 1; -CREATE VIEW db_bug_13684.v -AS SELECT * FROM db_bug_13684.t; -CREATE TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t -FOR EACH ROW BEGIN -END; -CREATE PROCEDURE db_bug_13684.p (OUT p1 INT) -BEGIN -END; -CREATE FUNCTION db_bug_13684.f (s CHAR(20)) -RETURNS CHAR(50) DETERMINISTIC -RETURN s; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p -master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f -master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr -master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v -master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t -master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 -master-bin.000001 # Query # # CREATE DATABASE db_bug_13684 -master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int) -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e -ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR -DO -UPDATE db_bug_13684.t SET a = a + 1 -master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `db_bug_13684`.`v` AS SELECT * FROM db_bug_13684.t -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t -FOR EACH ROW BEGIN -END -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `db_bug_13684`.`p`(OUT p1 INT) -BEGIN -END -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `db_bug_13684`.`f`(s CHAR(20)) RETURNS char(50) CHARSET latin1 - DETERMINISTIC -RETURN s -DROP PROCEDURE IF EXISTS db_bug_13684.p; -DROP FUNCTION IF EXISTS db_bug_13684.f; -DROP TRIGGER IF EXISTS db_bug_13684.tr; -DROP VIEW IF EXISTS db_bug_13684.v; -DROP EVENT IF EXISTS db_bug_13684.e; -DROP TABLE IF EXISTS db_bug_13684.t; -DROP DATABASE IF EXISTS db_bug_13684; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p -master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f -master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr -master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v -master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t -master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 -master-bin.000001 # Query # # CREATE DATABASE db_bug_13684 -master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int) -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e -ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR -DO -UPDATE db_bug_13684.t SET a = a + 1 -master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `db_bug_13684`.`v` AS SELECT * FROM db_bug_13684.t -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t -FOR EACH ROW BEGIN -END -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `db_bug_13684`.`p`(OUT p1 INT) -BEGIN -END -master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `db_bug_13684`.`f`(s CHAR(20)) RETURNS char(50) CHARSET latin1 - DETERMINISTIC -RETURN s -master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS db_bug_13684.p -master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS db_bug_13684.f -master-bin.000001 # Query # # use `test`; DROP TRIGGER IF EXISTS db_bug_13684.tr -master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v -master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t -master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 diff --git a/mysql-test/suite/rpl/r/rpl_drop_temp.result b/mysql-test/suite/rpl/r/rpl_drop_temp.result index 03fbaa2256f..4aa0ba0bc0d 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_temp.result +++ b/mysql-test/suite/rpl/r/rpl_drop_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create database if not exists mysqltest; use mysqltest; create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; @@ -26,3 +22,4 @@ CREATE TEMPORARY TABLE tmp3 (a int); DROP TEMPORARY TABLE tmp3; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_drop_view.result b/mysql-test/suite/rpl/r/rpl_drop_view.result index c359011612a..0688ce42bc2 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_view.result +++ b/mysql-test/suite/rpl/r/rpl_drop_view.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t1, t2; drop view if exists v1, v2, v3, not_exist_view; create table t1 (a int); @@ -27,3 +23,4 @@ select * from v3; ERROR 42S02: Table 'test.v3' doesn't exist ==== clean up ==== drop table t1, t2, t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result index aa1a573d052..3a3bed1a6fd 100644 --- a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result +++ b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result @@ -1,12 +1,4 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; -change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; -include/start_slave.inc +include/rpl_init.inc [topology=1->2->1] create table t1 (n int); include/stop_slave.inc create table t2 (n int); @@ -25,6 +17,7 @@ insert into t3 values(4); start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc show tables; Tables_in_test t1 @@ -32,12 +25,14 @@ t2 start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc select * from t3; n 1 start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS; Warnings: Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart +include/wait_for_slave_sql_to_stop.inc select * from t3; n 1 @@ -55,6 +50,5 @@ t3 t4 t5 t6 -include/stop_slave.inc -reset slave; -drop table t1,t2,t3,t4,t5,t6; +drop table t1, t2, t3, t4, t5, t6; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_empty_master_crash.result b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result index f71411c68dd..34281bc33d7 100644 --- a/mysql-test/suite/rpl/r/rpl_empty_master_crash.result +++ b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result @@ -1,10 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] load table t1 from master; ERROR 08S01: Error connecting to master: Master is not configured load table t1 from master; ERROR HY000: Error from master: 'Table 'test.t1' doesn't exist' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result index 75fefdad2a2..6d00774ef87 100644 --- a/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result +++ b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression("Statement may not be safe to log in statement format."); create table t1 (a int primary key); create table t4 (a int primary key); @@ -41,3 +37,4 @@ a 3 4 DROP TABLE test.t4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index b724d284bfa..30ba1bb3828 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET @old_event_scheduler = @@global.event_scheduler; set global event_scheduler=1; set binlog_format=row; @@ -257,3 +253,4 @@ DROP EVENT event44331_1; DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result deleted file mode 100644 index 48fd0366c26..00000000000 --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result +++ /dev/null @@ -1,603 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); -**** Diff Table Def Start **** -*** On Slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(4) DEFAULT 'TEST') -ENGINE='InnoDB'; -*** Create t1 on Master *** -CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); -SELECT * FROM t1 ORDER BY a; -a b c -1 2 TEXAS -2 1 AUSTIN -3 4 QA -*** Select from slave *** -SELECT * FROM t1 ORDER BY a; -a b c d e -1 2 TEXAS 2 TEST -2 1 AUSTIN 2 TEST -3 4 QA 2 TEST -*** Drop t1 *** -DROP TABLE t1; -*** Create t2 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='InnoDB'; -*** Create t2 on Master *** -CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='InnoDB'; -RESET MASTER; -*** Master Data Insert *** -INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); -SELECT * FROM t2 ORDER BY a; -a b c -1 2 Kyle, TEX -2 1 JOE AUSTIN -3 4 QA TESTING -*** Start Slave *** -START SLAVE; -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. -STOP SLAVE; -RESET SLAVE; -SELECT * FROM t2 ORDER BY a; -a b c d e -RESET MASTER; -START SLAVE; -*** Drop t2 *** -DROP TABLE t2; -*** Create t3 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='InnoDB'; -*** Create t3 on Master *** -CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t3 *** -DROP TABLE t3; -*** Create t4 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='InnoDB'; -*** Create t4 on Master *** -CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), -(30000.22,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t4 *** -DROP TABLE t4; -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT, e DOUBLE, -f DECIMAL(8,2))ENGINE='InnoDB'; -*** Create t5 on Master *** -CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT, e BLOB, -f FLOAT) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), -(2,'JOE',300.01,0,'b2b2',1.0000009); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t5 *** -DROP TABLE t5; -*** Create t6 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT)ENGINE='InnoDB'; -*** Create t6 on Master *** -CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), -(2,'JOE',300.01,0); -******************************************** -*** Expect slave to fail with Error 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 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; -*** Drop t6 *** -DROP TABLE t6; -DROP TABLE t6; -START SLAVE; -**** Diff Table Def End **** -**** Extra Colums Start **** -*** Create t7 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e CHAR(20) DEFAULT 'Extra Column Testing') -ENGINE='InnoDB'; -*** Create t7 on Master *** -CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t7 ORDER BY a; -a b c -1 b1b1 Kyle -2 b1b1 JOE -3 b1b1 QA -*** Select from slave *** -SELECT * FROM t7 ORDER BY a; -a b c d e -1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing -2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing -3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing -*** Drop t7 *** -DROP TABLE t7; -*** Create t8 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e INT)ENGINE='InnoDB'; -*** Create t8 on Master *** -CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -*** Drop t8 *** -DROP TABLE t8; -STOP SLAVE; -RESET SLAVE; -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='InnoDB'; -*** Create t9 on Master *** -CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -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; -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; -*** Create t10 on Master *** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t10 *** -DROP TABLE t10; -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -*** Create t11 on Master *** -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t11 *** -DROP TABLE t11; -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -*** Create t12 on Master *** -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t12 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave *** -SELECT * FROM t12 ORDER BY a; -a b f c e -1 b1b1b1b1b1b1b1b1 Kyle test 1 -2 b1b1b1b1b1b1b1b1 JOE test 1 -3 b1b1b1b1b1b1b1b1 QA test 1 -*** Drop t12 *** -DROP TABLE t12; -**** Extra Colums End **** -*** BUG 22177 Start *** -*** Create t13 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), -d INT DEFAULT '1', -e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t13 on Master *** -CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t13 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t13 ORDER BY a; -a b c d e -1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Drop t13 *** -DROP TABLE t13; -*** 22117 END *** -*** Alter Master Table Testing Start *** -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Create t14a on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t14a on Master *** -CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14a () VALUES(1,@b1,'Kyle'), -(2,@b1,'JOE'), -(3,@b1,'QA'); -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 c6 c7 -1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -STOP SLAVE; -RESET SLAVE; -*** Master Drop c5 *** -ALTER TABLE t14a DROP COLUMN c5; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14a () VALUES(4,@b1), -(5,@b1), -(6,@b1); -SELECT * FROM t14a ORDER BY c1; -c1 c4 -1 b1b1b1b1b1b1b1b1 -2 b1b1b1b1b1b1b1b1 -3 b1b1b1b1b1b1b1b1 -4 b1b1b1b1b1b1b1b1 -5 b1b1b1b1b1b1b1b1 -6 b1b1b1b1b1b1b1b1 -*** Select on Slave **** -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 c6 c7 -1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP -5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP -6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c4; -*** Select from Master *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 -1 Replication Testing Extra Col Kyle -2 This Test Should work JOE -3 If is does not, I will open a bug QA -*** Select from Slave *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 c6 c7 -1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP -2 This Test Should work JOE 1 CURRENT_TIMESTAMP -3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP -*** Drop t14 *** -DROP TABLE t14; -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5)) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Add column on master that is a Extra on Slave *** -ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; -******************************************** -*** Expect slave to fail with Error 1060 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc -*** Try to insert in master **** -INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 -*** Try to select from slave **** -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP -*** DROP TABLE t15 *** -DROP TABLE t15; -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5))ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Add Partition on master *** -ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; -INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c1) -PARTITIONS 4 */ -*** Show table on Slave **** -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - `c6` int(11) DEFAULT '1', - `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`c1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c1) -PARTITIONS 4 */ -*** DROP TABLE t16 *** -DROP TABLE t16; -*** Alter Master End *** -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='InnoDB'; -*** Create t17 on Master *** -CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -** DROP table t17 *** -DROP TABLE t17; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result deleted file mode 100644 index 80b18ee4bd7..00000000000 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ /dev/null @@ -1,603 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); -**** Diff Table Def Start **** -*** On Slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(4) DEFAULT 'TEST') -ENGINE='MyISAM'; -*** Create t1 on Master *** -CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); -SELECT * FROM t1 ORDER BY a; -a b c -1 2 TEXAS -2 1 AUSTIN -3 4 QA -*** Select from slave *** -SELECT * FROM t1 ORDER BY a; -a b c d e -1 2 TEXAS 2 TEST -2 1 AUSTIN 2 TEST -3 4 QA 2 TEST -*** Drop t1 *** -DROP TABLE t1; -*** Create t2 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='MyISAM'; -*** Create t2 on Master *** -CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='MyISAM'; -RESET MASTER; -*** Master Data Insert *** -INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); -SELECT * FROM t2 ORDER BY a; -a b c -1 2 Kyle, TEX -2 1 JOE AUSTIN -3 4 QA TESTING -*** Start Slave *** -START SLAVE; -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. -STOP SLAVE; -RESET SLAVE; -SELECT * FROM t2 ORDER BY a; -a b c d e -RESET MASTER; -START SLAVE; -*** Drop t2 *** -DROP TABLE t2; -*** Create t3 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='MyISAM'; -*** Create t3 on Master *** -CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t3 *** -DROP TABLE t3; -*** Create t4 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='MyISAM'; -*** Create t4 on Master *** -CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), -(30000.22,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t4 *** -DROP TABLE t4; -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT, e DOUBLE, -f DECIMAL(8,2))ENGINE='MyISAM'; -*** Create t5 on Master *** -CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT, e BLOB, -f FLOAT) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), -(2,'JOE',300.01,0,'b2b2',1.0000009); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t5 *** -DROP TABLE t5; -*** Create t6 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT)ENGINE='MyISAM'; -*** Create t6 on Master *** -CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), -(2,'JOE',300.01,0); -******************************************** -*** Expect slave to fail with Error 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 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; -*** Drop t6 *** -DROP TABLE t6; -DROP TABLE t6; -START SLAVE; -**** Diff Table Def End **** -**** Extra Colums Start **** -*** Create t7 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e CHAR(20) DEFAULT 'Extra Column Testing') -ENGINE='MyISAM'; -*** Create t7 on Master *** -CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t7 ORDER BY a; -a b c -1 b1b1 Kyle -2 b1b1 JOE -3 b1b1 QA -*** Select from slave *** -SELECT * FROM t7 ORDER BY a; -a b c d e -1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing -2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing -3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing -*** Drop t7 *** -DROP TABLE t7; -*** Create t8 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e INT)ENGINE='MyISAM'; -*** Create t8 on Master *** -CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -*** Drop t8 *** -DROP TABLE t8; -STOP SLAVE; -RESET SLAVE; -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='MyISAM'; -*** Create t9 on Master *** -CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -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; -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; -*** Create t10 on Master *** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t10 *** -DROP TABLE t10; -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -*** Create t11 on Master *** -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -*** Drop t11 *** -DROP TABLE t11; -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -*** Create t12 on Master *** -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t12 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave *** -SELECT * FROM t12 ORDER BY a; -a b f c e -1 b1b1b1b1b1b1b1b1 Kyle test 1 -2 b1b1b1b1b1b1b1b1 JOE test 1 -3 b1b1b1b1b1b1b1b1 QA test 1 -*** Drop t12 *** -DROP TABLE t12; -**** Extra Colums End **** -*** BUG 22177 Start *** -*** Create t13 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), -d INT DEFAULT '1', -e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t13 on Master *** -CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t13 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t13 ORDER BY a; -a b c d e -1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Drop t13 *** -DROP TABLE t13; -*** 22117 END *** -*** Alter Master Table Testing Start *** -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Create t14a on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t14a on Master *** -CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14a () VALUES(1,@b1,'Kyle'), -(2,@b1,'JOE'), -(3,@b1,'QA'); -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 c6 c7 -1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -STOP SLAVE; -RESET SLAVE; -*** Master Drop c5 *** -ALTER TABLE t14a DROP COLUMN c5; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14a () VALUES(4,@b1), -(5,@b1), -(6,@b1); -SELECT * FROM t14a ORDER BY c1; -c1 c4 -1 b1b1b1b1b1b1b1b1 -2 b1b1b1b1b1b1b1b1 -3 b1b1b1b1b1b1b1b1 -4 b1b1b1b1b1b1b1b1 -5 b1b1b1b1b1b1b1b1 -6 b1b1b1b1b1b1b1b1 -*** Select on Slave **** -SELECT * FROM t14a ORDER BY c1; -c1 c4 c5 c6 c7 -1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP -5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP -6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c4; -*** Select from Master *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 -1 Replication Testing Extra Col Kyle -2 This Test Should work JOE -3 If is does not, I will open a bug QA -*** Select from Slave *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 c6 c7 -1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP -2 This Test Should work JOE 1 CURRENT_TIMESTAMP -3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP -*** Drop t14 *** -DROP TABLE t14; -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5)) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Add column on master that is a Extra on Slave *** -ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; -******************************************** -*** Expect slave to fail with Error 1060 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc -*** Try to insert in master **** -INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 -*** Try to select from slave **** -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP -*** DROP TABLE t15 *** -DROP TABLE t15; -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5))ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 c6 c7 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Add Partition on master *** -ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; -INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c1) -PARTITIONS 4 */ -*** Show table on Slave **** -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - `c6` int(11) DEFAULT '1', - `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`c1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (c1) -PARTITIONS 4 */ -*** DROP TABLE t16 *** -DROP TABLE t16; -*** Alter Master End *** -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='MyISAM'; -*** Create t17 on Master *** -CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc -** DROP table t17 *** -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 deleted file mode 100644 index e8535a0bc5e..00000000000 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result +++ /dev/null @@ -1,2625 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set binlog_format=row; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format ROW and engine == 'InnoDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='InnoDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='InnoDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='InnoDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='InnoDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='InnoDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='InnoDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='InnoDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -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)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - -set binlog_format=statement; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format STATEMENT and engine == 'InnoDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='InnoDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='InnoDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='InnoDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='InnoDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='InnoDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='InnoDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='InnoDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -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)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - -set binlog_format=mixed; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format MIXED and engine == 'InnoDB' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='InnoDB'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='InnoDB'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='InnoDB'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='InnoDB'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='InnoDB'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='InnoDB'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='InnoDB'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -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)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result deleted file mode 100644 index f360a8847eb..00000000000 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result +++ /dev/null @@ -1,2625 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -set binlog_format=row; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format ROW and engine == 'MyISAM' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='MyISAM'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='MyISAM'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='MyISAM'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='MyISAM'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='MyISAM'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='MyISAM'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='MyISAM'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -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)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - -set binlog_format=statement; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format STATEMENT and engine == 'MyISAM' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='MyISAM'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='MyISAM'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='MyISAM'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='MyISAM'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='MyISAM'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='MyISAM'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='MyISAM'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -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)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - -set binlog_format=mixed; - -*********************************************************** -*********************************************************** -***************** Start of Testing ************************ -*********************************************************** -*********************************************************** -* This test format == binlog_format MIXED and engine == 'MyISAM' -*********************************************************** -*********************************************************** - -***** Testing more columns on the Master ***** - -CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 FLOAT DEFAULT '2.00', -f6 CHAR(4) DEFAULT 'TEST', -f7 INT DEFAULT '0', -f8 TEXT, -f9 LONGBLOB, -f10 BIT(63), -f11 VARBINARY(64))ENGINE='MyISAM'; - -* Alter Table on Slave and drop columns f5 through f11 * - -alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; - -* Insert data in Master then update and delete some rows* - -* Select count and 20 rows from Master * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, -hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) -2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 -30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 - -* Select count and 20 rows from Slave * - -SELECT COUNT(*) FROM t1; -COUNT(*) -40 - -SELECT * FROM t1 ORDER BY f3 LIMIT 20; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -Checking that both slave threads are running. - -***** Testing Altering table def scenario ***** - -CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f7 DECIMAL(17,9) default '1000.00', -f8 MEDIUMBLOB, -f9 NUMERIC(6,4) default '2000.00', -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='MyISAM'; -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 - -CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 ENUM('a', 'b', 'c') default 'a', -f8 MEDIUMBLOB, -f10 VARCHAR(1024), -f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f12 SET('a', 'b', 'c') default 'b') -ENGINE='MyISAM'; - -CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 DOUBLE DEFAULT '2.00', -f6 DECIMAL(17,9) default '1000.00', -f7 MEDIUMBLOB, -f8 NUMERIC(6,4) default '2000.00', -f9 VARCHAR(1024), -f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', -f11 CHAR(255)) -ENGINE='MyISAM'; -Warnings: -Warning 1264 Out of range value for column 'f8' at row 1 - -CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), -/* extra */ -f5 BIGINT, -f6 BLOB, -f7 DATE, -f8 DATETIME, -f9 FLOAT, -f10 INT, -f11 LONGBLOB, -f12 LONGTEXT, -f13 MEDIUMBLOB, -f14 MEDIUMINT, -f15 MEDIUMTEXT, -f16 REAL, -f17 SMALLINT, -f18 TEXT, -f19 TIME, -f20 TIMESTAMP, -f21 TINYBLOB, -f22 TINYINT, -f23 TINYTEXT, -f24 YEAR, -f25 BINARY(255), -f26 BIT(64), -f27 CHAR(255), -f28 DECIMAL(30,7), -f29 DOUBLE, -f30 ENUM ('a','b', 'c') default 'a', -f31 FLOAT, -f32 NUMERIC(17,9), -f33 SET ('a', 'b', 'c') default 'b', -f34 VARBINARY(1025), -f35 VARCHAR(257) -) ENGINE='MyISAM'; - -** Alter tables on slave and drop columns ** - -alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop -f12; -alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; -alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; -alter table t31 -drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, -drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, -drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, -drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, -drop f33, drop f34, drop f35; - -** Insert Data into Master ** -INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: -some var char'; -INSERT into t2 values (2, 2, 2, 'second', -2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', -'01234567', 'c'), -(3, 3, 3, 'third', -3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', -'01234567', 'c'); -Warnings: -Warning 1264 Out of range value for column 'f9' at row 1 -Warning 1264 Out of range value for column 'f9' at row 2 -INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; -INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: -binary data'; -INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', -f9=2.2, f10='seven samurai', f28=222.222, f35='222'; -Warnings: -Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 5, 'fifth', -/* f5 BIGINT, */ 333333333333333333333333, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ 'three times three' - ), -(1, 1, 6, 'sixth', -/* f5 BIGINT, */ NULL, -/* f6 BLOB, */ '3333333333333333333333', -/* f7 DATE, */ '2007-07-18', -/* f8 DATETIME, */ "2007-07-18", -/* f9 FLOAT, */ 3.33333333, -/* f10 INT, */ 333333333, -/* f11 LONGBLOB, */ '3333333333333333333', -/* f12 LONGTEXT, */ '3333333333333333333', -/* f13 MEDIUMBLOB, */ '3333333333333333333', -/* f14 MEDIUMINT, */ 33, -/* f15 MEDIUMTEXT, */ 3.3, -/* f16 REAL, */ 3.3, -/* f17 SMALLINT, */ 3, -/* f18 TEXT, */ '33', -/* f19 TIME, */ '2:59:58.999', -/* f20 TIMESTAMP, */ 20000303000000, -/* f21 TINYBLOB, */ '3333', -/* f22 TINYINT, */ 3, -/* f23 TINYTEXT, */ '3', -/* f24 YEAR, */ 3000, -/* f25 BINARY(255), */ 'three_33333', -/* f26 BIT(64), */ b'011', -/* f27 CHAR(255), */ 'three', -/* f28 DECIMAL(30,7), */ 3.333, -/* f29 DOUBLE, */ 3.333333333333333333333333333, -/* f30 ENUM ('a','b','c')*/ 'c', -/* f31 FLOAT, */ 3.0, -/* f32 NUMERIC(17,9), */ 3.3333, -/* f33 SET ('a','b','c'),*/ 'c', -/*f34 VARBINARY(1025),*/ '3333 minus 3', -/*f35 VARCHAR(257),*/ NULL -); -Warnings: -Warning 1264 Out of range value for column 'f5' at row 1 -Warning 1264 Out of range value for column 'f24' at row 1 -Warning 1264 Out of range value for column 'f5' at row 2 -Warning 1264 Out of range value for column 'f24' at row 2 -Warning 1264 Out of range value for column 'f24' at row 3 - -** Sync slave with master ** -** Do selects from tables ** - -select * from t1 order by f3; -f1 f2 f3 f4 -2 2 2 second -3 3 3 next -5 5 5 second -6 6 6 next -8 8 8 second -9 9 9 next -11 11 11 second -12 12 12 next -14 14 14 second -15 15 15 next -17 17 17 second -18 18 18 next -20 20 20 second -21 21 21 next -23 23 23 second -24 24 24 next -26 26 26 second -27 27 27 next -29 29 29 second -30 30 30 next -31 31 31 second -32 32 32 second -33 33 33 second -34 34 34 second -35 35 35 second -36 36 36 second -37 37 37 second -38 38 38 second -39 39 39 second -40 40 40 second -41 41 41 second -42 42 42 second -43 43 43 second -44 44 44 second -45 45 45 second -46 46 46 second -47 47 47 second -48 48 48 second -49 49 49 second -50 50 50 second -select * from t2 order by f1; -f1 f2 f3 f4 -1 1 1 first -2 2 2 second -3 3 3 third -select * from t3 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t4 order by f1; -f1 f2 f3 f4 -1 1 1 first -select * from t31 order by f3; -f1 f2 f3 f4 -1 1 1 first -1 1 2 second -1 1 3 third -1 1 4 fourth -1 1 5 fifth -1 1 6 sixth - -** Do updates master ** - -update t31 set f5=555555555555555 where f3=6; -update t31 set f2=2 where f3=2; -update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null - -** Delete from Master ** - -delete from t1; -delete from t2; -delete from t3; -delete from t4; -delete from t31; -select * from t31; -f1 f2 f3 f4 - -** Check slave status ** - -Checking that both slave threads are running. - -**************************************** -* columns in master at middle of table * -* Expect: Proper error message * -**************************************** - -** Stop and Reset Slave ** - -STOP SLAVE; -RESET SLAVE; - -** create table slave side ** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; - -** Connect to master and create table ** - -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), -(2,@b1,DEFAULT,'JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t10 *** -DROP TABLE t10; - -********************************************* -* More columns in master at middle of table * -* Expect: Proper error message * -********************************************* - -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='MyISAM'; - -*** Create t11 on Master *** -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), -(2,@b1,'Testing is cool','JOE',DEFAULT), -(3,@b1,DEFAULT,'QA',DEFAULT); - -******************************************** -*** Expect slave to fail with Error 1535 *** -******************************************** - ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc - -*** Drop t11 *** -DROP TABLE t11; - -********************************************* -* More columns in master at middle of table * -* Expect: This one should pass blob-text * -********************************************* - -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='MyISAM'; - -*** Create t12 on Master *** -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',DEFAULT,DEFAULT), -(3,@b1,'QA',DEFAULT,DEFAULT); - -SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; -a hex(b) f c e -1 62316231623162316231623162316231 Kyle test 1 -2 62316231623162316231623162316231 JOE test 1 -3 62316231623162316231623162316231 QA test 1 - -*** Select on Slave *** -SELECT a,hex(b),c FROM t12 ORDER BY a; -a hex(b) c -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -*** Drop t12 *** -DROP TABLE t12; - -**************************************************** -* - Alter Master adding columns at middle of table * -* Expect: columns added * -**************************************************** - - -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; - -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), -(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), -(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); - -SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 c6 c7 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP - -*** Select on Slave **** -SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; -c1 c2 c3 hex(c4) c5 -1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle -2 2.00 This Test Should work 62316231623162316231623162316231 JOE -3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA - -**************************************************** -* - Alter Master Dropping columns from the middle. * -* Expect: columns dropped * -**************************************************** - -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c7; - -*** Select from Master *** -SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; -c1 c3 hex(c4) c5 c6 -1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 -2 This Test Should work 62316231623162316231623162316231 JOE 1 -3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 - -************ -* Bug30415 * -************ -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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t14 *** -DROP TABLE t14; -DROP TABLE t14; -RESET MASTER; -START SLAVE; - -************************************************* -* - Alter Master adding columns at end of table * -* Expect: Error 1054 * -************************************************* - -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), -(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), -(3,@b1,'QA',DEFAULT,DEFAULT,3.00); -SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; -c1 hex(c4) c5 c6 c7 c2 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 -2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 -3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 - -******************************************** -*** Expect slave to fail with Error 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' -STOP SLAVE; -RESET SLAVE; - -*** Drop t15 *** -DROP TABLE t15; -DROP TABLE t15; -RESET MASTER; -START SLAVE; - -************************************************ -* - Create index on Master column not on slave * -* Expect:Warning * -************************************************ - -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Create Index and Data Insert *** -CREATE INDEX part_of_c6 ON t16 (c6); -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -***************** -*** BUG 30434 *** -***************** - -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)' -STOP SLAVE; -RESET SLAVE; - -*** Drop t16 *** -DROP TABLE t16; -DROP TABLE t16; -RESET MASTER; -START SLAVE; - -***************************************************** -* - Delete rows using column on Master not on slave * -* Expect: Rows Deleted * -***************************************************** - -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t17 on Master *** -CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** Delete from master ** -DELETE FROM t17 WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -DROP TABLE t17; - - -***************************************************** -* - Update row using column on Master not on slave * -* Expect: Rows updated * -***************************************************** - -** Bug30674 ** - -*** Create t18 on slave *** - -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t18 on Master *** -CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), -(2,@b1,'JOE',2,DEFAULT), -(3,@b1,'QA',3,DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 QA - -** update from master ** -UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; -SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP -2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP -3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP - -** Check slave ** -SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; -c1 hex(c4) c5 -1 62316231623162316231623162316231 Kyle -2 62316231623162316231623162316231 JOE -3 62316231623162316231623162316231 TEST -DROP TABLE t18; - - -***************************************************** -* - Insert UUID column on Master not on slave * -* Expect: Rows inserted * -***************************************************** - -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; - -*** Create t5 on Master *** -CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 LONG, -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -RESET MASTER; - -*** Start Slave *** -START SLAVE; - -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), -(2,@b1,'JOE',UUID(),DEFAULT), -(3,@b1,'QA',UUID(),DEFAULT); -SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; -c1 hex(c4) c5 c6 c7 -1 6231623162316231 Kyle UUID TIME -2 6231623162316231 JOE UUID TIME -3 6231623162316231 QA UUID TIME - -** Select * from Slave ** -SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; -c1 hex(c4) c5 -1 6231623162316231 Kyle -2 6231623162316231 JOE -3 6231623162316231 QA -DROP TABLE t5; - diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result new file mode 100644 index 00000000000..affb179d50e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result @@ -0,0 +1,2616 @@ +include/master-slave.inc +[connection master] +set binlog_format=row; + +*********************************************************** +*********************************************************** +***************** Start of Testing ************************ +*********************************************************** +*********************************************************** +* This test format == binlog_format ROW and engine == 'InnoDB' +*********************************************************** +*********************************************************** + +***** Testing more columns on the Master ***** + +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 FLOAT DEFAULT '2.00', +f6 CHAR(4) DEFAULT 'TEST', +f7 INT DEFAULT '0', +f8 TEXT, +f9 LONGBLOB, +f10 BIT(63), +f11 VARBINARY(64))ENGINE='InnoDB'; + +* Alter Table on Slave and drop columns f5 through f11 * + +alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; + +* Insert data in Master then update and delete some rows* + +* Select count and 20 rows from Master * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, +hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) +2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 + +* Select count and 20 rows from Slave * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT * FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +include/check_slave_is_running.inc + +***** Testing Altering table def scenario ***** + +CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f7 DECIMAL(17,9) default '1000.00', +f8 MEDIUMBLOB, +f9 NUMERIC(6,4) default '2000.00', +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='InnoDB'; +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 + +CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f8 MEDIUMBLOB, +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='InnoDB'; + +CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 DECIMAL(17,9) default '1000.00', +f7 MEDIUMBLOB, +f8 NUMERIC(6,4) default '2000.00', +f9 VARCHAR(1024), +f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f11 CHAR(255)) +ENGINE='InnoDB'; +Warnings: +Warning 1264 Out of range value for column 'f8' at row 1 + +CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 BIGINT, +f6 BLOB, +f7 DATE, +f8 DATETIME, +f9 FLOAT, +f10 INT, +f11 LONGBLOB, +f12 LONGTEXT, +f13 MEDIUMBLOB, +f14 MEDIUMINT, +f15 MEDIUMTEXT, +f16 REAL, +f17 SMALLINT, +f18 TEXT, +f19 TIME, +f20 TIMESTAMP, +f21 TINYBLOB, +f22 TINYINT, +f23 TINYTEXT, +f24 YEAR, +f25 BINARY(255), +f26 BIT(64), +f27 CHAR(255), +f28 DECIMAL(30,7), +f29 DOUBLE, +f30 ENUM ('a','b', 'c') default 'a', +f31 FLOAT, +f32 NUMERIC(17,9), +f33 SET ('a', 'b', 'c') default 'b', +f34 VARBINARY(1025), +f35 VARCHAR(257) +) ENGINE='InnoDB'; + +** Alter tables on slave and drop columns ** + +alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop +f12; +alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; +alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; +alter table t31 +drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, +drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, +drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, +drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, +drop f33, drop f34, drop f35; + +** Insert Data into Master ** +INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: +some var char'; +INSERT into t2 values (2, 2, 2, 'second', +2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', +'01234567', 'c'), +(3, 3, 3, 'third', +3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', +'01234567', 'c'); +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 +Warning 1264 Out of range value for column 'f9' at row 2 +INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; +INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: +binary data'; +INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; +INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +f9=2.2, f10='seven samurai', f28=222.222, f35='222'; +Warnings: +Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 +INSERT into t31 values (1, 1, 3, 'third', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +INSERT into t31 values (1, 1, 4, 'fourth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 5, 'fifth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 6, 'sixth', +/* f5 BIGINT, */ NULL, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ NULL +); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +Warning 1264 Out of range value for column 'f5' at row 2 +Warning 1264 Out of range value for column 'f24' at row 2 +Warning 1264 Out of range value for column 'f24' at row 3 + +** Sync slave with master ** +** Do selects from tables ** + +select * from t1 order by f3; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +31 31 31 second +32 32 32 second +33 33 33 second +34 34 34 second +35 35 35 second +36 36 36 second +37 37 37 second +38 38 38 second +39 39 39 second +40 40 40 second +41 41 41 second +42 42 42 second +43 43 43 second +44 44 44 second +45 45 45 second +46 46 46 second +47 47 47 second +48 48 48 second +49 49 49 second +50 50 50 second +select * from t2 order by f1; +f1 f2 f3 f4 +1 1 1 first +2 2 2 second +3 3 3 third +select * from t3 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t4 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t31 order by f3; +f1 f2 f3 f4 +1 1 1 first +1 1 2 second +1 1 3 third +1 1 4 fourth +1 1 5 fifth +1 1 6 sixth + +** Do updates master ** + +update t31 set f5=555555555555555 where f3=6; +update t31 set f2=2 where f3=2; +update t31 set f1=NULL where f3=1; +update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +Warnings: +Warning 1048 Column 'f3' cannot be null + +** Delete from Master ** + +delete from t1; +delete from t2; +delete from t3; +delete from t4; +delete from t31; +select * from t31; +f1 f2 f3 f4 + +** Check slave status ** + +include/check_slave_is_running.inc + +**************************************** +* columns in master at middle of table * +* Expect: Proper error message * +**************************************** + +** Stop and Reset Slave ** + +STOP SLAVE; +RESET SLAVE; + +** create table slave side ** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; + +** Connect to master and create table ** + +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), +(2,@b1,DEFAULT,'JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t10 *** +DROP TABLE t10; + +********************************************* +* More columns in master at middle of table * +* Expect: Proper error message * +********************************************* + +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='InnoDB'; + +*** Create t11 on Master *** +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), +(2,@b1,'Testing is cool','JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t11 *** +DROP TABLE t11; + +********************************************* +* More columns in master at middle of table * +* Expect: This one should pass blob-text * +********************************************* + +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='InnoDB'; + +*** Create t12 on Master *** +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',DEFAULT,DEFAULT), +(3,@b1,'QA',DEFAULT,DEFAULT); + +SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; +a hex(b) f c e +1 62316231623162316231623162316231 Kyle test 1 +2 62316231623162316231623162316231 JOE test 1 +3 62316231623162316231623162316231 QA test 1 + +*** Select on Slave *** +SELECT a,hex(b),c FROM t12 ORDER BY a; +a hex(b) c +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +*** Drop t12 *** +DROP TABLE t12; + +**************************************************** +* - Alter Master adding columns at middle of table * +* Expect: columns added * +**************************************************** + + +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; + +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), +(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), +(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); + +SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 c6 c7 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP + +*** Select on Slave **** +SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle +2 2.00 This Test Should work 62316231623162316231623162316231 JOE +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA + +**************************************************** +* - Alter Master Dropping columns from the middle. * +* Expect: columns dropped * +**************************************************** + +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c7; + +*** Select from Master *** +SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; +c1 c3 hex(c4) c5 c6 +1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 +2 This Test Should work 62316231623162316231623162316231 JOE 1 +3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 + +************ +* Bug30415 * +************ +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t14 *** +DROP TABLE t14; +DROP TABLE t14; +RESET MASTER; +START SLAVE; + +************************************************* +* - Alter Master adding columns at end of table * +* Expect: Error 1054 * +************************************************* + +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), +(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), +(3,@b1,'QA',DEFAULT,DEFAULT,3.00); +SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; +c1 hex(c4) c5 c6 c7 c2 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 +2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 +3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 + +******************************************** +*** Expect slave to fail with Error 1054 *** +******************************************** + +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t15 *** +DROP TABLE t15; +DROP TABLE t15; +RESET MASTER; +START SLAVE; + +************************************************ +* - Create index on Master column not on slave * +* Expect:Warning * +************************************************ + +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Create Index and Data Insert *** +CREATE INDEX part_of_c6 ON t16 (c6); +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +***************** +*** BUG 30434 *** +***************** + +include/wait_for_slave_sql_error.inc [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)'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t16 *** +DROP TABLE t16; +DROP TABLE t16; +RESET MASTER; +START SLAVE; + +***************************************************** +* - Delete rows using column on Master not on slave * +* Expect: Rows Deleted * +***************************************************** + +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t17 on Master *** +CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** Delete from master ** +DELETE FROM t17 WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +DROP TABLE t17; + + +***************************************************** +* - Update row using column on Master not on slave * +* Expect: Rows updated * +***************************************************** + +** Bug30674 ** + +*** Create t18 on slave *** + +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t18 on Master *** +CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** update from master ** +UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 TEST +DROP TABLE t18; + + +***************************************************** +* - Insert UUID column on Master not on slave * +* Expect: Rows inserted * +***************************************************** + +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t5 on Master *** +CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 LONG, +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), +(2,@b1,'JOE',UUID(),DEFAULT), +(3,@b1,'QA',UUID(),DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 6231623162316231 Kyle UUID TIME +2 6231623162316231 JOE UUID TIME +3 6231623162316231 QA UUID TIME + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; +c1 hex(c4) c5 +1 6231623162316231 Kyle +2 6231623162316231 JOE +3 6231623162316231 QA +DROP TABLE t5; +set binlog_format=statement; + +*********************************************************** +*********************************************************** +***************** Start of Testing ************************ +*********************************************************** +*********************************************************** +* This test format == binlog_format STATEMENT and engine == 'InnoDB' +*********************************************************** +*********************************************************** + +***** Testing more columns on the Master ***** + +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 FLOAT DEFAULT '2.00', +f6 CHAR(4) DEFAULT 'TEST', +f7 INT DEFAULT '0', +f8 TEXT, +f9 LONGBLOB, +f10 BIT(63), +f11 VARBINARY(64))ENGINE='InnoDB'; + +* Alter Table on Slave and drop columns f5 through f11 * + +alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; + +* Insert data in Master then update and delete some rows* + +* Select count and 20 rows from Master * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, +hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) +2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 + +* Select count and 20 rows from Slave * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT * FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +include/check_slave_is_running.inc + +***** Testing Altering table def scenario ***** + +CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f7 DECIMAL(17,9) default '1000.00', +f8 MEDIUMBLOB, +f9 NUMERIC(6,4) default '2000.00', +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='InnoDB'; +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 + +CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f8 MEDIUMBLOB, +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='InnoDB'; + +CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 DECIMAL(17,9) default '1000.00', +f7 MEDIUMBLOB, +f8 NUMERIC(6,4) default '2000.00', +f9 VARCHAR(1024), +f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f11 CHAR(255)) +ENGINE='InnoDB'; +Warnings: +Warning 1264 Out of range value for column 'f8' at row 1 + +CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 BIGINT, +f6 BLOB, +f7 DATE, +f8 DATETIME, +f9 FLOAT, +f10 INT, +f11 LONGBLOB, +f12 LONGTEXT, +f13 MEDIUMBLOB, +f14 MEDIUMINT, +f15 MEDIUMTEXT, +f16 REAL, +f17 SMALLINT, +f18 TEXT, +f19 TIME, +f20 TIMESTAMP, +f21 TINYBLOB, +f22 TINYINT, +f23 TINYTEXT, +f24 YEAR, +f25 BINARY(255), +f26 BIT(64), +f27 CHAR(255), +f28 DECIMAL(30,7), +f29 DOUBLE, +f30 ENUM ('a','b', 'c') default 'a', +f31 FLOAT, +f32 NUMERIC(17,9), +f33 SET ('a', 'b', 'c') default 'b', +f34 VARBINARY(1025), +f35 VARCHAR(257) +) ENGINE='InnoDB'; + +** Alter tables on slave and drop columns ** + +alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop +f12; +alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; +alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; +alter table t31 +drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, +drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, +drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, +drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, +drop f33, drop f34, drop f35; + +** Insert Data into Master ** +INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: +some var char'; +INSERT into t2 values (2, 2, 2, 'second', +2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', +'01234567', 'c'), +(3, 3, 3, 'third', +3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', +'01234567', 'c'); +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 +Warning 1264 Out of range value for column 'f9' at row 2 +INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; +INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: +binary data'; +INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; +INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +f9=2.2, f10='seven samurai', f28=222.222, f35='222'; +Warnings: +Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 +INSERT into t31 values (1, 1, 3, 'third', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +INSERT into t31 values (1, 1, 4, 'fourth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 5, 'fifth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 6, 'sixth', +/* f5 BIGINT, */ NULL, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ NULL +); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +Warning 1264 Out of range value for column 'f5' at row 2 +Warning 1264 Out of range value for column 'f24' at row 2 +Warning 1264 Out of range value for column 'f24' at row 3 + +** Sync slave with master ** +** Do selects from tables ** + +select * from t1 order by f3; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +31 31 31 second +32 32 32 second +33 33 33 second +34 34 34 second +35 35 35 second +36 36 36 second +37 37 37 second +38 38 38 second +39 39 39 second +40 40 40 second +41 41 41 second +42 42 42 second +43 43 43 second +44 44 44 second +45 45 45 second +46 46 46 second +47 47 47 second +48 48 48 second +49 49 49 second +50 50 50 second +select * from t2 order by f1; +f1 f2 f3 f4 +1 1 1 first +2 2 2 second +3 3 3 third +select * from t3 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t4 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t31 order by f3; +f1 f2 f3 f4 +1 1 1 first +1 1 2 second +1 1 3 third +1 1 4 fourth +1 1 5 fifth +1 1 6 sixth + +** Do updates master ** + +update t31 set f5=555555555555555 where f3=6; +update t31 set f2=2 where f3=2; +update t31 set f1=NULL where f3=1; +update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +Warnings: +Warning 1048 Column 'f3' cannot be null + +** Delete from Master ** + +delete from t1; +delete from t2; +delete from t3; +delete from t4; +delete from t31; +select * from t31; +f1 f2 f3 f4 + +** Check slave status ** + +include/check_slave_is_running.inc + +**************************************** +* columns in master at middle of table * +* Expect: Proper error message * +**************************************** + +** Stop and Reset Slave ** + +STOP SLAVE; +RESET SLAVE; + +** create table slave side ** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; + +** Connect to master and create table ** + +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), +(2,@b1,DEFAULT,'JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t10 *** +DROP TABLE t10; + +********************************************* +* More columns in master at middle of table * +* Expect: Proper error message * +********************************************* + +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='InnoDB'; + +*** Create t11 on Master *** +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), +(2,@b1,'Testing is cool','JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t11 *** +DROP TABLE t11; + +********************************************* +* More columns in master at middle of table * +* Expect: This one should pass blob-text * +********************************************* + +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='InnoDB'; + +*** Create t12 on Master *** +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',DEFAULT,DEFAULT), +(3,@b1,'QA',DEFAULT,DEFAULT); + +SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; +a hex(b) f c e +1 62316231623162316231623162316231 Kyle test 1 +2 62316231623162316231623162316231 JOE test 1 +3 62316231623162316231623162316231 QA test 1 + +*** Select on Slave *** +SELECT a,hex(b),c FROM t12 ORDER BY a; +a hex(b) c +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +*** Drop t12 *** +DROP TABLE t12; + +**************************************************** +* - Alter Master adding columns at middle of table * +* Expect: columns added * +**************************************************** + + +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; + +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), +(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), +(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); + +SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 c6 c7 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP + +*** Select on Slave **** +SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle +2 2.00 This Test Should work 62316231623162316231623162316231 JOE +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA + +**************************************************** +* - Alter Master Dropping columns from the middle. * +* Expect: columns dropped * +**************************************************** + +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c7; + +*** Select from Master *** +SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; +c1 c3 hex(c4) c5 c6 +1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 +2 This Test Should work 62316231623162316231623162316231 JOE 1 +3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 + +************ +* Bug30415 * +************ +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t14 *** +DROP TABLE t14; +DROP TABLE t14; +RESET MASTER; +START SLAVE; + +************************************************* +* - Alter Master adding columns at end of table * +* Expect: Error 1054 * +************************************************* + +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), +(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), +(3,@b1,'QA',DEFAULT,DEFAULT,3.00); +SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; +c1 hex(c4) c5 c6 c7 c2 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 +2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 +3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 + +******************************************** +*** Expect slave to fail with Error 1054 *** +******************************************** + +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t15 *** +DROP TABLE t15; +DROP TABLE t15; +RESET MASTER; +START SLAVE; + +************************************************ +* - Create index on Master column not on slave * +* Expect:Warning * +************************************************ + +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Create Index and Data Insert *** +CREATE INDEX part_of_c6 ON t16 (c6); +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +***************** +*** BUG 30434 *** +***************** + +include/wait_for_slave_sql_error.inc [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)'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t16 *** +DROP TABLE t16; +DROP TABLE t16; +RESET MASTER; +START SLAVE; + +***************************************************** +* - Delete rows using column on Master not on slave * +* Expect: Rows Deleted * +***************************************************** + +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t17 on Master *** +CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** Delete from master ** +DELETE FROM t17 WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +DROP TABLE t17; + + +***************************************************** +* - Update row using column on Master not on slave * +* Expect: Rows updated * +***************************************************** + +** Bug30674 ** + +*** Create t18 on slave *** + +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t18 on Master *** +CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** update from master ** +UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 TEST +DROP TABLE t18; + + +***************************************************** +* - Insert UUID column on Master not on slave * +* Expect: Rows inserted * +***************************************************** + +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t5 on Master *** +CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 LONG, +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), +(2,@b1,'JOE',UUID(),DEFAULT), +(3,@b1,'QA',UUID(),DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 6231623162316231 Kyle UUID TIME +2 6231623162316231 JOE UUID TIME +3 6231623162316231 QA UUID TIME + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; +c1 hex(c4) c5 +1 6231623162316231 Kyle +2 6231623162316231 JOE +3 6231623162316231 QA +DROP TABLE t5; +set binlog_format=mixed; + +*********************************************************** +*********************************************************** +***************** Start of Testing ************************ +*********************************************************** +*********************************************************** +* This test format == binlog_format MIXED and engine == 'InnoDB' +*********************************************************** +*********************************************************** + +***** Testing more columns on the Master ***** + +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 FLOAT DEFAULT '2.00', +f6 CHAR(4) DEFAULT 'TEST', +f7 INT DEFAULT '0', +f8 TEXT, +f9 LONGBLOB, +f10 BIT(63), +f11 VARBINARY(64))ENGINE='InnoDB'; + +* Alter Table on Slave and drop columns f5 through f11 * + +alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; + +* Insert data in Master then update and delete some rows* + +* Select count and 20 rows from Master * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, +hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) +2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 + +* Select count and 20 rows from Slave * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT * FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +include/check_slave_is_running.inc + +***** Testing Altering table def scenario ***** + +CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f7 DECIMAL(17,9) default '1000.00', +f8 MEDIUMBLOB, +f9 NUMERIC(6,4) default '2000.00', +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='InnoDB'; +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 + +CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f8 MEDIUMBLOB, +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='InnoDB'; + +CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 DECIMAL(17,9) default '1000.00', +f7 MEDIUMBLOB, +f8 NUMERIC(6,4) default '2000.00', +f9 VARCHAR(1024), +f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f11 CHAR(255)) +ENGINE='InnoDB'; +Warnings: +Warning 1264 Out of range value for column 'f8' at row 1 + +CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 BIGINT, +f6 BLOB, +f7 DATE, +f8 DATETIME, +f9 FLOAT, +f10 INT, +f11 LONGBLOB, +f12 LONGTEXT, +f13 MEDIUMBLOB, +f14 MEDIUMINT, +f15 MEDIUMTEXT, +f16 REAL, +f17 SMALLINT, +f18 TEXT, +f19 TIME, +f20 TIMESTAMP, +f21 TINYBLOB, +f22 TINYINT, +f23 TINYTEXT, +f24 YEAR, +f25 BINARY(255), +f26 BIT(64), +f27 CHAR(255), +f28 DECIMAL(30,7), +f29 DOUBLE, +f30 ENUM ('a','b', 'c') default 'a', +f31 FLOAT, +f32 NUMERIC(17,9), +f33 SET ('a', 'b', 'c') default 'b', +f34 VARBINARY(1025), +f35 VARCHAR(257) +) ENGINE='InnoDB'; + +** Alter tables on slave and drop columns ** + +alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop +f12; +alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; +alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; +alter table t31 +drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, +drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, +drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, +drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, +drop f33, drop f34, drop f35; + +** Insert Data into Master ** +INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: +some var char'; +INSERT into t2 values (2, 2, 2, 'second', +2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', +'01234567', 'c'), +(3, 3, 3, 'third', +3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', +'01234567', 'c'); +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 +Warning 1264 Out of range value for column 'f9' at row 2 +INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; +INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: +binary data'; +INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; +INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +f9=2.2, f10='seven samurai', f28=222.222, f35='222'; +Warnings: +Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 +INSERT into t31 values (1, 1, 3, 'third', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +INSERT into t31 values (1, 1, 4, 'fourth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 5, 'fifth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 6, 'sixth', +/* f5 BIGINT, */ NULL, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ NULL +); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +Warning 1264 Out of range value for column 'f5' at row 2 +Warning 1264 Out of range value for column 'f24' at row 2 +Warning 1264 Out of range value for column 'f24' at row 3 + +** Sync slave with master ** +** Do selects from tables ** + +select * from t1 order by f3; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +31 31 31 second +32 32 32 second +33 33 33 second +34 34 34 second +35 35 35 second +36 36 36 second +37 37 37 second +38 38 38 second +39 39 39 second +40 40 40 second +41 41 41 second +42 42 42 second +43 43 43 second +44 44 44 second +45 45 45 second +46 46 46 second +47 47 47 second +48 48 48 second +49 49 49 second +50 50 50 second +select * from t2 order by f1; +f1 f2 f3 f4 +1 1 1 first +2 2 2 second +3 3 3 third +select * from t3 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t4 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t31 order by f3; +f1 f2 f3 f4 +1 1 1 first +1 1 2 second +1 1 3 third +1 1 4 fourth +1 1 5 fifth +1 1 6 sixth + +** Do updates master ** + +update t31 set f5=555555555555555 where f3=6; +update t31 set f2=2 where f3=2; +update t31 set f1=NULL where f3=1; +update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +Warnings: +Warning 1048 Column 'f3' cannot be null + +** Delete from Master ** + +delete from t1; +delete from t2; +delete from t3; +delete from t4; +delete from t31; +select * from t31; +f1 f2 f3 f4 + +** Check slave status ** + +include/check_slave_is_running.inc + +**************************************** +* columns in master at middle of table * +* Expect: Proper error message * +**************************************** + +** Stop and Reset Slave ** + +STOP SLAVE; +RESET SLAVE; + +** create table slave side ** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; + +** Connect to master and create table ** + +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), +(2,@b1,DEFAULT,'JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t10 *** +DROP TABLE t10; + +********************************************* +* More columns in master at middle of table * +* Expect: Proper error message * +********************************************* + +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='InnoDB'; + +*** Create t11 on Master *** +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), +(2,@b1,'Testing is cool','JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t11 *** +DROP TABLE t11; + +********************************************* +* More columns in master at middle of table * +* Expect: This one should pass blob-text * +********************************************* + +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='InnoDB'; + +*** Create t12 on Master *** +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',DEFAULT,DEFAULT), +(3,@b1,'QA',DEFAULT,DEFAULT); + +SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; +a hex(b) f c e +1 62316231623162316231623162316231 Kyle test 1 +2 62316231623162316231623162316231 JOE test 1 +3 62316231623162316231623162316231 QA test 1 + +*** Select on Slave *** +SELECT a,hex(b),c FROM t12 ORDER BY a; +a hex(b) c +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +*** Drop t12 *** +DROP TABLE t12; + +**************************************************** +* - Alter Master adding columns at middle of table * +* Expect: columns added * +**************************************************** + + +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; + +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), +(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), +(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); + +SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 c6 c7 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP + +*** Select on Slave **** +SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle +2 2.00 This Test Should work 62316231623162316231623162316231 JOE +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA + +**************************************************** +* - Alter Master Dropping columns from the middle. * +* Expect: columns dropped * +**************************************************** + +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c7; + +*** Select from Master *** +SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; +c1 c3 hex(c4) c5 c6 +1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 +2 This Test Should work 62316231623162316231623162316231 JOE 1 +3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 + +************ +* Bug30415 * +************ +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t14 *** +DROP TABLE t14; +DROP TABLE t14; +RESET MASTER; +START SLAVE; + +************************************************* +* - Alter Master adding columns at end of table * +* Expect: Error 1054 * +************************************************* + +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), +(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), +(3,@b1,'QA',DEFAULT,DEFAULT,3.00); +SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; +c1 hex(c4) c5 c6 c7 c2 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 +2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 +3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 + +******************************************** +*** Expect slave to fail with Error 1054 *** +******************************************** + +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t15 *** +DROP TABLE t15; +DROP TABLE t15; +RESET MASTER; +START SLAVE; + +************************************************ +* - Create index on Master column not on slave * +* Expect:Warning * +************************************************ + +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Create Index and Data Insert *** +CREATE INDEX part_of_c6 ON t16 (c6); +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +***************** +*** BUG 30434 *** +***************** + +include/wait_for_slave_sql_error.inc [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)'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t16 *** +DROP TABLE t16; +DROP TABLE t16; +RESET MASTER; +START SLAVE; + +***************************************************** +* - Delete rows using column on Master not on slave * +* Expect: Rows Deleted * +***************************************************** + +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t17 on Master *** +CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** Delete from master ** +DELETE FROM t17 WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +DROP TABLE t17; + + +***************************************************** +* - Update row using column on Master not on slave * +* Expect: Rows updated * +***************************************************** + +** Bug30674 ** + +*** Create t18 on slave *** + +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t18 on Master *** +CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** update from master ** +UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 TEST +DROP TABLE t18; + + +***************************************************** +* - Insert UUID column on Master not on slave * +* Expect: Rows inserted * +***************************************************** + +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; + +*** Create t5 on Master *** +CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 LONG, +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), +(2,@b1,'JOE',UUID(),DEFAULT), +(3,@b1,'QA',UUID(),DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 6231623162316231 Kyle UUID TIME +2 6231623162316231 JOE UUID TIME +3 6231623162316231 QA UUID TIME + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; +c1 hex(c4) c5 +1 6231623162316231 Kyle +2 6231623162316231 JOE +3 6231623162316231 QA +DROP TABLE t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result new file mode 100644 index 00000000000..8aeb5bdc1c9 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result @@ -0,0 +1,2616 @@ +include/master-slave.inc +[connection master] +set binlog_format=row; + +*********************************************************** +*********************************************************** +***************** Start of Testing ************************ +*********************************************************** +*********************************************************** +* This test format == binlog_format ROW and engine == 'MyISAM' +*********************************************************** +*********************************************************** + +***** Testing more columns on the Master ***** + +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 FLOAT DEFAULT '2.00', +f6 CHAR(4) DEFAULT 'TEST', +f7 INT DEFAULT '0', +f8 TEXT, +f9 LONGBLOB, +f10 BIT(63), +f11 VARBINARY(64))ENGINE='MyISAM'; + +* Alter Table on Slave and drop columns f5 through f11 * + +alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; + +* Insert data in Master then update and delete some rows* + +* Select count and 20 rows from Master * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, +hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) +2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 + +* Select count and 20 rows from Slave * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT * FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +include/check_slave_is_running.inc + +***** Testing Altering table def scenario ***** + +CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f7 DECIMAL(17,9) default '1000.00', +f8 MEDIUMBLOB, +f9 NUMERIC(6,4) default '2000.00', +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='MyISAM'; +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 + +CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f8 MEDIUMBLOB, +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='MyISAM'; + +CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 DECIMAL(17,9) default '1000.00', +f7 MEDIUMBLOB, +f8 NUMERIC(6,4) default '2000.00', +f9 VARCHAR(1024), +f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f11 CHAR(255)) +ENGINE='MyISAM'; +Warnings: +Warning 1264 Out of range value for column 'f8' at row 1 + +CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 BIGINT, +f6 BLOB, +f7 DATE, +f8 DATETIME, +f9 FLOAT, +f10 INT, +f11 LONGBLOB, +f12 LONGTEXT, +f13 MEDIUMBLOB, +f14 MEDIUMINT, +f15 MEDIUMTEXT, +f16 REAL, +f17 SMALLINT, +f18 TEXT, +f19 TIME, +f20 TIMESTAMP, +f21 TINYBLOB, +f22 TINYINT, +f23 TINYTEXT, +f24 YEAR, +f25 BINARY(255), +f26 BIT(64), +f27 CHAR(255), +f28 DECIMAL(30,7), +f29 DOUBLE, +f30 ENUM ('a','b', 'c') default 'a', +f31 FLOAT, +f32 NUMERIC(17,9), +f33 SET ('a', 'b', 'c') default 'b', +f34 VARBINARY(1025), +f35 VARCHAR(257) +) ENGINE='MyISAM'; + +** Alter tables on slave and drop columns ** + +alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop +f12; +alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; +alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; +alter table t31 +drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, +drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, +drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, +drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, +drop f33, drop f34, drop f35; + +** Insert Data into Master ** +INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: +some var char'; +INSERT into t2 values (2, 2, 2, 'second', +2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', +'01234567', 'c'), +(3, 3, 3, 'third', +3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', +'01234567', 'c'); +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 +Warning 1264 Out of range value for column 'f9' at row 2 +INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; +INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: +binary data'; +INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; +INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +f9=2.2, f10='seven samurai', f28=222.222, f35='222'; +Warnings: +Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 +INSERT into t31 values (1, 1, 3, 'third', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +INSERT into t31 values (1, 1, 4, 'fourth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 5, 'fifth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 6, 'sixth', +/* f5 BIGINT, */ NULL, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ NULL +); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +Warning 1264 Out of range value for column 'f5' at row 2 +Warning 1264 Out of range value for column 'f24' at row 2 +Warning 1264 Out of range value for column 'f24' at row 3 + +** Sync slave with master ** +** Do selects from tables ** + +select * from t1 order by f3; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +31 31 31 second +32 32 32 second +33 33 33 second +34 34 34 second +35 35 35 second +36 36 36 second +37 37 37 second +38 38 38 second +39 39 39 second +40 40 40 second +41 41 41 second +42 42 42 second +43 43 43 second +44 44 44 second +45 45 45 second +46 46 46 second +47 47 47 second +48 48 48 second +49 49 49 second +50 50 50 second +select * from t2 order by f1; +f1 f2 f3 f4 +1 1 1 first +2 2 2 second +3 3 3 third +select * from t3 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t4 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t31 order by f3; +f1 f2 f3 f4 +1 1 1 first +1 1 2 second +1 1 3 third +1 1 4 fourth +1 1 5 fifth +1 1 6 sixth + +** Do updates master ** + +update t31 set f5=555555555555555 where f3=6; +update t31 set f2=2 where f3=2; +update t31 set f1=NULL where f3=1; +update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +Warnings: +Warning 1048 Column 'f3' cannot be null + +** Delete from Master ** + +delete from t1; +delete from t2; +delete from t3; +delete from t4; +delete from t31; +select * from t31; +f1 f2 f3 f4 + +** Check slave status ** + +include/check_slave_is_running.inc + +**************************************** +* columns in master at middle of table * +* Expect: Proper error message * +**************************************** + +** Stop and Reset Slave ** + +STOP SLAVE; +RESET SLAVE; + +** create table slave side ** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; + +** Connect to master and create table ** + +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), +(2,@b1,DEFAULT,'JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t10 *** +DROP TABLE t10; + +********************************************* +* More columns in master at middle of table * +* Expect: Proper error message * +********************************************* + +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='MyISAM'; + +*** Create t11 on Master *** +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), +(2,@b1,'Testing is cool','JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t11 *** +DROP TABLE t11; + +********************************************* +* More columns in master at middle of table * +* Expect: This one should pass blob-text * +********************************************* + +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='MyISAM'; + +*** Create t12 on Master *** +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',DEFAULT,DEFAULT), +(3,@b1,'QA',DEFAULT,DEFAULT); + +SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; +a hex(b) f c e +1 62316231623162316231623162316231 Kyle test 1 +2 62316231623162316231623162316231 JOE test 1 +3 62316231623162316231623162316231 QA test 1 + +*** Select on Slave *** +SELECT a,hex(b),c FROM t12 ORDER BY a; +a hex(b) c +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +*** Drop t12 *** +DROP TABLE t12; + +**************************************************** +* - Alter Master adding columns at middle of table * +* Expect: columns added * +**************************************************** + + +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; + +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), +(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), +(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); + +SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 c6 c7 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP + +*** Select on Slave **** +SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle +2 2.00 This Test Should work 62316231623162316231623162316231 JOE +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA + +**************************************************** +* - Alter Master Dropping columns from the middle. * +* Expect: columns dropped * +**************************************************** + +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c7; + +*** Select from Master *** +SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; +c1 c3 hex(c4) c5 c6 +1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 +2 This Test Should work 62316231623162316231623162316231 JOE 1 +3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 + +************ +* Bug30415 * +************ +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t14 *** +DROP TABLE t14; +DROP TABLE t14; +RESET MASTER; +START SLAVE; + +************************************************* +* - Alter Master adding columns at end of table * +* Expect: Error 1054 * +************************************************* + +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), +(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), +(3,@b1,'QA',DEFAULT,DEFAULT,3.00); +SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; +c1 hex(c4) c5 c6 c7 c2 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 +2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 +3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 + +******************************************** +*** Expect slave to fail with Error 1054 *** +******************************************** + +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t15 *** +DROP TABLE t15; +DROP TABLE t15; +RESET MASTER; +START SLAVE; + +************************************************ +* - Create index on Master column not on slave * +* Expect:Warning * +************************************************ + +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Create Index and Data Insert *** +CREATE INDEX part_of_c6 ON t16 (c6); +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +***************** +*** BUG 30434 *** +***************** + +include/wait_for_slave_sql_error.inc [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)'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t16 *** +DROP TABLE t16; +DROP TABLE t16; +RESET MASTER; +START SLAVE; + +***************************************************** +* - Delete rows using column on Master not on slave * +* Expect: Rows Deleted * +***************************************************** + +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t17 on Master *** +CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** Delete from master ** +DELETE FROM t17 WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +DROP TABLE t17; + + +***************************************************** +* - Update row using column on Master not on slave * +* Expect: Rows updated * +***************************************************** + +** Bug30674 ** + +*** Create t18 on slave *** + +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t18 on Master *** +CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** update from master ** +UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 TEST +DROP TABLE t18; + + +***************************************************** +* - Insert UUID column on Master not on slave * +* Expect: Rows inserted * +***************************************************** + +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t5 on Master *** +CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 LONG, +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), +(2,@b1,'JOE',UUID(),DEFAULT), +(3,@b1,'QA',UUID(),DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 6231623162316231 Kyle UUID TIME +2 6231623162316231 JOE UUID TIME +3 6231623162316231 QA UUID TIME + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; +c1 hex(c4) c5 +1 6231623162316231 Kyle +2 6231623162316231 JOE +3 6231623162316231 QA +DROP TABLE t5; +set binlog_format=statement; + +*********************************************************** +*********************************************************** +***************** Start of Testing ************************ +*********************************************************** +*********************************************************** +* This test format == binlog_format STATEMENT and engine == 'MyISAM' +*********************************************************** +*********************************************************** + +***** Testing more columns on the Master ***** + +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 FLOAT DEFAULT '2.00', +f6 CHAR(4) DEFAULT 'TEST', +f7 INT DEFAULT '0', +f8 TEXT, +f9 LONGBLOB, +f10 BIT(63), +f11 VARBINARY(64))ENGINE='MyISAM'; + +* Alter Table on Slave and drop columns f5 through f11 * + +alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; + +* Insert data in Master then update and delete some rows* + +* Select count and 20 rows from Master * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, +hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) +2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 + +* Select count and 20 rows from Slave * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT * FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +include/check_slave_is_running.inc + +***** Testing Altering table def scenario ***** + +CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f7 DECIMAL(17,9) default '1000.00', +f8 MEDIUMBLOB, +f9 NUMERIC(6,4) default '2000.00', +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='MyISAM'; +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 + +CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f8 MEDIUMBLOB, +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='MyISAM'; + +CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 DECIMAL(17,9) default '1000.00', +f7 MEDIUMBLOB, +f8 NUMERIC(6,4) default '2000.00', +f9 VARCHAR(1024), +f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f11 CHAR(255)) +ENGINE='MyISAM'; +Warnings: +Warning 1264 Out of range value for column 'f8' at row 1 + +CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 BIGINT, +f6 BLOB, +f7 DATE, +f8 DATETIME, +f9 FLOAT, +f10 INT, +f11 LONGBLOB, +f12 LONGTEXT, +f13 MEDIUMBLOB, +f14 MEDIUMINT, +f15 MEDIUMTEXT, +f16 REAL, +f17 SMALLINT, +f18 TEXT, +f19 TIME, +f20 TIMESTAMP, +f21 TINYBLOB, +f22 TINYINT, +f23 TINYTEXT, +f24 YEAR, +f25 BINARY(255), +f26 BIT(64), +f27 CHAR(255), +f28 DECIMAL(30,7), +f29 DOUBLE, +f30 ENUM ('a','b', 'c') default 'a', +f31 FLOAT, +f32 NUMERIC(17,9), +f33 SET ('a', 'b', 'c') default 'b', +f34 VARBINARY(1025), +f35 VARCHAR(257) +) ENGINE='MyISAM'; + +** Alter tables on slave and drop columns ** + +alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop +f12; +alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; +alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; +alter table t31 +drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, +drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, +drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, +drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, +drop f33, drop f34, drop f35; + +** Insert Data into Master ** +INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: +some var char'; +INSERT into t2 values (2, 2, 2, 'second', +2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', +'01234567', 'c'), +(3, 3, 3, 'third', +3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', +'01234567', 'c'); +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 +Warning 1264 Out of range value for column 'f9' at row 2 +INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; +INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: +binary data'; +INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; +INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +f9=2.2, f10='seven samurai', f28=222.222, f35='222'; +Warnings: +Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 +INSERT into t31 values (1, 1, 3, 'third', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +INSERT into t31 values (1, 1, 4, 'fourth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 5, 'fifth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 6, 'sixth', +/* f5 BIGINT, */ NULL, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ NULL +); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +Warning 1264 Out of range value for column 'f5' at row 2 +Warning 1264 Out of range value for column 'f24' at row 2 +Warning 1264 Out of range value for column 'f24' at row 3 + +** Sync slave with master ** +** Do selects from tables ** + +select * from t1 order by f3; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +31 31 31 second +32 32 32 second +33 33 33 second +34 34 34 second +35 35 35 second +36 36 36 second +37 37 37 second +38 38 38 second +39 39 39 second +40 40 40 second +41 41 41 second +42 42 42 second +43 43 43 second +44 44 44 second +45 45 45 second +46 46 46 second +47 47 47 second +48 48 48 second +49 49 49 second +50 50 50 second +select * from t2 order by f1; +f1 f2 f3 f4 +1 1 1 first +2 2 2 second +3 3 3 third +select * from t3 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t4 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t31 order by f3; +f1 f2 f3 f4 +1 1 1 first +1 1 2 second +1 1 3 third +1 1 4 fourth +1 1 5 fifth +1 1 6 sixth + +** Do updates master ** + +update t31 set f5=555555555555555 where f3=6; +update t31 set f2=2 where f3=2; +update t31 set f1=NULL where f3=1; +update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +Warnings: +Warning 1048 Column 'f3' cannot be null + +** Delete from Master ** + +delete from t1; +delete from t2; +delete from t3; +delete from t4; +delete from t31; +select * from t31; +f1 f2 f3 f4 + +** Check slave status ** + +include/check_slave_is_running.inc + +**************************************** +* columns in master at middle of table * +* Expect: Proper error message * +**************************************** + +** Stop and Reset Slave ** + +STOP SLAVE; +RESET SLAVE; + +** create table slave side ** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; + +** Connect to master and create table ** + +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), +(2,@b1,DEFAULT,'JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t10 *** +DROP TABLE t10; + +********************************************* +* More columns in master at middle of table * +* Expect: Proper error message * +********************************************* + +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='MyISAM'; + +*** Create t11 on Master *** +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), +(2,@b1,'Testing is cool','JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t11 *** +DROP TABLE t11; + +********************************************* +* More columns in master at middle of table * +* Expect: This one should pass blob-text * +********************************************* + +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='MyISAM'; + +*** Create t12 on Master *** +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',DEFAULT,DEFAULT), +(3,@b1,'QA',DEFAULT,DEFAULT); + +SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; +a hex(b) f c e +1 62316231623162316231623162316231 Kyle test 1 +2 62316231623162316231623162316231 JOE test 1 +3 62316231623162316231623162316231 QA test 1 + +*** Select on Slave *** +SELECT a,hex(b),c FROM t12 ORDER BY a; +a hex(b) c +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +*** Drop t12 *** +DROP TABLE t12; + +**************************************************** +* - Alter Master adding columns at middle of table * +* Expect: columns added * +**************************************************** + + +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; + +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), +(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), +(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); + +SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 c6 c7 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP + +*** Select on Slave **** +SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle +2 2.00 This Test Should work 62316231623162316231623162316231 JOE +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA + +**************************************************** +* - Alter Master Dropping columns from the middle. * +* Expect: columns dropped * +**************************************************** + +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c7; + +*** Select from Master *** +SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; +c1 c3 hex(c4) c5 c6 +1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 +2 This Test Should work 62316231623162316231623162316231 JOE 1 +3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 + +************ +* Bug30415 * +************ +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t14 *** +DROP TABLE t14; +DROP TABLE t14; +RESET MASTER; +START SLAVE; + +************************************************* +* - Alter Master adding columns at end of table * +* Expect: Error 1054 * +************************************************* + +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), +(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), +(3,@b1,'QA',DEFAULT,DEFAULT,3.00); +SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; +c1 hex(c4) c5 c6 c7 c2 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 +2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 +3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 + +******************************************** +*** Expect slave to fail with Error 1054 *** +******************************************** + +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t15 *** +DROP TABLE t15; +DROP TABLE t15; +RESET MASTER; +START SLAVE; + +************************************************ +* - Create index on Master column not on slave * +* Expect:Warning * +************************************************ + +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Create Index and Data Insert *** +CREATE INDEX part_of_c6 ON t16 (c6); +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +***************** +*** BUG 30434 *** +***************** + +include/wait_for_slave_sql_error.inc [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)'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t16 *** +DROP TABLE t16; +DROP TABLE t16; +RESET MASTER; +START SLAVE; + +***************************************************** +* - Delete rows using column on Master not on slave * +* Expect: Rows Deleted * +***************************************************** + +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t17 on Master *** +CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** Delete from master ** +DELETE FROM t17 WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +DROP TABLE t17; + + +***************************************************** +* - Update row using column on Master not on slave * +* Expect: Rows updated * +***************************************************** + +** Bug30674 ** + +*** Create t18 on slave *** + +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t18 on Master *** +CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** update from master ** +UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 TEST +DROP TABLE t18; + + +***************************************************** +* - Insert UUID column on Master not on slave * +* Expect: Rows inserted * +***************************************************** + +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t5 on Master *** +CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 LONG, +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), +(2,@b1,'JOE',UUID(),DEFAULT), +(3,@b1,'QA',UUID(),DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 6231623162316231 Kyle UUID TIME +2 6231623162316231 JOE UUID TIME +3 6231623162316231 QA UUID TIME + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; +c1 hex(c4) c5 +1 6231623162316231 Kyle +2 6231623162316231 JOE +3 6231623162316231 QA +DROP TABLE t5; +set binlog_format=mixed; + +*********************************************************** +*********************************************************** +***************** Start of Testing ************************ +*********************************************************** +*********************************************************** +* This test format == binlog_format MIXED and engine == 'MyISAM' +*********************************************************** +*********************************************************** + +***** Testing more columns on the Master ***** + +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 FLOAT DEFAULT '2.00', +f6 CHAR(4) DEFAULT 'TEST', +f7 INT DEFAULT '0', +f8 TEXT, +f9 LONGBLOB, +f10 BIT(63), +f11 VARBINARY(64))ENGINE='MyISAM'; + +* Alter Table on Slave and drop columns f5 through f11 * + +alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; + +* Insert data in Master then update and delete some rows* + +* Select count and 20 rows from Master * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, +hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) +2 2 2 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +3 3 3 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +5 5 5 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +6 6 6 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +8 8 8 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +9 9 9 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +11 11 11 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +12 12 12 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +14 14 14 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +15 15 15 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +17 17 17 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +18 18 18 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +20 20 20 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +21 21 21 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +23 23 23 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +24 24 24 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +26 26 26 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 +30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 + +* Select count and 20 rows from Slave * + +SELECT COUNT(*) FROM t1; +COUNT(*) +40 + +SELECT * FROM t1 ORDER BY f3 LIMIT 20; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +include/check_slave_is_running.inc + +***** Testing Altering table def scenario ***** + +CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f7 DECIMAL(17,9) default '1000.00', +f8 MEDIUMBLOB, +f9 NUMERIC(6,4) default '2000.00', +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='MyISAM'; +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 + +CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 ENUM('a', 'b', 'c') default 'a', +f8 MEDIUMBLOB, +f10 VARCHAR(1024), +f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f12 SET('a', 'b', 'c') default 'b') +ENGINE='MyISAM'; + +CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 DOUBLE DEFAULT '2.00', +f6 DECIMAL(17,9) default '1000.00', +f7 MEDIUMBLOB, +f8 NUMERIC(6,4) default '2000.00', +f9 VARCHAR(1024), +f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', +f11 CHAR(255)) +ENGINE='MyISAM'; +Warnings: +Warning 1264 Out of range value for column 'f8' at row 1 + +CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), +/* extra */ +f5 BIGINT, +f6 BLOB, +f7 DATE, +f8 DATETIME, +f9 FLOAT, +f10 INT, +f11 LONGBLOB, +f12 LONGTEXT, +f13 MEDIUMBLOB, +f14 MEDIUMINT, +f15 MEDIUMTEXT, +f16 REAL, +f17 SMALLINT, +f18 TEXT, +f19 TIME, +f20 TIMESTAMP, +f21 TINYBLOB, +f22 TINYINT, +f23 TINYTEXT, +f24 YEAR, +f25 BINARY(255), +f26 BIT(64), +f27 CHAR(255), +f28 DECIMAL(30,7), +f29 DOUBLE, +f30 ENUM ('a','b', 'c') default 'a', +f31 FLOAT, +f32 NUMERIC(17,9), +f33 SET ('a', 'b', 'c') default 'b', +f34 VARBINARY(1025), +f35 VARCHAR(257) +) ENGINE='MyISAM'; + +** Alter tables on slave and drop columns ** + +alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop +f12; +alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12; +alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11; +alter table t31 +drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, +drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18, +drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25, +drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32, +drop f33, drop f34, drop f35; + +** Insert Data into Master ** +INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10: +some var char'; +INSERT into t2 values (2, 2, 2, 'second', +2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char', +'01234567', 'c'), +(3, 3, 3, 'third', +3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', +'01234567', 'c'); +Warnings: +Warning 1264 Out of range value for column 'f9' at row 1 +Warning 1264 Out of range value for column 'f9' at row 2 +INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; +INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: +binary data'; +INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; +INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +f9=2.2, f10='seven samurai', f28=222.222, f35='222'; +Warnings: +Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 +INSERT into t31 values (1, 1, 3, 'third', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +INSERT into t31 values (1, 1, 4, 'fourth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 5, 'fifth', +/* f5 BIGINT, */ 333333333333333333333333, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ 'three times three' + ), +(1, 1, 6, 'sixth', +/* f5 BIGINT, */ NULL, +/* f6 BLOB, */ '3333333333333333333333', +/* f7 DATE, */ '2007-07-18', +/* f8 DATETIME, */ "2007-07-18", +/* f9 FLOAT, */ 3.33333333, +/* f10 INT, */ 333333333, +/* f11 LONGBLOB, */ '3333333333333333333', +/* f12 LONGTEXT, */ '3333333333333333333', +/* f13 MEDIUMBLOB, */ '3333333333333333333', +/* f14 MEDIUMINT, */ 33, +/* f15 MEDIUMTEXT, */ 3.3, +/* f16 REAL, */ 3.3, +/* f17 SMALLINT, */ 3, +/* f18 TEXT, */ '33', +/* f19 TIME, */ '2:59:58.999', +/* f20 TIMESTAMP, */ 20000303000000, +/* f21 TINYBLOB, */ '3333', +/* f22 TINYINT, */ 3, +/* f23 TINYTEXT, */ '3', +/* f24 YEAR, */ 3000, +/* f25 BINARY(255), */ 'three_33333', +/* f26 BIT(64), */ b'011', +/* f27 CHAR(255), */ 'three', +/* f28 DECIMAL(30,7), */ 3.333, +/* f29 DOUBLE, */ 3.333333333333333333333333333, +/* f30 ENUM ('a','b','c')*/ 'c', +/* f31 FLOAT, */ 3.0, +/* f32 NUMERIC(17,9), */ 3.3333, +/* f33 SET ('a','b','c'),*/ 'c', +/*f34 VARBINARY(1025),*/ '3333 minus 3', +/*f35 VARCHAR(257),*/ NULL +); +Warnings: +Warning 1264 Out of range value for column 'f5' at row 1 +Warning 1264 Out of range value for column 'f24' at row 1 +Warning 1264 Out of range value for column 'f5' at row 2 +Warning 1264 Out of range value for column 'f24' at row 2 +Warning 1264 Out of range value for column 'f24' at row 3 + +** Sync slave with master ** +** Do selects from tables ** + +select * from t1 order by f3; +f1 f2 f3 f4 +2 2 2 second +3 3 3 next +5 5 5 second +6 6 6 next +8 8 8 second +9 9 9 next +11 11 11 second +12 12 12 next +14 14 14 second +15 15 15 next +17 17 17 second +18 18 18 next +20 20 20 second +21 21 21 next +23 23 23 second +24 24 24 next +26 26 26 second +27 27 27 next +29 29 29 second +30 30 30 next +31 31 31 second +32 32 32 second +33 33 33 second +34 34 34 second +35 35 35 second +36 36 36 second +37 37 37 second +38 38 38 second +39 39 39 second +40 40 40 second +41 41 41 second +42 42 42 second +43 43 43 second +44 44 44 second +45 45 45 second +46 46 46 second +47 47 47 second +48 48 48 second +49 49 49 second +50 50 50 second +select * from t2 order by f1; +f1 f2 f3 f4 +1 1 1 first +2 2 2 second +3 3 3 third +select * from t3 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t4 order by f1; +f1 f2 f3 f4 +1 1 1 first +select * from t31 order by f3; +f1 f2 f3 f4 +1 1 1 first +1 1 2 second +1 1 3 third +1 1 4 fourth +1 1 5 fifth +1 1 6 sixth + +** Do updates master ** + +update t31 set f5=555555555555555 where f3=6; +update t31 set f2=2 where f3=2; +update t31 set f1=NULL where f3=1; +update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +Warnings: +Warning 1048 Column 'f3' cannot be null + +** Delete from Master ** + +delete from t1; +delete from t2; +delete from t3; +delete from t4; +delete from t31; +select * from t31; +f1 f2 f3 f4 + +** Check slave status ** + +include/check_slave_is_running.inc + +**************************************** +* columns in master at middle of table * +* Expect: Proper error message * +**************************************** + +** Stop and Reset Slave ** + +STOP SLAVE; +RESET SLAVE; + +** create table slave side ** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; + +** Connect to master and create table ** + +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), +(2,@b1,DEFAULT,'JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t10 *** +DROP TABLE t10; + +********************************************* +* More columns in master at middle of table * +* Expect: Proper error message * +********************************************* + +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='MyISAM'; + +*** Create t11 on Master *** +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), +(2,@b1,'Testing is cool','JOE',DEFAULT), +(3,@b1,DEFAULT,'QA',DEFAULT); + +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** + +include/wait_for_slave_sql_error_and_skip.inc [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' + +*** Drop t11 *** +DROP TABLE t11; + +********************************************* +* More columns in master at middle of table * +* Expect: This one should pass blob-text * +********************************************* + +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='MyISAM'; + +*** Create t12 on Master *** +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',DEFAULT,DEFAULT), +(3,@b1,'QA',DEFAULT,DEFAULT); + +SELECT a,hex(b),f,c,e FROM t12 ORDER BY a; +a hex(b) f c e +1 62316231623162316231623162316231 Kyle test 1 +2 62316231623162316231623162316231 JOE test 1 +3 62316231623162316231623162316231 QA test 1 + +*** Select on Slave *** +SELECT a,hex(b),c FROM t12 ORDER BY a; +a hex(b) c +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +*** Drop t12 *** +DROP TABLE t12; + +**************************************************** +* - Alter Master adding columns at middle of table * +* Expect: columns added * +**************************************************** + + +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; + +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle',DEFAULT,DEFAULT), +(2,2.00,'This Test Should work',@b1,'JOE',DEFAULT,DEFAULT), +(3,3.00,'If is does not, I will open a bug',@b1,'QA',DEFAULT,DEFAULT); + +SELECT c1,c2,c3,hex(c4),c5,c6,c7 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 c6 c7 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP + +*** Select on Slave **** +SELECT c1,c2,c3,hex(c4),c5 FROM t14 ORDER BY c1; +c1 c2 c3 hex(c4) c5 +1 1.00 Replication Testing Extra Col 62316231623162316231623162316231 Kyle +2 2.00 This Test Should work 62316231623162316231623162316231 JOE +3 3.00 If is does not, I will open a bug 62316231623162316231623162316231 QA + +**************************************************** +* - Alter Master Dropping columns from the middle. * +* Expect: columns dropped * +**************************************************** + +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c7; + +*** Select from Master *** +SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1; +c1 c3 hex(c4) c5 c6 +1 Replication Testing Extra Col 62316231623162316231623162316231 Kyle 1 +2 This Test Should work 62316231623162316231623162316231 JOE 1 +3 If is does not, I will open a bug 62316231623162316231623162316231 QA 1 + +************ +* Bug30415 * +************ +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t14 *** +DROP TABLE t14; +DROP TABLE t14; +RESET MASTER; +START SLAVE; + +************************************************* +* - Alter Master adding columns at end of table * +* Expect: Error 1054 * +************************************************* + +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00), +(2,@b1,'JOE',DEFAULT,DEFAULT,3.00), +(3,@b1,'QA',DEFAULT,DEFAULT,3.00); +SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1; +c1 hex(c4) c5 c6 c7 c2 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP 3.00 +2 62316231623162316231623162316231 JOE 1 CURRENT_TIMESTAMP 3.00 +3 62316231623162316231623162316231 QA 1 CURRENT_TIMESTAMP 3.00 + +******************************************** +*** Expect slave to fail with Error 1054 *** +******************************************** + +include/wait_for_slave_sql_error.inc [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'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t15 *** +DROP TABLE t15; +DROP TABLE t15; +RESET MASTER; +START SLAVE; + +************************************************ +* - Create index on Master column not on slave * +* Expect:Warning * +************************************************ + +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Create Index and Data Insert *** +CREATE INDEX part_of_c6 ON t16 (c6); +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +***************** +*** BUG 30434 *** +***************** + +include/wait_for_slave_sql_error.inc [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)'' +STOP SLAVE; +RESET SLAVE; + +*** Drop t16 *** +DROP TABLE t16; +DROP TABLE t16; +RESET MASTER; +START SLAVE; + +***************************************************** +* - Delete rows using column on Master not on slave * +* Expect: Rows Deleted * +***************************************************** + +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t17 on Master *** +CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t17 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** Delete from master ** +DELETE FROM t17 WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t17 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t17 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +DROP TABLE t17; + + +***************************************************** +* - Update row using column on Master not on slave * +* Expect: Rows updated * +***************************************************** + +** Bug30674 ** + +*** Create t18 on slave *** + +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t18 on Master *** +CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t18 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT), +(2,@b1,'JOE',2,DEFAULT), +(3,@b1,'QA',3,DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 QA 3 CURRENT_TIMESTAMP + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 QA + +** update from master ** +UPDATE t18 SET c5 = 'TEST' WHERE c6 = 3; +SELECT c1,hex(c4),c5,c6,c7 FROM t18 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 62316231623162316231623162316231 Kyle 1 CURRENT_TIMESTAMP +2 62316231623162316231623162316231 JOE 2 CURRENT_TIMESTAMP +3 62316231623162316231623162316231 TEST 3 CURRENT_TIMESTAMP + +** Check slave ** +SELECT c1,hex(c4),c5 FROM t18 ORDER BY c1; +c1 hex(c4) c5 +1 62316231623162316231623162316231 Kyle +2 62316231623162316231623162316231 JOE +3 62316231623162316231623162316231 TEST +DROP TABLE t18; + + +***************************************************** +* - Insert UUID column on Master not on slave * +* Expect: Rows inserted * +***************************************************** + +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; + +*** Create t5 on Master *** +CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 LONG, +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +RESET MASTER; + +*** Start Slave *** +START SLAVE; + +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +INSERT INTO t5 () VALUES(1,@b1,'Kyle',UUID(),DEFAULT), +(2,@b1,'JOE',UUID(),DEFAULT), +(3,@b1,'QA',UUID(),DEFAULT); +SELECT c1,hex(c4),c5,c6,c7 FROM t5 ORDER BY c1; +c1 hex(c4) c5 c6 c7 +1 6231623162316231 Kyle UUID TIME +2 6231623162316231 JOE UUID TIME +3 6231623162316231 QA UUID TIME + +** Select * from Slave ** +SELECT c1,hex(c4),c5 FROM t5 ORDER BY c1; +c1 hex(c4) c5 +1 6231623162316231 Kyle +2 6231623162316231 JOE +3 6231623162316231 QA +DROP TABLE t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result new file mode 100644 index 00000000000..9ea319379c0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result @@ -0,0 +1,590 @@ +include/master-slave.inc +[connection master] +call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); +**** Diff Table Def Start **** +*** On Slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(4) DEFAULT 'TEST') +ENGINE='InnoDB'; +*** Create t1 on Master *** +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); +SELECT * FROM t1 ORDER BY a; +a b c +1 2 TEXAS +2 1 AUSTIN +3 4 QA +*** Select from slave *** +SELECT * FROM t1 ORDER BY a; +a b c d e +1 2 TEXAS 2 TEST +2 1 AUSTIN 2 TEST +3 4 QA 2 TEST +*** Drop t1 *** +DROP TABLE t1; +*** Create t2 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t2 on Master *** +CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='InnoDB'; +RESET MASTER; +*** Master Data Insert *** +INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); +SELECT * FROM t2 ORDER BY a; +a b c +1 2 Kyle, TEX +2 1 JOE AUSTIN +3 4 QA TESTING +*** Start Slave *** +START SLAVE; +include/wait_for_slave_sql_error.inc [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.' +STOP SLAVE; +RESET SLAVE; +SELECT * FROM t2 ORDER BY a; +a b c d e +RESET MASTER; +START SLAVE; +*** Drop t2 *** +DROP TABLE t2; +*** Create t3 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t3 on Master *** +CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t3 *** +DROP TABLE t3; +*** Create t4 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t4 on Master *** +CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), +(30000.22,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t4 *** +DROP TABLE t4; +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT, e DOUBLE, +f DECIMAL(8,2))ENGINE='InnoDB'; +*** Create t5 on Master *** +CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT, e BLOB, +f FLOAT) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), +(2,'JOE',300.01,0,'b2b2',1.0000009); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t5 *** +DROP TABLE t5; +*** Create t6 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT)ENGINE='InnoDB'; +*** Create t6 on Master *** +CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), +(2,'JOE',300.01,0); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error.inc [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' +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +*** Drop t6 *** +DROP TABLE t6; +DROP TABLE t6; +START SLAVE; +**** Diff Table Def End **** +**** Extra Colums Start **** +*** Create t7 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e CHAR(20) DEFAULT 'Extra Column Testing') +ENGINE='InnoDB'; +*** Create t7 on Master *** +CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t7 ORDER BY a; +a b c +1 b1b1 Kyle +2 b1b1 JOE +3 b1b1 QA +*** Select from slave *** +SELECT * FROM t7 ORDER BY a; +a b c d e +1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing +2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing +3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing +*** Drop t7 *** +DROP TABLE t7; +*** Create t8 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e INT)ENGINE='InnoDB'; +*** Create t8 on Master *** +CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +*** Drop t8 *** +DROP TABLE t8; +STOP SLAVE; +RESET SLAVE; +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='InnoDB'; +*** Create t9 on Master *** +CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +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 +DROP TABLE t9; +*** Create t10 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t10 on Master *** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t10 *** +DROP TABLE t10; +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t11 on Master *** +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t11 *** +DROP TABLE t11; +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t12 on Master *** +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t12 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave *** +SELECT * FROM t12 ORDER BY a; +a b f c e +1 b1b1b1b1b1b1b1b1 Kyle test 1 +2 b1b1b1b1b1b1b1b1 JOE test 1 +3 b1b1b1b1b1b1b1b1 QA test 1 +*** Drop t12 *** +DROP TABLE t12; +**** Extra Colums End **** +*** BUG 22177 Start *** +*** Create t13 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), +d INT DEFAULT '1', +e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t13 on Master *** +CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t13 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t13 ORDER BY a; +a b c d e +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Drop t13 *** +DROP TABLE t13; +*** 22117 END *** +*** Alter Master Table Testing Start *** +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Create t14a on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t14a on Master *** +CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14a () VALUES(1,@b1,'Kyle'), +(2,@b1,'JOE'), +(3,@b1,'QA'); +SELECT * FROM t14a ORDER BY c1; +c1 c4 c5 +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14a ORDER BY c1; +c1 c4 c5 c6 c7 +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +STOP SLAVE; +RESET SLAVE; +*** Master Drop c5 *** +ALTER TABLE t14a DROP COLUMN c5; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14a () VALUES(4,@b1), +(5,@b1), +(6,@b1); +SELECT * FROM t14a ORDER BY c1; +c1 c4 +1 b1b1b1b1b1b1b1b1 +2 b1b1b1b1b1b1b1b1 +3 b1b1b1b1b1b1b1b1 +4 b1b1b1b1b1b1b1b1 +5 b1b1b1b1b1b1b1b1 +6 b1b1b1b1b1b1b1b1 +*** Select on Slave **** +SELECT * FROM t14a ORDER BY c1; +c1 c4 c5 c6 c7 +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +DROP TABLE t14a; +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c4; +*** Select from Master *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 +1 Replication Testing Extra Col Kyle +2 This Test Should work JOE +3 If is does not, I will open a bug QA +*** Select from Slave *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 c6 c7 +1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP +2 This Test Should work JOE 1 CURRENT_TIMESTAMP +3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP +*** Drop t14 *** +DROP TABLE t14; +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5)) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Add column on master that is a Extra on Slave *** +ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; +******************************************** +*** Expect slave to fail with Error 1060 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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'' +*** Try to insert in master **** +INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 +*** Try to select from slave **** +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP +*** DROP TABLE t15 *** +DROP TABLE t15; +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5))ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Add Partition on master *** +ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; +INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY KEY (c1) +PARTITIONS 4 */ +*** Show table on Slave **** +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + `c6` int(11) DEFAULT '1', + `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY KEY (c1) +PARTITIONS 4 */ +*** DROP TABLE t16 *** +DROP TABLE t16; +*** Alter Master End *** +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t17 on Master *** +CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +** DROP table t17 *** +DROP TABLE t17; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result new file mode 100644 index 00000000000..716a35b3464 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result @@ -0,0 +1,590 @@ +include/master-slave.inc +[connection master] +call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); +**** Diff Table Def Start **** +*** On Slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(4) DEFAULT 'TEST') +ENGINE='MyISAM'; +*** Create t1 on Master *** +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); +SELECT * FROM t1 ORDER BY a; +a b c +1 2 TEXAS +2 1 AUSTIN +3 4 QA +*** Select from slave *** +SELECT * FROM t1 ORDER BY a; +a b c d e +1 2 TEXAS 2 TEST +2 1 AUSTIN 2 TEST +3 4 QA 2 TEST +*** Drop t1 *** +DROP TABLE t1; +*** Create t2 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t2 on Master *** +CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='MyISAM'; +RESET MASTER; +*** Master Data Insert *** +INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); +SELECT * FROM t2 ORDER BY a; +a b c +1 2 Kyle, TEX +2 1 JOE AUSTIN +3 4 QA TESTING +*** Start Slave *** +START SLAVE; +include/wait_for_slave_sql_error.inc [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.' +STOP SLAVE; +RESET SLAVE; +SELECT * FROM t2 ORDER BY a; +a b c d e +RESET MASTER; +START SLAVE; +*** Drop t2 *** +DROP TABLE t2; +*** Create t3 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t3 on Master *** +CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t3 *** +DROP TABLE t3; +*** Create t4 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t4 on Master *** +CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), +(30000.22,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t4 *** +DROP TABLE t4; +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT, e DOUBLE, +f DECIMAL(8,2))ENGINE='MyISAM'; +*** Create t5 on Master *** +CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT, e BLOB, +f FLOAT) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), +(2,'JOE',300.01,0,'b2b2',1.0000009); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t5 *** +DROP TABLE t5; +*** Create t6 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT)ENGINE='MyISAM'; +*** Create t6 on Master *** +CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), +(2,'JOE',300.01,0); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error.inc [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' +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +*** Drop t6 *** +DROP TABLE t6; +DROP TABLE t6; +START SLAVE; +**** Diff Table Def End **** +**** Extra Colums Start **** +*** Create t7 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e CHAR(20) DEFAULT 'Extra Column Testing') +ENGINE='MyISAM'; +*** Create t7 on Master *** +CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t7 ORDER BY a; +a b c +1 b1b1 Kyle +2 b1b1 JOE +3 b1b1 QA +*** Select from slave *** +SELECT * FROM t7 ORDER BY a; +a b c d e +1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing +2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing +3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing +*** Drop t7 *** +DROP TABLE t7; +*** Create t8 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e INT)ENGINE='MyISAM'; +*** Create t8 on Master *** +CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +*** Drop t8 *** +DROP TABLE t8; +STOP SLAVE; +RESET SLAVE; +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='MyISAM'; +*** Create t9 on Master *** +CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +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 +DROP TABLE t9; +*** Create t10 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t10 on Master *** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t10 *** +DROP TABLE t10; +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t11 on Master *** +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +*** Drop t11 *** +DROP TABLE t11; +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t12 on Master *** +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t12 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave *** +SELECT * FROM t12 ORDER BY a; +a b f c e +1 b1b1b1b1b1b1b1b1 Kyle test 1 +2 b1b1b1b1b1b1b1b1 JOE test 1 +3 b1b1b1b1b1b1b1b1 QA test 1 +*** Drop t12 *** +DROP TABLE t12; +**** Extra Colums End **** +*** BUG 22177 Start *** +*** Create t13 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), +d INT DEFAULT '1', +e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t13 on Master *** +CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t13 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t13 ORDER BY a; +a b c d e +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Drop t13 *** +DROP TABLE t13; +*** 22117 END *** +*** Alter Master Table Testing Start *** +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Create t14a on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t14a on Master *** +CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14a () VALUES(1,@b1,'Kyle'), +(2,@b1,'JOE'), +(3,@b1,'QA'); +SELECT * FROM t14a ORDER BY c1; +c1 c4 c5 +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14a ORDER BY c1; +c1 c4 c5 c6 c7 +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +STOP SLAVE; +RESET SLAVE; +*** Master Drop c5 *** +ALTER TABLE t14a DROP COLUMN c5; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14a () VALUES(4,@b1), +(5,@b1), +(6,@b1); +SELECT * FROM t14a ORDER BY c1; +c1 c4 +1 b1b1b1b1b1b1b1b1 +2 b1b1b1b1b1b1b1b1 +3 b1b1b1b1b1b1b1b1 +4 b1b1b1b1b1b1b1b1 +5 b1b1b1b1b1b1b1b1 +6 b1b1b1b1b1b1b1b1 +*** Select on Slave **** +SELECT * FROM t14a ORDER BY c1; +c1 c4 c5 c6 c7 +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +4 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +5 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +6 b1b1b1b1b1b1b1b1 NULL 1 CURRENT_TIMESTAMP +DROP TABLE t14a; +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c4; +*** Select from Master *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 +1 Replication Testing Extra Col Kyle +2 This Test Should work JOE +3 If is does not, I will open a bug QA +*** Select from Slave *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 c6 c7 +1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP +2 This Test Should work JOE 1 CURRENT_TIMESTAMP +3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP +*** Drop t14 *** +DROP TABLE t14; +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5)) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Add column on master that is a Extra on Slave *** +ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; +******************************************** +*** Expect slave to fail with Error 1060 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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'' +*** Try to insert in master **** +INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 +*** Try to select from slave **** +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP +*** DROP TABLE t15 *** +DROP TABLE t15; +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5))ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 c6 c7 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Add Partition on master *** +ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; +INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY KEY (c1) +PARTITIONS 4 */ +*** Show table on Slave **** +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + `c6` int(11) DEFAULT '1', + `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY KEY (c1) +PARTITIONS 4 */ +*** DROP TABLE t16 *** +DROP TABLE t16; +*** Alter Master End *** +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t17 on Master *** +CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); +******************************************** +*** Expect slave to fail with Error 1535 *** +******************************************** +include/wait_for_slave_sql_error_and_skip.inc [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' +** DROP table t17 *** +DROP TABLE t17; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_failed_optimize.result b/mysql-test/suite/rpl/r/rpl_failed_optimize.result index 7210898d521..b0c331fa557 100644 --- a/mysql-test/suite/rpl/r/rpl_failed_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_failed_optimize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 ( a int ) ENGINE=InnoDB; BEGIN; INSERT INTO t1 VALUES (1); @@ -23,3 +19,4 @@ a 1 commit; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result index 5f1f72a9a3a..4eaf61e5f9e 100644 --- a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result +++ b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (id int, a int); CREATE TABLE t2 (id int, b int); CREATE TABLE t3 (id int, c int); @@ -47,85 +43,53 @@ UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1; UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1'' UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1'' UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1'' UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1'' UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1'' UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1'' UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1'' UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1'' UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1'' UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1'' UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1146] +Last_SQL_Error = 'Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1'' [on slave] show tables like 't%'; Tables_in_test (t%) @@ -149,3 +113,4 @@ id c 3 3 [on master] drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result index 3bb96b669d7..b6dbe9f5b48 100644 --- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result +++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result @@ -1,27 +1,15 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_init.inc [topology=1->2->1] show variables like 'relay_log%'; Variable_name Value -relay_log MYSQLD_DATADIR/relay-log +relay_log relay_log_index relay_log_info_file relay-log.info relay_log_purge ON relay_log_space_limit 0 -stop slave; -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=MASTER_PORT; -start slave; -stop slave; -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=SLAVE_PORT; -include/start_slave.inc CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; INSERT INTO t1 VALUE(1); FLUSH LOGS; INSERT INTO t1 VALUE(2); -Checking that both slave threads are running. -Relay_Log_File relay-log.000003 +include/check_slave_is_running.inc +Relay_Log_File = 'mysqld-relay-bin.000003' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result index e7a912b75fa..038a29c12e2 100644 --- a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB; CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB; SET FOREIGN_KEY_CHECKS=0; @@ -53,3 +49,4 @@ select count(*) from t1 /* must be zero */; count(*) 0 drop table t2,t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_found_rows.result b/mysql-test/suite/rpl/r/rpl_found_rows.result index 45a931872cf..f1f8cc6d32d 100644 --- a/mysql-test/suite/rpl/r/rpl_found_rows.result +++ b/mysql-test/suite/rpl/r/rpl_found_rows.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== 0. Setting it all up ==== SET BINLOG_FORMAT=STATEMENT; **** On Master **** @@ -102,11 +98,7 @@ DELETE FROM logtbl; DROP PROCEDURE just_log; DROP PROCEDURE calc_and_log; DROP FUNCTION log_rows; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc #### 2. Using mixed mode #### ==== 2.1. Checking a procedure ==== **** On Master **** @@ -231,3 +223,4 @@ DROP PROCEDURE just_log; DROP PROCEDURE log_me; DROP PROCEDURE log_me_inner; DROP FUNCTION log_rows; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_free_items.result b/mysql-test/suite/rpl/r/rpl_free_items.result index 91c1e2aa6e5..416f597aebc 100644 --- a/mysql-test/suite/rpl/r/rpl_free_items.result +++ b/mysql-test/suite/rpl/r/rpl_free_items.result @@ -1,10 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int); create table t2 (a int); drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_geometry.result b/mysql-test/suite/rpl/r/rpl_geometry.result index 9b48dba4f22..7ec119c9ae8 100644 --- a/mysql-test/suite/rpl/r/rpl_geometry.result +++ b/mysql-test/suite/rpl/r/rpl_geometry.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1(a varchar(100), b multipoint not null, c varchar(256)); @@ -16,3 +12,4 @@ b geometrycollection default null, c decimal(10,0)); insert into t2(c) values (null); drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_get_lock.result b/mysql-test/suite/rpl/r/rpl_get_lock.result index cbad759b17f..8250ca348e6 100644 --- a/mysql-test/suite/rpl/r/rpl_get_lock.result +++ b/mysql-test/suite/rpl/r/rpl_get_lock.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression("Statement may not be safe to log in statement format."); create table t1(n int); insert into t1 values(get_lock("lock",2)); @@ -34,3 +30,4 @@ select is_free_lock(NULL); is_free_lock(NULL) NULL drop table t1; +include/rpl_end.inc 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 432bcfcc94d..32d24e5867a 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 @@ -1,33 +1,32 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*"); call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*"); call mtr.add_suppression("Slave I/O thread .* register on master"); -stop slave; +include/stop_slave.inc SET @@global.debug= "+d,'debug_lock.before_get_UNIX_TIMESTAMP'"; -start slave; +include/start_slave.inc slave is going to hang in get_master_version_and_clock +include/rpl_stop_server.inc [server_number=1] slave is unblocked SET DEBUG_SYNC='now SIGNAL signal.get_unix_timestamp'; Check network error happened here +include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013] set @@global.debug = "-d,'debug_lock.before_get_UNIX_TIMESTAMP'"; -stop slave; +include/rpl_start_server.inc [server_number=1] +include/wait_for_slave_param.inc [Slave_IO_Running] +include/stop_slave.inc SET @@global.debug= "+d,'debug_lock.before_get_SERVER_ID'"; -start slave; +include/start_slave.inc slave is going to hang in get_master_version_and_clock +include/rpl_stop_server.inc [server_number=1] slave is unblocked SET DEBUG_SYNC='now SIGNAL signal.get_server_id'; Check network error happened here +include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013] set @@global.debug = "-d,'debug_lock.before_get_SERVER_ID'"; +include/rpl_start_server.inc [server_number=1] +include/wait_for_slave_param.inc [Slave_IO_Running] set global debug= ''; -reset master; -include/stop_slave.inc -change master to master_port=SLAVE_PORT; -start slave; -*** must be having the replicate-same-server-id IO thread error *** -Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). SET DEBUG_SYNC= 'RESET'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result index 285d52b7678..4ec8c51a5dc 100644 --- a/mysql-test/suite/rpl/r/rpl_grant.result +++ b/mysql-test/suite/rpl/r/rpl_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] **** On Master **** CREATE USER dummy@localhost; CREATE USER dummy1@localhost, dummy2@localhost; @@ -41,3 +37,4 @@ user host SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; COUNT(*) 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result index bfdcbc6fa23..1ae2d0b9ee5 100644 --- a/mysql-test/suite/rpl/r/rpl_idempotency.result +++ b/mysql-test/suite/rpl/r/rpl_idempotency.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); @@ -32,8 +28,7 @@ SELECT * FROM t2 ORDER BY a; a -3 -1 -Last_SQL_Error -0 +include/check_slave_no_error.inc INSERT IGNORE INTO t1 VALUES (-2); INSERT IGNORE INTO t1 VALUES (-2); SELECT * FROM t1 ORDER BY a; @@ -46,8 +41,7 @@ a -3 -2 -1 -Last_SQL_Error -0 +include/check_slave_no_error.inc UPDATE t1 SET a = 1 WHERE a = -1; UPDATE t2 SET a = 1 WHERE a = -1; UPDATE t1 SET a = 1 WHERE a = -1; @@ -70,8 +64,7 @@ SELECT * FROM t2 ORDER BY a; a -3 1 -Last_SQL_Error -0 +include/check_slave_no_error.inc DROP TABLE t1, t2; select @@global.slave_exec_mode /* must be IDEMPOTENT */; @@global.slave_exec_mode @@ -143,8 +136,7 @@ b 2 3 *** slave must stop (Trying to delete a referenced foreing key) -Last_SQL_Error -1451 +include/wait_for_slave_sql_error.inc [errno=1451] select * from ti1 order by b /* must be (1),(2),(3) - not deleted */; b 1 @@ -161,8 +153,7 @@ set global slave_exec_mode='STRICT'; delete from ti1 where b=3; insert into ti2 set a=3, b=3 /* offending write event */; *** slave must stop (Trying to insert an invalid foreign key) -Last_SQL_Error -1452 +include/wait_for_slave_sql_error.inc [errno=1452] select * from ti2 order by b /* must be (2,2) */; a b 2 2 @@ -181,8 +172,7 @@ a b insert into ti1 set b=1; insert into ti1 set b=1 /* offending write event */; *** slave must stop (Trying to insert a dupliacte key) -Last_SQL_Error -1062 +include/wait_for_slave_sql_error.inc [errno=1062] set foreign_key_checks= 0; delete from ti1 where b=1; set foreign_key_checks= 1; @@ -197,15 +187,13 @@ DELETE FROM t1 WHERE a = -2; DELETE FROM t2 WHERE a = -2; DELETE FROM t1 WHERE a = -2; *** slave must stop (Key was not found) -Last_SQL_Error -1032 +include/wait_for_slave_sql_error.inc [errno=1032] set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; set global slave_exec_mode='STRICT'; DELETE FROM t2 WHERE a = -2; *** slave must stop (Key was not found) -Last_SQL_Error -1032 +include/wait_for_slave_sql_error.inc [errno=1032] set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; set global slave_exec_mode='STRICT'; @@ -213,18 +201,17 @@ UPDATE t1 SET a = 1 WHERE a = -1; UPDATE t2 SET a = 1 WHERE a = -1; UPDATE t1 SET a = 1 WHERE a = -1; *** slave must stop (Key was not found) -Last_SQL_Error -1032 +include/wait_for_slave_sql_error.inc [errno=1032] set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; set global slave_exec_mode='STRICT'; UPDATE t2 SET a = 1 WHERE a = -1; *** slave must stop (Key was not found) -Last_SQL_Error -1032 +include/wait_for_slave_sql_error.inc [errno=1032] set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; SET @@global.slave_exec_mode= @old_slave_exec_mode; set @@session.binlog_format= @save_binlog_format; drop table t1,t2,ti2,ti1; +include/rpl_end.inc *** end of tests diff --git a/mysql-test/suite/rpl/r/rpl_ignore_grant.result b/mysql-test/suite/rpl/r/rpl_ignore_grant.result index 5169cc8e888..ae6d6ddfc8d 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_grant.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_grant.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; @@ -35,3 +31,4 @@ flush privileges; delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result index b1ccd2f0442..84e1a3b40c7 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; revoke select on *.* from 'user_foo'@'%'; select select_priv from mysql.user where user='user_foo' /* master:must be N */; @@ -28,3 +24,4 @@ Y revoke select on *.* FROM 'user_foo'; delete from mysql.user where user="user_foo"; delete from mysql.user where user="user_foo"; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index 6b845ddcac9..2e3fd62fbec 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] **** Test case for BUG#16487 **** **** Master **** CREATE TABLE test.t4 (a int); @@ -141,4 +137,4 @@ HEX(word) SELECT * FROM tmptbl504451f4258$1; ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist DROP TABLE t5; -call mtr.force_restart(); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table_update.result b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result index a88a3c690ed..c3882d0b98f 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table_update.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] use test; drop table if exists mysqltest_foo; drop table if exists mysqltest_bar; @@ -21,3 +17,4 @@ n m k 4 15 55 drop table mysqltest_foo,mysqltest_bar,t1; drop table mysqltest_foo,mysqltest_bar,t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result index 6c226aaf2f7..b54d7d400f7 100644 --- a/mysql-test/suite/rpl/r/rpl_incident.result +++ b/mysql-test/suite/rpl/r/rpl_incident.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); @@ -19,7 +15,8 @@ a 2 3 4 -Last_SQL_Error = The incident LOST_EVENTS occured on the master. Message: +include/wait_for_slave_sql_error.inc [errno=1590] +Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: ' **** On Slave **** SELECT * FROM t1; a @@ -34,5 +31,6 @@ a 2 3 4 -Checking that both slave threads are running. +include/check_slave_is_running.inc DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_init_slave.result b/mysql-test/suite/rpl/r/rpl_init_slave.result index 908abf56c1f..fcf7114879c 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set global max_connections=151; include/stop_slave.inc include/start_slave.inc @@ -25,6 +21,6 @@ set global init_connect="set @c=1"; show variables like 'init_connect'; Variable_name Value init_connect set @c=1 -include/stop_slave.inc set global init_connect= @my_global_init_connect; set global max_connections= default; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result index c6ee82b13f3..46bc66cbb65 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result @@ -1,19 +1,19 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] stop slave; reset slave; SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; -Reporting the following error: Failed during slave thread initialization +include/wait_for_slave_sql_error.inc [errno=1593] +Last_SQL_Error = 'Failed during slave thread initialization' call mtr.add_suppression("Failed during slave I/O thread initialization"); SET GLOBAL debug= ""; -stop slave; reset slave; SET GLOBAL init_slave= "garbage"; start slave; -Reporting the following error: Slave SQL thread aborted. Can't execute init_slave query +include/wait_for_slave_sql_error.inc [errno=1064] +Last_SQL_Error = 'Slave SQL thread aborted. Can't execute init_slave query' SET GLOBAL init_slave= ""; +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb.result b/mysql-test/suite/rpl/r/rpl_innodb.result index bf6c3cb8c86..fe3feba10e1 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t4 ( id INT(5) unsigned NOT NULL auto_increment, name varchar(15) NOT NULL default '', @@ -81,4 +77,5 @@ FLUSH LOGS; -------- switch to master -------- FLUSH LOGS; DROP DATABASE mysqltest1; +include/rpl_end.inc End of 5.1 tests diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result index 6ad22c368b4..f8734b48295 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] use test; CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, @@ -140,3 +136,4 @@ DROP PROCEDURE test.proc_byrange; DROP TABLE test.regular_tbl; DROP TABLE test.bykey_tbl; DROP TABLE test.byrange_tbl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result b/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result index abff02b4b07..d06e6681e81 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_bug30888.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] use test; CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, @@ -33,3 +29,4 @@ END| CALL test.proc_norm(); DROP PROCEDURE test.proc_norm; DROP TABLE test.regular_tbl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result index 549842198e8..36294a4333b 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==========MASTER========== show global variables like 'binlog_format%'; Variable_name Value @@ -157,3 +153,4 @@ master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index2 on t2 (d) master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index3 on t2 (a, d) master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d drop database test_rpl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index d076a24e1f0..acecb7a88be 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==========MASTER========== show global variables like 'binlog_format%'; Variable_name Value @@ -1104,3 +1100,4 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid # # COMMIT /* XID */ drop database test_rpl; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert.result b/mysql-test/suite/rpl/r/rpl_insert.result index b6a97926f73..8ab90fceed2 100644 --- a/mysql-test/suite/rpl/r/rpl_insert.result +++ b/mysql-test/suite/rpl/r/rpl_insert.result @@ -1,12 +1,8 @@ # # Bug#20821: INSERT DELAYED fails to write some rows to binlog # -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE SCHEMA IF NOT EXISTS mysqlslap; USE mysqlslap; CREATE TABLE t1 (id INT, name VARCHAR(64)); @@ -21,3 +17,4 @@ COUNT(*) # USE test; DROP SCHEMA mysqlslap; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_id.result b/mysql-test/suite/rpl/r/rpl_insert_id.result index e171e247b6c..7ac951576ce 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_id.result +++ b/mysql-test/suite/rpl/r/rpl_insert_id.result @@ -2,19 +2,14 @@ # Setup # use test; -drop table if exists t1, t2, t3; # # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well # # We also check how the foreign_key_check variable is replicated # -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] SET @old_concurrent_insert= @@global.concurrent_insert; SET @@global.concurrent_insert= 0; create table t1(a int auto_increment, key(a)) engine=myisam; @@ -531,3 +526,4 @@ id last_id drop table t1, t2; drop procedure foo; SET @@global.concurrent_insert= @old_concurrent_insert; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_id_pk.result b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result index 79815355332..c2d6d2c9b0c 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_id_pk.result +++ b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1(a int auto_increment, primary key(a)); create table t2(b int auto_increment, c int, primary key(b)); insert into t1 values (1),(2),(3); @@ -74,3 +70,4 @@ SET FOREIGN_KEY_CHECKS=0; INSERT INTO t1 VALUES (1),(1); Got one of the listed errors drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_ignore.result b/mysql-test/suite/rpl/r/rpl_insert_ignore.result index da24c86627c..6937c3d0987 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_ignore.result +++ b/mysql-test/suite/rpl/r/rpl_insert_ignore.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, b int unsigned, @@ -68,3 +64,4 @@ a b 5 5 6 6 drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_insert_select.result b/mysql-test/suite/rpl/r/rpl_insert_select.result index 1aff39e0026..d98ae2538fa 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_select.result +++ b/mysql-test/suite/rpl/r/rpl_insert_select.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (n int not null primary key); insert into t1 values (1); create table t2 (n int); @@ -15,3 +11,4 @@ n 1 2 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_invoked_features.result b/mysql-test/suite/rpl/r/rpl_invoked_features.result index be9169c785b..514483e7995 100644 --- a/mysql-test/suite/rpl/r/rpl_invoked_features.result +++ b/mysql-test/suite/rpl/r/rpl_invoked_features.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] USE test; DROP VIEW IF EXISTS v1,v11; DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; @@ -447,3 +443,4 @@ DROP FUNCTION IF EXISTS f1; DROP FUNCTION IF EXISTS f2; DROP EVENT IF EXISTS e1; DROP EVENT IF EXISTS e11; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_killed_ddl.result b/mysql-test/suite/rpl/r/rpl_killed_ddl.result index c3cde16b9d2..a02c9b599bf 100644 --- a/mysql-test/suite/rpl/r/rpl_killed_ddl.result +++ b/mysql-test/suite/rpl/r/rpl_killed_ddl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS d3; @@ -59,62 +55,62 @@ CREATE VIEW v1 AS SELECT a FROM t1 WHERE a < 100; [on master1] CREATE DATABASE d2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE d1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE IF EXISTS d2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY DO INSERT INTO test.t1 VALUES (2); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP EVENT e1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP EVENT IF EXISTS e2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC RETURN 1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER FUNCTION f1 SQL SECURITY INVOKER; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP FUNCTION f1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE PROCEDURE p2 (OUT rows INT) BEGIN SELECT COUNT(*) INTO rows FROM t2; END; // source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1'; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP PROCEDURE p1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE TABLE t2 (b int); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc ALTER TABLE t1 ADD (d int); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc RENAME TABLE t3 TO t4; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE INDEX i2 on t1 (a); source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP INDEX i1 on t1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE TABLE IF NOT EXISTS t4 (a int); CREATE TRIGGER tr2 BEFORE INSERT ON t4 FOR EACH ROW BEGIN @@ -122,28 +118,28 @@ DELETE FROM t1 WHERE a=NEW.a; END; // source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TRIGGER tr1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TRIGGER IF EXISTS tr2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP VIEW v1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP VIEW IF EXISTS v2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TABLE t1; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP TABLE IF EXISTS t2; source include/kill_query.inc; -source include/diff_master_slave.inc; +include/rpl_diff.inc DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS d3; @@ -168,3 +164,4 @@ DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP PROCEDURE IF EXISTS p3; DROP PROCEDURE IF EXISTS p4; +include/rpl_end.inc 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 daefee9c669..52980e81523 100644 --- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result +++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, UNIQUE(b)); INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; @@ -11,7 +7,8 @@ SELECT * FROM t1; a b 1 10 2 2 -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' +include/wait_for_slave_sql_error.inc [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'' SELECT * FROM t1; a b stop slave; @@ -56,12 +53,16 @@ id field_1 field_2 field_3 4 4 d 4d 5 5 e 5e 6 6 f 6f -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 (field_1, field_2, field_3) +include/wait_for_slave_sql_error.inc [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 (field_1, field_2, field_3) SELECT t2.field_a, t2.field_b, t2.field_c FROM t2 ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c' +t1.field_3 = t2.field_c'' SELECT * FROM t1; id field_1 field_2 field_3 drop table t1, t2; drop table t1, t2; +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_load_from_master.result b/mysql-test/suite/rpl/r/rpl_load_from_master.result index e1c2ecb35be..8ff9514d023 100644 --- a/mysql-test/suite/rpl/r/rpl_load_from_master.result +++ b/mysql-test/suite/rpl/r/rpl_load_from_master.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest; drop database if exists mysqltest2; drop database if exists mysqltest3; @@ -131,3 +127,4 @@ drop database mysqltest; drop database mysqltest2; drop database mysqltest2; drop database mysqltest3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_load_table_from_master.result b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result index 9d9a1d7d6cb..50bd11873f1 100644 --- a/mysql-test/suite/rpl/r/rpl_load_table_from_master.result +++ b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] "******************** Test Requirment 1 *************" SET SQL_LOG_BIN=0,timestamp=200006; CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; @@ -49,3 +45,4 @@ set SQL_LOG_BIN=1; drop table if exists t1,t2,t3; create table t1(n int); drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result index 32ec2e624e2..bd8bc5093aa 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; +include/master-slave.inc +[connection master] select last_insert_id(); last_insert_id() 0 @@ -32,32 +27,27 @@ drop table t3; create table t1(a int, b int, unique(b)); 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; -Last_SQL_Errno=0 -Last_SQL_Error - +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] +include/check_slave_no_error.inc set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data infile '../../std_data/rpl_loaddata.dat' into table t1; -stop slave; +include/wait_for_slave_sql_error.inc [errno=1062] +include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data infile '../../std_data/rpl_loaddata.dat' into table t1; +include/wait_for_slave_sql_error.inc [errno=1062] stop slave; reset slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; @@ -80,18 +70,15 @@ load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +include/wait_for_slave_sql_to_stop.inc drop table t1, t2; +include/stop_slave_io.inc drop table t1, t2; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' DROP TABLE IF EXISTS 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; +include/rpl_reset.inc drop database if exists b48297_db1; drop database if exists b42897_db2; create database b48297_db1; @@ -112,15 +99,10 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### disconnect and switch back to master connection use b48297_db1; -Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1 +include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; @@ -132,3 +114,4 @@ Field 3 'Field 4' 'Field 5' 'Field 6' Field 6 'Field 7' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result index e0971b84e3d..6b60bffa365 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a varchar(10) character set utf8); load data infile '../../std_data/loaddata6.dat' into table t1; set @@character_set_database=koi8r; @@ -76,3 +72,4 @@ E4B880E4BA8CE4B889 E59B9BE4BA94E585AD E4B883E585ABE4B99D DROP DATABASE mysqltest; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result index 126cc07f45f..bc40f32842d 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_concurrent.result @@ -9,13 +9,8 @@ master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../s master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=# 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; -reset master; +include/master-slave.inc +[connection master] select last_insert_id(); last_insert_id() 0 @@ -43,32 +38,27 @@ drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; -set global sql_slave_skip_counter=1; -start slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] +include/check_slave_no_error.inc set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; -stop slave; +include/wait_for_slave_sql_error.inc [errno=1062] +include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; +include/wait_for_slave_sql_error.inc [errno=1062] stop slave; reset slave; -Last_SQL_Errno=0 -Last_SQL_Error - +include/check_slave_no_error.inc reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; @@ -91,18 +81,15 @@ load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fie terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +include/wait_for_slave_sql_to_stop.inc drop table t1, t2; +include/stop_slave_io.inc drop table t1, t2; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' DROP TABLE IF EXISTS 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; +include/rpl_reset.inc drop database if exists b48297_db1; drop database if exists b42897_db2; create database b48297_db1; @@ -123,15 +110,10 @@ LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### disconnect and switch back to master connection use b48297_db1; -Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1 +include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; @@ -143,3 +125,4 @@ Field 3 'Field 4' 'Field 5' 'Field 6' Field 6 'Field 7' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result index 9acc1ad93ac..a81813de19f 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result @@ -1,14 +1,9 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,10); LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1; ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Fatal error: Not enough memory -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1593] +Last_SQL_Error = 'Fatal error: Not enough memory' DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_loaddata_m.result index a1294d515fa..ad9fb6e0896 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_m.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_m.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest; USE test; CREATE TABLE t1(a INT, b INT, UNIQUE(b)); @@ -37,3 +33,4 @@ COUNT(*) 2 DROP DATABASE mysqltest; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_map.result b/mysql-test/suite/rpl/r/rpl_loaddata_map.result index 91624b15ef8..ca6271012dc 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_map.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_map.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Create a big file ==== ==== Load our big file into a table ==== create table t2 (id int not null primary key auto_increment); @@ -29,3 +25,4 @@ count(*) ==== Clean up ==== [on master] drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_s.result b/mysql-test/suite/rpl/r/rpl_loaddata_s.result index 779a3af9631..351c5b584c5 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_s.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_s.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] reset master; create table test.t1(a int, b int, unique(b)); load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; @@ -13,3 +9,4 @@ count(*) show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info drop table test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result index 5e3923616ed..24a1a35470d 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (word CHAR(20) NOT NULL); LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; SELECT * FROM t1 ORDER BY word; @@ -151,3 +147,4 @@ Abernathy aberrant aberration drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result b/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result index c7806f5ecce..c3b3c2232a6 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_symlink.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a) ); load data infile '../../std_data/rpl_loaddata.dat' into table t1; select * from t1; @@ -15,3 +11,4 @@ a b 1 10 2 15 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result index 6dccaa3d74c..37936871993 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1(a int); select * into outfile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; truncate table t1; @@ -82,3 +78,4 @@ LOAD DATA LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO TABLE t1; DROP TABLE t1; SET SESSION sql_mode=@old_mode; [slave] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loadfile.result b/mysql-test/suite/rpl/r/rpl_loadfile.result index 22f65c0b5e5..640d1f72bf5 100644 --- a/mysql-test/suite/rpl/r/rpl_loadfile.result +++ b/mysql-test/suite/rpl/r/rpl_loadfile.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); @@ -225,11 +221,7 @@ aberration DROP PROCEDURE IF EXISTS test.p1; DROP TABLE test.t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc SELECT repeat('x',20) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_39701.data'; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (t text); @@ -240,6 +232,7 @@ END| include/stop_slave.inc CALL p('MYSQLTEST_VARDIR/tmp/bug_39701.data'); include/start_slave.inc -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; DROP PROCEDURE p; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_locale.result b/mysql-test/suite/rpl/r/rpl_locale.result index b7396084663..1f6bd40cd16 100644 --- a/mysql-test/suite/rpl/r/rpl_locale.result +++ b/mysql-test/suite/rpl/r/rpl_locale.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (s1 char(10)); set lc_time_names= 'de_DE'; insert into t1 values (date_format('2001-01-01','%W')); @@ -18,3 +14,4 @@ s1 Montag Monday drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result index d9f02f6e82f..91d307008f0 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -1,19 +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; +include/master-slave.inc +[connection master] call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # include/stop_slave.inc change master to master_log_pos=MASTER_LOG_POS; -Read_Master_Log_Pos 75 +Read_Master_Log_Pos = '75' start slave; -Last_IO_Error = Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master' -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'' +include/stop_slave_sql.inc show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # @@ -30,3 +27,4 @@ n 3 drop table t1; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result index 9061abca477..23238d9c97b 100644 --- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result +++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result @@ -1,21 +1,18 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] FLUSH LOGS; CREATE TABLE t1(c1 INT); FLUSH LOGS; call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log'); -Last_IO_Error -Got fatal error 1236 from master when reading data from binary log: 'could not find next log' +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log'' CREATE TABLE t2(c1 INT); FLUSH LOGS; CREATE TABLE t3(c1 INT); FLUSH LOGS; CREATE TABLE t4(c1 INT); START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc SHOW TABLES; Tables_in_test t1 @@ -23,3 +20,4 @@ t2 t3 t4 DROP TABLE t1, t2, t3, t4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_many_optimize.result b/mysql-test/suite/rpl/r/rpl_many_optimize.result index b2148892591..53be9b48c7b 100644 --- a/mysql-test/suite/rpl/r/rpl_many_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_many_optimize.result @@ -1,9 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2); drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result index edcae6e7506..bf4347757f7 100644 --- a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result +++ b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] select master_pos_wait('master-bin.999999',0,2); master_pos_wait('master-bin.999999',0,2) -1 @@ -22,3 +18,4 @@ show slave status; select master_pos_wait('foo', 98); master_pos_wait('foo', 98) NULL +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result index 6d69235927e..c8f294a7558 100644 --- a/mysql-test/suite/rpl/r/rpl_misc_functions.result +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); create table t1(id int, i int, r1 int, r2 int, p varchar(100)); insert into t1 values(1, connection_id(), 0, 0, ""); @@ -54,3 +50,4 @@ DROP TABLE t1, t1_slave; DROP PROCEDURE test_replication_sp1; DROP PROCEDURE test_replication_sp2; DROP FUNCTION test_replication_sf; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result b/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result index f1b0b2ae5cb..2b5b31201cb 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; CREATE TABLE t1 (`bit_key` bit, `bit` bit, key (`bit_key` )) ENGINE=MyISAM; CREATE TABLE t2 (`bit_key` bit(4), `bit` bit, key (`bit_key` )) ENGINE=MyISAM; @@ -30,3 +26,4 @@ DELETE FROM `t7` WHERE `bit` < 2 LIMIT 4; INSERT INTO `t8` ( `bit` ) VALUES ( 0 ); DELETE FROM `t8` WHERE `bit` < 2 LIMIT 4; DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result index 08d3241c48f..b378276133e 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (n int auto_increment primary key); set insert_id = 2000; insert into t1 values (NULL),(NULL),(NULL); @@ -44,3 +40,4 @@ t5 CREATE TABLE `t5` ( `created` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2,t3,t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete.result b/mysql-test/suite/rpl/r/rpl_multi_delete.result index 4831502eb88..ea1d87a3960 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_delete.result +++ b/mysql-test/suite/rpl/r/rpl_multi_delete.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int primary key); create table t2 (a int); insert into t1 values (1); @@ -20,3 +16,4 @@ select * from t2; a 1 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete2.result b/mysql-test/suite/rpl/r/rpl_multi_delete2.result index 87abe60b268..51112345a1d 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_delete2.result +++ b/mysql-test/suite/rpl/r/rpl_multi_delete2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set sql_log_bin=0; create database mysqltest_from; set sql_log_bin=1; @@ -42,3 +38,4 @@ set sql_log_bin=0; drop database mysqltest_from; set sql_log_bin=1; drop database mysqltest_to; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_engine.result b/mysql-test/suite/rpl/r/rpl_multi_engine.result index e26777c15ce..7815fa88c93 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_engine.result +++ b/mysql-test/suite/rpl/r/rpl_multi_engine.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t1; CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT @@ -360,3 +356,4 @@ id hex(b1) vc bc d f total y t select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; id hex(b1) vc bc d f total y t DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update.result b/mysql-test/suite/rpl/r/rpl_multi_update.result index 524278be042..8634e86afed 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, b int unsigned @@ -25,3 +21,4 @@ a b 2 1 UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; drop table t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update2.result b/mysql-test/suite/rpl/r/rpl_multi_update2.result index 5bb262764fa..a3cab693322 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update2.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t1,t2; CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, @@ -53,3 +49,4 @@ select * from t1; a 3 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update3.result b/mysql-test/suite/rpl/r/rpl_multi_update3.result index dba7f770ba2..6b9ec5c3947 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update3.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update3.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] -------- Test for BUG#9361 -------- CREATE TABLE t1 ( @@ -195,3 +191,4 @@ idpro price nbprice 2 1.0000 2 3 2.0000 1 DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_multi_update4.result b/mysql-test/suite/rpl/r/rpl_multi_update4.result index f6dde65a35d..0c4857bed60 100644 --- a/mysql-test/suite/rpl/r/rpl_multi_update4.result +++ b/mysql-test/suite/rpl/r/rpl_multi_update4.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists d1; drop database if exists d2; drop database if exists d2; @@ -23,3 +19,4 @@ id 0 drop database d1; drop database d2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result b/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result index 09a9121d22c..5187cb0344d 100644 --- a/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result +++ b/mysql-test/suite/rpl/r/rpl_mysql_upgrade.result @@ -1,13 +1,11 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`; CREATE DATABASE `#mysql50#mysqltest-1`; Master position is not changed STOP SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_stop.inc Master position has been changed DROP DATABASE `mysqltest-1`; DROP DATABASE `#mysql50#mysqltest-1`; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_name_const.result b/mysql-test/suite/rpl/r/rpl_name_const.result index acb2684d2c8..89a48bad09b 100644 --- a/mysql-test/suite/rpl/r/rpl_name_const.result +++ b/mysql-test/suite/rpl/r/rpl_name_const.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Initialize ==== [on master] create table t1 (id int); @@ -26,3 +22,4 @@ id [on master] drop table t1; drop procedure test_procedure; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result index 3b9b741e040..0b5673a383c 100644 --- a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result +++ b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); CREATE TABLE t1 (a VARCHAR(1000)); INSERT INTO t1 VALUES (CONNECTION_ID()); @@ -23,5 +19,6 @@ INSERT INTO t1 VALUES (UTC_TIMESTAMP()); INSERT INTO t1 VALUES (RAND()); INSERT INTO t1 VALUES (LAST_INSERT_ID()); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc 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 b09fbab905a..1eaeaba05bb 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET SQL_LOG_BIN= 0; CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, `c` INT DEFAULT NULL, @@ -45,8 +41,8 @@ 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 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] TABLES t2 and t3 must be different. SELECT * FROM t3 ORDER BY a; a b @@ -80,7 +76,7 @@ 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 +include/diff_tables.inc [master:t1, slave:t1] ************* CLEANING ************* DROP TABLE t1; DROP TABLE t2; @@ -122,7 +118,7 @@ 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 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ################################################################################ # NULL ---> NOT NULL (STRICT MODE) @@ -200,3 +196,4 @@ a b c DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +include/rpl_end.inc 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 09611dc6480..ec17e3bfafa 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET SQL_LOG_BIN= 0; CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, `c` INT DEFAULT NULL, @@ -45,8 +41,8 @@ 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 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] TABLES t2 and t3 must be different. SELECT * FROM t3 ORDER BY a; a b @@ -80,7 +76,7 @@ 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 +include/diff_tables.inc [master:t1, slave:t1] ************* CLEANING ************* DROP TABLE t1; DROP TABLE t2; @@ -122,7 +118,7 @@ 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 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ################################################################################ # NULL ---> NOT NULL (STRICT MODE) @@ -200,3 +196,4 @@ a b c DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_optimize.result b/mysql-test/suite/rpl/r/rpl_optimize.result index 1ae94a3ca36..9c0304ae3a4 100644 --- a/mysql-test/suite/rpl/r/rpl_optimize.result +++ b/mysql-test/suite/rpl/r/rpl_optimize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); create table t1 (a int not null auto_increment primary key, b int, key(b)); INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); @@ -26,3 +22,4 @@ optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result index 1ec9259a1fb..9239a718504 100644 --- a/mysql-test/suite/rpl/r/rpl_packet.result +++ b/mysql-test/suite/rpl/r/rpl_packet.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] call mtr.add_suppression("Slave I/O: Got a packet bigger than 'max_allowed_packet' bytes, Error_code: 1153"); call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log:"); drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; @@ -33,22 +29,15 @@ include/stop_slave.inc include/start_slave.inc CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); -Slave_IO_Running = No (expect No) -SELECT "Got a packet bigger than 'max_allowed_packet' bytes" AS Last_IO_Error; -Last_IO_Error -Got a packet bigger than 'max_allowed_packet' bytes -stop slave; -drop table if exists t1,t2,t3,t4,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/wait_for_slave_io_error.inc [errno=1153] +Last_IO_Error = 'Got a packet bigger than 'max_allowed_packet' bytes' +include/stop_slave_sql.inc +include/rpl_reset.inc +DROP TABLE t1; CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM; INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet)); -Slave_IO_Running = No (expect No) -SELECT "Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'" AS Last_IO_Error; -Last_IO_Error -Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master' +include/wait_for_slave_io_error.inc [errno=1236] +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'' STOP SLAVE; RESET SLAVE; RESET MASTER; @@ -62,3 +51,5 @@ DROP TABLE t1; SET @@global.max_allowed_packet= 1024; SET @@global.net_buffer_length= 1024; DROP TABLE t1; +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_plugin_load.result b/mysql-test/suite/rpl/r/rpl_plugin_load.result index 43e171a97c9..b33e29ef668 100644 --- a/mysql-test/suite/rpl/r/rpl_plugin_load.result +++ b/mysql-test/suite/rpl/r/rpl_plugin_load.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] Verify that example engine is not installed. SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS @@ -33,4 +29,5 @@ Delta Verify that example engine is not installed. SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +include/rpl_end.inc End of test diff --git a/mysql-test/suite/rpl/r/rpl_ps.result b/mysql-test/suite/rpl/r/rpl_ps.result index 89e822b3eb6..6e110227782 100644 --- a/mysql-test/suite/rpl/r/rpl_ps.result +++ b/mysql-test/suite/rpl/r/rpl_ps.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t1; create table t1(n char(30)); prepare stmt1 from 'insert into t1 values (?)'; @@ -33,49 +29,22 @@ stop slave; # statement breaks binlog. # ######################################################################## - # Connection: slave - - START SLAVE; - # Connection: master - - CREATE DATABASE mysqltest1; CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32)); - PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)'; - EXECUTE stmt_d_1; - use mysqltest1; - EXECUTE stmt_d_1; - - # Connection: slave - - SELECT * FROM t1; db_name db_col_name test latin1_swedish_ci test latin1_swedish_ci - # Connection: master - - DROP DATABASE mysqltest1; - use test; DROP TABLE t1; - - -# Connection: slave - - -STOP SLAVE; - -######################################################################## -reset master; -reset slave; +include/rpl_end.inc 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 6bb9b139057..e5d722a841f 100644 --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET @old_binlog_format= @@global.binlog_format; SET BINLOG_FORMAT=MIXED; SET GLOBAL BINLOG_FORMAT=MIXED; @@ -33,3 +29,4 @@ slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT DROP TABLE IF EXISTS t1; SET @@global.binlog_format= @old_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_read_only.result b/mysql-test/suite/rpl/r/rpl_read_only.result index 6b1404b4f68..37bdc09a8c0 100644 --- a/mysql-test/suite/rpl/r/rpl_read_only.result +++ b/mysql-test/suite/rpl/r/rpl_read_only.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create user test; create table t1(a int) engine=InnoDB; create table t2(a int) engine=MyISAM; @@ -114,3 +110,4 @@ drop user test; drop table t1; drop table t2; set global read_only=0; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result index 54aac2eca35..4f10ac50f9a 100644 --- a/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SHOW VARIABLES LIKE 'relay_log_space_limit'; Variable_name Value relay_log_space_limit 0 @@ -23,3 +19,4 @@ Andy 31 00000001 Jacob 2 00000002 Caleb 1 00000003 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result index e8d2d63e46e..4c1a50b2f33 100644 --- a/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SHOW VARIABLES LIKE 'relay_log_space_limit'; Variable_name Value relay_log_space_limit 0 @@ -23,3 +19,4 @@ Andy 31 00000001 Jacob 2 00000002 Caleb 1 00000003 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relayrotate.result b/mysql-test/suite/rpl/r/rpl_relayrotate.result index 20f19973d83..ea00aee0085 100644 --- a/mysql-test/suite/rpl/r/rpl_relayrotate.result +++ b/mysql-test/suite/rpl/r/rpl_relayrotate.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] stop slave; create table t1 (a int) engine=innodb; reset slave; @@ -14,3 +10,4 @@ select max(a) from t1; max(a) 8000 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_relayspace.result b/mysql-test/suite/rpl/r/rpl_relayspace.result index 1f2a739d3e3..f12f177ff7c 100644 --- a/mysql-test/suite/rpl/r/rpl_relayspace.result +++ b/mysql-test/suite/rpl/r/rpl_relayspace.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] stop slave; create table t1 (a int); drop table t1; @@ -11,9 +7,11 @@ create table t1 (a int); drop table t1; reset slave; start slave io_thread; +include/wait_for_slave_param.inc [Slave_IO_State] stop slave io_thread; reset slave; start slave; select master_pos_wait('master-bin.001',200,6)=-1; master_pos_wait('master-bin.001',200,6)=-1 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result index 637047a883b..6f85fc15b1e 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_do.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t11; drop table if exists t11; create table t2 (n int); @@ -26,7 +22,7 @@ n select * from t11; ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; -Replicate_Do_Table test.t1 +Replicate_Do_Table = 'test.t1' create table t1 (ts timestamp); set one_shot time_zone='met'; insert into t1 values('2005-08-12 00:00:00'); @@ -73,3 +69,4 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie *** master *** drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result index 0135804c02d..f0c46b0b966 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest1; drop database if exists mysqltest2; create database mysqltest1; @@ -21,3 +17,4 @@ a 1 drop database mysqltest1; drop database mysqltest2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_report.result b/mysql-test/suite/rpl/r/rpl_report.result index e129d7c8f22..b979d1faf5d 100644 --- a/mysql-test/suite/rpl/r/rpl_report.result +++ b/mysql-test/suite/rpl/r/rpl_report.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_host'; VARIABLE_NAME VARIABLE_VALUE REPORT_HOST 127.0.0.1 @@ -31,3 +27,4 @@ Value my_password set @@global.report_host='my.new.address.net'; ERROR HY000: Variable 'report_host' is a read only variable end of tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result index dae72d83b51..12071faecfd 100644 --- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result +++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -219,3 +215,4 @@ DROP DATABASE database_slave_temp_01; DROP DATABASE database_slave_temp_02; DROP DATABASE database_slave_temp_03; SET sql_log_bin= 1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result index b50c7cebcab..e41f56c0a71 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -1,5 +1,3 @@ -drop table if exists t1, t2, t3, t4; -drop table if exists t1, t2, t3, t4; start slave; Got one of the listed errors start slave; @@ -14,9 +12,9 @@ create temporary table temp_table (a char(80) not null); insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); -Master_Log_File master-bin.000001 -Relay_Master_Log_File master-bin.000001 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000001' +Relay_Master_Log_File = 'master-bin.000001' +include/check_slave_is_running.inc select * from t1; s Could not break slave @@ -38,8 +36,7 @@ drop table temp_table, t3; insert into t2 values(1234); set insert_id=1234; insert into t2 values(NULL); -set global sql_slave_skip_counter=1; -start slave; +include/wait_for_slave_sql_error_and_skip.inc [errno=1062] purge master logs to 'master-bin.000002'; show master logs; Log_name master-bin.000002 @@ -57,9 +54,9 @@ show binary logs; Log_name File_size master-bin.000003 # insert into t2 values (65); -Master_Log_File master-bin.000003 -Relay_Master_Log_File master-bin.000003 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000003' +Relay_Master_Log_File = 'master-bin.000003' +include/check_slave_is_running.inc select * from t2; m 34 @@ -85,9 +82,9 @@ master-bin.000005 # select * from t4; a testing temporary tables part 2 -Master_Log_File master-bin.000005 -Relay_Master_Log_File master-bin.000005 -Checking that both slave threads are running. +Master_Log_File = 'master-bin.000005' +Relay_Master_Log_File = 'master-bin.000005' +include/check_slave_is_running.inc lock tables t3 read; select count(*) from t3 where n >= 4; count(*) @@ -102,3 +99,5 @@ show binlog events in ''; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log purge master logs before now(); End of 5.0 tests +include/stop_slave.inc +CHANGE MASTER TO MASTER_HOST = ''; diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result index 0d682eb82e1..b5f6aea9698 100644 --- a/mysql-test/suite/rpl/r/rpl_row_001.result +++ b/mysql-test/suite/rpl/r/rpl_row_001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (word CHAR(20) NOT NULL); LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; @@ -53,3 +49,4 @@ SELECT n FROM t1; n 3456 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_4_bytes.result b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result index e2431364ed3..ef9602204a1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_4_bytes.result +++ b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -25,3 +21,4 @@ ABE ANG LIL DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_NOW.result b/mysql-test/suite/rpl/r/rpl_row_NOW.result index 23f95878608..eb6271d6e93 100644 --- a/mysql-test/suite/rpl/r/rpl_row_NOW.result +++ b/mysql-test/suite/rpl/r/rpl_row_NOW.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create database if not exists mysqltest1; DROP TABLE IF EXISTS mysqltest1.t1; CREATE TABLE mysqltest1.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, @@ -27,3 +23,4 @@ INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); DROP TABLE IF EXISTS mysqltest1.t1; DROP FUNCTION mysqltest1.f1; DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_USER.result b/mysql-test/suite/rpl/r/rpl_row_USER.result index 98755fb4653..5298395da20 100644 --- a/mysql-test/suite/rpl/r/rpl_row_USER.result +++ b/mysql-test/suite/rpl/r/rpl_row_USER.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP DATABASE IF EXISTS mysqltest1; CREATE DATABASE mysqltest1; CREATE USER tester IDENTIFIED BY 'test'; @@ -36,3 +32,4 @@ REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; DROP USER tester@'%'; DROP USER ''@'localhost%'; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_UUID.result b/mysql-test/suite/rpl/r/rpl_row_UUID.result index 02174a7ecae..b7d3f8914e0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_UUID.result +++ b/mysql-test/suite/rpl/r/rpl_row_UUID.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=myisam; @@ -38,3 +34,4 @@ DROP PROCEDURE test.p1; DROP FUNCTION test.fn1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc 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 458ae53e79c..d769b0b0881 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE DATABASE test_ignore; **** On Master **** SHOW DATABASES; @@ -46,11 +42,10 @@ t1 USE test_ignore; ERROR 42000: Unknown database 'test_ignore' DROP DATABASE test_ignore; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +USE test; +DROP TABLE t1; +USE test; +include/rpl_reset.inc CREATE TABLE t1 (a INT); DELETE FROM t1; INSERT INTO t1 VALUES (1),(2); @@ -65,11 +60,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT DROP TABLE t1; ================ Test for BUG#17620 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc **** On Slave **** SET GLOBAL QUERY_CACHE_SIZE=0; **** On Master **** @@ -103,12 +94,9 @@ a 8 9 SET GLOBAL QUERY_CACHE_SIZE=0; +DROP TABLE t1; ================ Test for BUG#22550 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; INSERT INTO t1 VALUES(1,2); SELECT HEX(a),b FROM t1; @@ -126,11 +114,7 @@ HEX(a) b 0 2 DROP TABLE IF EXISTS t1; ================ Test for BUG#22583 ================ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc **** On Master **** CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM; CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB; @@ -247,13 +231,8 @@ a b 3 1 4 4 drop table t1,t2; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc **** On Master **** -SET SESSION BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave')); INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave'); **** On Slave **** @@ -277,6 +256,6 @@ SELECT * FROM t1 ORDER BY a; a b 2 master,slave 5 slave -DROP TABLE t1; **** On Master **** DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result index a247c3a6039..7afc70bfa5c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'MYISAM' ; SELECT * FROM t1; C1 C2 @@ -422,11 +418,7 @@ a b c **** Test for BUG#31552 **** **** On Master **** DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); **** On Master **** @@ -436,7 +428,7 @@ DELETE FROM t1; SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 set @@global.slave_exec_mode= default; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 **** Test for BUG#37076 **** @@ -478,50 +470,44 @@ j INT NOT NULL) ENGINE = 'MYISAM' ; [expecting slave to replicate correctly] INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] [expecting slave to replicate correctly] INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] [expecting slave to stop] INSERT INTO t3 VALUES (1, "", 1); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] [expecting slave to stop] INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to stop] INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] drop table t1, t2, t3, t4, t5, t6, t7; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='MYISAM' ; INSERT INTO t1 VALUES (1), (2), (3); UPDATE t1 SET a = 10; ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( @@ -575,7 +561,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY' DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; *** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1, t2; EOF OF TESTS CREATE TABLE t1 (a int) ENGINE='MYISAM' ; @@ -591,7 +577,7 @@ UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; CREATE TABLE t1 (a bit) ENGINE='MYISAM' ; INSERT IGNORE INTO t1 VALUES (NULL); @@ -633,5 +619,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result index fefe8e969dc..b8620894bd1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'INNODB' ; SELECT * FROM t1; C1 C2 @@ -422,11 +418,7 @@ a b c **** Test for BUG#31552 **** **** On Master **** DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); **** On Master **** @@ -436,7 +428,7 @@ DELETE FROM t1; SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 set @@global.slave_exec_mode= default; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 **** Test for BUG#37076 **** @@ -478,50 +470,44 @@ j INT NOT NULL) ENGINE = 'INNODB' ; [expecting slave to replicate correctly] INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] [expecting slave to replicate correctly] INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] [expecting slave to stop] INSERT INTO t3 VALUES (1, "", 1); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] [expecting slave to stop] INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to stop] INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] drop table t1, t2, t3, t4, t5, t6, t7; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='INNODB' ; INSERT INTO t1 VALUES (1), (2), (3); UPDATE t1 SET a = 10; ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( @@ -575,7 +561,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY' DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; *** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1, t2; EOF OF TESTS CREATE TABLE t1 (a int) ENGINE='INNODB' ; @@ -591,7 +577,7 @@ UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; CREATE TABLE t1 (a bit) ENGINE='INNODB' ; INSERT IGNORE INTO t1 VALUES (NULL); @@ -633,5 +619,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result index 3443e704031..c7241c52353 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; SET @@BINLOG_FORMAT = ROW; SELECT @@BINLOG_FORMAT; @@ -717,3 +713,4 @@ COUNT(*) 4 DELETE FROM t1; DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result index 055efffbd6a..4fb33dc4b6b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; ***** Table Create Section **** @@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result index 055efffbd6a..4fb33dc4b6b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; ***** Table Create Section **** @@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result index 417bc65641a..49753d2b25c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_colSize.result +++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; **** Testing WL#3228 changes. **** *** Create "wider" table on slave *** @@ -18,7 +14,8 @@ CREATE TABLE t1 (a DECIMAL(20, 10)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -34,7 +31,8 @@ CREATE TABLE t1 (a DECIMAL(27, 18)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -50,7 +48,8 @@ CREATE TABLE t1 (a NUMERIC(20, 10)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -67,7 +66,8 @@ CREATE TABLE t1 (a FLOAT(47)); RESET MASTER; INSERT INTO t1 VALUES (901251.90125); START SLAVE; -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4 +include/wait_for_slave_sql_error.inc [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' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -84,7 +84,8 @@ CREATE TABLE t1 (a BIT(64)); RESET MASTER; INSERT INTO t1 VALUES (B'10101'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -100,7 +101,8 @@ CREATE TABLE t1 (a BIT(12)); RESET MASTER; INSERT INTO t1 VALUES (B'10101'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -117,7 +119,8 @@ CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9')); RESET MASTER; INSERT INTO t1 VALUES ('4'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -134,7 +137,8 @@ CREATE TABLE t1 (a CHAR(20)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -182,7 +186,8 @@ CREATE TABLE t1 (a ENUM( RESET MASTER; INSERT INTO t1 VALUES ('44'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -199,7 +204,8 @@ CREATE TABLE t1 (a VARCHAR(2000)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -215,7 +221,8 @@ CREATE TABLE t1 (a VARCHAR(200)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -231,7 +238,8 @@ CREATE TABLE t1 (a VARCHAR(2000)); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -248,7 +256,8 @@ CREATE TABLE t1 (a LONGBLOB); RESET MASTER; INSERT INTO t1 VALUES ('This is a test.'); START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -258,3 +267,4 @@ RESET MASTER; START SLAVE; *** Cleanup *** DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_conflicts.result b/mysql-test/suite/rpl/r/rpl_row_conflicts.result index 0f15bfc7156..d8fbab98191 100644 --- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result +++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*"); [on slave] SET @old_slave_exec_mode= @@global.slave_exec_mode; @@ -24,6 +20,7 @@ a 1 [on slave] ---- Wait until slave stops with an error ---- +include/wait_for_slave_sql_error.inc [errno=1062] 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) SELECT * FROM t1; a @@ -31,6 +28,7 @@ a ---- Resolve the conflict on the slave and restart SQL thread ---- DELETE FROM t1 WHERE a = 1; START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = '' (expected no error) SELECT * FROM t1; @@ -50,12 +48,15 @@ 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) +include/wait_for_slave_sql_error.inc [errno=1032] +Last_SQL_Error (expected "duplicate key" 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 END_LOG_POS SELECT * FROM t1; a ---- Resolve the conflict on the slave and restart SQL thread ---- INSERT INTO t1 VALUES (1); START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = (expected no error) SELECT * FROM t1; @@ -64,6 +65,7 @@ a [on master] DROP TABLE t1; [on slave] +include/rpl_reset.inc ######## Run with slave_exec_mode=IDEMPOTENT ######## set @@global.slave_exec_mode= 'IDEMPOTENT'; ==== Initialize ==== @@ -107,3 +109,4 @@ a DROP TABLE t1; [on slave] SET @@global.slave_exec_mode= @old_slave_exec_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result index 90b68428008..4575588b1ef 100644 --- a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result +++ b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1(a int not null primary key) engine=myisam; insert delayed into t1 values (1); insert delayed into t1 values (2); @@ -20,3 +16,4 @@ a 2 3 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_drop.result b/mysql-test/suite/rpl/r/rpl_row_drop.result index 048e07271b3..963a001f70a 100644 --- a/mysql-test/suite/rpl/r/rpl_row_drop.result +++ b/mysql-test/suite/rpl/r/rpl_row_drop.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); @@ -53,3 +49,4 @@ t2 SHOW TABLES; Tables_in_test t2 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row.result b/mysql-test/suite/rpl/r/rpl_row_find_row.result index 69516b47b7d..fff1f1b0c35 100644 --- a/mysql-test/suite/rpl/r/rpl_row_find_row.result +++ b/mysql-test/suite/rpl/r/rpl_row_find_row.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET SQL_LOG_BIN=0; CREATE TABLE t (a int, b int, c int, key(b)); SET SQL_LOG_BIN=1; @@ -12,27 +8,18 @@ INSERT INTO t VALUES (1,2,4); INSERT INTO t VALUES (4,3,4); DELETE FROM t; DROP TABLE t; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t (a int, b int, c int, key(b)); ALTER TABLE t DISABLE KEYS; INSERT INTO t VALUES (1,2,4); INSERT INTO t VALUES (4,3,4); DELETE FROM t; DROP TABLE t; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2)); INSERT INTO t1(c1,c2) VALUES(1,1); INSERT INTO t1(c1,c2) VALUES(1,2); UPDATE t1 SET c1=1000 WHERE c2=2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc 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 61fee130d49..af44821a817 100644 --- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int); insert into t1 values (10); create table t2 (a int); @@ -21,10 +17,13 @@ flush tables; select * from t3; a stop slave; +include/wait_for_slave_to_stop.inc drop table t1; flush tables with read lock; start slave; +include/wait_for_slave_to_start.inc stop slave; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction unlock tables; drop table t3, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func001.result b/mysql-test/suite/rpl/r/rpl_row_func001.result index b20f3f724d0..74a053abb26 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func001.result +++ b/mysql-test/suite/rpl/r/rpl_row_func001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP FUNCTION test.f1; DROP TABLE IF EXISTS test.t1; create table test.t1 (a int, PRIMARY KEY(a)); @@ -28,3 +24,4 @@ a 2 DROP FUNCTION test.f1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func002.result b/mysql-test/suite/rpl/r/rpl_row_func002.result index 03f5b3115c3..69a732048b2 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func002.result +++ b/mysql-test/suite/rpl/r/rpl_row_func002.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP FUNCTION test.f1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -24,3 +20,4 @@ INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); DROP FUNCTION test.f1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_func003.result b/mysql-test/suite/rpl/r/rpl_row_func003.result index 94d01b50ce5..cdc5bf6afba 100644 --- a/mysql-test/suite/rpl/r/rpl_row_func003.result +++ b/mysql-test/suite/rpl/r/rpl_row_func003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); DROP FUNCTION IF EXISTS test.f1; DROP TABLE IF EXISTS test.t1; @@ -28,3 +24,4 @@ ROLLBACK; SET AUTOCOMMIT=1; DROP FUNCTION test.f1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result index 562e3dc2862..148840cc8c5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result +++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Setup table on master but not on slave ==== [on master] CREATE TABLE t1 (a INT); @@ -14,8 +10,10 @@ DROP TABLE t1; INSERT INTO t1 VALUES (1); ==== Verify error on slave ==== [on slave] -Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables +include/wait_for_slave_sql_error.inc [errno=1146] ==== Clean up ==== -include/stop_slave.inc +include/stop_slave_io.inc +RESET SLAVE; [on master] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result index 1551d83266d..b6fd074c766 100644 --- a/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result +++ b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set @old_global_binlog_format = @@global.binlog_format; set @@global.binlog_format = row; CREATE SCHEMA IF NOT EXISTS mysqlslap; @@ -60,3 +56,4 @@ a drop table t1; End of 5.0 tests set @@global.binlog_format = @old_global_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index 0f648539c47..b88634e2802 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] include/stop_slave.inc reset master; reset slave; @@ -240,18 +236,13 @@ slave-bin.000002 # Query # # BEGIN slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000002 # Query # # COMMIT -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -273,3 +264,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc 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 ff189e676cc..6e1eec2056a 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] include/stop_slave.inc reset master; reset slave; @@ -240,18 +236,13 @@ slave-bin.000002 # Query # # BEGIN slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000002 # Xid # # COMMIT /* XID */ -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -273,3 +264,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc 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 db06cb6d3de..871d3218b70 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 @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] stop slave; # # Generate a big enough master's binlog to cause relay log rotations @@ -21,7 +17,7 @@ select @@global.max_relay_log_size; @@global.max_relay_log_size 4096 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 2 # @@ -31,7 +27,7 @@ set global max_relay_log_size=(5*4096); select @@global.max_relay_log_size; @@global.max_relay_log_size 20480 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 3: max_relay_log_size = 0 # @@ -41,7 +37,7 @@ set global max_relay_log_size=0; select @@global.max_relay_log_size; @@global.max_relay_log_size 0 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -55,13 +51,13 @@ reset slave; start slave; flush logs; create table t1 (a int); -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # flush logs; drop table t1; -Checking that both slave threads are running. +include/check_slave_is_running.inc flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB @@ -70,3 +66,4 @@ set global max_binlog_size= @my_max_binlog_size; # # End of 4.1 tests # +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 538764da738..5fee82f6017 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ---Setup Section -- set timestamp=1000000000; @@ -380,3 +376,4 @@ a b 1 1 FLUSH LOGS; DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result index c461cafbd7c..d9ebb52493b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result @@ -1,46 +1,28 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ## case #1 - last_null_bit_pos==0 in record_compare without X bit -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit ## (1 column less and no varchar) -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #2 - X bit is wrongly set. -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=InnoDB DEFAULT CHARSET= latin1; INSERT INTO t1(c1) VALUES (10); INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result index 38fbe486d2e..e9ffcc927be 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result @@ -1,60 +1,37 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] ## case #1 - last_null_bit_pos==0 in record_compare without X bit -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit ## (1 column less and no varchar) -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE t1 SET c5 = 'a'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## case #2 - X bit is wrongly set. -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=MyISAM DEFAULT CHARSET= latin1; INSERT INTO t1(c1) VALUES (10); INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; ## coverage purposes - Field_bits ## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0 -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1(c1,c2) VALUES (10, b'1'); INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); UPDATE t1 SET c1= 0; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc 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 7bf09df31ca..be4bc630e3f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -1,21 +1,17 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -Master_User root -Master_Host 127.0.0.1 +include/master-slave.inc +[connection master] +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc change master to master_user='test'; -Master_User test -Master_Host 127.0.0.1 +Master_User = 'test' +Master_Host = '127.0.0.1' reset slave; -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/start_slave.inc -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc reset slave; include/start_slave.inc @@ -28,13 +24,19 @@ Variable_name Value Slave_open_temp_tables 0 include/stop_slave.inc reset slave; +include/check_slave_no_error.inc change master to master_user='impossible_user_name'; start slave; -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc change master to master_user='root'; include/start_slave.inc +include/check_slave_no_error.inc include/stop_slave.inc change master to master_user='impossible_user_name'; start slave; -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc reset slave; +include/check_slave_no_error.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp001.result b/mysql-test/suite/rpl/r/rpl_row_sp001.result index 8c26c061376..17117ce2fac 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp001.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] --------------------------------------------- @@ -83,3 +79,4 @@ DROP PROCEDURE test.p1; DROP PROCEDURE test.p2; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result index a42c9af988c..f368cf6e356 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result @@ -1,15 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; +include/master-slave.inc +[connection master] CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=INNODB; CREATE TABLE test.t2 (a INT AUTO_INCREMENT KEY, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON DELETE CASCADE) ENGINE=INNODB; create procedure test.p1(IN i CHAR(6)) @@ -231,9 +221,10 @@ a t 98 NONE SET AUTOCOMMIT=1; SET FOREIGN_KEY_CHECKS=0; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; +DROP PROCEDURE test.p3; +DROP PROCEDURE test.p1; +DROP PROCEDURE test.p2; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp003.result b/mysql-test/suite/rpl/r/rpl_row_sp003.result index df3e2a7ceed..5650af7a916 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp003.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; @@ -47,3 +43,4 @@ a DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp005.result b/mysql-test/suite/rpl/r/rpl_row_sp005.result index 01e1970e0df..df877233e94 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp005.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp005.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t2; @@ -98,3 +94,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc 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 6792a701577..da196bb3615 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP PROCEDURE IF EXISTS p1; @@ -42,3 +38,4 @@ DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; DROP PROCEDURE p2; +include/rpl_end.inc 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..fc49f968b4a 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result @@ -1,11 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; +include/master-slave.inc +[connection master] CREATE PROCEDURE test.p1(IN i INT) BEGIN DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END; @@ -46,5 +40,6 @@ num SELECT * FROM test.t1; num 13 -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; +DROP PROCEDURE test.p1; +DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp008.result b/mysql-test/suite/rpl/r/rpl_row_sp008.result index 23197964a24..f817e9c5f1b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp008.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp008.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t2; CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)); @@ -32,3 +28,4 @@ a DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp009.result b/mysql-test/suite/rpl/r/rpl_row_sp009.result index 35ce0d7b420..8e9a2cbb8e9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp009.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp009.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -75,3 +71,4 @@ a DROP PROCEDURE test.p1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp010.result b/mysql-test/suite/rpl/r/rpl_row_sp010.result index 02567465428..d31f37d8411 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp010.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp010.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -54,3 +50,4 @@ DROP PROCEDURE IF EXISTS test.p3; DROP PROCEDURE IF EXISTS test.p4; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp011.result b/mysql-test/suite/rpl/r/rpl_row_sp011.result index e35c9f21adb..8588d739dff 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp011.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp011.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -67,3 +63,4 @@ DROP PROCEDURE IF EXISTS test.p6; DROP PROCEDURE IF EXISTS test.p7; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_sp012.result b/mysql-test/suite/rpl/r/rpl_row_sp012.result index b9c818bad9a..57d92386638 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp012.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp012.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP PROCEDURE IF EXISTS test.p3; @@ -57,3 +53,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP USER user1@localhost; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result index 1934b01505c..09a3e4b73de 100644 --- a/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result +++ b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result @@ -1,17 +1,14 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1 (words varchar(20)) engine=myisam; load data infile '../../std_data/words.dat' into table t1 (words); select count(*) from t1; count(*) 70 +include/wait_for_slave_sql_to_stop.inc select count(*) from t1; count(*) 70 drop table t1; -include/stop_slave.inc drop table t1; +include/rpl_end.inc 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 2b83bffd85f..5a29acfda1d 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] STOP SLAVE; SET @my_sql_mode= @@global.sql_mode; SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; @@ -118,27 +114,21 @@ a b SELECT * FROM t2; a 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t9 VALUES (4); INSERT INTO t4 VALUES (4); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4' INSERT INTO t9 VALUES (5); INSERT INTO t5 VALUES (5,10,25); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4' INSERT INTO t9 VALUES (6); INSERT INTO t6 VALUES (6,12,36); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4' INSERT INTO t9 VALUES (6); -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; @@ -194,3 +184,4 @@ a b x y z DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; SET @@global.sql_mode= @my_sql_mode; +include/rpl_end.inc 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 a42530c354d..f6620ecf05f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] STOP SLAVE; SET @my_sql_mode= @@global.sql_mode; SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; @@ -118,27 +114,21 @@ a b SELECT * FROM t2; a 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t9 VALUES (4); INSERT INTO t4 VALUES (4); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4' INSERT INTO t9 VALUES (5); INSERT INTO t5 VALUES (5,10,25); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4' INSERT INTO t9 VALUES (6); INSERT INTO t6 VALUES (6,12,36); ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4' INSERT INTO t9 VALUES (6); -Checking that both slave threads are running. +include/check_slave_is_running.inc INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; @@ -194,3 +184,4 @@ a b x y z DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; SET @@global.sql_mode= @my_sql_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result index 711d0d063aa..eaee105a2d9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result +++ b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS `t1`; ### TABLE with field_metadata_size == 290 CREATE TABLE `t1` ( @@ -159,15 +155,10 @@ LOCK TABLES `t1` WRITE; INSERT INTO `t1`(c2) VALUES ('1'); FLUSH LOGS; ### assertion: the slave replicated event successfully and tables match -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE `t1`; === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail. -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc ### action: generating several tables with different metadata ### sizes (resorting to perl) ### testing table with 249 field metadata size. @@ -182,25 +173,26 @@ start slave; ### testing table with 258 field metadata size. FLUSH LOGS; ### assertion: the slave replicated event successfully and tables match for t10 -Comparing tables master:test.t10 and slave:test.t10 +include/diff_tables.inc [master:t10, slave:t10] ### assertion: the slave replicated event successfully and tables match for t9 -Comparing tables master:test.t9 and slave:test.t9 +include/diff_tables.inc [master:t9, slave:t9] ### assertion: the slave replicated event successfully and tables match for t8 -Comparing tables master:test.t8 and slave:test.t8 +include/diff_tables.inc [master:t8, slave:t8] ### assertion: the slave replicated event successfully and tables match for t7 -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] ### assertion: the slave replicated event successfully and tables match for t6 -Comparing tables master:test.t6 and slave:test.t6 +include/diff_tables.inc [master:t6, slave:t6] ### assertion: the slave replicated event successfully and tables match for t5 -Comparing tables master:test.t5 and slave:test.t5 +include/diff_tables.inc [master:t5, slave:t5] ### assertion: the slave replicated event successfully and tables match for t4 -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] ### assertion: the slave replicated event successfully and tables match for t3 -Comparing tables master:test.t3 and slave:test.t3 +include/diff_tables.inc [master:t3, slave:t3] ### assertion: the slave replicated event successfully and tables match for t2 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] ### assertion: the slave replicated event successfully and tables match for t1 -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ### assertion: check that binlog is not corrupt. Using mysqlbinlog to ### detect failure. Before the patch mysqlbinlog would find ### a corrupted event, thence would fail. +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig001.result b/mysql-test/suite/rpl/r/rpl_row_trig001.result index ea0ef27fccd..d00da976d30 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig001.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n)); CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n)); @@ -29,3 +25,4 @@ DROP TRIGGER test.t3_bi_t2; DROP TABLE test.t1; DROP TABLE test.t2; DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig002.result b/mysql-test/suite/rpl/r/rpl_row_trig002.result index 794104db750..b0be0316bf2 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig002.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig002.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TRIGGER test.t2_ai; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -67,3 +63,4 @@ DROP TRIGGER test.t2_ai; DROP TABLE test.t1; DROP TABLE test.t2; DROP TABLE test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig003.result b/mysql-test/suite/rpl/r/rpl_row_trig003.result index 43c2ecde2b4..68552ede1c0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig003.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TRIGGER test.t1_bi; DROP TRIGGER test.t2_ai; DROP TRIGGER test.t1_bu; @@ -81,3 +77,4 @@ DROP TRIGGER test.t2_ad; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trig004.result b/mysql-test/suite/rpl/r/rpl_row_trig004.result index d0d0657f875..50317b55e2e 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trig004.result +++ b/mysql-test/suite/rpl/r/rpl_row_trig004.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TRIGGER test.t1_bi_t2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -28,3 +24,4 @@ n f DROP TRIGGER test.t1_bi_t2; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result b/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result index f9181be9bc0..d3b892326ac 100644 --- a/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result +++ b/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TEMPORARY TABLE t1(c1 INTEGER); CREATE TABLE t2(c1 INTEGER); CREATE TABLE t1(c1 INTEGER); @@ -27,3 +23,4 @@ SELECT * FROM t2; c1 DROP TABLE t1; DROP TABLE t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result b/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result index 800670b78ae..b9ae1893629 100644 --- a/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result +++ b/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (a INT); CREATE TABLE t2 (a INT, b INT); INSERT INTO t1 SELECT 1; @@ -20,3 +16,4 @@ b 1 3 DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result index 81aeb0d645b..5629f5c8cdd 100644 --- a/mysql-test/suite/rpl/r/rpl_row_until.result +++ b/mysql-test/suite/rpl/r/rpl_row_until.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); INSERT INTO t1 VALUES (1),(2),(3),(4); DROP TABLE t1; @@ -14,27 +10,37 @@ DROP TABLE t2; include/stop_slave.inc RESET SLAVE; START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_drop_t1 +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2 +include/wait_for_slave_sql_to_stop.inc SELECT * FROM t2; n 1 2 +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE; +include/wait_for_slave_to_start.inc include/stop_slave.inc START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2 +include/wait_for_slave_param.inc [Until_Log_Pos] +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=MASTER_LOG_POS; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS, RELAY_LOG_POS=RELAY_LOG_POS; @@ -49,3 +55,6 @@ START SLAVE; START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; Warnings: Note 1254 Slave is already running +include/stop_slave.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_view01.result b/mysql-test/suite/rpl/r/rpl_row_view01.result index 4dfe5826f32..471de20ea6d 100644 --- a/mysql-test/suite/rpl/r/rpl_row_view01.result +++ b/mysql-test/suite/rpl/r/rpl_row_view01.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create database if not exists mysqltest1; DROP VIEW IF EXISTS mysqltest1.v1; DROP VIEW IF EXISTS mysqltest1.v2; @@ -102,3 +98,4 @@ DROP TABLE IF EXISTS mysqltest1.t2; DROP TABLE IF EXISTS mysqltest1.t4; DROP TABLE IF EXISTS mysqltest1.t10; DROP DATABASE mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_wide_table.result b/mysql-test/suite/rpl/r/rpl_row_wide_table.result index da96e84d1d5..f469a13837c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_wide_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_wide_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t300; create table t300 ( f1 int, @@ -316,3 +312,4 @@ one 1 *** Cleanup *** DROP TABLE t300; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_server_id.result b/mysql-test/suite/rpl/r/rpl_server_id.result deleted file mode 100644 index 1e74394c122..00000000000 --- a/mysql-test/suite/rpl/r/rpl_server_id.result +++ /dev/null @@ -1,34 +0,0 @@ -set global server_id=1; -reset master; -drop table if exists t1,t2,t3; -create table t1 (a int); -select @@server_id; -@@server_id -1 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3 -master-bin.000001 # Query 1 # use `test`; create table t1 (a int) -set global server_id=2; -create table t2 (b int); -select @@server_id; -@@server_id -2 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3 -master-bin.000001 # Query 1 # use `test`; create table t1 (a int) -master-bin.000001 # Query 2 # use `test`; create table t2 (b int) -set global server_id=3; -create table t3 (c int); -select @@server_id; -@@server_id -3 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3 -master-bin.000001 # Query 1 # use `test`; create table t1 (a int) -master-bin.000001 # Query 2 # use `test`; create table t2 (b int) -master-bin.000001 # Query 3 # use `test`; create table t3 (c int) -set global server_id=1; -drop table t1,t2,t3; diff --git a/mysql-test/suite/rpl/r/rpl_server_id1.result b/mysql-test/suite/rpl/r/rpl_server_id1.result index 76f187e3b01..80e5bbae146 100644 --- a/mysql-test/suite/rpl/r/rpl_server_id1.result +++ b/mysql-test/suite/rpl/r/rpl_server_id1.result @@ -1,13 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -reset master; -include/stop_slave.inc -change master to master_port=SLAVE_PORT; -start slave; -*** must be having the replicate-same-server-id IO thread error *** -Slave_IO_Errno= 1593 -Slave_IO_Error= Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). +include/rpl_init.inc [topology=2->2] +START SLAVE; +include/wait_for_slave_io_error.inc [errno=1593] +Last_IO_Error = 'Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).' +include/stop_slave_sql.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_server_id2.result b/mysql-test/suite/rpl/r/rpl_server_id2.result index bb5a175fbfe..dacb69bc7cb 100644 --- a/mysql-test/suite/rpl/r/rpl_server_id2.result +++ b/mysql-test/suite/rpl/r/rpl_server_id2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (n int); reset master; stop slave; @@ -21,6 +17,8 @@ create table t1(n int); create table t2(n int); change master to master_port=MASTER_PORT; start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc *** checking until postion execution: must be only t1 in the list *** show tables; Tables_in_test @@ -28,3 +26,4 @@ t1 start slave sql_thread; drop table t1; drop table t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_session_var.result b/mysql-test/suite/rpl/r/rpl_session_var.result index 297a18a5931..030ae161b22 100644 --- a/mysql-test/suite/rpl/r/rpl_session_var.result +++ b/mysql-test/suite/rpl/r/rpl_session_var.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t1; Warnings: Note 1051 Unknown table 't1' @@ -51,3 +47,4 @@ SELECT length(data) < 100 FROM t1; length(data) < 100 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_charset.result b/mysql-test/suite/rpl/r/rpl_set_charset.result index 480d926fbba..fa30a361d13 100644 --- a/mysql-test/suite/rpl/r/rpl_set_charset.result +++ b/mysql-test/suite/rpl/r/rpl_set_charset.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1 /*!40100 character set latin2 */; use mysqltest1; @@ -46,3 +42,4 @@ D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 drop database mysqltest1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result index 41600a5fe1b..f099b2b7691 100644 --- a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result @@ -1,35 +1,22 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] +include/rpl_reset.inc CREATE TABLE t1 (c1 BIT, c2 INT) Engine=InnoDB; INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] 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; +include/rpl_reset.inc CREATE TABLE t1 (c1 CHAR) Engine=InnoDB; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; SELECT * FROM t1; c1 w UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result index cbd7010664a..5698be4ff0c 100644 --- a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result @@ -1,35 +1,22 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] +include/rpl_reset.inc CREATE TABLE t1 (c1 BIT, c2 INT) Engine=MyISAM; INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] 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; +include/rpl_reset.inc CREATE TABLE t1 (c1 CHAR) Engine=MyISAM; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; SELECT * FROM t1; c1 w UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sf.result b/mysql-test/suite/rpl/r/rpl_sf.result deleted file mode 100644 index 085ba1ebb8a..00000000000 --- a/mysql-test/suite/rpl/r/rpl_sf.result +++ /dev/null @@ -1,68 +0,0 @@ -set global log_bin_trust_function_creators=0; -set binlog_format=STATEMENT; -create function fn16456() -returns int -begin -return unix_timestamp(); -end| -ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) -set global log_bin_trust_function_creators=1; -create function fn16456() -returns int -begin -return unix_timestamp(); -end| -set global log_bin_trust_function_creators=0; -set binlog_format=ROW; -select fn16456(); -fn16456() -timestamp -set binlog_format=STATEMENT; -select fn16456(); -ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) -drop function fn16456; -set global log_bin_trust_function_creators=0; -create function fn16456() -returns int deterministic -begin -return unix_timestamp(); -end| -set binlog_format=ROW; -select fn16456(); -fn16456() -timestamp -set binlog_format=STATEMENT; -select fn16456(); -fn16456() -timestamp -drop function fn16456; -set global log_bin_trust_function_creators=0; -create function fn16456() -returns int no sql -begin -return unix_timestamp(); -end| -set binlog_format=ROW; -select fn16456(); -fn16456() -timestamp -set binlog_format=STATEMENT; -select fn16456(); -fn16456() -timestamp -drop function fn16456; -set global log_bin_trust_function_creators=0; -create function fn16456() -returns int reads sql data -begin -return unix_timestamp(); -end| -set binlog_format=ROW; -select fn16456(); -fn16456() -timestamp -set binlog_format=STATEMENT; -select fn16456(); -fn16456() -timestamp -drop function fn16456; diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_running.result b/mysql-test/suite/rpl/r/rpl_show_slave_running.result index 598762d5188..66958c67428 100644 --- a/mysql-test/suite/rpl/r/rpl_show_slave_running.result +++ b/mysql-test/suite/rpl/r/rpl_show_slave_running.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET DEBUG_SYNC= 'RESET'; include/stop_slave.inc set global debug= 'd,dbug.before_get_running_status_yes'; @@ -21,6 +17,7 @@ Slave_running OFF Slave_IO_Running= No Slave_SQL_Running= No SET DEBUG_SYNC='now SIGNAL signal.io_thread_let_running'; +include/wait_for_slave_param.inc [Slave_IO_Running] Slave_running, Slave_IO_Running, Slave_SQL_Running must be OFF YES NO in three following queries SHOW STATUS LIKE 'Slave_running'; Variable_name Value @@ -28,6 +25,7 @@ Slave_running OFF Slave_IO_Running= Yes Slave_SQL_Running= No start slave sql_thread; +include/wait_for_slave_sql_to_start.inc Slave_running, Slave_IO_Running, Slave_SQL_Running must be ON, YES, YES in three following queries SHOW STATUS LIKE 'Slave_running'; Variable_name Value @@ -37,3 +35,4 @@ Slave_SQL_Running= Yes set global debug= ''; SET DEBUG_SYNC= 'RESET'; End of tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result index 0aa8069a38c..d46338fd5b0 100644 --- a/mysql-test/suite/rpl/r/rpl_skip_error.result +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Test Without sql_mode=strict_trans_tables ==== [on master] create table t1 (n int not null primary key); @@ -31,7 +27,7 @@ n 3 7 8 -Checking that both slave threads are running. +include/check_slave_is_running.inc ==== Clean Up ==== drop table t1; create table t1(a int primary key); @@ -46,7 +42,7 @@ select * from t1; a 1 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc ==== Clean Up ==== drop table t1; ==== Using Innodb ==== @@ -112,3 +108,4 @@ UPDATE t2 SET id= id + 3, data = 2; ==== Clean Up ==== DROP TABLE t1; DROP TABLE t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result index eb3c4ef5978..25deb65fa0f 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result +++ b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] *** Preparing data *** CREATE TABLE t1 (a INT NOT NULL, b VARCHAR(10)) ENGINE=MyISAM; @@ -33,6 +29,7 @@ a b SELECT * FROM t3 ORDER BY a; a b 1 ZZ +include/wait_for_slave_sql_error.inc [errno=1146] SHOW TABLES LIKE 't%'; Tables_in_test (t%) t1 @@ -44,7 +41,7 @@ a b SELECT * FROM t2 ORDER BY a; a b 1 AA_for_row_or_YY_for_stmt_mixed -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc TRUNCATE t1; @@ -60,6 +57,7 @@ INSERT INTO t3 VALUES(2, 'B'); INSERT INTO t2 VALUES(2, 'B'); INSERT INTO t1 VALUES(2, 'B'); UPDATE t1 SET b = 'X' WHERE a = 2; +include/wait_for_slave_sql_error.inc [errno=1146] SELECT * FROM t1 ORDER BY a; a b 2 X @@ -78,7 +76,7 @@ SELECT * FROM t1 ORDER BY a; a b SELECT * FROM t2 ORDER BY a; a b -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc TRUNCATE t1; @@ -95,6 +93,7 @@ INSERT INTO t1 VALUES (3, 'C'), (4, 'D'); INSERT INTO t2 VALUES (3, 'C'), (4, 'D'); INSERT INTO t3 VALUES (3, 'C'), (4, 'D'); COMMIT; +include/wait_for_slave_sql_error.inc [errno=1146] SELECT * FROM t1 ORDER BY a; a b 3 C @@ -116,8 +115,9 @@ SELECT * FROM t1 ORDER BY a; a b SELECT * FROM t2 ORDER BY a; a b -include/stop_slave.inc +include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; include/start_slave.inc *** Clean up *** DROP TABLE t1,t2,t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_in.result b/mysql-test/suite/rpl/r/rpl_slave_load_in.result index 2cc83fd0a19..504f6f60d9e 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_in.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_in.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a)); create table t2(a int not null auto_increment, b int, primary key(a)) engine=innodb; load data infile '../../std_data/rpl_loaddata.dat' into table t1; @@ -13,7 +9,8 @@ insert into t2(b) values (2); load data infile '../../std_data/rpl_loaddata.dat' into table t2; load data infile '../../std_data/rpl_loaddata.dat' into table t2; commit; -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:t2, slave:t2] drop table t1; drop table t2; +include/rpl_end.inc 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 c3c4f7c015a..213ab06f0c1 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 @@ -1,15 +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; +include/master-slave.inc +[connection master] create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb; start transaction; insert into t1(b) values (1); insert into t1(b) values (2); load data infile '../../std_data/rpl_loaddata.dat' into table t1; commit; +include/wait_for_slave_sql_error.inc [errno=9] drop table t1; +include/sync_slave_io_with_master.inc +include/stop_slave_io.inc +RESET SLAVE; drop table t1; call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3"); +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result b/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result index 3ed14a9cb6b..8cd6218dcdc 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result @@ -1,6 +1,7 @@ -CHANGE MASTER TO MASTER_USER='root', -MASTER_CONNECT_RETRY=1, -MASTER_HOST='127.0.0.1', -MASTER_PORT=MASTER_MYPORT; +include/master-slave.inc +[connection master] START SLAVE; -12 +include/wait_for_slave_sql_error.inc [errno=12] +include/stop_slave_io.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index a4067fb7983..e5fe33aed19 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] **** On Slave **** STOP SLAVE; **** On Master **** @@ -43,6 +39,9 @@ c d 3 18 **** On Slave **** START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] +include/check_slave_no_error.inc SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; SELECT * FROM t1; @@ -66,6 +65,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # User var # # @`foo`=12 master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@foo, 2*@foo) START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; +include/wait_for_slave_sql_to_stop.inc SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; **** On Master **** @@ -279,3 +279,4 @@ include/start_slave.inc SELECT * FROM t10 ORDER BY a; a b DROP TABLE t10; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_status.result b/mysql-test/suite/rpl/r/rpl_slave_status.result index a98a81dc74f..cbd71002c04 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_status.result +++ b/mysql-test/suite/rpl/r/rpl_slave_status.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Create new replication user ==== [on master] GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl'; @@ -27,9 +23,11 @@ FLUSH PRIVILEGES; ==== Restart slave without privileges ===== include/stop_slave.inc START SLAVE; -==== Verify that Slave_IO_Running = No ==== -Slave_IO_Running = No (should be No) +include/wait_for_slave_sql_to_start.inc +==== Verify that Slave IO thread stopped with error ==== +include/wait_for_slave_io_error.inc [errno=1045] ==== Cleanup (Note that slave IO thread is not running) ==== -DROP TABLE t1; +include/rpl_reset.inc [on master] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slow_query_log.result b/mysql-test/suite/rpl/r/rpl_slow_query_log.result index a4479f0c544..46da59a583d 100644 --- a/mysql-test/suite/rpl/r/rpl_slow_query_log.result +++ b/mysql-test/suite/rpl/r/rpl_slow_query_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT"); include/stop_slave.inc SET @old_log_output= @@log_output; @@ -46,12 +42,7 @@ include/stop_slave.inc SET GLOBAL long_query_time= @old_long_query_time; SET GLOBAL log_output= @old_log_output; include/start_slave.inc -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc SET @old_log_output= @@log_output; SET GLOBAL log_output= 'TABLE'; SET GLOBAL long_query_time= 2; @@ -89,3 +80,4 @@ SET @@global.long_query_time= @old_long_query_time; DROP TABLE t1; SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 8f06653f8ab..fc9c05ebc81 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -989,3 +985,4 @@ drop procedure ` mysqltestbug36570_p2`; drop function mysqltestbug36570_f1; End of 5.0 tests End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp004.result b/mysql-test/suite/rpl/r/rpl_sp004.result index 1c0ed3cc50a..5b67d225490 100644 --- a/mysql-test/suite/rpl/r/rpl_sp004.result +++ b/mysql-test/suite/rpl/r/rpl_sp004.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t2; @@ -91,3 +87,4 @@ DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result index d9cdfd81167..a6e3ae03963 100644 --- a/mysql-test/suite/rpl/r/rpl_sp_effects.result +++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators; drop procedure if exists p1; drop procedure if exists p2; @@ -278,3 +274,4 @@ drop procedure sp_bug26199; drop function sf_bug26199; SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators; end of the tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_sporadic_master.result b/mysql-test/suite/rpl/r/rpl_sporadic_master.result index 14fb673a081..e8278bf3744 100644 --- a/mysql-test/suite/rpl/r/rpl_sporadic_master.result +++ b/mysql-test/suite/rpl/r/rpl_sporadic_master.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t2(n int); create table t1(n int not null auto_increment primary key); insert into t1 values (NULL),(NULL); @@ -24,3 +20,4 @@ n 14 15 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ssl.result b/mysql-test/suite/rpl/r/rpl_ssl.result index 1af4c5e227c..35aaabc8c56 100644 --- a/mysql-test/suite/rpl/r/rpl_ssl.result +++ b/mysql-test/suite/rpl/r/rpl_ssl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int auto_increment, KEY(t)); stop slave; @@ -19,23 +15,32 @@ insert into t1 values(1); select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File 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 -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = '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/check_slave_is_running.inc STOP SLAVE; select * from t1; t 1 insert into t1 values (NULL); -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File 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 -Checking that both slave threads are running. +include/wait_for_slave_to_start.inc +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = '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/check_slave_is_running.inc drop user replssl@localhost; drop table t1; +include/stop_slave.inc +CHANGE MASTER TO +master_user = 'root', +master_ssl = 0, +master_ssl_ca = '', +master_ssl_cert = '', +master_ssl_key = ''; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_ssl1.result b/mysql-test/suite/rpl/r/rpl_ssl1.result index 5b4aa126c77..5e1614f5aac 100644 --- a/mysql-test/suite/rpl/r/rpl_ssl1.result +++ b/mysql-test/suite/rpl/r/rpl_ssl1.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int); stop slave; @@ -18,23 +14,23 @@ start slave; select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File 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 -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = '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/check_slave_is_running.inc stop slave; change master to master_user='root',master_password='', master_ssl=0; start slave; drop user replssl@localhost; drop table t1; -Master_SSL_Allowed No -Master_SSL_CA_Path -Master_SSL_CA_File 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 -Checking that both slave threads are running. +Master_SSL_Allowed = 'No' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = '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/check_slave_is_running.inc stop slave; change master to master_host="localhost", @@ -50,10 +46,19 @@ on slave select * from t1; t 1 -Master_SSL_Allowed Yes -Master_SSL_CA_Path -Master_SSL_CA_File 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 -Checking that both slave threads are running. +Master_SSL_Allowed = 'Yes' +Master_SSL_CA_Path = '' +Master_SSL_CA_File = '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/check_slave_is_running.inc drop table t1; +include/stop_slave.inc +CHANGE MASTER TO +master_host="127.0.0.1", +master_ssl_ca ='', +master_ssl_cert='', +master_ssl_key='', +master_ssl_verify_server_cert=0, +master_ssl=0; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result index e2b1935c268..ee667771ef0 100644 --- a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result @@ -1,14 +1,11 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] create table t1(n int); stop slave; start slave; stop slave io_thread; start slave io_thread; +include/wait_for_slave_to_start.inc drop table t1; create table t1i(n int primary key) engine=innodb; create table t2m(n int primary key) engine=myisam; @@ -28,6 +25,7 @@ zero 0 stop slave; rollback; +include/wait_for_slave_to_stop.inc *** sql thread is *not* running: No *** *** the prove: the stopped slave has finished the current transaction *** five @@ -38,3 +36,4 @@ one 1 include/start_slave.inc drop table t1i, t2m; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index c2a24cbaa82..d4290331b8c 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_000001.result +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression("Statement may not be safe to log in statement format."); create table t1 (word char(20) not null); load data infile '../../std_data/words.dat' into table t1; @@ -52,8 +48,7 @@ select (@id := id) - id from t2; kill @id; drop table t2; Got one of the listed errors -set global sql_slave_skip_counter=1; -start slave; +include/wait_for_slave_sql_error_and_skip.inc [errno=1053] select count(*) from t1; count(*) 5000 @@ -81,3 +76,4 @@ select_priv user Y blafasel2 drop table t1; delete from mysql.user where user="blafasel2"; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result index 4bbbc0e99c6..0e83f1dfb67 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result +++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int, unique(a)) engine=myisam; set sql_log_bin=0; insert into t1 values(2); @@ -11,6 +7,10 @@ set sql_log_bin=1; insert into t1 values(1),(2); ERROR 23000: Duplicate entry '2' for key 'a' drop table t1; +include/wait_for_slave_sql_to_stop.inc Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) Errno: "0" (expected 0) drop table t1; +include/stop_slave.inc +RESET SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result b/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result index 2f6e98d5eec..2b974d0d98c 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result +++ b/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1, t2; DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; @@ -167,3 +163,4 @@ DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result b/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result index 818e383e2f1..8fdac1a5c97 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result +++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_direct.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set @@session.binlog_direct_non_transactional_updates= TRUE; ######################################################################### # CONFIGURATION @@ -1358,3 +1354,4 @@ master-bin.000001 # Query # # ROLLBACK ################################################################################### # CLEAN ################################################################################### +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_conflicts.result b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result index b0df9516b7c..b56297a5487 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_conflicts.result +++ b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE t1(a INT PRIMARY KEY); @@ -19,6 +15,7 @@ a 1 [on slave] ---- Wait until slave stops with an error ---- +include/wait_for_slave_sql_error.inc [errno=1062] Last_SQL_Error = Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)' (expected "duplicate key" error) SELECT * FROM t1; a @@ -26,6 +23,7 @@ a ---- Resolve the conflict on the slave and restart SQL thread ---- DELETE FROM t1 WHERE a = 1; START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc ---- Sync slave and verify that there is no error ---- Last_SQL_Error = '' (expected no error) SELECT * FROM t1; @@ -52,3 +50,4 @@ a [on master] DROP TABLE t1; [on slave] +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result index 9ae1ef315b6..d833852e193 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_stm_create_if_not_exists.result @@ -1,12 +1,8 @@ # WL#5370 Keep forward-compatibility when changing 'CREATE TABLE IF NOT # EXISTS ... SELECT' behaviour # -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t2(c1 INT, c2 char(10)); @@ -21,7 +17,7 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY) SELECT 'abc' AS c3, 1 AS c4 -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # The statement should be binlogged as two events. one is # 'CREATE TABLE IF NOT EXISTS ..', another one is @@ -44,7 +40,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 2 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Verify if it can be binlogged with right database name when the table # is not in the default database @@ -68,7 +64,7 @@ master-bin.000001 # Query # # use `db1`; CREATE TABLE IF NOT EXISTS `test`.`t1` ) master-bin.000001 # Query # # use `db1`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 20 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:test.t1,slave:test.t1] USE test; DROP DATABASE db1; @@ -91,7 +87,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; REPLACE INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 2 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # It should be binlogged as 'INSERT IGNORE... SELECT' # if the original statement has option IGNORE @@ -112,7 +108,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 2 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Nothing should be binlogged if error happens and no any row is inserted @@ -121,7 +117,7 @@ SELECT '123', 2; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Verify it can binlog well when there are some braces('(') @@ -169,7 +165,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO `test`.`t1` (`c3`,`c4`) (SELECT '123', 3) UNION (SELECT '123', 4) master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # Throw a warning that table already exists and don't insert anything @@ -215,7 +211,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', NAME_CONST('a',600) master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] DROP PROCEDURE p1; # The statement can be binlogged correctly when it is in a prepared statement @@ -251,7 +247,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT '123', 800 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] # The statement can be binlogged correctly when it is in a conditional comment @@ -362,7 +358,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t1` ( ) master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SELECT 'abc', 905 master-bin.000001 # Query # # COMMIT -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1,slave:t1] DROP TABLE t2; DROP TABLE t1; @@ -702,3 +698,4 @@ master-bin.000001 # Query # # use `test`; INSERT INTO `test`.`t1` (`c3`,`c4`) SE master-bin.000001 # Query # # COMMIT DROP TABLE t2; DROP TEMPORARY TABLE t1; +include/rpl_end.inc 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 61fee130d49..af44821a817 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int); insert into t1 values (10); create table t2 (a int); @@ -21,10 +17,13 @@ flush tables; select * from t3; a stop slave; +include/wait_for_slave_to_stop.inc drop table t1; flush tables with read lock; start slave; +include/wait_for_slave_to_start.inc stop slave; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction unlock tables; drop table t3, t4, t5; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result index 1bed2058687..b309096fbc0 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result +++ b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set @old_global_binlog_format = @@global.binlog_format; set @@global.binlog_format = statement; CREATE SCHEMA IF NOT EXISTS mysqlslap; @@ -128,3 +124,4 @@ FLUSH LOGS; FLUSH LOGS; End of 5.0 tests set @@global.binlog_format = @old_global_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_loadfile.result b/mysql-test/suite/rpl/r/rpl_stm_loadfile.result index ca76695f4d4..b49f44273ff 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_loadfile.result +++ b/mysql-test/suite/rpl/r/rpl_stm_loadfile.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); @@ -229,3 +225,4 @@ aberration DROP PROCEDURE IF EXISTS test.p1; DROP TABLE test.t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index d73a689969f..4eeec6584fd 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] include/stop_slave.inc reset master; reset slave; @@ -222,18 +218,13 @@ 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`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Query # # use `test`; insert into t2 values (1) -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -252,3 +243,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc 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 db06cb6d3de..871d3218b70 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 @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] stop slave; # # Generate a big enough master's binlog to cause relay log rotations @@ -21,7 +17,7 @@ select @@global.max_relay_log_size; @@global.max_relay_log_size 4096 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 2 # @@ -31,7 +27,7 @@ set global max_relay_log_size=(5*4096); select @@global.max_relay_log_size; @@global.max_relay_log_size 20480 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 3: max_relay_log_size = 0 # @@ -41,7 +37,7 @@ set global max_relay_log_size=0; select @@global.max_relay_log_size; @@global.max_relay_log_size 0 start slave; -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -55,13 +51,13 @@ reset slave; start slave; flush logs; create table t1 (a int); -Checking that both slave threads are running. +include/check_slave_is_running.inc # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # flush logs; drop table t1; -Checking that both slave threads are running. +include/check_slave_is_running.inc flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB @@ -70,3 +66,4 @@ set global max_binlog_size= @my_max_binlog_size; # # End of 4.1 tests # +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result index 2ecaf2c90ae..ee4c710ecd2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ################################################################################### # CONFIGURATION ################################################################################### @@ -868,12 +864,7 @@ DROP TABLE nt_4; DROP PROCEDURE pc_i_tt_3; DROP FUNCTION f1; DROP FUNCTION f2; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE `t1` ( `c1` int(10) unsigned NOT NULL AUTO_INCREMENT, `c2` tinyint(1) unsigned DEFAULT NULL, @@ -887,5 +878,6 @@ INSERT INTO t1 (c1,c2,c3,c4,c5) VALUES (1, 1, 'X', 1, NULL); COMMIT; ROLLBACK; SET AUTOCOMMIT=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE `t1`; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_multi_query.result b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result index 625c686f383..0b4d179f385 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_multi_query.result +++ b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result @@ -1,10 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop database if exists mysqltest; +include/master-slave.inc +[connection master] create database mysqltest; create table mysqltest.t1 ( n int); insert into mysqltest.t1 values(1)/ @@ -21,7 +16,6 @@ n 5 show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest master-bin.000001 # Query # # create database mysqltest master-bin.000001 # Query # # use `test`; create table mysqltest.t1 ( n int) master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(1) @@ -30,3 +24,4 @@ master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(3) master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(4) master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(5) drop database mysqltest; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_no_op.result b/mysql-test/suite/rpl/r/rpl_stm_no_op.result index 5a253d61fcb..cf5b03cdfa6 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_no_op.result +++ b/mysql-test/suite/rpl/r/rpl_stm_no_op.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create database mysqltest; drop database if exists mysqltest; Warnings: @@ -50,3 +46,4 @@ a b select * from t2; a b drop table t1, t2; +include/rpl_end.inc 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 1fc189975ef..c263e27a11f 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -1,21 +1,17 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -Master_User root -Master_Host 127.0.0.1 +include/master-slave.inc +[connection master] +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc change master to master_user='test'; -Master_User test -Master_Host 127.0.0.1 +Master_User = 'test' +Master_Host = '127.0.0.1' reset slave; -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/start_slave.inc -Master_User root -Master_Host 127.0.0.1 +Master_User = 'root' +Master_Host = '127.0.0.1' include/stop_slave.inc reset slave; include/start_slave.inc @@ -28,13 +24,19 @@ Variable_name Value Slave_open_temp_tables 1 include/stop_slave.inc reset slave; +include/check_slave_no_error.inc change master to master_user='impossible_user_name'; start slave; -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc change master to master_user='root'; include/start_slave.inc +include/check_slave_no_error.inc include/stop_slave.inc change master to master_user='impossible_user_name'; start slave; -include/stop_slave.inc +include/wait_for_slave_io_error.inc [errno=1045] +include/stop_slave_sql.inc reset slave; +include/check_slave_no_error.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result b/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result index fd143fc8a50..fa5ac2a0c85 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result +++ b/mysql-test/suite/rpl/r/rpl_stm_sql_mode.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (pk integer auto_increment , primary key (pk)); SET SESSION SQL_MODE='traditional'; # **** [MASTER] ***** @@ -16,3 +12,4 @@ DROP TABLE t1; # assertion: sync slave with master makes slave not to stop with # duplicate key error (because it has received event # with expected error code). +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result index 118d31d78c8..a71746d7fba 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_until.result +++ b/mysql-test/suite/rpl/r/rpl_stm_until.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] [on slave] include/stop_slave.inc ==== Create some events on master ==== @@ -18,29 +14,41 @@ drop table t2; ==== Replicate one event at a time on slave ==== [on slave] start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t1; n 1 2 3 4 +include/check_slave_param.inc [Exec_Master_Log_Pos] start slave until master_log_file='master-no-such-bin.000001', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t1; n 1 2 3 4 -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS; +include/check_slave_param.inc [Exec_Master_Log_Pos] +start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=RELAY_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc select * from t2; n 1 2 +include/check_slave_param.inc [Exec_Master_Log_Pos] start slave; [on master] [on slave] include/stop_slave.inc start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_stop.inc +include/check_slave_param.inc [Exec_Master_Log_Pos] ==== Test various error conditions ==== start slave until master_log_file='master-bin', master_log_pos=MASTER_LOG_POS; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL @@ -75,6 +83,7 @@ select count(*) as two from t1; two 2 start slave until master_log_file='MASTER_LOG_FILE', master_log_pos= UNTIL_POS;; +include/wait_for_slave_sql_to_stop.inc slave stopped at the prescribed position select 0 as zero; zero @@ -84,23 +93,15 @@ one 1 drop table t1; start slave; -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' +include/rpl_reset.inc flush logs; stop slave; reset slave; start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */; +include/wait_for_slave_sql_to_stop.inc show tables /* t1 must exist */; Tables_in_test t1 drop table t1; stop slave; -reset slave; -reset master; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index 49146417ab7..2e9522e8947 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] # BUG#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends # @@ -41,10 +37,12 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # CREATE TEMPORARY TABLE with MyISAM engine # ----------------------------------------- @@ -66,10 +64,12 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # CREATE TEMPORARY TABLE ... SELECT with InnoDB engine # ---------------------------------------------------- @@ -92,10 +92,12 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # CREATE TEMPORARY TABLE ... SELECT with MyISAM engine # ---------------------------------------------------- @@ -118,10 +120,13 @@ SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] +include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] START SLAVE SQL_THREAD; +include/wait_for_slave_sql_to_start.inc # Test end SET GLOBAL debug= '$debug_save'; DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result index 7447d12f9b2..d4aae782221 100644 --- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result +++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop database if exists mysqltest1; create database mysqltest1; use mysqltest1; @@ -427,3 +423,4 @@ INSERT INTO t13 VALUES (CURRENT_USER()); INSERT INTO t13 VALUES (my_current_user()); drop database mysqltest1; set global binlog_format =@my_binlog_format; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temp_table.result b/mysql-test/suite/rpl/r/rpl_temp_table.result index e4ca31d8908..e7df070874a 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t2 (n int, PRIMARY KEY(n)); create temporary table t1 (n int); create temporary table t3 (n int not null); @@ -46,3 +42,4 @@ Slave_open_temp_tables 0 drop table if exists t1,t2; Warnings: Note 1051 Unknown table 't1' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result index 00cf238c712..116ae76dafe 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Initialize ==== [on master] CREATE TABLE t1 (a CHAR(48)); @@ -15,6 +11,7 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; Variable_name Value Slave_open_temp_tables 1 [on master] +[on master1] [on slave] ==== Verify results on slave ==== SHOW STATUS LIKE "Slave_open_temp_tables"; @@ -22,14 +19,10 @@ Variable_name Value Slave_open_temp_tables 0 ==== Clean up ==== [on master] +include/rpl_connect.inc [creating master] DROP TABLE t1; [on slave] -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc CREATE TABLE t1 (a int); CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) ); CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) ); @@ -110,6 +103,7 @@ 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 # Compare the base table. -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result index 87bf525aacc..0ce7fe37a34 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary.result +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Can\'t find record in \'user\' Error_code: 1032"); reset master; DROP TABLE IF EXISTS t1; @@ -129,6 +125,8 @@ select * from t1; a 1 drop table t1; +include/stop_slave.inc +include/rpl_reset.inc -- Bug#43748 -- make a user on the slave that can list but not kill system threads. FLUSH PRIVILEGES; @@ -140,5 +138,5 @@ KILL @id; Got one of the listed errors -- throw out test-user on slave. DROP USER user43748@127.0.0.1; --- done. back to master. End of 5.1 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result index 3ea31b8fc62..27843e1dcda 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result +++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] call mtr.add_suppression("Deadlock found"); **** On Master **** SET SESSION BINLOG_FORMAT=ROW; @@ -40,12 +36,9 @@ a b 2 2 3 3 4 4 -Checking that both slave threads are running. -DROP TABLE t1; +include/check_slave_is_running.inc **** On Master **** -SET SQL_LOG_BIN= 0; DROP TABLE t1; -SET SQL_LOG_BIN= 1; SET SESSION BINLOG_FORMAT=MIXED; CREATE TABLE t_myisam (id INT, PRIMARY KEY (id)) engine= MyIsam; INSERT INTO t_myisam (id) VALUES(1); @@ -101,3 +94,4 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(1) master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(1) master-bin.000001 # Query # # ROLLBACK DROP TABLE t_myisam, t_innodb; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_test_framework.result b/mysql-test/suite/rpl/r/rpl_test_framework.result new file mode 100644 index 00000000000..e45c12ba0ec --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_test_framework.result @@ -0,0 +1,170 @@ +==== Create t1 on all servers. ==== +include/rpl_init.inc [topology=1->2->3->4->5->6->7->8->9] +CREATE TABLE t1 (a INT); +include/rpl_end.inc +==== Test 3-server topologies ==== +include/rpl_init.inc [topology=1 -> 2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 12' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (1); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (1); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2 -> 3] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 23' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (2); +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (2); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=none] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= '' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (3); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2, 2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (4); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (4); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (5); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (5); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2->1->2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 212' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (6); +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (6); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->3] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 123' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (7); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=2->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 323 21' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (8); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2,2->3,3->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 23123' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (9); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 13213' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (10); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] +include/rpl_end.inc +==== Test 6-server topologies ==== +include/rpl_init.inc [topology=1->2->3->4->1->5->6] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 341234156' +[connection server_1] +DELETE FROM t1; +INSERT INTO t1 VALUES (11); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=3->4->5->6->3->1->2] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 4563456 312' +[connection server_4] +DELETE FROM t1; +INSERT INTO t1 VALUES (12); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=6->5->4->3->2->1] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 65 54 43 32 21' +[connection server_6] +DELETE FROM t1; +INSERT INTO t1 VALUES (13); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +include/rpl_init.inc [topology=1->2->3->1,4->5->6] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 456 23123' +[connection server_3] +DELETE FROM t1; +INSERT INTO t1 VALUES (14); +[connection server_4] +DELETE FROM t1; +INSERT INTO t1 VALUES (14); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] +include/rpl_end.inc +==== Test 9-server topology ==== +include/rpl_init.inc [topology=1->2, 2->3, 3->4, 4->5, 5->1, 1->6, 6->7, 6->8, 8->9] +include/rpl_generate_sync_chain.inc +rpl_sync_chain= ' 345123451689 67' +[connection server_2] +DELETE FROM t1; +INSERT INTO t1 VALUES (15); +include/rpl_sync.inc +include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1,server_7:t1,server_8:t1,server_9:t1] +include/rpl_end.inc +==== Clean up ==== +include/rpl_init.inc [topology=1->2->3->4->5->6->7->8->9] +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result index 0b5c03b5300..ce93c3030c0 100644 --- a/mysql-test/suite/rpl/r/rpl_timezone.result +++ b/mysql-test/suite/rpl/r/rpl_timezone.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set @my_time_zone= @@global.time_zone; set timestamp=100000000; create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); @@ -122,6 +118,7 @@ a b SET @@session.time_zone = default; DROP TABLE t1; SET @@session.time_zone = default; +include/stop_slave.inc reset master; CREATE TABLE t1 (date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, a int(11) default NULL); SET @@session.time_zone='+01:00'; @@ -141,4 +138,5 @@ date a 2008-12-23 19:39:39 2 DROP TABLE t1; SET @@session.time_zone = default; +include/rpl_end.inc End of 5.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result index 5729faa9659..682aa71d64c 100644 --- a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result +++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TEMPORARY TABLE t1 (a INT); CREATE TABLE t2 (a INT, b INT) ENGINE= MyISAM; INSERT INTO t1 VALUES (1); @@ -94,3 +90,4 @@ INSERT INTO t1 VALUES (1); DROP TABLE t2; INSERT INTO t1 VALUES (1); DROP TEMPORARY TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result index 86534fa8f7d..24795378177 100644 --- a/mysql-test/suite/rpl/r/rpl_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression("Statement may not be safe to log in statement format."); DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; @@ -863,8 +859,8 @@ drop table t21,t31; drop table t11; STOP SLAVE; FLUSH LOGS; ---> Stop master server ---> Start master server +include/rpl_stop_server.inc [server_number=1] +include/rpl_start_server.inc [server_number=1] --> Master binlog: Server ver: 5.0.16-debug-log, Binlog ver: 4 RESET SLAVE; START SLAVE; @@ -979,12 +975,7 @@ a b 2 b 3 c 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; +include/rpl_reset.inc create table t1 ( f int ) engine = innodb; create table log ( r int ) engine = myisam; create trigger tr @@ -995,6 +986,7 @@ insert into t1 values ( 1 ); rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -Comparing tables master:test.t1 and slave:test.t1 -Comparing tables master:test.log and slave:test.log +include/diff_tables.inc [master:t1, slave:t1] +include/diff_tables.inc [master:log, slave:log] drop table t1, log; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_trunc_temp.result b/mysql-test/suite/rpl/r/rpl_trunc_temp.result index 44624a38875..ae2c9973c9f 100644 --- a/mysql-test/suite/rpl/r/rpl_trunc_temp.result +++ b/mysql-test/suite/rpl/r/rpl_trunc_temp.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create temporary table t1 (n int); insert into t1 values(1); show status like 'Slave_open_temp_tables'; @@ -20,3 +16,4 @@ Slave_open_temp_tables 1 show status like 'Slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result index 38fb9e27764..da8db64cef4 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result @@ -1,20 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -22,19 +14,15 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=MyISAM; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** DELETE FROM t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -42,5 +30,6 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=MyISAM; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** DELETE FROM t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result index b5e5936834d..d8a4443022d 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result @@ -1,20 +1,12 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -22,19 +14,15 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=InnoDB; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** TRUNCATE TABLE t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; INSERT INTO t1 VALUES (1,1), (2,2); **** On Master **** DELETE FROM t1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] ==== Test using a table with delete triggers ==== **** On Master **** SET @count := 1; @@ -42,5 +30,6 @@ CREATE TABLE t2 (a INT, b LONG) ENGINE=InnoDB; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; **** On Master **** DELETE FROM t1; -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result b/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result index e3b8d6de12e..a5c55e43617 100644 --- a/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result @@ -1,15 +1,7 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/master-slave.inc +[connection master] CREATE TABLE t1(b1 BIT(1), b2 BIT(2), b3 BIT(3)) ENGINE=InnoDB; INSERT INTO t1 VALUES (b'0', b'01', b'101'); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_udf.result b/mysql-test/suite/rpl/r/rpl_udf.result index ccf16271d01..9f4c2b199ca 100644 --- a/mysql-test/suite/rpl/r/rpl_udf.result +++ b/mysql-test/suite/rpl/r/rpl_udf.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set binlog_format=row; drop table if exists t1; "*** Test 1) Test UDFs via loadable libraries *** @@ -316,3 +312,4 @@ affected rows: 0 "Running on the master" DROP TABLE t1; affected rows: 0 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_user.result b/mysql-test/suite/rpl/r/rpl_user.result index a98e7e9ca55..4ad87eb1ae7 100644 --- a/mysql-test/suite/rpl/r/rpl_user.result +++ b/mysql-test/suite/rpl/r/rpl_user.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] set session sql_log_bin=0; delete from mysql.user where Host='fakehost'; set session sql_log_bin=1; @@ -43,3 +39,4 @@ master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofo master-bin.000001 # Query # # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost' master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost' master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_user_variables.result b/mysql-test/suite/rpl/r/rpl_user_variables.result index 1f76eae3fce..e302ec0aceb 100644 --- a/mysql-test/suite/rpl/r/rpl_user_variables.result +++ b/mysql-test/suite/rpl/r/rpl_user_variables.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] reset master; create table t1(n char(30)); set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1; @@ -279,4 +275,4 @@ i DROP FUNCTION f1; DROP FUNCTION f2; DROP TABLE t1; -stop slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_variables.result b/mysql-test/suite/rpl/r/rpl_variables.result index b3108c75a6e..3724ff571b2 100644 --- a/mysql-test/suite/rpl/r/rpl_variables.result +++ b/mysql-test/suite/rpl/r/rpl_variables.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Initialization ==== [on master] SET @m_default_week_format= @@global.default_week_format; @@ -38,12 +34,7 @@ SET @@global.sql_mode = 'ALLOW_INVALID_DATES'; SET @@local.sql_mode = 'ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE'; SET @user_num = 10; SET @user_text = 'Alunda'; -[on master] -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc [on slave] SET @@global.init_slave = 'SELECT 1'; [on master] @@ -550,15 +541,7 @@ id truth num text 30 NULL 30 NULL 31 NULL NULL Bergsbrunna 32 NULL NULL Centrum -Comparing tables master:test.tstmt and master:test.tproc -Comparing tables master:test.tstmt and master:test.tfunc -Comparing tables master:test.tstmt and master:test.ttrig -Comparing tables master:test.tstmt and master:test.tprep -Comparing tables master:test.tstmt and slave:test.tstmt -Comparing tables master:test.tstmt and slave:test.tproc -Comparing tables master:test.tstmt and slave:test.tfunc -Comparing tables master:test.tstmt and slave:test.ttrig -Comparing tables master:test.tstmt and slave:test.tprep +include/diff_tables.inc [master:tstmt,tproc,tfunc,ttrig,tprep, slave:tstmt,tproc,tfunc,ttrig,tprep] ==== Clean up ==== [on master] DROP PROCEDURE proc; @@ -582,3 +565,4 @@ SET @@global.relay_log_purge= @s_relay_log_purge; SET @@global.slave_exec_mode= @s_slave_exec_mode; SET @@global.sql_mode= @s_sql_mode; SET @@global.sync_binlog= @s_sync_binlog; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_variables_stm.result b/mysql-test/suite/rpl/r/rpl_variables_stm.result index 51484187215..553a1710d77 100644 --- a/mysql-test/suite/rpl/r/rpl_variables_stm.result +++ b/mysql-test/suite/rpl/r/rpl_variables_stm.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ==== Initialization ==== [on master] SET @m_pseudo_thread_id= @@global.pseudo_thread_id; @@ -490,15 +486,7 @@ id num text 56 NULL 47124712 57 NULL 1616 58 NULL 1717 -Comparing tables master:test.tstmt and master:test.tproc -Comparing tables master:test.tstmt and master:test.tfunc -Comparing tables master:test.tstmt and master:test.ttrig -Comparing tables master:test.tstmt and master:test.tprep -Comparing tables master:test.tstmt and slave:test.tstmt -Comparing tables master:test.tstmt and slave:test.tproc -Comparing tables master:test.tstmt and slave:test.tfunc -Comparing tables master:test.tstmt and slave:test.ttrig -Comparing tables master:test.tstmt and slave:test.tprep +include/diff_tables.inc [master:tstmt,tproc,tfunc,ttrig,tprep, slave:tstmt,tproc,tfunc,ttrig,tprep] ==== Clean up ==== [on master] DROP PROCEDURE proc; @@ -524,3 +512,4 @@ SET @@global.collation_server= @s_collation_server; SET @@global.time_zone= @s_time_zone; SET @@global.lc_time_names= @s_lc_time_names; SET @@global.collation_database= @s_collation_database; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_view.result b/mysql-test/suite/rpl/r/rpl_view.result index b129223b6d2..307b88ff6f9 100644 --- a/mysql-test/suite/rpl/r/rpl_view.result +++ b/mysql-test/suite/rpl/r/rpl_view.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t1,v1; drop view if exists t1,v1; reset master; @@ -116,3 +112,4 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI DROP VIEW v1; DROP TABLE t1; End of 5.0 tests +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl000010-slave.opt b/mysql-test/suite/rpl/t/rpl000010-slave.opt deleted file mode 100644 index 0dbfb311e33..00000000000 --- a/mysql-test/suite/rpl/t/rpl000010-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---disconnect-slave-event-count=2 diff --git a/mysql-test/suite/rpl/t/rpl000010.test b/mysql-test/suite/rpl/t/rpl000010.test deleted file mode 100644 index 261b9148774..00000000000 --- a/mysql-test/suite/rpl/t/rpl000010.test +++ /dev/null @@ -1,19 +0,0 @@ -# This tests the offset off by 22 mystery bug -# Must run slave with --disconnect-slave-event-count=1 --master-connect-retry=1 - -source include/master-slave.inc; - -create table t1 (n int not null auto_increment primary key); -insert into t1 values(NULL); -insert into t1 values(2); -save_master_pos; -connection slave; -sync_with_master; -select n from t1; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl000011.test b/mysql-test/suite/rpl/t/rpl000011.test deleted file mode 100644 index 32f6227f7c5..00000000000 --- a/mysql-test/suite/rpl/t/rpl000011.test +++ /dev/null @@ -1,17 +0,0 @@ -source include/master-slave.inc; - -create table t1 (n int); -insert into t1 values(1); -sync_slave_with_master; -stop slave; -start slave; -connection master; -insert into t1 values(2); -#let slave catch up -sync_slave_with_master; -select * from t1; -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl000013.test b/mysql-test/suite/rpl/t/rpl000013.test deleted file mode 100644 index 69a102e84ce..00000000000 --- a/mysql-test/suite/rpl/t/rpl000013.test +++ /dev/null @@ -1,53 +0,0 @@ -# This test is to verify that DROP TEMPORARY TABLE -# is automatically binlogged and sent to slave -# when a temp table is dropped by disconnection -# of a master's conection. -# So it does not apply to row-based, where we neither need -# nor do this automatic binlogging. And if we run this test -# in row-based, it hangs waiting for an offset which is never -# reached (the "sync_with_master 1"), logically. - ---source include/have_binlog_format_mixed_or_statement.inc -source include/master-slave.inc; -save_master_pos; -connection slave; -sync_with_master; -connection master; - -create table t2(n int); -create temporary table t1 (n int); -insert into t1 values(1),(2),(3); -insert into t2 select * from t1; -connection master1; -create temporary table t1 (n int); -insert into t1 values (4),(5); -insert into t2 select * from t1 as t10; -save_master_pos; -disconnect master; -connection slave; -#add 1 to catch drop table -sync_with_master 1; -connection master1; -insert into t2 values(6); -save_master_pos; -disconnect master1; -connection slave; -# same trick to go one more event -sync_with_master 1; -select * from t2; -show status like 'Slave_open_temp_tables'; -# -# Clean up -# -connect (master2,localhost,root,,); -connection master2; - -# We will get a warning for t1 as this is a temporary table that doesn't -# exist in this connection. - -drop table if exists t1,t2; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl000017-slave.opt b/mysql-test/suite/rpl/t/rpl000017-slave.opt deleted file mode 100644 index 58a964c90d0..00000000000 --- a/mysql-test/suite/rpl/t/rpl000017-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-slave-start diff --git a/mysql-test/suite/rpl/t/rpl000017-slave.sh b/mysql-test/suite/rpl/t/rpl000017-slave.sh deleted file mode 100755 index 1d95798260a..00000000000 --- a/mysql-test/suite/rpl/t/rpl000017-slave.sh +++ /dev/null @@ -1,12 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/log/*relay* -rm -f $MYSQLTEST_VARDIR/mysqld.2/data/relay-log.info -cat > $MYSQLTEST_VARDIR/mysqld.2/data/master.info < injects fault on MYSQL_BIN_LOG::open_index_file SET GLOBAL debug="+d,fault_injection_openning_index"; @@ -316,7 +317,8 @@ DELETE FROM t2; DROP TABLE t5; # restart the server so that we have binlog again --- source include/restart_mysqld.inc +--let $rpl_server_number= 1 +--source include/rpl_restart_server.inc -- echo ###################### TEST #12 @@ -342,7 +344,8 @@ DELETE FROM t2; DROP TABLE t5; # restart the server so that we have binlog again --- source include/restart_mysqld.inc +--let $rpl_server_number= 1 +--source include/rpl_restart_server.inc ## clean up SET GLOBAL debug= @old_debug; @@ -359,9 +362,7 @@ RESET MASTER; -- echo ####################################################################### ### setup --- connection master -# master-slave-reset starts the slave automatically --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection slave # slave suppressions @@ -404,12 +405,9 @@ call mtr.add_suppression("Can't generate a unique log-filename .*"); -- source include/io_thd_fault_injection.inc ### clean up --- disable_warnings --- source include/stop_slave.inc --- enable_warnings +-- source include/stop_slave_sql.inc SET GLOBAL debug=@old_debug; RESET SLAVE; RESET MASTER; --- source include/start_slave.inc --- connection master --- source include/master-slave-end.inc +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test index 4c6402359fe..a20853e35a9 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test @@ -41,3 +41,4 @@ show grants for x@y; drop user x@y; drop database d1; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test index 9dca61d8f75..265bde2ccf6 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test @@ -69,16 +69,17 @@ if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) CONCAT($data, $data, $data, $data, $data, $data)); # Below code fakes the result of 'ROW' mode. --echo Got one of the listed errors - --echo --source include/wait_for_slave_sql_error_and_skip.inc - --echo include/start_slave.inc + # Ensure same message as in the case binlog_format=row below + --echo include/wait_for_slave_sql_error_and_skip.inc [errno=1590] } if (`SELECT @@binlog_format = 'ROW'`) { --error ER_TRANS_CACHE_FULL, ER_ERROR_ON_WRITE eval INSERT INTO t2 (a, data) VALUES (2, CONCAT($data, $data, $data, $data, $data, $data)); - # Incident event - --let $slave_sql_errno=1590 + + # 1590=ER_SLAVE_INCIDENT + --let $slave_sql_errno= 1590 --source include/wait_for_slave_sql_error_and_skip.inc } --enable_warnings @@ -101,8 +102,8 @@ eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data), t1.data = CONCAT($data, $data, $data, $data); --enable_query_log -# Incident event ---let $slave_sql_errno=1590 +# 1590=ER_SLAVE_INCIDENT +--let $slave_sql_errno= 1590 --source include/wait_for_slave_sql_error_and_skip.inc #--echo ######################################################################################## @@ -192,8 +193,9 @@ BEGIN; CREATE TABLE t5 (a int); --enable_query_log -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 3 - BEGIN - COMMIT @@ -221,8 +223,9 @@ BEGIN; --enable_query_log COMMIT; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 4 - BEGIN - ROLLBACK @@ -250,8 +253,9 @@ BEGIN; --enable_query_log ROLLBACK; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 5 - PROCEDURE @@ -299,8 +303,9 @@ eval CALL p1($data); --enable_query_log ROLLBACK; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 6 - XID @@ -330,8 +335,9 @@ SAVEPOINT sv; ROLLBACK TO sv; COMMIT; -let $diff_statement= SELECT * FROM t1; ---source include/diff_master_slave.inc +--sync_slave_with_master +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo ######################################################################################## --echo # 7 - NON-TRANS TABLE @@ -374,8 +380,8 @@ BEGIN; --enable_query_log COMMIT; -# Incident event ---let $slave_sql_errno=1590 +# 1590=ER_SLAVE_INCIDENT +--let $slave_sql_errno= 1590 --source include/wait_for_slave_sql_error_and_skip.inc sync_slave_with_master; @@ -420,7 +426,7 @@ while ($n) --enable_query_log COMMIT; -connection slave; +--connection slave --let $slave_sql_errno= 1197 source include/wait_for_slave_sql_error.inc; @@ -443,14 +449,16 @@ SELECT count(*) FROM t1; --echo # CLEAN --echo ######################################################################################## ---disable_warnings connection master; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +# t4 exists only if binlog_format!=row, so so a warning is generated +# if binog_format=row +--disable_warnings DROP TABLE IF EXISTS t4; -DROP TABLE IF EXISTS t5; -DROP TABLE IF EXISTS t6; -DROP PROCEDURE p1; --enable_warnings -source include/master-slave-end.inc; +DROP TABLE t5; +DROP PROCEDURE p1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt b/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt deleted file mode 100644 index 33632bf98e8..00000000000 --- a/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules-master.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-db='impossible_database' diff --git a/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test b/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test deleted file mode 100644 index d56a32ce2bd..00000000000 --- a/mysql-test/suite/rpl/t/rpl_binlog_query_filter_rules.test +++ /dev/null @@ -1,32 +0,0 @@ -# regression test for -# Bug#36099 replicate-do-db affects replaying RBR events with mysqlbinlog -# The test verifies that the slave side filtering rule does not affect -# applying of row-events on master via mysqlbinlog - --- source include/have_log_bin.inc --- source include/not_embedded.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -reset master; - -create table t1 (a int); -insert into t1 values (1); - -let $MYSQLD_DATADIR= `select @@datadir`; -flush logs; ---exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/bug36099.sql - -drop table t1; ---exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/bug36099.sql" - ---echo *** must be 1 *** -select * from t1; - -# cleanup - -drop table t1; -remove_file $MYSQLTEST_VARDIR/tmp/bug36099.sql; diff --git a/mysql-test/suite/rpl/t/rpl_bit.test b/mysql-test/suite/rpl/t/rpl_bit.test index 07b0778296c..2ee4074c4e3 100644 --- a/mysql-test/suite/rpl/t/rpl_bit.test +++ b/mysql-test/suite/rpl/t/rpl_bit.test @@ -92,3 +92,4 @@ DROP TABLE IF EXISTS test.t1; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bit_npk.test b/mysql-test/suite/rpl/t/rpl_bit_npk.test index 12b587919f9..40f375b92f3 100644 --- a/mysql-test/suite/rpl/t/rpl_bit_npk.test +++ b/mysql-test/suite/rpl/t/rpl_bit_npk.test @@ -114,3 +114,4 @@ DROP TABLE IF EXISTS test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_blackhole.test b/mysql-test/suite/rpl/t/rpl_blackhole.test index 6bf66422d62..d39df0cbde4 100644 --- a/mysql-test/suite/rpl/t/rpl_blackhole.test +++ b/mysql-test/suite/rpl/t/rpl_blackhole.test @@ -82,3 +82,4 @@ source extra/rpl_tests/rpl_blackhole.test; connection master; DROP TABLE t1,t2; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug26395.test b/mysql-test/suite/rpl/t/rpl_bug26395.test index 97c152d52e9..aeb0da9511d 100644 --- a/mysql-test/suite/rpl/t/rpl_bug26395.test +++ b/mysql-test/suite/rpl/t/rpl_bug26395.test @@ -95,3 +95,5 @@ connection slave; DROP TABLE tinnodb; # Warning: do not add more tests here. The binlog is in a bad state. +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug31076.test b/mysql-test/suite/rpl/t/rpl_bug31076.test index 9176bafe022..d81d646ebe3 100644 --- a/mysql-test/suite/rpl/t/rpl_bug31076.test +++ b/mysql-test/suite/rpl/t/rpl_bug31076.test @@ -134,3 +134,4 @@ SELECT * FROM visits_events; DROP DATABASE track; sync_slave_with_master; --echo End of 5.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test index 3327a36622c..c2cf5811938 100644 --- a/mysql-test/suite/rpl/t/rpl_bug33931.test +++ b/mysql-test/suite/rpl/t/rpl_bug33931.test @@ -3,23 +3,14 @@ # Bug #33932 assertion at handle_slave_sql if init_slave_thread() fails source include/have_debug.inc; -source include/have_log_bin.inc; - -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); - - -connection master; -reset master; +source include/master-slave.inc; connection slave; # Add suppression for expected warnings in slaves error log call mtr.add_suppression("Failed during slave I/O thread initialization"); ---disable_warnings -stop slave; ---enable_warnings +--source include/stop_slave.inc reset slave; # Set debug flags on slave to force errors to occur @@ -27,18 +18,13 @@ SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_ start slave; -connection master; -save_master_pos; -connection slave; - # # slave is going to stop because of emulated failures # but there won't be any crashes nor asserts hit. # -source include/wait_for_slave_to_stop.inc; # 1593 = ER_SLAVE_FATAL_ERROR ---let $slave_sql_errno= 1593 +--let $slave_sql_errno= 1593 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc @@ -47,3 +33,8 @@ source include/wait_for_slave_to_stop.inc; # SET GLOBAL debug=""; +# Clear Last_SQL_Error +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_bug38694.test b/mysql-test/suite/rpl/t/rpl_bug38694.test index 41b11d271b9..48f950ad6ef 100644 --- a/mysql-test/suite/rpl/t/rpl_bug38694.test +++ b/mysql-test/suite/rpl/t/rpl_bug38694.test @@ -8,3 +8,4 @@ source include/master-slave.inc; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index 33bd9d51b11..65af5e72865 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -49,3 +49,4 @@ connection slave; sync_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_charset.test b/mysql-test/suite/rpl/t/rpl_charset.test index ed0d835f22d..3ed9147508e 100644 --- a/mysql-test/suite/rpl/t/rpl_charset.test +++ b/mysql-test/suite/rpl/t/rpl_charset.test @@ -1,3 +1,2 @@ let $engine_type=myisam; source extra/rpl_tests/rpl_charset.test; - diff --git a/mysql-test/suite/rpl/t/rpl_charset_sjis.test b/mysql-test/suite/rpl/t/rpl_charset_sjis.test index 2469b0db8a2..a3a3de8c1d0 100644 --- a/mysql-test/suite/rpl/t/rpl_charset_sjis.test +++ b/mysql-test/suite/rpl/t/rpl_charset_sjis.test @@ -23,3 +23,4 @@ sync_slave_with_master; connection master; # End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf index 141aaa7788d..104963c7d82 100644 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf +++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf @@ -17,11 +17,8 @@ log-slave-updates innodb [ENV] -SLAVE_MYPORT1= @mysqld.3.port -SLAVE_MYSOCK1= @mysqld.3.socket - -SLAVE_MYPORT2= @mysqld.4.port -SLAVE_MYSOCK2= @mysqld.4.socket - - +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYSOCK_3= @mysqld.3.socket +SERVER_MYPORT_4= @mysqld.4.port +SERVER_MYSOCK_4= @mysqld.4.socket diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test index 3633462d68e..6099637e3e9 100644 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test +++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test @@ -1,24 +1,32 @@ -############################################################# -# Author: Serge Kozlov -# Date: 03/12/2008 -# Purpose: Testing circular replication based on schema -# A->B->C->D->A with using AUTO_INCREMENT_INCREMENT, -# AUTO_INCREMENT_OFFSET variables and failover -############################################################# +# ==== Purpose ==== +# +# Setup: circular replication on four hosts, i.e., topology +# server_1 -> server_2 -> server_3 -> server_4 -> server_1 +# +# Tested properties: +# - Correctly configured autoinc works. +# - Manual failover works. +# +# ==== Related bugs and worklogs ==== +# +# WL#3754 +# BUG#49978 + --source include/have_innodb.inc # Set up circular ring and new names for servers ---echo *** Set up circular ring by schema A->B->C->D->A *** ---source include/circular_rpl_for_4_hosts_init.inc +--echo *** Set up circular replication on four servers *** +--let $rpl_topology= 1->2->3->4->1 +--source include/rpl_init.inc --echo # Preparing data. --echo *** Preparing data *** ---connection master_a +--connection server_1 CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; ---source include/circular_rpl_for_4_hosts_sync.inc ---connection master_d +--source include/rpl_sync.inc +--connection server_4 --echo # @@ -28,121 +36,134 @@ CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, --echo *** Testing schema A->B->C->D->A *** --echo # insert data via all hosts ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',1); ---sync_slave_with_master master_b +--sync_slave_with_master server_2 INSERT INTO t1(b,c) VALUES('B',1); ---sync_slave_with_master master_c +--sync_slave_with_master server_3 INSERT INTO t1(b,c) VALUES('C',1); ---sync_slave_with_master master_d +--sync_slave_with_master server_4 INSERT INTO t1(b,c) VALUES('D',1); ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 1 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 1 ORDER BY a,b; --echo --echo *** Testing schema A->B->D->A if C has failure *** --echo --echo * Do failure for C and then make new connection B->D * + +# Note: server_N has auto_increment_offset=N. Below, we insert value 6 +# in the autoinc column on server_3 (and prevent it from replicating +# further using SQL_SLAVE_SKIP_COUNTER on server_4). Due to the +# auto_increment_offset setting, the autoinc value 6 is normally +# generated on server_2. When we later insert a row on server_2, we +# thus cause a duplicate key error on server_3. + # Do not replicate next event from C ---connection master_d -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2); +--connection server_4 STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; source include/start_slave.inc; -disconnect slave; ---connection master_c +--connection server_3 INSERT INTO t1 VALUES(6,'C',2); ---save_master_pos ---connection master_b +--sync_slave_with_master server_4 + +--connection server_2 INSERT INTO t1(b,c) VALUES('B',2); # Wait while C will stop. ---connection master_c -source include/wait_for_slave_sql_to_stop.inc; ---connection master_a +--connection server_3 +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error.inc +--connection server_1 INSERT INTO t1(b,c) VALUES('A',2); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',2); # Sync all servers except C ---connection master_b +--connection server_2 let $wait_condition= SELECT COUNT(*)=3 FROM t1 WHERE a > 4; +--let $server_connection= server_1 --source include/wait_condition.inc --echo --echo * Data on servers (C failed) * # Masters C,D shouldn't have correct data ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 2 ORDER BY a,b; --echo --echo * Reconfigure replication to schema A->B->D->A * # Exclude Master C ---connection master_c -STOP SLAVE; +--connection server_3 +--source include/stop_slave_io.inc --let $pos_c= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1) --let $file_c= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1) ---connection master_d -STOP SLAVE; ---replace_result $SLAVE_MYPORT MASTER_B_PORT $file_c LOG_FILE $pos_c LOG_POS ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT,master_user='root',master_log_file='$file_c',master_log_pos=$pos_c -connect(slave,127.0.0.1,root,,test,$SLAVE_MYPORT2); + +--connection server_4 +--source include/stop_slave.inc + +--let $rpl_topology= 1->2->4->1,2->3 +--let $rpl_master_log_file= 4:$file_c +--let $rpl_master_log_pos= 4:$pos_c +--source include/rpl_change_topology.inc + +#--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2 $file_c LOG_FILE $pos_c LOG_POS +#--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SERVER_MYPORT_2,master_user='root',master_log_file='$file_c',master_log_pos=$pos_c source include/start_slave.inc; -disconnect slave; ---connection master_b ---sync_slave_with_master master_d ---sync_slave_with_master master_a +--connection server_2 +--sync_slave_with_master server_4 +--sync_slave_with_master server_1 --echo --echo * Check data inserted before failure * ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 2 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 2 ORDER BY a,b; --echo --echo * Check data inserted after failure * ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',3); ---connection master_b +--connection server_2 INSERT INTO t1(b,c) VALUES('B',3); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',3); -connection master_a; +connection server_1; ---sync_slave_with_master master_b ---sync_slave_with_master master_d ---sync_slave_with_master master_a ---sync_slave_with_master master_b +--let $rpl_only_running_threads= 1 +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 3 ORDER BY a,b; ---connection master_a +--connection server_1 --echo --echo *** Testing restoring scheme A->B->C->D->A after failure *** @@ -150,158 +171,150 @@ SELECT 'Master D',a,b FROM t1 WHERE c = 3 ORDER BY a,b; # Master D will ignore a next event from C so that event will not be # distributed to other servers --echo * Remove wrong event from C and restore B->C->D * ---connection master_d +--connection server_4 source include/stop_slave.inc; ---connection master_c +--connection server_3 DELETE FROM t1 WHERE a = 6; START SLAVE; ---connection master_b ---sync_slave_with_master master_c +--connection server_2 +--sync_slave_with_master server_3 RESET MASTER; --let $file_d= query_get_value(SHOW MASTER STATUS, File, 1) --let $pos_d= query_get_value(SHOW MASTER STATUS, Position, 1) ---connection master_d +--connection server_4 RESET SLAVE; ---replace_result $SLAVE_MYPORT1 MASTER_C_PORT $file_d LOG_FILE $pos_d LOG_POS ---eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT1,master_user='root',master_log_file='$file_d',master_log_pos=$pos_d +--let $rpl_topology= 1->2->3->4->1 +--let $rpl_master_log_file= 4:$file_d +--let $rpl_master_log_pos= 4:$pos_d +--source include/rpl_change_topology.inc +#--replace_result $SERVER_MYPORT_3 SERVER_MYPORT_3 $file_d LOG_FILE $pos_d LOG_POS +#--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SERVER_MYPORT_3,master_user='root',master_log_file='$file_d',master_log_pos=$pos_d START SLAVE; ---connection master_c ---sync_slave_with_master master_d ---source include/circular_rpl_for_4_hosts_sync.inc +--connection server_3 +--sync_slave_with_master server_4 +--source include/rpl_sync.inc --echo --echo * Check data inserted before restoring schema A->B->C->D->A * ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_b +--sync_slave_with_master server_2 SELECT 'Master B',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_c +--sync_slave_with_master server_3 SELECT 'Master C',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_d +--sync_slave_with_master server_4 SELECT 'Master D',a,b FROM t1 WHERE c IN (2,3) ORDER BY a,b; ---sync_slave_with_master master_a +--sync_slave_with_master server_1 --echo --echo * Check data inserted after restoring schema A->B->C->D->A * ---connection master_a +--connection server_1 INSERT INTO t1(b,c) VALUES('A',4); ---connection master_b +--connection server_2 INSERT INTO t1(b,c) VALUES('B',4); ---connection master_c +--connection server_3 INSERT INTO t1(b,c) VALUES('C',4); ---connection master_d +--connection server_4 INSERT INTO t1(b,c) VALUES('D',4); ---connection master_a +--connection server_1 ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_b +--connection server_2 SELECT 'Master B',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_c +--connection server_3 SELECT 'Master C',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_d +--connection server_4 SELECT 'Master D',a,b FROM t1 WHERE c = 4 ORDER BY a,b; ---connection master_a +--connection server_1 --echo --echo * Transactions with commits * # Testing mixing of transactions and regular inserts ---connection master_a +--connection server_1 BEGIN; ---connection master_c +--connection server_3 BEGIN; let $counter= 100; ---connection master_a +--connection server_1 --disable_query_log while ($counter) { - --connection master_a + --connection server_1 INSERT INTO t2(b,c) VALUES('A',1); - --connection master_b + --connection server_2 INSERT INTO t2(b,c) VALUES('B',1); - --connection master_c + --connection server_3 INSERT INTO t2(b,c) VALUES('C',1); - --connection master_d + --connection server_4 INSERT INTO t2(b,c) VALUES('D',1); dec $counter; } ---connection master_a +--connection server_1 COMMIT; ---connection master_c +--connection server_3 COMMIT; ---connection master_a +--connection server_1 --enable_query_log ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_b +--connection server_2 SELECT 'Master B',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_c +--connection server_3 SELECT 'Master C',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_d +--connection server_4 SELECT 'Master D',b,COUNT(*) FROM t2 WHERE c = 1 GROUP BY b ORDER BY b; ---connection master_a +--connection server_1 --echo --echo * Transactions with rollbacks * # Testing mixing of transactions with rollback and regular inserts ---connection master_a +--connection server_1 BEGIN; ---connection master_c +--connection server_3 BEGIN; let $counter= 100; ---connection master_a +--connection server_1 --disable_query_log while ($counter) { - --connection master_a + --connection server_1 INSERT INTO t2(b,c) VALUES('A',2); - --connection master_b + --connection server_2 INSERT INTO t2(b,c) VALUES('B',2); - --connection master_c + --connection server_3 INSERT INTO t2(b,c) VALUES('C',2); - --connection master_d + --connection server_4 INSERT INTO t2(b,c) VALUES('D',2); dec $counter; } ---connection master_a +--connection server_1 ROLLBACK; ---connection master_c +--connection server_3 ROLLBACK; ---connection master_a +--connection server_1 --enable_query_log ---source include/circular_rpl_for_4_hosts_sync.inc +--source include/rpl_sync.inc ---connection master_a +--connection server_1 SELECT 'Master A',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_b +--connection server_2 SELECT 'Master B',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_c +--connection server_3 SELECT 'Master C',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_d +--connection server_4 SELECT 'Master D',b,COUNT(*) FROM t2 WHERE c = 2 GROUP BY b ORDER BY b; ---connection master_a +--connection server_1 --echo # Clean up --echo *** Clean up *** ---connection master_a +--connection server_1 DROP TABLE t1,t2; ---source include/circular_rpl_for_4_hosts_sync.inc ---connection master_a -STOP SLAVE; -RESET SLAVE; ---connection master_b -STOP SLAVE; -RESET SLAVE; ---connection master_c -STOP SLAVE; -RESET SLAVE; ---connection master_d -STOP SLAVE; -RESET SLAVE; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_colSize.test b/mysql-test/suite/rpl/t/rpl_colSize.test index c20f2c3fd35..0a64817bf36 100644 --- a/mysql-test/suite/rpl/t/rpl_colSize.test +++ b/mysql-test/suite/rpl/t/rpl_colSize.test @@ -218,3 +218,4 @@ DROP TABLE t1; sync_slave_with_master; # END 5.1 Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_commit_after_flush.test b/mysql-test/suite/rpl/t/rpl_commit_after_flush.test index 47df391d6be..5e070b14301 100644 --- a/mysql-test/suite/rpl/t/rpl_commit_after_flush.test +++ b/mysql-test/suite/rpl/t/rpl_commit_after_flush.test @@ -1,12 +1,6 @@ -##################################### -# Wrapper for rpl_commit_after_flush# -##################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc -- source include/master-slave.inc let $engine_type=innodb; -- source extra/rpl_tests/rpl_commit_after_flush.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test index da2951afb1a..a5c77e830d6 100644 --- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test @@ -125,13 +125,11 @@ while ($type) connection master; sync_slave_with_master; -connection master; -let $diff_statement= SELECT * FROM t order by i; -source include/diff_master_slave.inc; +let $rpl_diff_statement= SELECT * FROM t order by i; +source include/rpl_diff.inc; -connection master; -let $diff_statement= SELECT * FROM n order by d, f; -source include/diff_master_slave.inc; +let $rpl_diff_statement= SELECT * FROM n order by d, f; +source include/rpl_diff.inc; --echo ######################################################################## --echo # Cleanup @@ -147,3 +145,4 @@ sync_slave_with_master; connection master; disconnect conn1; disconnect conn2; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_conditional_comments.test b/mysql-test/suite/rpl/t/rpl_conditional_comments.test index 14251d5eb37..88adf3a20f1 100644 --- a/mysql-test/suite/rpl/t/rpl_conditional_comments.test +++ b/mysql-test/suite/rpl/t/rpl_conditional_comments.test @@ -26,15 +26,15 @@ let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); source include/show_binlog_events.inc; let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo --echo # Case 2: --echo # ----------------------------------------------------------------- --echo # Verify whether it can be binlogged correctly when executing prepared --echo # statement. +--connection master PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/'; EXECUTE stmt; DROP TABLE t1; @@ -42,10 +42,10 @@ CREATE TABLE t1(c1 INT); EXECUTE stmt; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc +--connection master --echo SET @value=62; PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; @@ -58,17 +58,17 @@ source include/show_binlog_events.inc; let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; -source include/diff_tables.inc; +--let $diff_tables= master:t1,slave:t1 +--source include/diff_tables.inc --echo --echo # Case 3: --echo # ----------------------------------------------------------------- --echo # Verify it can restore the '!', if the it is an uncomplete conditional --echo # comments +--connection master --error 1064 SELECT c1 FROM /*!99999 t1 WHEREN; DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_database.test b/mysql-test/suite/rpl/t/rpl_create_database.test index e3e2e637594..5eac3de0d15 100644 --- a/mysql-test/suite/rpl/t/rpl_create_database.test +++ b/mysql-test/suite/rpl/t/rpl_create_database.test @@ -70,3 +70,4 @@ DROP DATABASE IF EXISTS mysqltest_bob; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test index cf26e58c3ec..12183531677 100644 --- a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test @@ -147,4 +147,4 @@ sync_slave_with_master; connection master; DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test index a06dfa54cb1..daf6b7e9ad8 100644 --- a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test @@ -38,4 +38,4 @@ CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp; source include/show_binlog_events.inc; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_critical_errors.test b/mysql-test/suite/rpl/t/rpl_critical_errors.test index aa1f251b738..bc0d7096f80 100644 --- a/mysql-test/suite/rpl/t/rpl_critical_errors.test +++ b/mysql-test/suite/rpl/t/rpl_critical_errors.test @@ -35,7 +35,7 @@ connection master1; # This sleep is picked so that the query above has started to insert # some rows into t2. If it hasn't the slave will not stop below. let $wait_condition= SELECT COUNT(*) > 1000 FROM t1; -source include/wait_condition.inc +--source include/wait_condition.inc # SHOW PROCESSLIST; @@ -62,4 +62,5 @@ connection slave; # The following should be 0 SELECT COUNT(*) FROM t2; +--source include/rpl_end.inc enable_parsing; diff --git a/mysql-test/suite/rpl/t/rpl_cross_version.test b/mysql-test/suite/rpl/t/rpl_cross_version.test index 8cd268a5fd9..d3e834b5358 100644 --- a/mysql-test/suite/rpl/t/rpl_cross_version.test +++ b/mysql-test/suite/rpl/t/rpl_cross_version.test @@ -10,7 +10,7 @@ # The master's binlog is treated as a relay log that the SQL thread executes. # ---source include/have_log_bin.inc +--source include/master-slave.inc # The test is disabled for windows due to # Bug #42879 CHANGE MASTER RELAY_LOG_FILE=path fails on windows @@ -22,6 +22,10 @@ # --echo ==== Initialize ==== +--connection slave +--source include/stop_slave.inc +RESET SLAVE; + # the relay log contains create t1, t3 tables and load data infile --let $fake_relay_log = $MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001 --source include/setup_fake_relay_log.inc @@ -36,6 +40,8 @@ start slave sql_thread; SELECT COUNT(*) - 17920 as zero FROM t3; --echo ==== Clean up ==== -stop slave sql_thread; +--source include/stop_slave_sql.inc --source include/cleanup_fake_relay_log.inc drop table t1, t3; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_current_user.cnf b/mysql-test/suite/rpl/t/rpl_current_user.cnf index 999ee727a88..58b605ad928 100644 --- a/mysql-test/suite/rpl/t/rpl_current_user.cnf +++ b/mysql-test/suite/rpl/t/rpl_current_user.cnf @@ -1,9 +1,8 @@ !include ../my.cnf [mysqld.3] -server-id=3 -log-bin=slave-bin +log-slave-updates [ENV] -SLAVE_MYPORT1= @mysqld.3.port -SLAVE_MYSOCK1= @mysqld.3.socket +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYSOCK_3= @mysqld.3.socket diff --git a/mysql-test/suite/rpl/t/rpl_current_user.test b/mysql-test/suite/rpl/t/rpl_current_user.test index 72581ed7049..bdb53cbcdfe 100644 --- a/mysql-test/suite/rpl/t/rpl_current_user.test +++ b/mysql-test/suite/rpl/t/rpl_current_user.test @@ -10,34 +10,22 @@ # 'ALTER EVENT'. # ############################################################################## -source include/master-slave.inc; + source include/have_binlog_format_statement.inc; ---echo ---echo # On slave2 -connect (slave2,127.0.0.1,root,,test,$SLAVE_MYPORT1,); -connection slave2; +--let $rpl_topology= 1->2->3 +--source include/rpl_init.inc ---echo # Connect slave2 to slave ---replace_result $SLAVE_MYPORT SLAVE_MYPORT; -eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, - MASTER_LOG_FILE='slave-bin.000001', MASTER_USER='root'; -START SLAVE; -source include/wait_for_slave_to_start.inc; +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc + +--let $rpl_connection_name= slave +--let $rpl_server_number= 2 +--source include/rpl_connect.inc + +--connection master ---echo ---echo # [On master] -connection master; ---disable_warnings -DROP VIEW IF EXISTS v_user; -DROP VIEW IF EXISTS v_tables_priv; -DROP VIEW IF EXISTS v_procs_priv; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS my_grant; -DROP PROCEDURE IF EXISTS my_revoke; -DROP FUNCTION IF EXISTS my_user; -DROP EVENT IF EXISTS e1; ---enable_warnings CREATE TABLE t1(c1 char(100)); CREATE VIEW test.v_user AS SELECT * FROM mysql.user WHERE User LIKE 'bug48321%'; CREATE VIEW test.v_tables_priv AS SELECT * FROM mysql.tables_priv WHERE User LIKE 'bug48321%'; @@ -63,75 +51,76 @@ connection conn1; --echo # [On conn1] --echo # Verify 'REVOKE ALL' statement REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); -let $diff_table= test.v_user; -let $diff_server_list= master, slave, slave2; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON TABLE ...' statement -connection conn1; GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON PROCEDURE...' statement -connection conn1; GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER(); -let $diff_table= test.v_procs_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ... ON *.* ...' statement -connection conn1; GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() WITH GRANT OPTION; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON TABLE ...' statement -connection conn1; REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON PROCEDURE...' statement -connection conn1; REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); -let $diff_table= test.v_procs_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON *.* ...' statement -connection conn1; REVOKE ALL PRIVILEGES ON *.* FROM CURRENT_USER(); -let $diff_table= test.v_user; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'GRANT ...' statement in the procedure -connection conn1; CREATE PROCEDURE my_grant() GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); call my_grant; -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'REVOKE ... ON TABLE ...' statement in the procedure -connection conn1; CREATE PROCEDURE my_revoke() REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); call my_revoke; -let $diff_table= test.v_tables_priv; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv; +source include/diff_tables.inc; --echo --echo # Verify 'RENAME USER ...' statement -connection conn1; RENAME USER CURRENT_USER TO 'bug48321_2'@'localhost'; -let $diff_table= test.v_user; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; disconnect conn1; @@ -142,7 +131,9 @@ GRANT CREATE USER ON *.* TO 'bug48321_2'@'localhost'; connect (conn1, 127.0.0.1, 'bug48321_2'@'localhost',,); connection conn1; DROP USER CURRENT_USER(); -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_user, server_2:v_user, server_3:v_user; +source include/diff_tables.inc; --echo --echo # Verify 'ALTER EVENT...' statement @@ -151,16 +142,17 @@ CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1; --echo # Explicitly assign CURRENT_USER() to definer ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE; -let $diff_table= test.v_event; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_event, server_2:v_event, server_3:v_event; +source include/diff_tables.inc; -connection master; --echo --echo # Session user will be set as definer, if the statement does not assign --echo # a definer ALTER EVENT e1 ENABLE; -sync_slave_with_master; -source include/rpl_diff_tables.inc; +--source include/rpl_sync.inc +let $diff_tables= server_1:v_event, server_2:v_event, server_3:v_event; +source include/diff_tables.inc; --echo --echo # Verify that this patch does not affect the calling of CURRENT_USER() @@ -172,8 +164,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; ---echo # [On slave2] -sync_slave_with_master slave2; +--echo # [On server_3] +sync_slave_with_master server_3; SELECT * FROM t1; connection master; @@ -183,8 +175,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; connection master; @@ -194,8 +186,8 @@ SELECT * FROM t1; sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; connection master; @@ -218,8 +210,8 @@ sync_slave_with_master; --echo # [On slave] SELECT * FROM t1; SELECT * FROM t2; -sync_slave_with_master slave2; ---echo # [On slave2] +sync_slave_with_master server_3; +--echo # [On server_3] SELECT * FROM t1; SELECT * FROM t2; @@ -233,6 +225,5 @@ DROP PROCEDURE my_grant; DROP PROCEDURE my_revoke; DROP FUNCTION my_user; DROP EVENT e1; -sync_slave_with_master; -sync_slave_with_master slave2; -source include/master-slave-end.inc; +--source include/rpl_end.inc + diff --git a/mysql-test/suite/rpl/t/rpl_ddl.test b/mysql-test/suite/rpl/t/rpl_ddl.test index 80df16a7a00..83a530131a6 100644 --- a/mysql-test/suite/rpl/t/rpl_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_ddl.test @@ -30,3 +30,4 @@ let $temp_engine_type= MEMORY; let $show_binlog = 0; let $manipulate = 0; -- source extra/rpl_tests/rpl_ddl.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test b/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test index ee907f81b22..b2d4e42a973 100644 --- a/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test @@ -1,10 +1,3 @@ -################################ -# Wrapper for rpl_deadlock.test# -################################ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_delete_no_where.test b/mysql-test/suite/rpl/t/rpl_delete_no_where.test index 64a293b4058..4bfe6d07b5a 100644 --- a/mysql-test/suite/rpl/t/rpl_delete_no_where.test +++ b/mysql-test/suite/rpl/t/rpl_delete_no_where.test @@ -5,3 +5,4 @@ -- source include/master-slave.inc let $engine_type=myisam; -- source extra/rpl_tests/rpl_delete_no_where.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index c65eef6e939..7b535637658 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -224,7 +224,9 @@ DROP USER 'create_rout_db'@'localhost'; # finish entire clean up (remove binlogs) # so that we leave a pristine environment for the # following tests --- source include/master-slave-reset.inc +--let $rpl_only_running_threads= 1 +-- source include/rpl_reset.inc +USE test; # BUG#49119: Master crashes when executing 'REVOKE ... ON # {PROCEDURE|FUNCTION} FROM ...' @@ -249,7 +251,7 @@ DROP USER 'create_rout_db'@'localhost'; -- echo ######## BUG#49119 ####### -- echo ### i) test case from the 'how to repeat section' --- source include/master-slave-reset.inc + -- connection master CREATE TABLE t1(c1 INT); @@ -270,7 +272,7 @@ DROP PROCEDURE p1; -- echo ### ii) Test case in which REVOKE partially succeeds -- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master CREATE TABLE t1(c1 INT); @@ -330,8 +332,7 @@ DROP USER 'user49119'@'localhost'; # Bug #51987 revoke privileges logs wrong error code # --- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master grant all on *.* to foo@"1.2.3.4"; @@ -345,11 +346,7 @@ revoke all privileges, grant option from "foo"; ## assertion: slave replicates revoke and does not fail because master ## logged revoke with correct expected error code --- let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1) - if ($err) -{ - -- die UNEXPECTED ERROR AT SLAVE: $err -} +--source include/check_slave_no_error.inc -- connection master DROP USER foo@"1.2.3.4"; @@ -357,8 +354,7 @@ DROP USER foo@"1.2.3.4"; --echo --echo # Bug#27606 GRANT statement should be replicated with DEFINER information ---connection master ---source include/master-slave-reset.inc +--source include/rpl_reset.inc --connection master GRANT SELECT, INSERT ON mysql.user TO user_bug27606@localhost; @@ -375,5 +371,5 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; --connection master DROP USER user_bug27606@localhost; ---source include/master-slave-end.inc --echo "End of test" +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop.test b/mysql-test/suite/rpl/t/rpl_drop.test index 336edad6fc5..748a5759513 100644 --- a/mysql-test/suite/rpl/t/rpl_drop.test +++ b/mysql-test/suite/rpl/t/rpl_drop.test @@ -2,15 +2,12 @@ # exist, must be binlogged with a non-zero error code) source include/master-slave.inc; source include/have_innodb.inc; ---disable_warnings -drop table if exists t1, t2; ---enable_warnings + create table t1 (a int); --error 1051 drop table t1, t2; -save_master_pos; -connection slave; -sync_with_master; +--sync_slave_with_master + # End of 4.1 tests # BUG#55625 RBR breaks on failing 'CREATE TABLE' @@ -65,3 +62,5 @@ SET @@global.binlog_format= @old_binlog_format; SET @@global.binlog_format= @old_binlog_format; # End of 5.1 tests + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test index 11e93e7307a..c3194f08f52 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -58,4 +58,5 @@ drop table t1; drop database mysqltest1; sync_slave_with_master; -source include/stop_slave.inc; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_if_exists.test b/mysql-test/suite/rpl/t/rpl_drop_if_exists.test deleted file mode 100644 index 6b2b37ae791..00000000000 --- a/mysql-test/suite/rpl/t/rpl_drop_if_exists.test +++ /dev/null @@ -1,115 +0,0 @@ -# BUG#13684: -# SP: DROP PROCEDURE|FUNCTION IF EXISTS not binlogged if routine -# does not exist -# -# There is an inconsistency with DROP DATABASE IF EXISTS, DROP -# TABLE IF EXISTS and DROP VIEW IF EXISTS: those are binlogged even -# if the DB or TABLE does not exist, whereas DROP PROCEDURE IF -# EXISTS does not. It would be nice or at least consistent if DROP -# PROCEDURE/STATEMENT worked the same too. -# -# Description: -# DROP PROCEDURE|FUNCTION IF EXISTS does not get binlogged whereas DROP -# DATABASE|TABLE|TRIGGER|... IF EXISTS do. -# -# Fixed DROP PROCEDURE|FUNCTION IF EXISTS by adding a call to -# write_bin_log in mysql_execute_command. Checked also if all -# documented "DROP (...) IF EXISTS" get binlogged. Left out DROP -# SERVER IF EXISTS because it seems that it only gets binlogged when -# using row event (see BUG#25705). -# -# TODO: add DROP SERVER IF EXISTS to the test case when its -# binlogging procedure gets fixed (BUG#25705). Furthermore, when -# logging in RBR format the events that get logged are effectively in -# RBR format and not in STATEMENT format meaning that one must needs -# to be extra careful when writing a test for it, or change the CREATE -# SERVER logging to always log as STATEMENT. You can quickly check this -# by enabling the flag below $fixed_bug_25705=1 and watch the diff on -# the STDOUT. More detail may be found on the generated reject file. -# -# Test is implemented as follows: -# -# i) test each "drop if exists" (DDL), found in MySQL 5.1 manual, -# on inexistent objects (except for DROP SERVER); -# ii) show binlog events; -# iii) create an object for each drop if exists statement; -# iv) issue "drop if exists" in existent objects. -# v) show binlog events; -# -# References: -# http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-data-definition.html -# ---source include/have_log_bin.inc -RESET MASTER; - -disable_warnings; - -# test all "drop if exists" in manual with inexistent objects -DROP PROCEDURE IF EXISTS db_bug_13684.p; -DROP FUNCTION IF EXISTS db_bug_13684.f; -DROP TRIGGER IF EXISTS db_bug_13684.tr; -DROP VIEW IF EXISTS db_bug_13684.v; -DROP EVENT IF EXISTS db_bug_13684.e; -DROP TABLE IF EXISTS db_bug_13684.t; -DROP DATABASE IF EXISTS db_bug_13684; - -let $fixed_bug_25705 = 0; - -if($fixed_bug_25705) -{ - DROP SERVER IF EXISTS s_bug_13684; -} ---source include/show_binlog_events.inc - -# test drop with existing values - -# create -CREATE DATABASE db_bug_13684; - -CREATE TABLE db_bug_13684.t (a int); - -CREATE EVENT db_bug_13684.e - ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR - DO - UPDATE db_bug_13684.t SET a = a + 1; - -CREATE VIEW db_bug_13684.v - AS SELECT * FROM db_bug_13684.t; - -CREATE TRIGGER db_bug_13684.tr BEFORE INSERT ON db_bug_13684.t - FOR EACH ROW BEGIN - END; - -CREATE PROCEDURE db_bug_13684.p (OUT p1 INT) - BEGIN - END; - -CREATE FUNCTION db_bug_13684.f (s CHAR(20)) - RETURNS CHAR(50) DETERMINISTIC - RETURN s; - -if($fixed_bug_25705) -{ - CREATE SERVER s_bug_13684 - FOREIGN DATA WRAPPER mysql - OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test'); -} - ---source include/show_binlog_events.inc - -# drop existing -DROP PROCEDURE IF EXISTS db_bug_13684.p; -DROP FUNCTION IF EXISTS db_bug_13684.f; -DROP TRIGGER IF EXISTS db_bug_13684.tr; -DROP VIEW IF EXISTS db_bug_13684.v; -DROP EVENT IF EXISTS db_bug_13684.e; -DROP TABLE IF EXISTS db_bug_13684.t; -DROP DATABASE IF EXISTS db_bug_13684; -if($fixed_bug_25705) -{ - DROP SERVER IF EXISTS s_bug_13684; -} - ---source include/show_binlog_events.inc - -enable_warnings; diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test index f2a4dd70da6..0b6d1458893 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_temp.test +++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test @@ -67,3 +67,4 @@ connection master; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_view.test b/mysql-test/suite/rpl/t/rpl_drop_view.test index 11633a0a7e8..99c5edb928d 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_view.test +++ b/mysql-test/suite/rpl/t/rpl_drop_view.test @@ -34,3 +34,4 @@ select * from v3; connection master; drop table t1, t2, t3; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test index ab1de6a2e9f..618576f5641 100644 --- a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test +++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test @@ -6,33 +6,21 @@ # of their server id). # It also will test BUG#13861. -source include/master-slave.inc; source include/have_innodb.inc; - -# set up "dual head" - -# Needed for debug info in wait_for_slave_sql_to_stop. -let $master_connection= slave; -connection slave; -reset master; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"; - -source include/start_slave.inc; +--let $rpl_topology= 1->2->1 +--source include/rpl_init.inc # now we test it -connection slave; +connection server_2; create table t1 (n int); let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1); let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1); let $master_log_pos_1= `SELECT $master_log_pos_1 + 3`; -sync_slave_with_master master; +--sync_slave_with_master server_1 # # BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if @@ -42,7 +30,7 @@ source include/stop_slave.inc; create table t2 (n int); # create one ignored event -sync_slave_with_master; +--sync_slave_with_master server_2 show tables; @@ -59,7 +47,8 @@ insert into t3 values(3); commit; insert into t3 values(4); -connection master; + +connection server_1; # bug is that START SLAVE UNTIL may stop too late, we test that by # asking it to stop before creation of t3. @@ -89,26 +78,20 @@ source include/start_slave.inc; # BUG#13023 is that Exec_master_log_pos may stay too low "forever": -connection master; +connection server_1; create table t4 (n int); # create 3 ignored events create table t5 (n int); create table t6 (n int); -sync_slave_with_master; -sync_slave_with_master master; +--sync_slave_with_master server_2 # then BUG#13023 caused hang below ("master" looks behind, while it's # not in terms of updates done). +--sync_slave_with_master server_1 show tables; # cleanup - -source include/stop_slave.inc; -reset slave; -drop table t1,t2,t3,t4,t5,t6; - -sync_slave_with_master; - -# End of 4.1 tests +drop table t1, t2, t3, t4, t5, t6; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_crash.test b/mysql-test/suite/rpl/t/rpl_empty_master_crash.test index 863b450a6d9..a657b82fc94 100644 --- a/mysql-test/suite/rpl/t/rpl_empty_master_crash.test +++ b/mysql-test/suite/rpl/t/rpl_empty_master_crash.test @@ -10,3 +10,4 @@ connection slave; load table t1 from master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test index f358c0ee356..01ef5298e48 100644 --- a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test +++ b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test @@ -62,3 +62,6 @@ DROP TABLE test.t4; sync_slave_with_master; # End of 4.1 tests # Adding comment for force manual merge 5.0 -> wl1012. delete me if needed + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test index 327ad9bf22c..ed5ebd3dbc4 100644 --- a/mysql-test/suite/rpl/t/rpl_events.test +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -111,3 +111,4 @@ DROP EVENT event44331_2; DROP EVENT event44331_3; DROP EVENT event44331_4; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test b/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test deleted file mode 100644 index e9685baf01b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test +++ /dev/null @@ -1,13 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using innodb -########################################### --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc -let $engine_type = 'InnoDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test b/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test deleted file mode 100644 index d56df394ccf..00000000000 --- a/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test +++ /dev/null @@ -1,12 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-07 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using MyISAM -########################################### --- source include/have_binlog_format_row.inc --- source include/master-slave.inc -let $engine_type = 'MyISAM'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test b/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test deleted file mode 100644 index 5255a9cfbad..00000000000 --- a/mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# Purpose: To test having extra columns on the master WL#3915 -############################################################# --- source include/master-slave.inc --- source include/have_innodb.inc - -let $engine_type = 'InnoDB'; - -set binlog_format=row; --- source extra/rpl_tests/rpl_extraMaster_Col.test - -set binlog_format=statement; --- source extra/rpl_tests/rpl_extraMaster_Col.test - -set binlog_format=mixed; --- source extra/rpl_tests/rpl_extraMaster_Col.test diff --git a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test b/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test deleted file mode 100644 index e6b41eabd0d..00000000000 --- a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test +++ /dev/null @@ -1,15 +0,0 @@ -############################################################# -# Purpose: To test having extra columns on the master WL#3915 -############################################################# --- source include/master-slave.inc - -let $engine_type = 'MyISAM'; - -set binlog_format=row; --- source extra/rpl_tests/rpl_extraMaster_Col.test - -set binlog_format=statement; --- source extra/rpl_tests/rpl_extraMaster_Col.test - -set binlog_format=mixed; --- source extra/rpl_tests/rpl_extraMaster_Col.test diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test b/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test new file mode 100644 index 00000000000..11211e51286 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test @@ -0,0 +1,17 @@ +############################################################# +# Purpose: To test having extra columns on the master WL#3915 +############################################################# +-- source include/master-slave.inc +-- source include/have_innodb.inc + +let $engine_type = 'InnoDB'; + +set binlog_format=row; +-- source extra/rpl_tests/rpl_extra_col_master.test + +set binlog_format=statement; +-- source extra/rpl_tests/rpl_extra_col_master.test + +set binlog_format=mixed; +-- source extra/rpl_tests/rpl_extra_col_master.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test b/mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test new file mode 100644 index 00000000000..2343d430784 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test @@ -0,0 +1,16 @@ +############################################################# +# Purpose: To test having extra columns on the master WL#3915 +############################################################# +-- source include/master-slave.inc + +let $engine_type = 'MyISAM'; + +set binlog_format=row; +-- source extra/rpl_tests/rpl_extra_col_master.test + +set binlog_format=statement; +-- source extra/rpl_tests/rpl_extra_col_master.test + +set binlog_format=mixed; +-- source extra/rpl_tests/rpl_extra_col_master.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test b/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test new file mode 100644 index 00000000000..8b2cb2ded1c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test @@ -0,0 +1,6 @@ +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc +-- source include/master-slave.inc +let $engine_type = 'InnoDB'; +-- source extra/rpl_tests/rpl_extra_col_slave.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test b/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test new file mode 100644 index 00000000000..52d312de878 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test @@ -0,0 +1,5 @@ +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc +let $engine_type = 'MyISAM'; +-- source extra/rpl_tests/rpl_extra_col_slave.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_failed_optimize.test b/mysql-test/suite/rpl/t/rpl_failed_optimize.test index 81e8342b5c0..798b3ef8b41 100644 --- a/mysql-test/suite/rpl/t/rpl_failed_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_failed_optimize.test @@ -1,10 +1,3 @@ -####################################### -# Wrapper for rpl_failed_optimize.test# -####################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test index aa2dee0fe57..8e1c9eb98b2 100644 --- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test +++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test @@ -204,4 +204,4 @@ SELECT * FROM t3; connection master; echo [on master]; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt index 95bca94fd3a..eb35347af33 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt @@ -1 +1 @@ --O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.1/data/relay-log +-O max_binlog_size=1M diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh deleted file mode 100755 index a321dd690cd..00000000000 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh +++ /dev/null @@ -1,5 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*.index - - diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt index e2aa63225a3..eb35347af33 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt @@ -1 +1 @@ --O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.2/data/relay-log +-O max_binlog_size=1M diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh deleted file mode 100755 index e46ea6d400b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh +++ /dev/null @@ -1,4 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/master-data/master.info -rm -f $MYSQLTEST_VARDIR/master-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/master-data/*.index - diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test index 487f910ba2b..d5d362bac0f 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -1,33 +1,12 @@ # Testing if "flush logs" command bouncing resulting in logs created in a loop # in case of bi-directional replication --- source include/master-slave.inc +--let $rpl_topology= 1->2->1 +--source include/rpl_init.inc let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR/ show variables like 'relay_log%'; -connection slave; ---disable_warnings -stop slave; ---enable_warnings ---replace_result $MASTER_MYPORT MASTER_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$MASTER_MYPORT; -start slave; - -# -# Start replication slave -> master -# -connection master; ---disable_warnings -stop slave; ---enable_warnings ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$SLAVE_MYPORT; - -source include/start_slave.inc; - # # Flush logs of slave # @@ -39,16 +18,16 @@ source include/start_slave.inc; CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; let $wait_binlog_event= CREATE TABLE t1; --source include/wait_for_binlog_event.inc -sync_slave_with_master; +sync_slave_with_master server_2; -connection master; +connection server_1; INSERT INTO t1 VALUE(1); FLUSH LOGS; -sync_slave_with_master; +sync_slave_with_master server_2; INSERT INTO t1 VALUE(2); let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1); -sync_slave_with_master master; +sync_slave_with_master server_1; # # Check that the master server's slave threads are still running and show @@ -59,7 +38,9 @@ sync_slave_with_master master; --source include/show_slave_status.inc --disable_query_log -connection master; +connection server_1; DROP TABLE t1; -sync_slave_with_master; +sync_slave_with_master server_2; --enable_query_log + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test index d085bff2012..ce28c0334ec 100644 --- a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test @@ -1,10 +1,3 @@ -################################### -# Wrapper for rpl_foreign_key.test# -################################### -# Change Author: JBM -# Change Date: 2006-01-17 -# Change: FK not supported, skip test when NDB is forced -#################################### -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_found_rows.test b/mysql-test/suite/rpl/t/rpl_found_rows.test index ff8d2c3107a..3e5d741d788 100644 --- a/mysql-test/suite/rpl/t/rpl_found_rows.test +++ b/mysql-test/suite/rpl/t/rpl_found_rows.test @@ -114,9 +114,8 @@ DELETE FROM logtbl; DROP PROCEDURE just_log; DROP PROCEDURE calc_and_log; DROP FUNCTION log_rows; -sync_slave_with_master; -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc --echo #### 2. Using mixed mode #### @@ -254,3 +253,4 @@ DROP PROCEDURE log_me_inner; DROP FUNCTION log_rows; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_free_items.test b/mysql-test/suite/rpl/t/rpl_free_items.test index 043e84160b8..581409cfc10 100644 --- a/mysql-test/suite/rpl/t/rpl_free_items.test +++ b/mysql-test/suite/rpl/t/rpl_free_items.test @@ -20,3 +20,4 @@ drop table t2; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_geometry.test b/mysql-test/suite/rpl/t/rpl_geometry.test index eac98924b98..769c49c96b1 100644 --- a/mysql-test/suite/rpl/t/rpl_geometry.test +++ b/mysql-test/suite/rpl/t/rpl_geometry.test @@ -23,4 +23,4 @@ sync_slave_with_master; connection master; drop table t1, t2; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_get_lock.test b/mysql-test/suite/rpl/t/rpl_get_lock.test index 87366f41ba2..f87932113ac 100644 --- a/mysql-test/suite/rpl/t/rpl_get_lock.test +++ b/mysql-test/suite/rpl/t/rpl_get_lock.test @@ -22,9 +22,7 @@ while ($1) dec $1; } enable_query_log; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; select get_lock("lock",3); select * from t1; # There is no point in testing REPLICATIION of the IS_*_LOCK @@ -41,8 +39,9 @@ select is_free_lock("lock2"); select is_free_lock(NULL); connection master1; drop table t1; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; + + +--source include/rpl_end.inc # End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test index 28f13c17042..ec1d6d57555 100644 --- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test +++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test @@ -7,12 +7,6 @@ # So they can't be verified by test case here. # Finish the following tests by calling its common test script: # extra/rpl_tests/rpl_get_master_version_and_clock.test. -# And meanwhile this test checks that the slave I/O thread refuses to start if slave -# and master have the same server id (because this is a useless setup, -# and otherwise SHOW SLAVE STATUS shows progress but all queries are -# ignored, which has caught our customers), unless -# --replicate-same-server-id. -# source include/master-slave.inc; source include/have_debug.inc; @@ -47,20 +41,6 @@ source extra/rpl_tests/rpl_get_master_version_and_clock.test; eval set global debug= '$debug_saved'; -#Test case 3: This test checks that the slave I/O thread refuses to start -#if slave and master have the same server id. -connection slave; -reset master; -# replicate ourselves -source include/stop_slave.inc; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; -start slave; - ---echo *** must be having the replicate-same-server-id IO thread error *** -let $slave_io_errno= 1593; -let $show_slave_io_error= 1; -source include/wait_for_slave_io_error.inc; # cleanup @@ -68,3 +48,4 @@ source include/wait_for_slave_io_error.inc; SET DEBUG_SYNC= 'RESET'; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_grant.test b/mysql-test/suite/rpl/t/rpl_grant.test index 6fbdafc0f9c..1091e5aab0d 100644 --- a/mysql-test/suite/rpl/t/rpl_grant.test +++ b/mysql-test/suite/rpl/t/rpl_grant.test @@ -36,3 +36,5 @@ sync_slave_with_master; --echo **** On Slave **** SELECT user,host FROM mysql.user WHERE user like 'dummy%'; SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test index c96b88a1b1a..141f3699b14 100644 --- a/mysql-test/suite/rpl/t/rpl_idempotency.test +++ b/mysql-test/suite/rpl/t/rpl_idempotency.test @@ -37,10 +37,7 @@ SELECT * FROM t2 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc # An insert of a row that already exists. Since we are replacing the # row if it already exists, the most apropriate representation is @@ -53,10 +50,7 @@ INSERT IGNORE INTO t1 VALUES (-2); SELECT * FROM t1 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc # BUG#19958: RBR idempotency issue for UPDATE and DELETE @@ -80,10 +74,7 @@ SELECT * FROM t2 ORDER BY a; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +--source include/check_slave_no_error.inc connection master; DROP TABLE t1, t2; @@ -211,12 +202,9 @@ select * from ti1 order by b /* must be (2),(3) */; --echo *** slave must stop (Trying to delete a referenced foreing key) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1451 = ER_ROW_ID_REFERENCED_2 +--let $slave_sql_errno= 1451 +--source include/wait_for_slave_sql_error.inc select * from ti1 order by b /* must be (1),(2),(3) - not deleted */; set foreign_key_checks= 0; @@ -245,12 +233,9 @@ insert into ti2 set a=3, b=3 /* offending write event */; --echo *** slave must stop (Trying to insert an invalid foreign key) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1452 = ER_NO_REFERENCED_ROW_2 +--let $slave_sql_errno= 1452 +--source include/wait_for_slave_sql_error.inc select * from ti2 order by b /* must be (2,2) */; set foreign_key_checks= 0; @@ -284,12 +269,9 @@ insert into ti1 set b=1 /* offending write event */; --echo *** slave must stop (Trying to insert a dupliacte key) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error.inc set foreign_key_checks= 0; delete from ti1 where b=1; @@ -319,12 +301,9 @@ DELETE FROM t1 WHERE a = -2; --echo *** slave must stop (Key was not found) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1032 = ER_KEY_NOT_FOUND +--let $slave_sql_errno= 1032 +--source include/wait_for_slave_sql_error.inc set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; @@ -337,12 +316,9 @@ connection master; DELETE FROM t2 WHERE a = -2; --echo *** slave must stop (Key was not found) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1032 = ER_KEY_NOT_FOUND +--let $slave_sql_errno= 1032 +source include/wait_for_slave_sql_error.inc; set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; @@ -359,12 +335,9 @@ UPDATE t1 SET a = 1 WHERE a = -1; --echo *** slave must stop (Key was not found) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1032 = ER_KEY_NOT_FOUND +--let $slave_sql_errno= 1032 +source include/wait_for_slave_sql_error.inc; set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; @@ -379,12 +352,9 @@ UPDATE t2 SET a = 1 WHERE a = -1; --echo *** slave must stop (Key was not found) connection slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); -disable_query_log; -eval SELECT "$last_error" AS Last_SQL_Error; -enable_query_log; +# 1032 = ER_KEY_NOT_FOUND +--let $slave_sql_errno= 1032 +source include/wait_for_slave_sql_error.inc; set global slave_exec_mode='IDEMPOTENT'; start slave sql_thread; @@ -399,6 +369,6 @@ connection master; set @@session.binlog_format= @save_binlog_format; drop table t1,t2,ti2,ti1; ---source include/master-slave-end.inc +--source include/rpl_end.inc --echo *** end of tests diff --git a/mysql-test/suite/rpl/t/rpl_ignore_grant.test b/mysql-test/suite/rpl/t/rpl_ignore_grant.test index 2e6e2ce9a31..34074ba8ca9 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_grant.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_grant.test @@ -57,3 +57,4 @@ delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_revoke.test b/mysql-test/suite/rpl/t/rpl_ignore_revoke.test index 00171605a92..db20e807afc 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_revoke.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_revoke.test @@ -49,3 +49,4 @@ sync_slave_with_master; # Since changes to mysql.* are ignored, the revoke need to # be done on slave as well delete from mysql.user where user="user_foo"; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test index b5666ad6e91..1ab7393d8fc 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test @@ -175,4 +175,6 @@ connection master; DROP TABLE t5; sync_slave_with_master; -call mtr.force_restart(); +--source include/force_restart.inc + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table_update.test b/mysql-test/suite/rpl/t/rpl_ignore_table_update.test index fe030f90411..840052e2f25 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table_update.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table_update.test @@ -36,3 +36,4 @@ sync_with_master; drop table mysqltest_foo,mysqltest_bar,t1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_incident.test b/mysql-test/suite/rpl/t/rpl_incident.test index 08096d03c11..b65441c7d50 100644 --- a/mysql-test/suite/rpl/t/rpl_incident.test +++ b/mysql-test/suite/rpl/t/rpl_incident.test @@ -37,3 +37,4 @@ source include/check_slave_is_running.inc; connection master; DROP TABLE t1; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_init_slave.test b/mysql-test/suite/rpl/t/rpl_init_slave.test index 58d1f6bdc01..1803b146819 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave.test @@ -25,10 +25,10 @@ set global init_connect="set @c=1"; show variables like 'init_connect'; connection master; sync_slave_with_master; -source include/stop_slave.inc; # Restore changed global variable set global init_connect= @my_global_init_connect; set global max_connections= default; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test index 180821730ec..cf72de18e13 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test @@ -53,10 +53,11 @@ start slave; # slave is going to stop because of emulated failures # but there won't be any crashes nor asserts hit. # -source include/wait_for_slave_to_stop.inc; +# 1593 = ER_SLAVE_FATAL_ERROR +--let $slave_sql_errno= 1593 +--let $show_slave_sql_error= 1 +--source include/wait_for_slave_sql_error.inc -let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1); -echo Reporting the following error: $error; call mtr.add_suppression("Failed during slave I/O thread initialization"); SET GLOBAL debug= ""; @@ -66,22 +67,23 @@ SET GLOBAL debug= ""; ###################################################################### connection slave; ---disable_warnings -stop slave; ---enable_warnings -source include/wait_for_slave_to_stop.inc; - reset slave; SET GLOBAL init_slave= "garbage"; start slave; -source include/wait_for_slave_sql_to_stop.inc; - -let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1); -echo Reporting the following error: $error; +# 1064 = ER_PARSE_ERROR +--let $slave_sql_errno= 1064 +--let $show_slave_sql_error= 1 +--source include/wait_for_slave_sql_error.inc ###################################################################### # Clean up ###################################################################### SET GLOBAL init_slave= ""; + +# Clean up Last_SQL_Error +--source include/stop_slave_io.inc +RESET SLAVE; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb.test b/mysql-test/suite/rpl/t/rpl_innodb.test index 64a85d27c88..b9b6080cfe5 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_innodb.test @@ -120,6 +120,6 @@ connection master; FLUSH LOGS; DROP DATABASE mysqltest1; --- source include/master-slave-end.inc +--source include/rpl_end.inc --echo End of 5.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test index 124cf4a956f..6b82f2f5334 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test @@ -150,4 +150,4 @@ DROP TABLE test.regular_tbl; DROP TABLE test.bykey_tbl; DROP TABLE test.byrange_tbl; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test b/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test index 4311328b064..9bfce61804b 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_bug30888.test @@ -62,5 +62,5 @@ connection master; DROP PROCEDURE test.proc_norm; DROP TABLE test.regular_tbl; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test b/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test index 6eb9c7075e4..5147e67c160 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_mixed_ddl.test @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -8,7 +6,4 @@ --source include/have_binlog_format_mixed.inc --source include/have_innodb.inc let $engine_type= innodb; - --source suite/rpl/include/rpl_mixed_ddl.inc - -# End 5.1 Test Case diff --git a/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test b/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test index d48e847a6c8..d04ced0f476 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_mixed_dml.test @@ -1,6 +1,4 @@ ######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 07/10/2006 # Purpose: testing the replication in mixed mode # Requirements: define binlog format for mysqld as in example below: # ./mysql-test-run.pl --mysqld=--binlog-format=mixed @@ -8,7 +6,4 @@ --source include/have_binlog_format_mixed.inc --source include/have_innodb.inc let $engine_type= innodb; - --source suite/rpl/include/rpl_mixed_dml.inc - -# End 5.1 Test Case diff --git a/mysql-test/suite/rpl/t/rpl_insert.test b/mysql-test/suite/rpl/t/rpl_insert.test index d304dfb6cc7..05793230b19 100644 --- a/mysql-test/suite/rpl/t/rpl_insert.test +++ b/mysql-test/suite/rpl/t/rpl_insert.test @@ -38,3 +38,4 @@ connection master; USE test; DROP SCHEMA mysqlslap; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_insert_id.test b/mysql-test/suite/rpl/t/rpl_insert_id.test index 45cc32c9d39..f2f62a207a0 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_id.test +++ b/mysql-test/suite/rpl/t/rpl_insert_id.test @@ -1,10 +1,6 @@ ################################# # Wrapper for rpl_insert_id.test# ################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=myisam; diff --git a/mysql-test/suite/rpl/t/rpl_insert_id_pk.test b/mysql-test/suite/rpl/t/rpl_insert_id_pk.test index 01f30b78ac5..c0d68855f85 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_id_pk.test +++ b/mysql-test/suite/rpl/t/rpl_insert_id_pk.test @@ -1,10 +1,6 @@ ################################# # Wrapper for rpl_insert_id.test# ################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_insert_ignore.test b/mysql-test/suite/rpl/t/rpl_insert_ignore.test index 2709430f85d..1d6c8e7168e 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_ignore.test +++ b/mysql-test/suite/rpl/t/rpl_insert_ignore.test @@ -7,3 +7,4 @@ let $engine_type=innodb; let $engine_type2=myisam; -- source extra/rpl_tests/rpl_insert_ignore.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_insert_select.test b/mysql-test/suite/rpl/t/rpl_insert_select.test index 677be526982..23bc7ecd167 100644 --- a/mysql-test/suite/rpl/t/rpl_insert_select.test +++ b/mysql-test/suite/rpl/t/rpl_insert_select.test @@ -17,3 +17,4 @@ select * from t1; connection master; drop table t1,t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features.test b/mysql-test/suite/rpl/t/rpl_invoked_features.test index e73964a6e14..7082117b9eb 100644 --- a/mysql-test/suite/rpl/t/rpl_invoked_features.test +++ b/mysql-test/suite/rpl/t/rpl_invoked_features.test @@ -308,3 +308,4 @@ DROP EVENT IF EXISTS e11; --sync_slave_with_master slave # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_killed_ddl.test b/mysql-test/suite/rpl/t/rpl_killed_ddl.test index 69648267ca4..6d86285484a 100644 --- a/mysql-test/suite/rpl/t/rpl_killed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_killed_ddl.test @@ -139,7 +139,7 @@ disable_warnings; ######## DATABASE ######## -let $diff_statement= SHOW DATABASES LIKE 'd%'; +--let $rpl_diff_statement= SHOW DATABASES LIKE \'d%\' send CREATE DATABASE d2; source include/kill_query_and_diff_master_slave.inc; @@ -158,7 +158,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## EVENT ######## -let $diff_statement= SELECT event_name, event_body, execute_at FROM information_schema.events where event_name like 'e%'; +--let $rpl_diff_statement= SELECT event_name, event_body, execute_at FROM information_schema.events where event_name like \'e%\' send CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY @@ -179,7 +179,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## FUNCTION ######## -let $diff_statement= SHOW FUNCTION STATUS LIKE 'f%'; +--let $rpl_diff_statement= SHOW FUNCTION STATUS LIKE \'f%\' send CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC RETURN 1; @@ -208,7 +208,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## PROCEDURE ######## -let $diff_statement= SHOW PROCEDURE STATUS LIKE 'p%'; +--let $rpl_diff_statement= SHOW PROCEDURE STATUS LIKE \'p%\' DELIMITER //; send CREATE PROCEDURE p2 (OUT rows INT) @@ -231,7 +231,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## TABLE ######## -let $diff_statement= SHOW TABLES LIKE 't%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'t%\' send CREATE TABLE t2 (b int); source include/kill_query_and_diff_master_slave.inc; @@ -244,7 +244,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## INDEX ######## -let $diff_statement= SHOW INDEX FROM t1; +--let $rpl_diff_statement= SHOW INDEX FROM t1 send CREATE INDEX i2 on t1 (a); source include/kill_query_and_diff_master_slave.inc; @@ -257,7 +257,7 @@ source include/kill_query_and_diff_master_slave.inc; # Tempoarily disabled, see bug#25705 -# let $diff_statement= SELECT * FROM mysql.server WHERE name like 's%'; +# --let $rpl_diff_statement= SELECT * FROM mysql.server WHERE name like \'s%\' # send CREATE SERVER s2 # FOREIGN DATA WRAPPER mysql @@ -281,7 +281,7 @@ connection master; CREATE TABLE IF NOT EXISTS t4 (a int); connection master1; -let $diff_statement= SHOW TRIGGERS LIKE 'v%'; +--let $rpl_diff_statement= SHOW TRIGGERS LIKE \'v%\' DELIMITER //; send CREATE TRIGGER tr2 BEFORE INSERT ON t4 @@ -300,7 +300,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## VIEW ######## -let $diff_statement= SHOW TABLES LIKE 'v%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'v%\' send CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100; source include/kill_query_and_diff_master_slave.inc; @@ -313,7 +313,7 @@ source include/kill_query_and_diff_master_slave.inc; ######## DROP TABLE ######## -let $diff_statement= SHOW TABLES LIKE 't%'; +--let $rpl_diff_statement= SHOW TABLES LIKE \'t%\' send DROP TABLE t1; source include/kill_query_and_diff_master_slave.inc; @@ -354,3 +354,4 @@ DROP PROCEDURE IF EXISTS p2; DROP PROCEDURE IF EXISTS p3; DROP PROCEDURE IF EXISTS p4; enable_warnings; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test index 5b31b094b62..a8c7c2c1f5b 100644 --- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test +++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test @@ -25,7 +25,7 @@ connection master; INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; SELECT * FROM t1; connection slave; ---source include/wait_for_slave_sql_to_stop.inc + # show the error message #1105 = ER_UNKNOWN_ERROR --let $slave_sql_errno= 1105 @@ -81,17 +81,25 @@ ON DUPLICATE KEY UPDATE t1.field_3 = t2.field_c; SELECT * FROM t1; connection slave; ---source include/wait_for_slave_sql_to_stop.inc + # show the error message #1105 = ER_UNKNOWN_ERROR --let $slave_sql_errno= 1105 --let $show_slave_sql_error= 1 --source include/wait_for_slave_sql_error.inc + # show that it was not replicated SELECT * FROM t1; connection master; + +# clean up drop table t1, t2; connection slave; drop table t1, t2; +# clear error message in sql thread +--source include/stop_slave_io.inc +RESET SLAVE; # End of 5.0 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_load_from_master.test b/mysql-test/suite/rpl/t/rpl_load_from_master.test index 0f085457817..6d09f71e809 100644 --- a/mysql-test/suite/rpl/t/rpl_load_from_master.test +++ b/mysql-test/suite/rpl/t/rpl_load_from_master.test @@ -179,3 +179,4 @@ drop database mysqltest2; drop database mysqltest3; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_load_table_from_master.test b/mysql-test/suite/rpl/t/rpl_load_table_from_master.test index aad113878d3..5474124c337 100644 --- a/mysql-test/suite/rpl/t/rpl_load_table_from_master.test +++ b/mysql-test/suite/rpl/t/rpl_load_table_from_master.test @@ -96,3 +96,4 @@ drop table t1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata.test b/mysql-test/suite/rpl/t/rpl_loaddata.test index 6f9ee4ef80a..4682e1e59eb 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_loaddata.test diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test index 031a0f6c351..768b61d5741 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test @@ -48,3 +48,4 @@ source include/rpl_loaddata_charset.inc; # LOAD DATA LOCAL INFILE let $LOAD_LOCAL=0; source include/rpl_loaddata_charset.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test index b8975308a86..ecbaddb6995 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test @@ -23,3 +23,4 @@ connection master; DROP TABLE t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_m.test b/mysql-test/suite/rpl/t/rpl_loaddata_m.test index 42c3ad99f33..bbe11bbb887 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_m.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_m.test @@ -50,3 +50,4 @@ DROP TABLE test.t1; sync_slave_with_master; # End of test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_map.test b/mysql-test/suite/rpl/t/rpl_loaddata_map.test index 1db7c4a893b..24c8221c20f 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_map.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map.test @@ -71,3 +71,4 @@ connection master; drop table t2; sync_slave_with_master; remove_file $MYSQLTEST_VARDIR/tmp/bug30435_5k.txt; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_s.test b/mysql-test/suite/rpl/t/rpl_loaddata_s.test index 2dd2218eb5c..80785bb562f 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_s.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_s.test @@ -26,3 +26,4 @@ source include/show_binlog_events.inc; connection master; drop table test.t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_simple.test b/mysql-test/suite/rpl/t/rpl_loaddata_simple.test index 439c2b48ca5..a09d3feec42 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_simple.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_simple.test @@ -12,3 +12,4 @@ SELECT * FROM t1 ORDER BY word; connection master; drop table t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test index 63e65834e5b..d6bc0ba2ed5 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test @@ -19,3 +19,4 @@ connection master; drop table t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddatalocal.test b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test index a93a82d6d9f..572c660faf7 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddatalocal.test +++ b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test @@ -168,3 +168,4 @@ SET SESSION sql_mode=@old_mode; sync_slave_with_master; connection master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loadfile.test b/mysql-test/suite/rpl/t/rpl_loadfile.test index adb23d2c2bc..ced0054c52c 100644 --- a/mysql-test/suite/rpl/t/rpl_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_loadfile.test @@ -58,8 +58,7 @@ # vii) assert that the contents of master and slave # table are the same -connection master; -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc connection master; let $file= $MYSQLTEST_VARDIR/tmp/bug_39701.data; @@ -105,11 +104,12 @@ sync_slave_with_master; # if the file was removed before the slave started, # meaning that contents were indeed transfered # through binlog (in row format) -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; # CLEAN UP +--connection master DROP TABLE t1; DROP PROCEDURE p; -sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_locale.test b/mysql-test/suite/rpl/t/rpl_locale.test index 2f2d637e1b4..0d6692dd89c 100644 --- a/mysql-test/suite/rpl/t/rpl_locale.test +++ b/mysql-test/suite/rpl/t/rpl_locale.test @@ -22,3 +22,4 @@ sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test index 239ddc5c8d4..484ffa52a44 100644 --- a/mysql-test/suite/rpl/t/rpl_log_pos.test +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -24,7 +24,7 @@ start slave; let $slave_io_errno= 1236; let $show_slave_io_error= 1; source include/wait_for_slave_io_error.inc; -source include/stop_slave.inc; +source include/stop_slave_sql.inc; connection master; source include/show_master_status.inc; @@ -44,3 +44,4 @@ drop table t1; sync_slave_with_master; --echo End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test index ecdf10ac2c2..b0d3b23b4e1 100644 --- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test +++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test @@ -58,10 +58,10 @@ FLUSH LOGS; # error to slave. call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log'); connection slave; -source include/wait_for_slave_io_to_stop.inc; -let $last_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -echo Last_IO_Error; -echo $last_error; +# 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG +--let $slave_io_errno= 1236 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc connection master; @@ -103,4 +103,4 @@ SHOW TABLES; connection master; DROP TABLE t1, t2, t3, t4; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_many_optimize.test b/mysql-test/suite/rpl/t/rpl_many_optimize.test index 91fab0b27a8..d5e9f69b4bc 100644 --- a/mysql-test/suite/rpl/t/rpl_many_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_many_optimize.test @@ -20,3 +20,4 @@ drop table t1; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test index 2f7b18ae04b..a6a49950300 100644 --- a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test +++ b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test @@ -27,3 +27,5 @@ echo "*** must be NULL ***"; select master_pos_wait('foo', 98); # End of 4.1 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index b84042160cd..9b7bfd35579 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -122,3 +122,4 @@ DROP FUNCTION test_replication_sf; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test b/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test index 55f6ad61446..d2aa8363060 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test @@ -76,3 +76,4 @@ sync_slave_with_master; connection master; DROP TABLE t1, t2, t3, t4, t5, t6, t7, t8; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test index 6a1f81abed3..96f7ae2e85b 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test @@ -44,3 +44,4 @@ drop table t2,t3,t5; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete.test b/mysql-test/suite/rpl/t/rpl_multi_delete.test index a251cbf8833..9df8ca4d29a 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_delete.test +++ b/mysql-test/suite/rpl/t/rpl_multi_delete.test @@ -24,3 +24,4 @@ connection slave; sync_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete2.test b/mysql-test/suite/rpl/t/rpl_multi_delete2.test index 81379d4056b..7317dfa8732 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_delete2.test +++ b/mysql-test/suite/rpl/t/rpl_multi_delete2.test @@ -66,3 +66,4 @@ drop database mysqltest_to; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_engine.test b/mysql-test/suite/rpl/t/rpl_multi_engine.test index 31c4a2050d7..b1dbf99f114 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_engine.test +++ b/mysql-test/suite/rpl/t/rpl_multi_engine.test @@ -102,3 +102,4 @@ DROP TABLE t1; sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update.test b/mysql-test/suite/rpl/t/rpl_multi_update.test index a6111455d16..710337816da 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_multi_update.test diff --git a/mysql-test/suite/rpl/t/rpl_multi_update2.test b/mysql-test/suite/rpl/t/rpl_multi_update2.test index 812a486ad69..497568f2738 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update2.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update2.test @@ -8,3 +8,4 @@ --source include/master-slave.inc let $engine_type=MyISAM; --source extra/rpl_tests/rpl_multi_update2.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update3.test b/mysql-test/suite/rpl/t/rpl_multi_update3.test index 5da91c26b04..f6e70f14b30 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update3.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update3.test @@ -8,3 +8,4 @@ --source include/master-slave.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_multi_update3.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_multi_update4.test b/mysql-test/suite/rpl/t/rpl_multi_update4.test index 4991a385f6f..8f069b9c18f 100644 --- a/mysql-test/suite/rpl/t/rpl_multi_update4.test +++ b/mysql-test/suite/rpl/t/rpl_multi_update4.test @@ -43,3 +43,4 @@ drop database d2; sync_slave_with_master; # End of test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test index bf5c6d2b921..beefd8bc0cf 100644 --- a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test +++ b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test @@ -54,3 +54,5 @@ if (!`SELECT '$before_position'='$after_position'`) DROP DATABASE `mysqltest-1`; connection slave; DROP DATABASE `#mysql50#mysqltest-1`; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_name_const.test b/mysql-test/suite/rpl/t/rpl_name_const.test index adb71d452ef..4cacafa0523 100644 --- a/mysql-test/suite/rpl/t/rpl_name_const.test +++ b/mysql-test/suite/rpl/t/rpl_name_const.test @@ -45,3 +45,4 @@ select * from t1 order by id; connection master; drop table t1; drop procedure test_procedure; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test index 9ff2e2d081e..2c5db21b0e3 100644 --- a/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test +++ b/mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test @@ -50,8 +50,9 @@ INSERT INTO t1 VALUES (RAND()); INSERT INTO t1 VALUES (LAST_INSERT_ID()); --sync_slave_with_master ---let $diff_table_1= master:test.t1 ---let $diff_table_2= slave:test.t1 +--let $diff_tables= master:t1, slave:t1 --source include/diff_tables.inc +--connection master DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test index dca0ea6589c..1e67ba4eda1 100644 --- a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test @@ -17,3 +17,4 @@ let $engine=Innodb; --source extra/rpl_tests/rpl_not_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test index 0c036f5bfd7..dcfaf006dad 100644 --- a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test @@ -16,3 +16,4 @@ let $engine=MyISAM; --source extra/rpl_tests/rpl_not_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_optimize.test b/mysql-test/suite/rpl/t/rpl_optimize.test index 87eb9dce818..b31a9e422fd 100644 --- a/mysql-test/suite/rpl/t/rpl_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_optimize.test @@ -56,3 +56,4 @@ sync_with_master; # starts, this test wil demonstrate nothing but will pass. # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test index 08a533e22ca..b11bd0a227e 100644 --- a/mysql-test/suite/rpl/t/rpl_packet.test +++ b/mysql-test/suite/rpl/t/rpl_packet.test @@ -43,20 +43,16 @@ select @@net_buffer_length, @@max_allowed_packet; create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; eval select count(*) from `$db`.`t1` /* must be 1 */; SHOW STATUS LIKE 'Slave_running'; select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; connection master; eval drop database $db; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; # # Bug #23755: Replicated event larger that max_allowed_packet infinitely re-transmits @@ -89,17 +85,21 @@ connection master; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); -# The slave I/O thread must stop after trying to read the above event -connection slave; ---source include/wait_for_slave_io_to_stop.inc -let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); ---echo Slave_IO_Running = $slave_io_running (expect No) + # # Bug#42914: The slave I/O thread must stop after trying to read the above # event, However there is no Last_IO_Error report. # -let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -eval SELECT "$last_io_error" AS Last_IO_Error; + +# The slave I/O thread must stop after trying to read the above event +connection slave; +# 1153 = ER_NET_PACKET_TOO_LARGE +--let $slave_io_errno= 1153 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc + +# TODO: this is needed because of BUG#55790. Remove once that is fixed. +--source include/stop_slave_sql.inc # # Bug#42914: On the master, if a binary log event is larger than @@ -107,7 +107,14 @@ eval SELECT "$last_io_error" AS Last_IO_Error; # is sent to a slave when it requests a dump from the master, thus leading the # I/O thread to stop. However, there is no Last_IO_Error reported. # -source include/master-slave-reset.inc; + +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc +--connection master +DROP TABLE t1; +--sync_slave_with_master + + connection master; CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM; sync_slave_with_master; @@ -117,12 +124,10 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), R connection slave; # The slave I/O thread must stop after receiving -# ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master. ---source include/wait_for_slave_io_to_stop.inc -let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); ---echo Slave_IO_Running = $slave_io_running (expect No) -let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1); -eval SELECT "$last_io_error" AS Last_IO_Error; +# 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master. +--let $slave_io_errno= 1236 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc # Remove the bad binlog and clear error status on slave. STOP SLAVE; @@ -165,4 +170,8 @@ eval SET @@global.net_buffer_length= $old_net_buffer_length; connection slave; DROP TABLE t1; +# Clear Last_IO_Error +RESET SLAVE; + +--source include/rpl_end.inc # End of tests diff --git a/mysql-test/suite/rpl/t/rpl_plugin_load.test b/mysql-test/suite/rpl/t/rpl_plugin_load.test index 100683922ad..5f9725a8e66 100644 --- a/mysql-test/suite/rpl/t/rpl_plugin_load.test +++ b/mysql-test/suite/rpl/t/rpl_plugin_load.test @@ -56,5 +56,5 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='EXAMPLE'; sync_slave_with_master; # # Cleanup ---source include/master-slave-end.inc +--source include/rpl_end.inc --echo End of test diff --git a/mysql-test/suite/rpl/t/rpl_ps.test b/mysql-test/suite/rpl/t/rpl_ps.test index b00dec6b80c..e93c68d0e10 100644 --- a/mysql-test/suite/rpl/t/rpl_ps.test +++ b/mysql-test/suite/rpl/t/rpl_ps.test @@ -72,75 +72,36 @@ stop slave; ############################################################################### ---echo --echo # Connection: slave ---echo --connection slave ---echo START SLAVE; ---echo --echo # Connection: master ---echo --connection master ---echo CREATE DATABASE mysqltest1; CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32)); ---echo PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)'; ---echo EXECUTE stmt_d_1; ---echo use mysqltest1; ---echo EXECUTE stmt_d_1; ---echo ---save_master_pos - ---echo --echo # Connection: slave ---echo ---connection slave ---sync_with_master +--sync_slave_with_master ---echo SELECT * FROM t1; ---echo --echo # Connection: master ---echo --connection master ---echo DROP DATABASE mysqltest1; ---echo use test; DROP TABLE t1; ---echo ---save_master_pos - ---echo ---echo # Connection: slave ---echo ---connection slave ---sync_with_master - ---echo -STOP SLAVE; - ---echo ---echo ######################################################################## - -############################################################################### -reset master; -reset slave; -disconnect master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test index ec50311fc7c..86dd2eb78eb 100644 --- a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test +++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test @@ -38,3 +38,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp --remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql --remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_read_only.test b/mysql-test/suite/rpl/t/rpl_read_only.test index 62864b62a28..c791bc3e1ea 100644 --- a/mysql-test/suite/rpl/t/rpl_read_only.test +++ b/mysql-test/suite/rpl/t/rpl_read_only.test @@ -111,3 +111,4 @@ sync_slave_with_master; set global read_only=0; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test b/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test index 156d53ef856..ca16a583fe5 100644 --- a/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test @@ -1,22 +1,4 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test b/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test index 1d8563e7fd9..13719cbdc33 100644 --- a/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test @@ -1,21 +1,3 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### -- source include/not_ndb_default.inc let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/suite/rpl/t/rpl_relayrotate.test b/mysql-test/suite/rpl/t/rpl_relayrotate.test index ec3e6be4bea..c1db2f334fa 100644 --- a/mysql-test/suite/rpl/t/rpl_relayrotate.test +++ b/mysql-test/suite/rpl/t/rpl_relayrotate.test @@ -9,3 +9,4 @@ -- source include/master-slave.inc let $engine_type=innodb; -- source extra/rpl_tests/rpl_relayrotate.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_relayspace.test b/mysql-test/suite/rpl/t/rpl_relayspace.test index 0fc564cdb46..bb34ec25bcd 100644 --- a/mysql-test/suite/rpl/t/rpl_relayspace.test +++ b/mysql-test/suite/rpl/t/rpl_relayspace.test @@ -35,3 +35,4 @@ start slave; select master_pos_wait('master-bin.001',200,6)=-1; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_replicate_do.test b/mysql-test/suite/rpl/t/rpl_replicate_do.test index 382e198aaf9..c6cbf819deb 100644 --- a/mysql-test/suite/rpl/t/rpl_replicate_do.test +++ b/mysql-test/suite/rpl/t/rpl_replicate_do.test @@ -88,3 +88,4 @@ connection master; drop table t1; drop table t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test index bcfef919fad..f1907456ed5 100644 --- a/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test +++ b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test @@ -28,3 +28,4 @@ connection master; drop database mysqltest1; drop database mysqltest2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_report.test b/mysql-test/suite/rpl/t/rpl_report.test index 8798905d372..a73442917fa 100644 --- a/mysql-test/suite/rpl/t/rpl_report.test +++ b/mysql-test/suite/rpl/t/rpl_report.test @@ -19,3 +19,4 @@ set @@global.report_host='my.new.address.net'; --echo end of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db.test b/mysql-test/suite/rpl/t/rpl_rewrt_db.test index 585b08be0b3..996ad0a10c7 100644 --- a/mysql-test/suite/rpl/t/rpl_rewrt_db.test +++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test @@ -237,3 +237,4 @@ connection master; sync_slave_with_master; # end of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt b/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt deleted file mode 100644 index 80190bf6d29..00000000000 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---server-id=2 diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh b/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh deleted file mode 100755 index 81490a54b4b..00000000000 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh +++ /dev/null @@ -1,2 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*relay* diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test index a2f7b522f1f..6ed690f91bf 100644 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test @@ -18,19 +18,14 @@ -- source include/have_binlog_format_mixed_or_statement.inc connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); + # Create empty file let $MYSQLD_SLAVE_DATADIR= `select @@datadir`; write_file $MYSQLD_SLAVE_DATADIR/master.info; EOF chmod 0000 $MYSQLD_SLAVE_DATADIR/master.info; connection slave; ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings # START SLAVE will fail because it can't read the file (mode 000) # (system error 13) @@ -97,11 +92,9 @@ connection master; set insert_id=1234; insert into t2 values(NULL); connection slave; ---source include/wait_for_slave_sql_to_stop.inc - -#restart slave skipping one event -set global sql_slave_skip_counter=1; -start slave; +# 1062 = ER_DUP_ENTRY +--let $slave_sql_errno= 1062 +--source include/wait_for_slave_sql_error_and_skip.inc connection master; @@ -194,3 +187,5 @@ show binlog events in ''; purge master logs before now(); --echo End of 5.0 tests +--source include/stop_slave.inc +CHANGE MASTER TO MASTER_HOST = ''; diff --git a/mysql-test/suite/rpl/t/rpl_row_001.test b/mysql-test/suite/rpl/t/rpl_row_001.test index 99eaebcdcaf..2dfc5e63d42 100644 --- a/mysql-test/suite/rpl/t/rpl_row_001.test +++ b/mysql-test/suite/rpl/t/rpl_row_001.test @@ -7,3 +7,4 @@ -- source include/master-slave.inc let $engine_type=MYISAM; -- source extra/rpl_tests/rpl_row_001.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_4_bytes.test b/mysql-test/suite/rpl/t/rpl_row_4_bytes.test index 73ef6dd2345..6130f74983e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_4_bytes.test +++ b/mysql-test/suite/rpl/t/rpl_row_4_bytes.test @@ -31,3 +31,4 @@ select * from t2 order by a; connection master; DROP DATABASE mysqltest1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_NOW.test b/mysql-test/suite/rpl/t/rpl_row_NOW.test index c28b714277e..d732c6e6733 100644 --- a/mysql-test/suite/rpl/t/rpl_row_NOW.test +++ b/mysql-test/suite/rpl/t/rpl_row_NOW.test @@ -72,3 +72,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave. sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_USER.test b/mysql-test/suite/rpl/t/rpl_row_USER.test index 7b13ebc50ee..010e0e6ea05 100644 --- a/mysql-test/suite/rpl/t/rpl_row_USER.test +++ b/mysql-test/suite/rpl/t/rpl_row_USER.test @@ -58,3 +58,4 @@ DROP USER ''@'localhost%'; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_UUID.test b/mysql-test/suite/rpl/t/rpl_row_UUID.test index b0ef96463d0..ce3a4ed40a9 100644 --- a/mysql-test/suite/rpl/t/rpl_row_UUID.test +++ b/mysql-test/suite/rpl/t/rpl_row_UUID.test @@ -7,3 +7,4 @@ -- source include/master-slave.inc let $engine_type=myisam; --source extra/rpl_tests/rpl_row_UUID.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test index b1f37e0bfe4..915e747dd45 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test @@ -34,13 +34,15 @@ USE test_ignore; connection master; DROP DATABASE test_ignore; +USE test; +DROP TABLE t1; sync_slave_with_master; +USE test; + # Bug#19995: Extreneous table maps generated for statements that does # not generate rows ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT); @@ -55,9 +57,7 @@ DROP TABLE t1; # BUG#17620: Replicate (Row Based) Fails when Query Cache enabled on # slave --echo ================ Test for BUG#17620 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc --echo **** On Slave **** connection slave; @@ -89,12 +89,13 @@ sync_slave_with_master; SELECT * FROM t1; SET GLOBAL QUERY_CACHE_SIZE=0; +--connection master +DROP TABLE t1; + # Bug#22550: Replication of BIT columns failing --echo ================ Test for BUG#22550 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; @@ -120,9 +121,7 @@ sync_slave_with_master; # field does not work --echo ================ Test for BUG#22583 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log +--source include/rpl_reset.inc # disabling warnings temporarily for ENGINE=INNODB to work without InnoDB --disable_warnings @@ -227,13 +226,10 @@ sync_slave_with_master; # row-based replication # -disable_query_log; -source include/master-slave-reset.inc; -enable_query_log; +--source include/rpl_reset.inc --echo **** On Master **** connection master; -SET SESSION BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT PRIMARY KEY, b SET('master','slave')); INSERT INTO t1 VALUES (1,'master,slave'), (2,'master,slave'); --echo **** On Slave **** @@ -241,7 +237,7 @@ sync_slave_with_master; UPDATE t1 SET a = 5, b = 'slave' WHERE a = 1; SELECT * FROM t1 ORDER BY a; # since bug#31552/31609 idempotency is not default any longer. In -# order the preceeding test UPDATE t1 to pass the mode is switched +# order for the preceeding test UPDATE t1 to pass, the mode is switched # temprorarily set @@global.slave_exec_mode= 'IDEMPOTENT'; --echo **** On Master **** @@ -255,9 +251,10 @@ let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); disable_query_log; eval SELECT "$last_error" AS Last_SQL_Error; enable_query_log; + SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; --echo **** On Master **** connection master; DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test index c5648fa1d77..f1f5c584543 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test @@ -4,3 +4,4 @@ let $type= 'MYISAM' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test index 3786a697e3f..d5dfcd7b75c 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test @@ -6,3 +6,4 @@ let $type= 'INNODB' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test b/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test index 687b3bc785d..3ec79ec8cd5 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test @@ -208,3 +208,4 @@ SHOW CREATE TABLE t1; DROP TABLE IF EXISTS t1; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test b/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test index 6aa6c2a31b9..eaf86688a29 100644 --- a/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test @@ -12,3 +12,4 @@ let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_row_blob.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test b/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test index 11f5336502a..482ccb7ecc0 100644 --- a/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test @@ -11,3 +11,4 @@ let $engine_type=myisam; -- source extra/rpl_tests/rpl_row_blob.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_colSize.test b/mysql-test/suite/rpl/t/rpl_row_colSize.test index 078e6886ec7..04434517518 100644 --- a/mysql-test/suite/rpl/t/rpl_row_colSize.test +++ b/mysql-test/suite/rpl/t/rpl_row_colSize.test @@ -166,3 +166,4 @@ DROP TABLE IF EXISTS t1; sync_slave_with_master; # END 5.1 Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_conflicts.test b/mysql-test/suite/rpl/t/rpl_row_conflicts.test index 59757e2e802..ce5332966ef 100644 --- a/mysql-test/suite/rpl/t/rpl_row_conflicts.test +++ b/mysql-test/suite/rpl/t/rpl_row_conflicts.test @@ -20,6 +20,8 @@ SET @old_slave_exec_mode= @@global.slave_exec_mode; SET @@global.slave_exec_mode = 'STRICT'; source extra/rpl_tests/rpl_conflicts.test; +--source include/rpl_reset.inc + --echo ######## Run with slave_exec_mode=IDEMPOTENT ######## @@ -28,4 +30,4 @@ source extra/rpl_tests/rpl_conflicts.test; SET @@global.slave_exec_mode= @old_slave_exec_mode; -source include/master-slave-end.inc; +--source include/rpl_end.inc 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 148032f2987..bfe480f724e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -29,7 +29,7 @@ SET GLOBAL storage_engine=memory; START SLAVE; --enable_query_log ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT, b INT); @@ -65,7 +65,7 @@ SELECT * FROM t5 ORDER BY a,b,c; --query_vertical SHOW CREATE TABLE t6 SELECT * FROM t6 ORDER BY a,b,c; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; # Test for erroneous constructions @@ -84,7 +84,7 @@ SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TEMPORARY TABLE tt4 (a INT, b INT); @@ -97,7 +97,7 @@ SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; CREATE TABLE t8 LIKE t4; @@ -127,7 +127,7 @@ START SLAVE; # table' from log): --echo ================ BUG#22864 ================ ---source include/master-slave-reset.inc +--source include/rpl_reset.inc connection master; SET AUTOCOMMIT=0; @@ -164,15 +164,7 @@ SET AUTOCOMMIT=1; sync_slave_with_master; # Some tests with temporary tables -connection slave; -STOP SLAVE; -RESET SLAVE; - -connection master; -RESET MASTER; - -connection slave; -START SLAVE; +--source include/rpl_reset.inc connection master; CREATE TABLE t1 (a INT); @@ -198,7 +190,7 @@ connection master; TRUNCATE TABLE t2; sync_slave_with_master; ---source include/reset_master_and_slave.inc +--source include/rpl_reset.inc connection master; BEGIN; @@ -247,7 +239,7 @@ sync_slave_with_master; # BUG#34707: Row based replication: slave creates table within wrong database # -source include/master-slave-reset.inc; +--source include/rpl_reset.inc connection master; --disable_warnings @@ -269,7 +261,7 @@ sync_slave_with_master; # with RBL # -source include/master-slave-reset.inc; +--source include/rpl_reset.inc connection master; CREATE TEMPORARY TABLE t7(c1 INT); @@ -299,6 +291,7 @@ DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3; DROP TEMPORARY TABLES t7; DROP TABLES t4, t5; DROP TABLES IF EXISTS bug48506_t4; + sync_slave_with_master; # @@ -308,9 +301,10 @@ sync_slave_with_master; connection master; CREATE TABLE t1 SELECT 1; CREATE TABLE IF NOT EXISTS t1 SELECT 1; -let $diff_table=test.t1; -source include/rpl_diff_tables.inc; +--let $diff_tables= master:test.t1,slave:test.t1 +--source include/diff_tables.inc DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc + --echo end of the tests diff --git a/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test b/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test index a0e74567349..db41ff09117 100644 --- a/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test +++ b/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test @@ -1,7 +1,3 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc let $engine_type=myisam; -- source extra/rpl_tests/rpl_row_delayed_ins.test diff --git a/mysql-test/suite/rpl/t/rpl_row_drop.test b/mysql-test/suite/rpl/t/rpl_row_drop.test index d18ebc2846b..eca2ae0f643 100644 --- a/mysql-test/suite/rpl/t/rpl_row_drop.test +++ b/mysql-test/suite/rpl/t/rpl_row_drop.test @@ -43,3 +43,4 @@ DROP TABLE IF EXISTS t2; sync_slave_with_master; --enable_warnings --enable_query_log +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_find_row.test b/mysql-test/suite/rpl/t/rpl_row_find_row.test index 9163ab54406..7f633c5aa97 100644 --- a/mysql-test/suite/rpl/t/rpl_row_find_row.test +++ b/mysql-test/suite/rpl/t/rpl_row_find_row.test @@ -50,7 +50,7 @@ DROP TABLE t; # but it gets disabled sometime. # Replication does not break anymore. # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master CREATE TABLE t (a int, b int, c int, key(b)); @@ -84,8 +84,7 @@ DROP TABLE t; # As a consquence, the wrong row would be updated. # --- connection master --- source include/master-slave-reset.inc +-- source include/rpl_reset.inc -- connection master CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2)); @@ -94,11 +93,11 @@ INSERT INTO t1(c1,c2) VALUES(1,2); UPDATE t1 SET c1=1000 WHERE c2=2; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE t1; -- sync_slave_with_master +--source include/rpl_end.inc 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..06955ef5a80 100644 --- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test @@ -14,4 +14,3 @@ let $rename_event_pos= 897; --disable_ps_protocol -- source extra/rpl_tests/rpl_flsh_tbls.test --enable_ps_protocol - diff --git a/mysql-test/suite/rpl/t/rpl_row_func001.test b/mysql-test/suite/rpl/t/rpl_row_func001.test index 53fb55118e6..6ff97388b31 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func001.test +++ b/mysql-test/suite/rpl/t/rpl_row_func001.test @@ -55,3 +55,4 @@ DROP TABLE test.t1; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_func002.test b/mysql-test/suite/rpl/t/rpl_row_func002.test index 44a704bfbc5..2f4e3fdd910 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func002.test +++ b/mysql-test/suite/rpl/t/rpl_row_func002.test @@ -102,3 +102,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func00 # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_func003.test b/mysql-test/suite/rpl/t/rpl_row_func003.test index 30b24cf4174..a17d70e4b04 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func003.test +++ b/mysql-test/suite/rpl/t/rpl_row_func003.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=INNODB; -- source extra/rpl_tests/rpl_row_func003.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test index 0c038c41ebf..b695428dd38 100644 --- a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test +++ b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test @@ -29,14 +29,16 @@ INSERT INTO t1 VALUES (1); --echo [on slave] connection slave; # slave should have stopped because can't find table t1 ---source include/wait_for_slave_sql_to_stop.inc -# see if we have a good error message: -let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); ---echo Last_SQL_Error = $err +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --echo ==== Clean up ==== -source include/stop_slave.inc; +source include/stop_slave_io.inc; +RESET SLAVE; --echo [on master] connection master; DROP TABLE t1; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test index 9aeb57c4fa2..71ae0cb5e17 100644 --- a/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test +++ b/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test @@ -12,3 +12,4 @@ set @@global.binlog_format = row; connection master; set @@global.binlog_format = @old_global_binlog_format; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_log.test b/mysql-test/suite/rpl/t/rpl_row_log.test index 197f83c85af..b156a4c8dd4 100644 --- a/mysql-test/suite/rpl/t/rpl_row_log.test +++ b/mysql-test/suite/rpl/t/rpl_row_log.test @@ -15,3 +15,4 @@ let $engine_type=MyISAM; -- source extra/rpl_tests/rpl_log.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_log_innodb.test b/mysql-test/suite/rpl/t/rpl_row_log_innodb.test index 16e775287b3..631fb29c7bc 100644 --- a/mysql-test/suite/rpl/t/rpl_row_log_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_log_innodb.test @@ -12,3 +12,4 @@ let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_log.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test index 3328d582692..6c9c2c056b0 100644 --- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test @@ -357,3 +357,4 @@ DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test index 67e4c4fb14d..57d67c5c71b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test @@ -8,3 +8,4 @@ -- let $engine= InnoDB -- source extra/rpl_tests/rpl_record_compare.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test index 43fa99a51da..e40cd615ca6 100644 --- a/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test @@ -12,7 +12,7 @@ -- echo ## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0 ## Added here because AFAIK it's only MyISAM and NDB that use Field_bits --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master -- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=$engine DEFAULT CHARSET=latin1 @@ -22,10 +22,10 @@ INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); UPDATE t1 SET c1= 0; -- sync_slave_with_master --- let $diff_table_1= master:test.t1 --- let $diff_table_2= slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE t1; -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp001.test b/mysql-test/suite/rpl/t/rpl_row_sp001.test index 1595c4a21d5..07345781225 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp001.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp001.test @@ -148,3 +148,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_sl --remove_file $MYSQLTEST_VARDIR/tmp/sp001_slave.sql # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test index e272e34e715..aec421407c9 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test @@ -1,10 +1,3 @@ -################################# -# Wrapper for rpl_row_sp002.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_row_sp003.test b/mysql-test/suite/rpl/t/rpl_row_sp003.test index 391ecd59b22..d4f1ce3ac6b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp003.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp003.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=INNODB; -- source extra/rpl_tests/rpl_row_sp003.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp005.test b/mysql-test/suite/rpl/t/rpl_row_sp005.test index f5a74325b7c..2a06a6ae1dc 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp005.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp005.test @@ -112,3 +112,4 @@ DROP TABLE IF EXISTS test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test index e5be4e6dc28..df3952bead1 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test @@ -11,3 +11,4 @@ -- source include/master-slave.inc let $engine_type=InnoDB; -- source extra/rpl_tests/rpl_row_sp006.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test index 41af5a5f997..fcac31df780 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test @@ -1,10 +1,3 @@ -################################# -# Wrapper for rpl_row_sp007.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc let $engine_type=INNODB; diff --git a/mysql-test/suite/rpl/t/rpl_row_sp008.test b/mysql-test/suite/rpl/t/rpl_row_sp008.test index b1295820c99..8c3e2966647 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp008.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp008.test @@ -55,3 +55,4 @@ DROP TABLE IF EXISTS test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp009.test b/mysql-test/suite/rpl/t/rpl_row_sp009.test index 92d47c6f50f..2f05a55e6f8 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp009.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp009.test @@ -103,3 +103,4 @@ DROP TABLE test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp010.test b/mysql-test/suite/rpl/t/rpl_row_sp010.test index 28b82217517..71ab3c1a772 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp010.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp010.test @@ -78,3 +78,4 @@ DROP TABLE IF EXISTS test.t2; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp011.test b/mysql-test/suite/rpl/t/rpl_row_sp011.test index 25c2fc9ad26..d2a323faad2 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp011.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp011.test @@ -109,3 +109,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_sl --remove_file $MYSQLTEST_VARDIR/tmp/sp011_slave.sql # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_sp012.test b/mysql-test/suite/rpl/t/rpl_row_sp012.test index 3a8d295121c..23bc92b51cf 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp012.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp012.test @@ -73,3 +73,4 @@ sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test index 9b24c78e62d..b9b7a2cfc0e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test +++ b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test @@ -28,5 +28,6 @@ select count(*) from t1; connection master; drop table t1; connection slave; # slave SQL thread is stopped -source include/stop_slave.inc; drop table t1; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test index ab4914e15fa..030ec7d6541 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test @@ -6,3 +6,4 @@ let $engine_type = 'MyISAM'; -- source extra/rpl_tests/rpl_row_tabledefs.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test index 7824fbfb663..35eddfc3ed4 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test @@ -7,3 +7,4 @@ let $engine_type = 'InnoDB'; -- source extra/rpl_tests/rpl_row_tabledefs.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test index d854aa64dc5..e8ac74f0125 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test +++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test @@ -193,8 +193,7 @@ FLUSH LOGS; -- connection master -- echo ### assertion: the slave replicated event successfully and tables match --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc DROP TABLE `t1`; @@ -229,7 +228,7 @@ DROP TABLE `t1`; # in both cases: when slave is replaying events and when # mysqlbinlog is used to read the binary log --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master # Create several tables with field_metadata_size ranging @@ -313,8 +312,7 @@ FLUSH LOGS; while($ntables) { -- echo ### assertion: the slave replicated event successfully and tables match for t$ntables - -- let $diff_table_1=master:test.t$ntables - -- let $diff_table_2=slave:test.t$ntables + -- let $diff_tables= master:t$ntables, slave:t$ntables -- source include/diff_tables.inc -- connection master @@ -337,4 +335,4 @@ while($ntables) ## For debugging purposes you might want not to remove these -- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog -- remove_file $generated_sql --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig001.test b/mysql-test/suite/rpl/t/rpl_row_trig001.test index 8669034713a..39f2662b569 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig001.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig001.test @@ -113,3 +113,4 @@ sync_slave_with_master; diff_files $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig002.test b/mysql-test/suite/rpl/t/rpl_row_trig002.test index 7ca8a68f060..2835d07ce2a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig002.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig002.test @@ -78,3 +78,4 @@ DROP TABLE test.t3; sync_slave_with_master; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig003.test b/mysql-test/suite/rpl/t/rpl_row_trig003.test index 5d667e29d69..a4c32e8947a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig003.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig003.test @@ -152,3 +152,4 @@ DROP TABLE IF EXISTS test.t3; diff_files $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql; # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trig004.test b/mysql-test/suite/rpl/t/rpl_row_trig004.test index a918c602d56..fa5f973c355 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trig004.test +++ b/mysql-test/suite/rpl/t/rpl_row_trig004.test @@ -16,3 +16,4 @@ let $engine_type=INNODB; -- source extra/rpl_tests/rpl_trig004.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test index 60e1cd73200..394bf949f72 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test +++ b/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test @@ -32,4 +32,4 @@ SELECT * FROM t2; DROP TABLE t1; connection master; DROP TABLE t2; ---source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test b/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test index 069700546ce..9e6485d6630 100644 --- a/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test +++ b/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test @@ -33,3 +33,4 @@ connection master; DROP TABLE t1, t2; sync_slave_with_master; connection master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test index 9e3cbbd325a..afd964ca81a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_until.test +++ b/mysql-test/suite/rpl/t/rpl_row_until.test @@ -4,9 +4,6 @@ # Note: The test is dependent on binlog positions -# prepare version for substitutions -let $VERSION=`select version()`; - # Create some events on master connection master; CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); @@ -121,3 +118,10 @@ START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=561; START SLAVE; --replace_result 740 MASTER_LOG_POS START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=740; + +--source include/stop_slave.inc +# Clear slave IO error. +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_view01.test b/mysql-test/suite/rpl/t/rpl_row_view01.test index 77e4b98f780..cc60ab9912c 100644 --- a/mysql-test/suite/rpl/t/rpl_row_view01.test +++ b/mysql-test/suite/rpl/t/rpl_row_view01.test @@ -95,3 +95,4 @@ sync_slave_with_master; # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_wide_table.test b/mysql-test/suite/rpl/t/rpl_row_wide_table.test index 7b17d7c4866..b1d16133096 100644 --- a/mysql-test/suite/rpl/t/rpl_row_wide_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_wide_table.test @@ -337,3 +337,4 @@ sync_slave_with_master; # END of Test Case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_server_id.test b/mysql-test/suite/rpl/t/rpl_server_id.test deleted file mode 100644 index 6e98ec6ee6d..00000000000 --- a/mysql-test/suite/rpl/t/rpl_server_id.test +++ /dev/null @@ -1,29 +0,0 @@ -# Test for BUG#28908 Replication: set global server_id is not setting the session server_id - --- source include/have_log_bin.inc - -let $saved_server_id=`select @@server_id`; -set global server_id=1; -reset master; - --- disable_warnings -drop table if exists t1,t2,t3; --- enable_warnings - -create table t1 (a int); -select @@server_id; -source include/show_binlog_events2.inc; - -set global server_id=2; -create table t2 (b int); -select @@server_id; -source include/show_binlog_events2.inc; - -set global server_id=3; -create table t3 (c int); -select @@server_id; -source include/show_binlog_events2.inc; - -# cleanup -eval set global server_id=$saved_server_id; -drop table t1,t2,t3; diff --git a/mysql-test/suite/rpl/t/rpl_server_id1.test b/mysql-test/suite/rpl/t/rpl_server_id1.test index c97f7975278..90198a4ac5e 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id1.test +++ b/mysql-test/suite/rpl/t/rpl_server_id1.test @@ -4,21 +4,19 @@ # ignored, which has caught our customers), unless # --replicate-same-server-id. -source include/master-slave.inc; -connection slave; -reset master; +--let $rpl_topology= 2->2 +--let $rpl_skip_start_slave= 1 +--source include/rpl_init.inc -# replicate ourselves -source include/stop_slave.inc; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; -start slave; +--connection server_2 +START SLAVE; +# 1593 = ER_SLAVE_FATAL_ERROR +--let $slave_io_errno= 1593 +--let $show_slave_io_error= 1 +--source include/wait_for_slave_io_error.inc -let $slave_param= Last_IO_Errno; -let $slave_param_value= 1593; -source include/wait_for_slave_param.inc; ---echo *** must be having the replicate-same-server-id IO thread error *** -let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1); -let $last_io_error= query_get_value("show slave status", Last_IO_Error, 1); -echo Slave_IO_Errno= $last_io_errno; -echo Slave_IO_Error= $last_io_error; +--source include/stop_slave_sql.inc +RESET SLAVE; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_server_id2.test b/mysql-test/suite/rpl/t/rpl_server_id2.test index 488a3aa6ab6..32d5e1ec8f2 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id2.test +++ b/mysql-test/suite/rpl/t/rpl_server_id2.test @@ -61,3 +61,4 @@ drop table t2; sync_slave_with_master; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_session_var.test b/mysql-test/suite/rpl/t/rpl_session_var.test index 50efc8930a1..4ea07d4f9d6 100644 --- a/mysql-test/suite/rpl/t/rpl_session_var.test +++ b/mysql-test/suite/rpl/t/rpl_session_var.test @@ -63,3 +63,4 @@ drop table t1; save_master_pos; connection slave; sync_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_charset.test b/mysql-test/suite/rpl/t/rpl_set_charset.test index c70eb2681f5..53ec08f752f 100644 --- a/mysql-test/suite/rpl/t/rpl_set_charset.test +++ b/mysql-test/suite/rpl/t/rpl_set_charset.test @@ -33,3 +33,4 @@ connection slave; sync_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test index dba79b78fa1..2d0c34e1d0a 100644 --- a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test @@ -4,3 +4,4 @@ -- let $engine= InnoDB -- source extra/rpl_tests/rpl_set_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_set_null_myisam.test b/mysql-test/suite/rpl/t/rpl_set_null_myisam.test index 7b433071553..13cd7c3e4a8 100644 --- a/mysql-test/suite/rpl/t/rpl_set_null_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_set_null_myisam.test @@ -3,3 +3,4 @@ -- let $engine= MyISAM -- source extra/rpl_tests/rpl_set_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sf.test b/mysql-test/suite/rpl/t/rpl_sf.test deleted file mode 100644 index 4d12f3839a2..00000000000 --- a/mysql-test/suite/rpl/t/rpl_sf.test +++ /dev/null @@ -1,187 +0,0 @@ --- source include/have_log_bin.inc - -# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR -# BUG#41166 stored function requires "deterministic" if binlog_format is "statement" - -# save status - -let $oblf=`select @@SESSION.BINLOG_FORMAT`; -let $otfc=`select @@log_bin_trust_function_creators`; - -set global log_bin_trust_function_creators=0; - - - -# fail *on definition* - -set binlog_format=STATEMENT; - -delimiter |; ---error ER_BINLOG_UNSAFE_ROUTINE -create function fn16456() - returns int -begin - return unix_timestamp(); -end| -delimiter ;| - - - -# force in definition, so we can see whether we fail on call - -set global log_bin_trust_function_creators=1; - -delimiter |; -create function fn16456() - returns int -begin - return unix_timestamp(); -end| -delimiter ;| - -set global log_bin_trust_function_creators=0; - - - -# allow funcall in RBR - -set binlog_format=ROW; - ---replace_column 1 timestamp -select fn16456(); - - - -# fail funcall in SBR - -set binlog_format=STATEMENT; - ---error ER_BINLOG_UNSAFE_ROUTINE -select fn16456(); - - - -# clean - -drop function fn16456; - - - -# success in definition with deterministic - -set global log_bin_trust_function_creators=0; - -delimiter |; -create function fn16456() - returns int deterministic -begin - return unix_timestamp(); -end| -delimiter ;| - - - -# allow funcall in RBR - -set binlog_format=ROW; - ---replace_column 1 timestamp -select fn16456(); - - - -# allow funcall in SBR - -set binlog_format=STATEMENT; - ---replace_column 1 timestamp -select fn16456(); - - - -# clean - -drop function fn16456; - - -# success in definition with NO SQL - -set global log_bin_trust_function_creators=0; - -delimiter |; -create function fn16456() - returns int no sql -begin - return unix_timestamp(); -end| -delimiter ;| - - - -# allow funcall in RBR - -set binlog_format=ROW; - ---replace_column 1 timestamp -select fn16456(); - - - -# allow funcall in SBR - -set binlog_format=STATEMENT; - ---replace_column 1 timestamp -select fn16456(); - - -# clean - -drop function fn16456; - - - -# success in definition with reads sql data - -set global log_bin_trust_function_creators=0; - -delimiter |; -create function fn16456() - returns int reads sql data -begin - return unix_timestamp(); -end| -delimiter ;| - - - -# allow funcall in RBR - -set binlog_format=ROW; - ---replace_column 1 timestamp -select fn16456(); - - - -# allow funcall in SBR - -set binlog_format=STATEMENT; - ---replace_column 1 timestamp -select fn16456(); - - - -# clean - -drop function fn16456; - - - -# restore status - ---disable_query_log -eval set binlog_format=$oblf; -eval set global log_bin_trust_function_creators=$otfc; ---enable_query_log diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_running.test b/mysql-test/suite/rpl/t/rpl_show_slave_running.test index 8a3e56975ad..e589e126186 100644 --- a/mysql-test/suite/rpl/t/rpl_show_slave_running.test +++ b/mysql-test/suite/rpl/t/rpl_show_slave_running.test @@ -80,3 +80,4 @@ connection slave; eval set global debug= '$debug_saved'; SET DEBUG_SYNC= 'RESET'; --echo End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test index 8d176ac0c3b..2853c95b212 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_error.test +++ b/mysql-test/suite/rpl/t/rpl_skip_error.test @@ -167,3 +167,4 @@ DROP TABLE t1; DROP TABLE t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test index 1a0ff8d52f0..70ebba0047b 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test +++ b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test @@ -62,7 +62,9 @@ SELECT * FROM t2 ORDER BY a; SELECT * FROM t3 ORDER BY a; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc SHOW TABLES LIKE 't%'; if (`SELECT @@BINLOG_FORMAT = 'ROW'`) { --replace_regex /AA/AA_for_row_or_XX_for_stmt_mixed/ @@ -77,7 +79,7 @@ if (!`SELECT @@BINLOG_FORMAT = 'ROW'`) { SELECT * FROM t2 ORDER BY a; } ---source include/stop_slave.inc +--source include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; --source include/start_slave.inc @@ -107,7 +109,9 @@ INSERT INTO t1 VALUES(2, 'B'); UPDATE t1 SET b = 'X' WHERE a = 2; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --connection master SELECT * FROM t1 ORDER BY a; @@ -119,7 +123,7 @@ SHOW TABLES LIKE 't%'; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; ---source include/stop_slave.inc +--source include/stop_slave_io.inc RENAME TABLE t3_bak TO t3; --source include/start_slave.inc @@ -151,7 +155,9 @@ INSERT INTO t3 VALUES (3, 'C'), (4, 'D'); COMMIT; --connection slave ---source include/wait_for_slave_sql_to_stop.inc +# 1146 = ER_NO_SUCH_TABLE +--let $slave_sql_errno= 1146 +--source include/wait_for_slave_sql_error.inc --connection master SELECT * FROM t1 ORDER BY a; @@ -163,7 +169,7 @@ SHOW TABLES LIKE 't%'; SELECT * FROM t1 ORDER BY a; SELECT * FROM t2 ORDER BY a; -source include/stop_slave.inc; +source include/stop_slave_io.inc; RENAME TABLE t3_bak TO t3; source include/start_slave.inc; @@ -174,3 +180,4 @@ DROP TABLE t1,t2,t3; --sync_slave_with_master # End of 5.1 test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_in.test b/mysql-test/suite/rpl/t/rpl_slave_load_in.test index 54ebdffce69..80a27479ae2 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_in.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_in.test @@ -31,12 +31,10 @@ commit; ########################################################################## sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; -let $diff_table_1=master:test.t2; -let $diff_table_2=slave:test.t2; +let $diff_tables= master:t2, slave:t2; source include/diff_tables.inc; ########################################################################## @@ -48,3 +46,4 @@ drop table t1; drop table t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index b7342fd1c40..d80a2ed9e25 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -42,8 +42,12 @@ connection master; drop table t1; -connection slave; +--source include/sync_slave_io_with_master.inc +--source include/stop_slave_io.inc +RESET SLAVE; drop table t1; call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3"); +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test index 68c41abf537..0481581998c 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test @@ -5,20 +5,17 @@ --source include/have_log_bin.inc --source include/not_embedded.inc -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); -connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,); +--let $rpl_skip_start_slave= 1 +--source include/master-slave.inc -connection slave; - ---replace_result $MASTER_MYPORT MASTER_MYPORT -eval CHANGE MASTER TO MASTER_USER='root', - MASTER_CONNECT_RETRY=1, - MASTER_HOST='127.0.0.1', - MASTER_PORT=$MASTER_MYPORT; +--connection slave START SLAVE; +# Why 12??? +--let $slave_sql_errno= 12 +source include/wait_for_slave_sql_error.inc; + +--source include/stop_slave_io.inc +RESET SLAVE; -source include/wait_for_slave_sql_to_stop.inc; -let $errno=query_get_value("show slave status", Last_SQL_Errno, 1); -echo $errno; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index 4c5930d74fe..2dddabf4b4c 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -299,3 +299,4 @@ connection master; DROP TABLE t10; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_status.test b/mysql-test/suite/rpl/t/rpl_slave_status.test index 4edf1802a5d..83a18474976 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_status.test +++ b/mysql-test/suite/rpl/t/rpl_slave_status.test @@ -55,15 +55,20 @@ source include/stop_slave.inc; START SLAVE; source include/wait_for_slave_sql_to_start.inc; ---echo ==== Verify that Slave_IO_Running = No ==== -let $result= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); ---echo Slave_IO_Running = $result (should be No) +--echo ==== Verify that Slave IO thread stopped with error ==== +# 1045 = ER_ACCESS_DENIED_ERROR +--let $slave_io_errno= 1045 +--source include/wait_for_slave_io_error.inc --echo ==== Cleanup (Note that slave IO thread is not running) ==== -DROP TABLE t1; -# cleanup: slave io thread has been stopped "irrecoverably" -# so we clean up mess manually + +# cleanup: slave io thread has is stopped so we reset replication +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc --echo [on master] connection master; DROP TABLE t1; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test index ced4859ebe7..76664705f99 100644 --- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test @@ -195,7 +195,7 @@ disconnect extra2; # BUG#50620: Adding an index to a table prevents slave from logging into slow log # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master SET @old_log_output= @@log_output; @@ -306,3 +306,4 @@ DROP TABLE t1; -- sync_slave_with_master SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp.test b/mysql-test/suite/rpl/t/rpl_sp.test index 243136a0d38..10e23eb5928 100644 --- a/mysql-test/suite/rpl/t/rpl_sp.test +++ b/mysql-test/suite/rpl/t/rpl_sp.test @@ -643,3 +643,4 @@ drop function mysqltestbug36570_f1; # Cleanup sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp004.test b/mysql-test/suite/rpl/t/rpl_sp004.test index 967e7007c15..b916c78a6fb 100644 --- a/mysql-test/suite/rpl/t/rpl_sp004.test +++ b/mysql-test/suite/rpl/t/rpl_sp004.test @@ -95,3 +95,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_sl # End of 5.0 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test index 63ac3a8ad9c..df13ff253b1 100644 --- a/mysql-test/suite/rpl/t/rpl_sp_effects.test +++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test @@ -261,3 +261,4 @@ SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creato sync_slave_with_master; --echo end of the tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sporadic_master.test b/mysql-test/suite/rpl/t/rpl_sporadic_master.test index 824f7abc9f5..2a60a5c5e29 100644 --- a/mysql-test/suite/rpl/t/rpl_sporadic_master.test +++ b/mysql-test/suite/rpl/t/rpl_sporadic_master.test @@ -27,3 +27,4 @@ drop table t1,t2; sync_slave_with_master; # End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test index 803b08eeec5..0ba88a62242 100644 --- a/mysql-test/suite/rpl/t/rpl_ssl.test +++ b/mysql-test/suite/rpl/t/rpl_ssl.test @@ -97,4 +97,14 @@ drop user replssl@localhost; drop table t1; sync_slave_with_master; +--source include/stop_slave.inc +CHANGE MASTER TO + master_user = 'root', + master_ssl = 0, + master_ssl_ca = '', + master_ssl_cert = '', + master_ssl_key = ''; + --echo End of 5.0 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_ssl1.test b/mysql-test/suite/rpl/t/rpl_ssl1.test index eca6a8cf46e..0a64415dbd8 100644 --- a/mysql-test/suite/rpl/t/rpl_ssl1.test +++ b/mysql-test/suite/rpl/t/rpl_ssl1.test @@ -9,11 +9,8 @@ source include/master-slave.inc; connection master; grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int); -save_master_pos; -#syncing with master -connection slave; -sync_with_master; +sync_slave_with_master; #trying to use this user without ssl stop slave; @@ -37,9 +34,7 @@ start slave; #avoiding unneeded sleeps connection master; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; #checking that replication is ok select * from t1; @@ -56,9 +51,8 @@ start slave; connection master; drop user replssl@localhost; drop table t1; -save_master_pos; -connection slave; -sync_with_master; + +sync_slave_with_master; source include/show_slave_status.inc; source include/check_slave_is_running.inc; # End of 4.1 tests @@ -90,6 +84,19 @@ select * from t1; source include/show_slave_status.inc; --source include/check_slave_is_running.inc +# ==== Clean up ==== + connection master; drop table t1; sync_slave_with_master; +--source include/stop_slave.inc +CHANGE MASTER TO + master_host="127.0.0.1", + master_ssl_ca ='', + master_ssl_cert='', + master_ssl_key='', + master_ssl_verify_server_cert=0, + master_ssl=0; + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test index d9b87427321..5011dd7735a 100644 --- a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test @@ -121,3 +121,4 @@ drop table t1i, t2m; sync_slave_with_master; # End of tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index aee067b2d4a..9841ecb040a 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -1,2 +1,128 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_000001.test +# Requires binlog_format=statement format since query involving +# get_lock() is logged in row format if binlog_format=mixed or row. +-- source include/have_binlog_format_statement.inc +-- source include/master-slave.inc + +--let $engine_type= myisam +CALL mtr.add_suppression("Statement may not be safe to log in statement format."); + +# Load some data into t1 +create table t1 (word char(20) not null); +load data infile '../../std_data/words.dat' into table t1; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1; +select * from t1 limit 10; + +# +# Test slave with wrong password +# +sync_slave_with_master; +stop slave; +connection master; +set password for root@"localhost" = password('foo'); +connection slave; +start slave; +connection master; +# +# Give slave time to do at last one failed connect retry +# This one must be short so that the slave will not stop retrying +real_sleep 2; +set password for root@"localhost" = password(''); +# Give slave time to connect (will retry every second) +sleep 2; + +create table t3(n int); +insert into t3 values(1),(2); +sync_slave_with_master; +select * from t3; +select sum(length(word)) from t1; +connection master; +drop table t1,t3; +sync_slave_with_master; + +# Test if the slave SQL thread can be more than 16K behind the slave +# I/O thread (> IO_SIZE) + +connection master; +# we'll use table-level locking to delay slave SQL thread +eval create table t1 (n int) engine=$engine_type; +sync_slave_with_master; +connection master; +reset master; +connection slave; +stop slave; +reset slave; + +connection master; +let $1=5000; +# Generate 16K of relay log +disable_query_log; +while ($1) +{ + eval insert into t1 values($1); + dec $1; +} +enable_query_log; + +# Try to cause a large relay log lag on the slave by locking t1 +connection slave; +lock tables t1 read; +start slave; +#hope this is long enough for I/O thread to fetch over 16K relay log data +sleep 3; +unlock tables; + +#test handling of aborted connection in the middle of update + +connection master; +create table t2(id int); +insert into t2 values(connection_id()); + +connection master1; +# Avoid generating result +create temporary table t3(n int); +--disable_warnings +insert into t3 select get_lock('crash_lock%20C', 1) from t2; +--enable_warnings + +connection master; +send update t1 set n = n + get_lock('crash_lock%20C', 2); +connection master1; +sleep 3; +select (@id := id) - id from t2; +kill @id; +# We don't drop t3 as this is a temporary table +drop table t2; +connection master; +# The get_lock function causes warning for unsafe statement. +--disable_warnings +--error 1317,2013 +reap; +--enable_warnings +connection slave; +# The SQL slave thread should now have stopped because the query was killed on +# the master (so it has a non-zero error code in the binlog). +# 1053 = ER_SERVER_SHUTDOWN +--let $slave_sql_errno= 1053 +--source include/wait_for_slave_sql_error_and_skip.inc + +select count(*) from t1; +connection master1; +drop table t1; +create table t1 (n int); +insert into t1 values(3456); +insert into mysql.user (Host, User, Password) + VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); +select select_priv,user from mysql.user where user = _binary'blafasel2'; +update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; +select select_priv,user from mysql.user where user = _binary'blafasel2'; +sync_slave_with_master; +select n from t1; +select select_priv,user from mysql.user where user = _binary'blafasel2'; +connection master1; +drop table t1; +delete from mysql.user where user="blafasel2"; +sync_slave_with_master; + +# End of 4.1 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test b/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test index a8139bbbcd2..6381150217f 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test +++ b/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test @@ -108,3 +108,4 @@ DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; enable_warnings; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test index f0c36c7b40c..2a899b06a2d 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test +++ b/mysql-test/suite/rpl/t/rpl_stm_binlog_direct.test @@ -228,3 +228,4 @@ sync_slave_with_master; --echo ################################################################################### SET @commands= 'clean'; --source extra/rpl_tests/rpl_mixing_engines.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_conflicts.test b/mysql-test/suite/rpl/t/rpl_stm_conflicts.test index 07b7a0bf8f7..cd9e71cbff9 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_conflicts.test +++ b/mysql-test/suite/rpl/t/rpl_stm_conflicts.test @@ -1,11 +1,6 @@ -# See the top of mysql-test/extra/rpl_tests/rpl_conflicts.test for an -# explanation of what this test does. -# -# This test file is for statement-logging mode. - source include/have_binlog_format_mixed_or_statement.inc; source include/master-slave.inc; source extra/rpl_tests/rpl_conflicts.test; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test b/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test index 69866cad267..b72a2e1532d 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test +++ b/mysql-test/suite/rpl/t/rpl_stm_create_if_not_exists.test @@ -11,4 +11,4 @@ source extra/rpl_tests/rpl_stm_create_if_not_exists.test; let $is_temporary=1; source extra/rpl_tests/rpl_stm_create_if_not_exists.test; -source include/master-slave-end.inc; +--source include/rpl_end.inc 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..71272c1d01d 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test @@ -3,6 +3,3 @@ let $rename_event_pos= 656; -- source extra/rpl_tests/rpl_flsh_tbls.test - -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed. diff --git a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test index d55e3a4da2c..e9ee040c890 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test +++ b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test @@ -18,3 +18,4 @@ set @@global.binlog_format = mixed; connection master; set @@global.binlog_format = @old_global_binlog_format; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_loadfile.test b/mysql-test/suite/rpl/t/rpl_stm_loadfile.test index 3db8385a2f2..acf8c9a1bde 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_stm_loadfile.test @@ -18,3 +18,4 @@ -- source extra/rpl_tests/rpl_loadfile.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_log.test b/mysql-test/suite/rpl/t/rpl_stm_log.test index 7bc17fbaada..7e7e1d4033f 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_log.test +++ b/mysql-test/suite/rpl/t/rpl_stm_log.test @@ -7,3 +7,4 @@ let $engine_type=MyISAM; # End of 4.1 tests # Adding comment for force manual merge 5.0 -> wl1012: Delete me +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test b/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test index 950aa8b322a..1a7139c889a 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test +++ b/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test @@ -6,6 +6,3 @@ # Requires statement logging -- source include/have_binlog_format_mixed_or_statement.inc -- source extra/rpl_tests/rpl_max_relay_size.test - -# End of 4.1 tests -# diff --git a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test index 4086fd03ca1..575180e9177 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test @@ -8,7 +8,7 @@ # BUG#49522: Replication problem with mixed MyISAM/InnoDB # --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master CREATE TABLE `t1` ( @@ -32,12 +32,11 @@ SET AUTOCOMMIT=1; -- sync_slave_with_master --- let $diff_table_1=master:test.t1 --- let $diff_table_2=slave:test.t1 +-- let $diff_tables= master:t1, slave:t1 -- source include/diff_tables.inc -- connection master DROP TABLE `t1`; -- sync_slave_with_master --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_multi_query.test b/mysql-test/suite/rpl/t/rpl_stm_multi_query.test index c39d1fad015..e234f4b9622 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_multi_query.test +++ b/mysql-test/suite/rpl/t/rpl_stm_multi_query.test @@ -3,10 +3,5 @@ # CLIENT_MULTI_STATEMENTS) will be binlogged ONE-query-per-event (not # one binlog event containing all queries) -# Requires statement logging -- source include/have_binlog_format_mixed_or_statement.inc -- source extra/rpl_tests/rpl_multi_query.test - - -# End of 4.1 tests -# diff --git a/mysql-test/suite/rpl/t/rpl_stm_no_op.test b/mysql-test/suite/rpl/t/rpl_stm_no_op.test index 66dc89bd712..1605b177ac4 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_no_op.test +++ b/mysql-test/suite/rpl/t/rpl_stm_no_op.test @@ -91,3 +91,4 @@ select * from t2; connection master; drop table t1, t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test b/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test index d5aac4a43e2..0eb41d1c6bd 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test +++ b/mysql-test/suite/rpl/t/rpl_stm_sql_mode.test @@ -22,3 +22,4 @@ DROP TABLE t1; -- echo # duplicate key error (because it has received event -- echo # with expected error code). -- sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test index ee9501681a1..7f041ae5123 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_until.test +++ b/mysql-test/suite/rpl/t/rpl_stm_until.test @@ -69,7 +69,7 @@ select * from t1; --let $slave_param_value= $master_log_pos_1 --source include/check_slave_param.inc -let $relay_log_file= slave-relay-bin.000004; +let $relay_log_file= slave-relay-bin.000003; let $master_log_pos= $master_log_pos_2; source include/get_relay_log_pos.inc; # try replicate all up to and not including the second insert to t2; @@ -192,10 +192,9 @@ sync_with_master; # to substitute the genuine one with a prepared on 4.1 server. # ---source include/master-slave-reset.inc +--source include/rpl_reset.inc connection master; -drop table if exists t1; # there is create table t1 in bug47142_master-bin.000001 flush logs; let $MYSQLD_DATADIR= `select @@datadir`; --remove_file $MYSQLD_DATADIR/master-bin.000001 @@ -213,9 +212,7 @@ show tables /* t1 must exist */; drop table t1; # drop on slave only, master does not have t1. stop slave; -reset slave; - -connection master; -reset master; # End of tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stop_slave.test index e44cf3e94b7..e7c67448dbe 100644 --- a/mysql-test/suite/rpl/t/rpl_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test @@ -57,4 +57,4 @@ SET GLOBAL debug= '$debug_save'; connection master; DROP TABLE t1, t2; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test index e6c1d5256a0..02bb386fe3b 100644 --- a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test +++ b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test @@ -611,3 +611,4 @@ sync_slave_with_master; connection master; # Restore binlog format setting set global binlog_format =@my_binlog_format; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temp_table.test b/mysql-test/suite/rpl/t/rpl_temp_table.test index 9b73961aeea..4118e9783fa 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table.test @@ -54,6 +54,7 @@ show status like 'Slave_open_temp_tables'; connect (master2,localhost,root,,); connection master2; drop table if exists t1,t2; -save_master_pos; -connection slave; -sync_with_master; +sync_slave_with_master; + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test index fa3f7929c1c..2369a3c00e2 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test @@ -32,6 +32,7 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; --connection master disconnect master; +--echo [on master1] --connection master1 # waiting DROP TEMPORARY TABLE event to be written into binlog @@ -47,7 +48,10 @@ SHOW STATUS LIKE "Slave_open_temp_tables"; --echo ==== Clean up ==== --echo [on master] ---connection master1 +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc +--connection master DROP TABLE t1; --echo [on slave] @@ -89,8 +93,7 @@ sync_slave_with_master; # 10. in the end the slave should not have open temp tables. # -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); --- source include/master-slave-reset.inc +--source include/rpl_reset.inc -- connection master # action: setup environment @@ -191,11 +194,13 @@ COMMIT; source include/show_binlog_events.inc; +--sync_slave_with_master + --echo # Compare the base table. -let diff_table= test.t1; -source include/rpl_diff_tables.inc; +--let $diff_tables= master:t1, slave:t1 +--source include/diff_tables.inc --echo connection master; DROP TABLE t1; -source include/master-slave-end.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test index 29b214e5169..a195c6de447 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary.test +++ b/mysql-test/suite/rpl/t/rpl_temporary.test @@ -291,10 +291,15 @@ select * from t1; connection master; drop table t1; --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql +--sync_slave_with_master -# Delete the anonymous users +# Delete the anonymous users. +--source include/stop_slave.inc source include/delete_anonymous_users.inc; - +--connection master +source include/delete_anonymous_users.inc; +--let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc # @@ -326,9 +331,7 @@ connection slave; DROP USER user43748@127.0.0.1; ---echo -- done. back to master. -connection master; - - --echo End of 5.1 tests +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors.test b/mysql-test/suite/rpl/t/rpl_temporary_errors.test index 611f54e821f..7ebaa10e9db 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test +++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test @@ -27,13 +27,13 @@ set @@global.slave_exec_mode= default; SHOW STATUS LIKE 'Slave_retried_transactions'; SELECT * FROM t1; source include/check_slave_is_running.inc; -DROP TABLE t1; --echo **** On Master **** connection master; -SET SQL_LOG_BIN= 0; DROP TABLE t1; -SET SQL_LOG_BIN= 1; +--sync_slave_with_master +--connection master + # BUG#Bug #53259 Unsafe statement binlogged in statement format w/MyIsam temp tables # @@ -71,3 +71,5 @@ ROLLBACK; source include/show_binlog_events.inc; DROP TABLE t_myisam, t_innodb; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_test_framework.cnf b/mysql-test/suite/rpl/t/rpl_test_framework.cnf new file mode 100644 index 00000000000..8934d1c9ae1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_test_framework.cnf @@ -0,0 +1,46 @@ +!include ../my.cnf +[mysqld.1] +log-slave-updates +[mysqld.2] +log-slave-updates +[mysqld.3] +log-slave-updates +[mysqld.4] +log-slave-updates +[mysqld.5] +log-slave-updates +[mysqld.6] +log-slave-updates +[mysqld.7] +log-slave-updates +[mysqld.8] +log-slave-updates +[mysqld.9] +log-slave-updates +#[mysqld.10] +#log-slave-updates +#[mysqld.11] +#log-slave-updates +#[mysqld.12] +#log-slave-updates +#[mysqld.13] +#log-slave-updates +#[mysqld.14] +#log-slave-updates +#[mysqld.15] +#log-slave-updates + +[ENV] +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYPORT_4= @mysqld.4.port +SERVER_MYPORT_5= @mysqld.5.port +SERVER_MYPORT_6= @mysqld.6.port +SERVER_MYPORT_7= @mysqld.7.port +SERVER_MYPORT_8= @mysqld.8.port +SERVER_MYPORT_9= @mysqld.9.port +#SERVER_MYPORT_10= @mysqld.10.port +#SERVER_MYPORT_11= @mysqld.11.port +#SERVER_MYPORT_12= @mysqld.12.port +#SERVER_MYPORT_13= @mysqld.13.port +#SERVER_MYPORT_14= @mysqld.14.port +#SERVER_MYPORT_15= @mysqld.15.port diff --git a/mysql-test/suite/rpl/t/rpl_test_framework.test b/mysql-test/suite/rpl/t/rpl_test_framework.test new file mode 100644 index 00000000000..e0f961caff1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_test_framework.test @@ -0,0 +1,143 @@ +# ==== Purpose ==== +# +# Test that the sync chain generated by +# include/rpl_change_topology.inc (sourced from include/rpl_init.inc) +# is correct. +# +# We test a number of different topologies. Each topology is tested +# in extra/rpl_tests/rpl_test_framework.inc. See +# extra/rpl_tests/rpl_test_framework.inc for details on how the sync +# chain is tested. +# +# ==== Related bugs ==== +# +# BUG#49978: Replication tests don't clean up replication state at the end + + +# We only need to execute this test once. Also, we rely on 'DELETE +# FROM t1' to remove rows in slave tables that don't exist in master +# tables (see include/rpl_test_framework.inc for details). +--source include/have_binlog_format_statement.inc + + +--echo ==== Create t1 on all servers. ==== +if ($mtr_supports_more_than_10_servers) +{ + --let $rpl_server_count= 15 + --let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15 +} +if (!$mtr_supports_more_than_10_servers) +{ + --let $rpl_server_count= 9 + --let $rpl_topology= 1->2->3->4->5->6->7->8->9 +} +--source include/rpl_init.inc +CREATE TABLE t1 (a INT); +--source include/rpl_end.inc + +# Initialize $next_number before first call to +# extra/rpl_tests/rpl_test_framework.text +--let $next_number= 0 + + +--echo ==== Test 3-server topologies ==== + +--let $rpl_server_count= 3 + +--let $rpl_topology= 1 -> 2 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2 -> 3 +--let $masters= 1,2 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= none +--let $masters= 1,2,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2, 2->1 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->1 +--let $masters= 2,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2->1->2 +--let $masters= 1,3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->3 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 2->3->2->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2,2->3,3->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->3->2->1 +--let $masters= 3 +--source extra/rpl_tests/rpl_test_framework.inc + + +--echo ==== Test 6-server topologies ==== + +--let $rpl_server_count= 6 + +--let $rpl_topology= 1->2->3->4->1->5->6 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 3->4->5->6->3->1->2 +--let $masters= 4 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 6->5->4->3->2->1 +--let $masters= 6 +--source extra/rpl_tests/rpl_test_framework.inc + +--let $rpl_topology= 1->2->3->1,4->5->6 +--let $masters= 3,4 +--source extra/rpl_tests/rpl_test_framework.inc + + +--echo ==== Test 9-server topology ==== + +--let $rpl_server_count= 9 + +--let $rpl_topology= 1->2, 2->3, 3->4, 4->5, 5->1, 1->6, 6->7, 6->8, 8->9 +--let $masters= 2 +--source extra/rpl_tests/rpl_test_framework.inc + +if ($mtr_supports_more_than_10_servers) { +--echo ==== Test 15-server topologies ==== + +--let $rpl_server_count= 15 + +--let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15->1 +--let $masters= 2 +--source extra/rpl_tests/rpl_test_framework.inc + +# This is a binary tree +--let $rpl_topology= 1->2->4->8,1->3->6->12,2->5->10,3->7->14,4->9,5->11,6->13,7->15 +--let $masters= 1 +--source extra/rpl_tests/rpl_test_framework.inc +} + +--echo ==== Clean up ==== + +if ($mtr_supports_more_than_10_servers) { + --let $rpl_topology= 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15 +} +if (!$mtr_supports_more_than_10_servers) { + --let $rpl_topology= 1->2->3->4->5->6->7->8->9 +} +--source include/rpl_init.inc +--connection server_1 +DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_timezone.test b/mysql-test/suite/rpl/t/rpl_timezone.test index 45d1f12b5d5..5b8b1df2652 100644 --- a/mysql-test/suite/rpl/t/rpl_timezone.test +++ b/mysql-test/suite/rpl/t/rpl_timezone.test @@ -164,6 +164,8 @@ SET @@session.time_zone = default; connection master; DROP TABLE t1; SET @@session.time_zone = default; +--sync_slave_with_master +--source include/stop_slave.inc # Bug#41719 delayed INSERT into timestamp col needs set time_zone for concurrent binlogging # To test that time_zone is correctly binloging for 'insert delayed' statement @@ -196,4 +198,7 @@ select * from t1 order by a; DROP TABLE t1; SET @@session.time_zone = default; +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc + --echo End of 5.0 tests diff --git a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test index b3efb578b68..cbd4ed5a097 100644 --- a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test +++ b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test @@ -12,3 +12,4 @@ LET $ENGINE_TYPE= MyISAM; source extra/rpl_tests/rpl_tmp_table_and_DDL.test; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test index afa80e9c3f5..861b76ed00a 100644 --- a/mysql-test/suite/rpl/t/rpl_trigger.test +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -312,20 +312,19 @@ let $MYSQLD_DATADIR= `select @@datadir`; FLUSH LOGS; # Stop master server ---echo --> Stop master server ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---shutdown_server 10 ---source include/wait_until_disconnected.inc +--let $rpl_server_number= 1 +--source include/rpl_stop_server.inc + # Replace binlog remove_file $MYSQLD_DATADIR/master-bin.000001; copy_file $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLD_DATADIR/master-bin.000001; - ---echo --> Start master server ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---enable_reconnect ---source include/wait_until_connected_again.inc + +--let $rpl_server_number= 1 +--source include/rpl_start_server.inc + let $binlog_version= query_get_value(SHOW BINLOG EVENTS, Info, 1); + # Make the slave to replay the new binlog. --echo --> Master binlog: $binlog_version @@ -501,7 +500,8 @@ sync_slave_with_master; # connection master; -source include/master-slave-reset.inc; +--source include/rpl_reset.inc + source include/have_innodb.inc; connection slave; source include/have_innodb.inc; @@ -518,12 +518,10 @@ insert into t1 values ( 1 ); rollback; sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; --source include/diff_tables.inc -let $diff_table_1=master:test.log; -let $diff_table_2=slave:test.log; +let $diff_tables= master:log, slave:log; --source include/diff_tables.inc connection master; @@ -533,3 +531,4 @@ sync_slave_with_master; # # End of tests # +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_trunc_temp.test index 88ecb7c18b0..0e7d5483f62 100644 --- a/mysql-test/suite/rpl/t/rpl_trunc_temp.test +++ b/mysql-test/suite/rpl/t/rpl_trunc_temp.test @@ -52,3 +52,6 @@ let $wait_binlog_event= DROP; source include/wait_for_binlog_event.inc; show status like 'Slave_open_temp_tables'; + + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test b/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test index a0f0ea04f44..bea6332963e 100644 --- a/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test @@ -1,4 +1,3 @@ --source include/not_ndb_default.inc let $engine=MyISAM; --source extra/rpl_tests/rpl_truncate.test - diff --git a/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test b/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test index a31fd62a29a..093cf56a316 100644 --- a/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test +++ b/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test @@ -1,6 +1,4 @@ - --source include/have_innodb.inc --source include/not_ndb_default.inc - let $engine=InnoDB; --source extra/rpl_tests/rpl_truncate.test diff --git a/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test b/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test index e7882b28065..d4aae5736b4 100644 --- a/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_typeconv_innodb.test @@ -6,17 +6,16 @@ # BUG#49618: Field length stored incorrectly in binary log for InnoDB # -source include/reset_master_and_slave.inc; - connection master; CREATE TABLE t1(b1 BIT(1), b2 BIT(2), b3 BIT(3)) ENGINE=InnoDB; INSERT INTO t1 VALUES (b'0', b'01', b'101'); sync_slave_with_master; -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; connection master; DROP TABLE t1; sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_udf.test b/mysql-test/suite/rpl/t/rpl_udf.test index 262ad04630c..452431e2f52 100644 --- a/mysql-test/suite/rpl/t/rpl_udf.test +++ b/mysql-test/suite/rpl/t/rpl_udf.test @@ -20,3 +20,4 @@ set binlog_format=statement; # Embedded server doesn't support binlogging --source include/rpl_udf.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_user.test b/mysql-test/suite/rpl/t/rpl_user.test index b8fe41d03c4..caa17b47733 100644 --- a/mysql-test/suite/rpl/t/rpl_user.test +++ b/mysql-test/suite/rpl/t/rpl_user.test @@ -59,3 +59,4 @@ select Host,User from mysql.user where Host='fakehost'; # connection master; source include/show_binlog_events.inc; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_user_variables.test b/mysql-test/suite/rpl/t/rpl_user_variables.test index 8d570f28f64..d496458c3fb 100644 --- a/mysql-test/suite/rpl/t/rpl_user_variables.test +++ b/mysql-test/suite/rpl/t/rpl_user_variables.test @@ -378,4 +378,5 @@ DROP FUNCTION f2; DROP TABLE t1; sync_slave_with_master; -stop slave; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_variables.test b/mysql-test/suite/rpl/t/rpl_variables.test index 6c3b3ab6d8a..001b8a6bc8e 100644 --- a/mysql-test/suite/rpl/t/rpl_variables.test +++ b/mysql-test/suite/rpl/t/rpl_variables.test @@ -109,9 +109,7 @@ SET @user_text = 'Alunda'; # Stop slave so that we get a fresh sql thread, reading the slave's # global values of variables into its local copies. ---echo [on master] -connection master; -source include/reset_master_and_slave.inc; +--source include/rpl_reset.inc # We would have wanted to set this together with the other variables # above, but can't because it affects how the slave works. @@ -679,30 +677,11 @@ EXECUTE p61; EXECUTE p62; EXECUTE p63; EXECUTE p64; # Show the result in table test.tstmt on master... SELECT * FROM tstmt ORDER BY id; -let $diff_table_1=master:test.tstmt; -# ... then compare test.tstmt on master to the other tables on master... -let $diff_table_2=master:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=master:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=master:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=master:test.tprep; -source include/diff_tables.inc; +--sync_slave_with_master -# ... and to all tables on slave. -connection master; -sync_slave_with_master; -let $diff_table_2=slave:test.tstmt; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tprep; +# ... then compare test.tstmt on master to the other tables on master and slave. +let $diff_tables= master:tstmt,tproc,tfunc,ttrig,tprep, slave:tstmt,tproc,tfunc,ttrig,tprep; source include/diff_tables.inc; @@ -737,3 +716,4 @@ SET @@global.sync_binlog= @s_sync_binlog; connection master; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_variables_stm.test b/mysql-test/suite/rpl/t/rpl_variables_stm.test index 85152ae878a..f2f535f27d1 100644 --- a/mysql-test/suite/rpl/t/rpl_variables_stm.test +++ b/mysql-test/suite/rpl/t/rpl_variables_stm.test @@ -575,29 +575,11 @@ EXECUTE p61; EXECUTE p62; EXECUTE p63; EXECUTE p64; # Show the result in table test.tstmt on master... SELECT * FROM tstmt ORDER BY id; -let $diff_table_1=master:test.tstmt; -# ... then compare test.tstmt on master to the other tables on master... -let $diff_table_2=master:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=master:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=master:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=master:test.tprep; -source include/diff_tables.inc; +--sync_slave_with_master -# ... and to all tables on slave. -sync_slave_with_master; -let $diff_table_2=slave:test.tstmt; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tproc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tfunc; -source include/diff_tables.inc; -let $diff_table_2=slave:test.ttrig; -source include/diff_tables.inc; -let $diff_table_2=slave:test.tprep; +# ... then compare test.tstmt on master to the other tables on master and slave. +let $diff_tables= master:tstmt,tproc,tfunc,ttrig,tprep, slave:tstmt,tproc,tfunc,ttrig,tprep; source include/diff_tables.inc; @@ -634,3 +616,4 @@ SET @@global.collation_database= @s_collation_database; connection master; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_view.test b/mysql-test/suite/rpl/t/rpl_view.test index 1053514bfec..5d878fda205 100644 --- a/mysql-test/suite/rpl/t/rpl_view.test +++ b/mysql-test/suite/rpl/t/rpl_view.test @@ -183,3 +183,4 @@ DROP TABLE t1; sync_slave_with_master; --echo End of 5.0 tests +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result index 28ca1ac43b9..eae70ca5a69 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET storage_engine=ndb; === NDB -> MYISAM === @@ -805,3 +801,4 @@ TRUNCATE TABLE t1; DROP TABLE IF EXISTS t1; drop table mysql.ndb_apply_status; set @@global.slave_exec_mode= @old_slave_exec_mode; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result index 6babf49dcaa..136aee25fe2 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=NDB; @@ -38,3 +34,4 @@ DROP PROCEDURE test.p1; DROP FUNCTION test.fn1; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result index 0fcd361da21..5e44591f87e 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] *** on slave there should be zero rows *** select count(*) from mysql.ndb_apply_status; count(*) @@ -18,3 +14,4 @@ select count(*) from mysql.ndb_apply_status; count(*) 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result index dd4cc90a75f..c537fb85ad2 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] ***************** Test 1 ************************ CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; @@ -168,3 +164,4 @@ a 32 42 drop table t1; +include/rpl_end.inc 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 d43165e2b5e..6109ea0b742 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', `nom` char(4) default NULL, `prenom` char(4) default NULL, @@ -140,7 +136,8 @@ set GLOBAL slave_transaction_retries=1; **** On Master **** UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; **** On Slave **** -Last_SQL_Error = Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834 +include/wait_for_slave_sql_error.inc [errno=1205 ] +Last_SQL_Error = 'Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834' set GLOBAL slave_transaction_retries=10; include/start_slave.inc select * from t1 order by nid; @@ -191,3 +188,4 @@ c1 104 105 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result index c11de8c27e3..537af85d766 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 ( a int not null primary key, b text not null @@ -133,3 +129,4 @@ S testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 S testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 S testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result index 055efffbd6a..4fb33dc4b6b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; ***** Table Create Section **** @@ -154,3 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; +include/rpl_end.inc 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 dfbd7a37d8e..7ff7830449f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result @@ -1,12 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -RESET MASTER; -CHANGE MASTER TO master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; -START SLAVE; +include/rpl_init.inc [topology=1->2->1] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating slave] CREATE TABLE t1 (a int key, b int) ENGINE=ndb; SHOW TABLES; Tables_in_test @@ -17,11 +11,12 @@ SELECT * FROM t1 ORDER BY a; a b 1 2 2 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT * FROM t1 ORDER BY a; a b 1 2 2 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc STOP SLAVE; DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result index b7d4a3d76db..75aa37f99f3 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result @@ -1,21 +1,8 @@ -STOP SLAVE; -STOP SLAVE; -STOP SLAVE; -STOP SLAVE; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -RESET MASTER; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_MYPORT,master_user='root'; -START SLAVE; -RESET SLAVE; -CHANGE MASTER TO master_host='127.0.0.1',master_port=SLAVE_MYPORT1,master_user='root'; -START SLAVE; +include/rpl_init.inc [topology=1->2,4->3] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating master1] +include/rpl_connect.inc [creating slave] +include/rpl_connect.inc [creating slave1] *** Check server_id of mysqld servers *** SHOW VARIABLES LIKE "server_id"; @@ -45,20 +32,20 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, *** Basic testing *** Insert rows via all hosts Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] *** Transaction testing *** BEGIN; BEGIN; COMMIT; COMMIT; Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] BEGIN; BEGIN; ROLLBACK; ROLLBACK; Check data on both clusters -Comparing tables master:test.t1 and slave:test.t1 -DROP TABLE t1; +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE IF EXISTS t1; +include/rpl_end.inc 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 99438d663bb..f3a4c132ee3 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 @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (a int key, b int) ENGINE=NDB; SHOW TABLES; Tables_in_test @@ -12,9 +8,9 @@ RESET MASTER; INSERT INTO t1 VALUES (1,2); INSERT INTO t1 VALUES (2,3); STOP SLAVE; -CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=SLAVE_PORT,MASTER_USER="root"; +include/rpl_change_topology.inc [new topology=1->2->1] START SLAVE; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT * FROM t1 ORDER BY a; a b 1 2 @@ -25,5 +21,6 @@ SELECT * FROM t1 ORDER BY a; a b 1 2 2 3 -Checking that both slave threads are running. +include/check_slave_is_running.inc DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result index 3fc4ca26967..21546ed6524 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (a INT) ENGINE=NDB; begin; insert into t1 values(1); @@ -11,3 +7,4 @@ flush tables with read lock; commit; unlock tables; drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result index a6e2144f532..aa67c678773 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] show variables like 'collation_server'; Variable_name Value collation_server ucs2_unicode_ci @@ -25,3 +21,4 @@ nid nom prenom 1 XYZ1 ABC1 ==== clean up ==== DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result index 6a0c863440e..6fda18ba207 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' @@ -70,3 +66,4 @@ drop datafile 'datafile02.dat' engine=ndb; DROP TABLESPACE ts1 ENGINE=NDB; DROP LOGFILE GROUP lg1 ENGINE=NDB; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result index c906f00bd40..acead977487 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] --- Doing pre test cleanup --- DROP TABLE IF EXISTS t1; CREATE LOGFILE GROUP lg1 @@ -788,3 +784,4 @@ drop datafile 'datafile02.dat' engine=ndb; DROP TABLESPACE ts1 ENGINE=NDB; DROP LOGFILE GROUP lg1 ENGINE=NDB; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result index e668b57293e..3ceb66f076a 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] -------- switch to master ------- SET AUTOCOMMIT = 1; @@ -1626,3 +1622,4 @@ use test; -------- switch to master ------- DROP DATABASE mysqltest1; DROP DATABASE mysqltest3; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result index 1cecb030181..5f61e4d7803 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int, b int) engine=NDB; insert into t1 values(1,1); select * from t1; @@ -13,3 +9,4 @@ delete from t1; select * from t1; a b drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result index 316f5fc7e31..6171d10657f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP DATABASE IF EXISTS replica; CREATE DATABASE replica; CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; @@ -56,3 +52,4 @@ Tables_in_test USE test; DROP TABLE t1, t2; DROP DATABASE IF EXISTS replica; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result index dda2844f6d0..6ac55944e33 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; @@ -24,3 +20,4 @@ ERROR 23000: Duplicate entry '3' for key 'PRIMARY' INSERT INTO t1 VALUES (3, repeat('bad too',1)); ERROR 23000: Duplicate entry '3' for key 'PRIMARY' DROP TABLE IF EXISTS t1, t2; +include/rpl_end.inc 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 1a79affabe6..9ae340d713e 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** @@ -54,7 +50,8 @@ a b c 3 4 QA TESTING *** Start Slave *** START SLAVE; -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. +include/wait_for_slave_sql_error.inc [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.' STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -83,10 +80,8 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [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' *** Drop t3 *** DROP TABLE t3; *** Create t4 on slave *** @@ -108,10 +103,8 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [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' *** Drop t4 *** DROP TABLE t4; *** Create t5 on slave *** @@ -133,10 +126,8 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [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' *** Drop t5 *** DROP TABLE t5; *** Create t6 on slave *** @@ -157,7 +148,8 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), ******************************************** *** Expect slave to fail with Error 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 +include/wait_for_slave_sql_error.inc [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' SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -231,10 +223,8 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [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' *** Drop t10 *** DROP TABLE t10; *** Create t11 on slave *** @@ -255,10 +245,8 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [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' *** Drop t11 *** DROP TABLE t11; *** Create t12 on slave *** @@ -468,10 +456,8 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; ******************************************** *** Expect slave to fail with Error 1060 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [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'' *** Try to insert in master **** INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); SELECT * FROM t15 ORDER BY c1; @@ -571,9 +557,8 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); ******************************************** *** Expect slave to fail with Error 1535 *** ******************************************** ---source include/wait_for_slave_sql_error_and_skip.inc -Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2; -include/start_slave.inc +include/wait_for_slave_sql_error_and_skip.inc [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' ** DROP table t17 *** DROP TABLE t17; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result index 7e750f2ce2a..3829d1468fd 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CALL mtr.add_suppression('Statement may not be safe to log in statement format.'); DROP FUNCTION IF EXISTS test.f1; DROP TABLE IF EXISTS test.t1; @@ -28,3 +24,4 @@ ROLLBACK; SET AUTOCOMMIT=1; DROP FUNCTION test.f1; DROP TABLE test.t1; +include/rpl_end.inc 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 e2755c04f28..019b8bc4cf0 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; INSERT INTO t1 VALUES ("row1","will go away",1); SELECT * FROM t1 ORDER BY c3; @@ -32,11 +28,12 @@ SELECT * FROM t1 ORDER BY c3; c1 c2 c3 row3 C 3 row4 D 4 -Checking that both slave threads are running. +include/check_slave_is_running.inc STOP SLAVE; CHANGE MASTER TO master_log_file = 'master-bin.000001', master_log_pos = ; +include/check_slave_no_error.inc START SLAVE; SELECT * FROM t1 ORDER BY c3; c1 c2 c3 @@ -62,5 +59,6 @@ COMMIT; SELECT * FROM t1; c1 c2 c3 row2 new on slave 2 -Checking that both slave threads are running. +include/check_slave_is_running.inc DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result index 4c96ccf85ee..9fb019bf6e5 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET storage_engine=innodb; --- Doing pre test cleanup --- DROP TABLE IF EXISTS t1; @@ -917,3 +913,4 @@ DELETE FROM t1; --- End test 5 key partition testing --- --- Do Cleanup --- DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result index 7c3f331958f..a01841af003 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] create table t1 (a int, unique(a)) engine=ndbcluster; create table t2 (a int, unique(a)) engine=innodb; begin; @@ -101,3 +97,4 @@ select count(*) from t2; count(*) 0 drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result index 030845e89e2..195392ae0c5 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, b int unsigned, @@ -68,3 +64,4 @@ a b 5 5 6 6 drop table t1, t2; +include/rpl_end.inc 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 85ecb13bd66..a20e5d03595 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] include/stop_slave.inc reset master; reset slave; @@ -256,18 +252,13 @@ slave-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status) slave-bin.000002 # Write_rows # # table_id: # slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F slave-bin.000002 # Query # # COMMIT -Checking that both slave threads are running. +include/check_slave_is_running.inc show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; -stop slave; -drop table if exists t1,t2,t3,t4,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/rpl_reset.inc create table t1(a int auto_increment primary key, b int); insert into t1 values (NULL, 1); set insert_id=5; @@ -289,3 +280,4 @@ a b 5 1 6 1 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result index 7caa88a16a1..d8b01dc1f5b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE tmyisam (a int) ENGINE = MYISAM; CREATE TABLE tinnodb (a int) ENGINE = INNODB; CREATE TABLE tndb (a int) ENGINE = NDB; @@ -477,10 +473,11 @@ a 151 152 [on slave] -Comparing tables master:test.tmyisam and slave:test.tmyisam -Comparing tables master:test.tinnodb and slave:test.tinnodb -Comparing tables master:test.tndb and slave:test.tndb +include/diff_tables.inc [master:tmyisam, slave:tmyisam] +include/diff_tables.inc [master:tinnodb, slave:tinnodb] +include/diff_tables.inc [master:tndb, slave:tndb] ==== Clean up ==== [on master] DROP TABLE tmyisam, tinnodb, tndb; [on slave] +include/rpl_end.inc 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..3e88f846164 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 @@ -1,10 +1,6 @@ ==== 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; +include/master-slave.inc +[connection master] ---- setup master ---- CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM; CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB; @@ -274,13 +270,14 @@ a 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 +include/diff_tables.inc [master:myisam_innodb, slave:myisam_innodb] +include/diff_tables.inc [master:innodb_myisam, slave:innodb_myisam] +include/diff_tables.inc [master:myisam_ndb, slave:myisam_ndb] +include/diff_tables.inc [master:ndb_myisam, slave:ndb_myisam] +include/diff_tables.inc [master:innodb_ndb, slave:innodb_ndb] +include/diff_tables.inc [master:ndb_innodb, slave:ndb_innodb] ==== Clean up ==== drop table myisam_innodb, innodb_myisam; drop table myisam_ndb, ndb_myisam; drop table innodb_ndb, ndb_innodb; +include/rpl_end.inc 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 05524ae1ae3..97463efae94 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; reset master; SHOW TABLES; @@ -27,11 +23,8 @@ 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 -CHANGE MASTER TO -master_port=, -master_log_file = 'MASTER_LOG_FILE', -master_log_pos = MASTER_LOG_POS ; -start slave; +include/rpl_change_topology.inc [new topology=3->2] +include/start_slave.inc INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); DELETE FROM t1 WHERE c3 = 1; UPDATE t1 SET c2="should go away" WHERE c3 = 2; @@ -54,4 +47,4 @@ row4 D 4 row5 E 5 ==== clean up ==== DROP TABLE t1; -STOP SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result index 5d00ae6598c..f3142678ff8 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] drop table if exists t1,t2; CREATE TABLE t1 ( a int unsigned not null auto_increment primary key, @@ -53,3 +49,4 @@ select * from t1; a 3 drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result index dc4e11c9c9e..d1cc10a930c 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] -------- Test for BUG#9361 -------- CREATE TABLE t1 ( @@ -195,3 +191,4 @@ idpro price nbprice 2 1.0000 2 3 2.0000 1 DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result index eb7d88c812b..d167a85bb8b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET storage_engine=myisam; --- Doing pre test cleanup --- DROP TABLE IF EXISTS t1; @@ -917,3 +913,4 @@ DELETE FROM t1; --- End test 5 key partition testing --- --- Do Cleanup --- DROP TABLE IF EXISTS t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result index 4e28a7e5865..801e1c0a9f2 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP DATABASE IF EXISTS replica; CREATE DATABASE replica; CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; @@ -52,3 +48,4 @@ Tables_in_test USE test; DROP TABLE t1, t2; DROP DATABASE IF EXISTS replica; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result index 7f75bdedd65..333e943d3ca 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (word CHAR(20) NOT NULL); LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1; @@ -53,3 +49,4 @@ SELECT n FROM t1; n 3456 DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result index 473cd63169c..b37f55b36a4 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_set_null.result @@ -1,35 +1,22 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] +include/rpl_reset.inc CREATE TABLE t1 (c1 BIT, c2 INT) Engine=NDB; INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 WHERE c2=1 LIMIT 1; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] 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; +include/rpl_reset.inc CREATE TABLE t1 (c1 CHAR) Engine=NDB; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; SELECT * FROM t1; c1 w UPDATE t1 SET c1=NULL WHERE c1='w'; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DELETE FROM t1 LIMIT 2; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result index d7922c61b52..e28e438610f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; @@ -47,3 +43,4 @@ a DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; DROP TABLE IF EXISTS test.t1; +include/rpl_end.inc 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 047402f826f..2dd1754745b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP PROCEDURE IF EXISTS p1; @@ -42,3 +38,4 @@ DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; DROP PROCEDURE p2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result index 367738b21e5..f57becd18fe 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] SET binlog_format = STATEMENT; *** Test 1 *** @@ -123,12 +119,7 @@ master-bin.000002 # Xid 1 COMMIT /* XID */ ** Test 4 ** -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/rpl_reset.inc select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; @@ -142,3 +133,4 @@ master-bin.000001 # Xid 1 COMMIT /* XID */ *** DUMP MASTER & SLAVE FOR COMPARE ******** DROP DATABASE tpcb; ****** Do dumps compare ************ +include/rpl_end.inc 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 49d068d5fe4..457933ae5f7 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] STOP SLAVE; CREATE DATABASE ndbsynctest; USE ndbsynctest; @@ -68,7 +64,7 @@ CHANGE MASTER TO master_log_file = 'master-bin.000001', master_log_pos = ; START SLAVE; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; hex(c1) hex(c2) c3 1 1 row1 @@ -89,3 +85,4 @@ Position File epoch inserts updates deletes schemaops reset slave; select * from mysql.ndb_apply_status; server_id epoch log_name start_pos end_pos +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result index ba5f0dea91c..c6d9e29183e 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] DROP TRIGGER test.t1_bi_t2; DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t2; @@ -28,3 +24,4 @@ n f DROP TRIGGER test.t1_bi_t2; DROP TABLE test.t1; DROP TABLE test.t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result index 04a75bf3479..12f171531b5 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'NDB' ; SELECT * FROM t1; C1 C2 @@ -422,11 +418,7 @@ a b c **** Test for BUG#31552 **** **** On Master **** DELETE FROM t1; -**** Resetting master and slave **** -include/stop_slave.inc -RESET SLAVE; -RESET MASTER; -include/start_slave.inc +include/rpl_reset.inc **** On Master **** INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); **** On Master **** @@ -436,7 +428,7 @@ DELETE FROM t1; SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 set @@global.slave_exec_mode= default; -Checking that both slave threads are running. +include/check_slave_is_running.inc SELECT COUNT(*) FROM t1 ORDER BY c1,c2; COUNT(*) 0 **** Test for BUG#37076 **** @@ -478,50 +470,44 @@ j INT NOT NULL) ENGINE = 'NDB' ; [expecting slave to replicate correctly] INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] [expecting slave to replicate correctly] INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); -Comparing tables master:test.t2 and slave:test.t2 +include/diff_tables.inc [master:t2, slave:t2] [expecting slave to stop] INSERT INTO t3 VALUES (1, "", 1); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); -Comparing tables master:test.t4 and slave:test.t4 +include/diff_tables.inc [master:t4, slave:t4] [expecting slave to stop] INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to stop] INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); -Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size. -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -START SLAVE; +include/wait_for_slave_sql_error.inc [errno=1535] +Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.' +include/rpl_reset.inc [expecting slave to replicate correctly] INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); -Comparing tables master:test.t7 and slave:test.t7 +include/diff_tables.inc [master:t7, slave:t7] drop table t1, t2, t3, t4, t5, t6, t7; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='NDB' ; INSERT INTO t1 VALUES (1), (2), (3); UPDATE t1 SET a = 10; ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( @@ -575,7 +561,7 @@ ERROR 23000: Duplicate entry '6' for key 'PRIMARY' DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; *** results: t2 must be consistent **** -Comparing tables master:test.t2 and master:test.t2 +include/diff_tables.inc [master:t2, master:t2] DROP TABLE t1, t2; EOF OF TESTS CREATE TABLE t1 (a int) ENGINE='NDB' ; @@ -591,7 +577,7 @@ UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; CREATE TABLE t1 (a bit) ENGINE='NDB' ; INSERT IGNORE INTO t1 VALUES (NULL); @@ -633,5 +619,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; -Comparing tables master:test.t1 and slave:test.t1 +include/diff_tables.inc [master:t1, slave:t1] drop table t1; +include/rpl_end.inc 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 14d3baee1b0..dd84fea8258 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,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/master-slave.inc +[connection master] **** On Master **** CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; INSERT INTO t1 VALUES (1,1), (2,2); @@ -87,3 +83,4 @@ master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t1 +include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test index 3b075808481..8279d814deb 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test @@ -33,3 +33,4 @@ CREATE TABLE mysql.ndb_apply_status --connection slave drop table mysql.ndb_apply_status; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test index 560efec255b..265b2f412dc 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test @@ -32,3 +32,4 @@ CREATE TABLE mysql.ndb_apply_status --connection slave drop table mysql.ndb_apply_status; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test index e954c72fd1d..1d0ee48bd20 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test @@ -17,3 +17,4 @@ SET storage_engine=ndb; --echo connection slave; --source extra/rpl_tests/rpl_ndb_2multi_basic.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test index 41f91d62dec..df751214b40 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test @@ -48,3 +48,4 @@ SET storage_engine=innodb; connection slave; drop table mysql.ndb_apply_status; set @@global.slave_exec_mode= @old_slave_exec_mode; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test index ea623a06fd1..e2bcb143ab0 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test @@ -6,3 +6,4 @@ --source include/ndb_master-slave.inc let $engine_type=NDB; --source extra/rpl_tests/rpl_row_UUID.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test index cc74acc6490..92f71e294b2 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test @@ -24,3 +24,4 @@ select count(*) from mysql.ndb_apply_status; connection master; drop table t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test index 5e0584e332a..d2921424d6a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test @@ -116,3 +116,4 @@ drop table t1; # End cleanup sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test index b90e6fff8bc..12bd8d533c5 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test @@ -179,3 +179,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BAN --dec $2 } +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test index c03738bc48b..1871c332c29 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test @@ -188,7 +188,6 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; # Wait for deadlock to be detected. # When detected, the slave will stop, so we just wait for it to stop. connection slave; -source include/wait_for_slave_sql_to_stop.inc; # Replication should have stopped, since max retries were not enough. # verify with show slave status @@ -259,4 +258,4 @@ SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; # cleanup --connection master DROP TABLE t1; --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test index 822f1f224cd..560cebe2a41 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test @@ -139,3 +139,4 @@ drop table t1; #let $VERSION=`select version()`; #--replace_result $VERSION VERSION #show binlog events; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test index e29f24998fe..ad4510d57c2 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test @@ -8,3 +8,4 @@ let $engine_type=NDBCLUSTER; -- source extra/rpl_tests/rpl_row_blob.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test index e63b7c5e8ff..233d4338256 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test @@ -1,15 +1,16 @@ --source include/have_ndb.inc ---source include/ndb_master-slave.inc # set up circular replication +--let $rpl_topology= 1->2->1 +--source include/rpl_init.inc ---connection slave -RESET MASTER; +--let $rpl_connection_name= master +--let $rpl_server_number= 1 +--source include/rpl_connect.inc ---connection master ---replace_result $SLAVE_MYPORT SLAVE_PORT ---eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root" -START SLAVE; +--let $rpl_connection_name= slave +--let $rpl_server_number= 2 +--source include/rpl_connect.inc # create the table on the "slave" @@ -51,3 +52,6 @@ STOP SLAVE; --connection master DROP TABLE t1; -- sync_slave_with_master + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf index b1b010ef0f3..b234f9a8c2c 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf @@ -15,14 +15,7 @@ skip-slave-start [mysqld.2.slave] server-id= 2 -master-host= 127.0.0.1 -master-port= @mysqld.2.1.port -master-password= @mysqld.2.1.#password -master-user= @mysqld.2.1.#user -master-connect-retry= 1 -init-rpl-role= slave log-bin -skip-slave-start ndb_connectstring= @mysql_cluster.slave.ndb_connectstring [ENV] diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test index 8721e85780d..2d1f75f148d 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test @@ -75,9 +75,7 @@ let $wait_condition= SELECT COUNT(*)=40 FROM t1 WHERE c = 1; # Check data --echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --echo *** Transaction testing *** @@ -116,9 +114,7 @@ let $wait_condition= SELECT COUNT(*)=400 FROM t1 WHERE c = 2; --source include/wait_condition.inc --echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; # Start transaction and then roll back @@ -155,18 +151,17 @@ let $wait_condition= SELECT COUNT(*)=200 FROM t1 WHERE c = 3; --source include/wait_condition.inc --echo Check data on both clusters -let $diff_table_1=master:test.t1; -let $diff_table_2=slave:test.t1; - +let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; # Clean up --connection master -DROP TABLE t1; ---connection slave ---disable_warnings DROP TABLE IF EXISTS t1; ---enable_warnings +--connection slave +# Wait until table is dropped on slave. +--let $query= SELECT COUNT(*) FROM t1 +--source include/wait_for_query_to_fail.inc --echo # End of test 5.1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test index 8b0f869c1a3..19af5d54559 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test @@ -31,9 +31,9 @@ INSERT INTO t1 VALUES (2,3); # Replicate back to the master to test this mixed event on the master STOP SLAVE; +--let $rpl_topology= 1->2->1 +--source include/rpl_change_topology.inc connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_USER="root"; START SLAVE; @@ -76,3 +76,6 @@ source include/check_slave_is_running.inc; -- connection master DROP TABLE t1; -- sync_slave_with_master + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test index 8c45ac5dbdd..2353a2a8b5a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test @@ -8,3 +8,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_commit_after_flush.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test index 8d5ad334766..f2eec56e176 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test @@ -41,3 +41,4 @@ select * from t1 order by nid; connection master; DROP TABLE t1; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test index ac0ab01f8dd..dbe6929bbef 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test @@ -82,4 +82,4 @@ drop datafile 'datafile02.dat' engine=ndb; DROP TABLESPACE ts1 ENGINE=NDB; DROP LOGFILE GROUP lg1 ENGINE=NDB; --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test index c84854e89e8..373cc88fb00 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test @@ -308,3 +308,4 @@ DROP LOGFILE GROUP lg1 ENGINE=NDB; --sync_slave_with_master # End of 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test index 654d1c08944..5798bff163a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test @@ -31,3 +31,4 @@ let $temp_engine_type= MEMORY; let $show_binlog = 0; let $manipulate = 0; -- source extra/rpl_tests/rpl_ddl.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test index 6b1d932f9a6..76484e5b5ae 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test @@ -6,3 +6,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_delete_no_where.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test index ffe8551d00f..7b42d86a260 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test @@ -54,3 +54,4 @@ DROP DATABASE IF EXISTS replica; --sync_slave_with_master # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test index ee6abd580f5..9d5db57f988 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test @@ -43,3 +43,4 @@ INSERT INTO t1 VALUES (3, repeat('bad too',1)); connection master; DROP TABLE IF EXISTS t1, t2; --sync_slave_with_master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test index 9cf4f8dba0b..67101c11d26 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test @@ -11,3 +11,4 @@ let $engine_type = 'NDB'; -- source extra/rpl_tests/rpl_extraSlave_Col.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test index c02d82e2dc9..ca1f1d9463f 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test @@ -10,4 +10,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_row_func003.test --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test index 99c9df40094..da22e0ae8f8 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test @@ -106,4 +106,4 @@ connection master; DROP TABLE IF EXISTS t1; # End of 5.1 Test --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test index 92374c26742..b9ad0f6375e 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test @@ -13,3 +13,4 @@ -- source include/ndb_master-slave.inc SET storage_engine=innodb; --source extra/rpl_tests/rpl_ndb_2multi_eng.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test index fcc2928c5e2..eaf34a0131d 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test @@ -64,3 +64,4 @@ connection master; drop table t1,t2; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test index e6c66011fb7..edbc3d17334 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test @@ -6,3 +6,4 @@ let $engine_type=NDB; let $engine_type2=myisam; -- source extra/rpl_tests/rpl_insert_ignore.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test index 75fe2688b4a..8411daa5e88 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test @@ -64,3 +64,4 @@ CREATE TABLE SERVER # --exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbCreate >> $NDB_TOOLS_OUTPUT --exec NDB_CONNECTSTRING=$NDB_CONNECTSTRING ../storage/ndb/test/ndbapi/DbAsyncGenerator >> $NDB_TOOLS_OUTPUT +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test index d32a05bf92a..7ce9d17a0c9 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test @@ -11,3 +11,4 @@ let $engine_type=NDB; -- source extra/rpl_tests/rpl_log.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test index 22ccabe3745..52fd19669bd 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test @@ -448,16 +448,13 @@ SELECT * FROM tndb ORDER BY a; --echo [on slave] --sync_slave_with_master -let $diff_table_1=master:test.tmyisam; -let $diff_table_2=slave:test.tmyisam; +let $diff_tables= master:tmyisam, slave:tmyisam; source include/diff_tables.inc; -let $diff_table_1=master:test.tinnodb; -let $diff_table_2=slave:test.tinnodb; +let $diff_tables= master:tinnodb, slave:tinnodb; source include/diff_tables.inc; -let $diff_table_1=master:test.tndb; -let $diff_table_2=slave:test.tndb; +let $diff_tables= master:tndb, slave:tndb; source include/diff_tables.inc; @@ -470,4 +467,4 @@ DROP TABLE tmyisam, tinnodb, tndb; --echo [on slave] sync_slave_with_master; -source include/master-slave-end.inc; +--source include/rpl_end.inc 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..d994393d75a 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 @@ -316,28 +316,22 @@ 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; +let $diff_tables= master:myisam_innodb, slave:myisam_innodb; source include/diff_tables.inc; -let $diff_table_1=master:test.innodb_myisam; -let $diff_table_2=slave:test.innodb_myisam; +let $diff_tables= master:innodb_myisam, slave:innodb_myisam; source include/diff_tables.inc; -let $diff_table_1=master:test.myisam_ndb; -let $diff_table_2=slave:test.myisam_ndb; +let $diff_tables= master:myisam_ndb, slave:myisam_ndb; source include/diff_tables.inc; -let $diff_table_1=master:test.ndb_myisam; -let $diff_table_2=slave:test.ndb_myisam; +let $diff_tables= master:ndb_myisam, slave:ndb_myisam; source include/diff_tables.inc; -let $diff_table_1=master:test.innodb_ndb; -let $diff_table_2=slave:test.innodb_ndb; +let $diff_tables= master:innodb_ndb, slave:innodb_ndb; source include/diff_tables.inc; -let $diff_table_1=master:test.ndb_innodb; -let $diff_table_2=slave:test.ndb_innodb; +let $diff_tables= master:ndb_innodb, slave:ndb_innodb; source include/diff_tables.inc; @@ -347,3 +341,4 @@ drop table myisam_innodb, innodb_myisam; drop table myisam_ndb, ndb_myisam; drop table innodb_ndb, ndb_innodb; sync_slave_with_master; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test index e9107fd90bd..65093319fbe 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test @@ -1,6 +1,11 @@ --source include/have_multi_ndb.inc --source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc + +# We need server 3 later on in this test. +--let $rpl_server_count= 3 +--source include/master-slave.inc + +--connection master # note: server2 is another "master" connected to the master cluster @@ -38,13 +43,12 @@ let $the_pos= `SELECT @the_pos` ; let $the_file= `SELECT @the_file` ; # now connect the slave to the _other_ "master" -connection slave; ---replace_result $MASTER_MYPORT1 $the_pos MASTER_LOG_POS $the_file MASTER_LOG_FILE -eval CHANGE MASTER TO - master_port=$MASTER_MYPORT1, - master_log_file = '$the_file', - master_log_pos = $the_pos ; -start slave; +--let $rpl_topology= 3->2 +--let $rpl_master_log_file= 2:$the_file +--let $rpl_master_log_pos= 2:$the_pos +--source include/rpl_change_topology.inc +--connection slave +--source include/start_slave.inc # insert some more values on the first master connection master; @@ -61,7 +65,6 @@ connection server2; INSERT INTO t1 VALUES ("row5","E",5); SELECT * FROM t1 ORDER BY c3; sync_slave_with_master; -connection slave; SELECT * FROM t1 ORDER BY c3; --echo ==== clean up ==== @@ -69,4 +72,4 @@ connection server2; DROP TABLE t1; sync_slave_with_master; -STOP SLAVE; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test index 6b86f8146f8..40ec8d2b6c5 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test @@ -11,3 +11,4 @@ let $engine_type=NDB; --source extra/rpl_tests/rpl_multi_update2.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test index f144965e9b0..fc618becd3c 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test @@ -6,3 +6,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_multi_update3.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test index a9e56d17139..33a4b029914 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test @@ -12,3 +12,4 @@ -- source include/ndb_master-slave.inc SET storage_engine=myisam; --source extra/rpl_tests/rpl_ndb_2multi_eng.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test index b0b9dd9e7da..83cc64993b0 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test @@ -7,3 +7,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_relayrotate.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test index 1f305d20c92..a88ac18f711 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test @@ -55,3 +55,4 @@ DROP DATABASE IF EXISTS replica; --sync_slave_with_master # End 5.1 test case +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test index f5b05080131..083b1e59242 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test @@ -5,3 +5,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDB; -- source extra/rpl_tests/rpl_row_001.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test index 454807d9591..41641ec793b 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_set_null.test @@ -4,3 +4,4 @@ -- let $engine= NDB -- source extra/rpl_tests/rpl_set_null.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test index 6453f45aa75..cff9bb7837a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test @@ -8,3 +8,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDBCLUSTER; -- source extra/rpl_tests/rpl_row_sp003.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test index c2c7be6112c..5ad34c6a573 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test @@ -8,3 +8,4 @@ -- source include/ndb_master-slave.inc let $engine_type=NDBCLUSTER; -- source extra/rpl_tests/rpl_row_sp006.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test index 7c65e04717a..60d7d6b3d10 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test @@ -35,3 +35,4 @@ SET binlog_format = STATEMENT; let $off_set = 6; let $rpl_format = 'SBR'; --source extra/rpl_tests/rpl_ndb_apply_status.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test index b91ff198c51..f3722a1c8a4 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test @@ -98,3 +98,5 @@ reset slave; select * from mysql.ndb_apply_status; # End 5.1 Test +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test index 7f7e08685bf..a283aa60504 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test @@ -12,3 +12,4 @@ let $engine_type=NDB; -- source extra/rpl_tests/rpl_trig004.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test index 543393b980d..fdb0293676b 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test @@ -9,3 +9,4 @@ --exec echo Running mgmapi_logevent --exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "$NDB_CONNECTSTRING" "$NDB_CONNECTSTRING_SLAVE" 1 >> $NDB_EXAMPLES_OUTPUT +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test index 3a17de1bc9e..ac31e4de654 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test @@ -5,4 +5,4 @@ let $type= 'NDB' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test index 898bf310dc5..a539720d6e7 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test @@ -63,4 +63,4 @@ connection master; DROP TABLE t1; source include/show_binlog_events.inc; --- source include/master-slave-end.inc +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test index 549227db61a..7c9684d5cbb 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test @@ -9,3 +9,4 @@ --source include/have_binlog_format_mixed.inc --source include/big_test.inc --source suite/rpl_ndb/t/rpl_truncate_7ndb.test +--source include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test index 2cc31c91388..d4607dc6bf1 100644 --- a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test +++ b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test @@ -100,3 +100,4 @@ SET @@global.init_slave= @start_init_slave; # End of functionality Testing for init_slave # ################################################## +--source include/rpl_end.inc -- cgit v1.2.1 From 1a3d5fbfc7aa45463354b57586e24a630727c73e Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Mon, 20 Dec 2010 10:07:35 +0100 Subject: Fixed pb failure. Problem: Warnings for truncated data were generated on hosts with long host names because @@hostname was inserted into a CHAR(40) column. Fix: Change CHAR(40) to TEXT. --- mysql-test/suite/binlog/r/binlog_unsafe.result | 12 ++---------- mysql-test/suite/binlog/t/binlog_unsafe.test | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index b851e472689..77fe5eb0b5e 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -1,8 +1,8 @@ ==== Setup tables ==== CREATE TABLE t1 (a INT); -CREATE TABLE t2 (a CHAR(40)); +CREATE TABLE t2 (a TEXT); CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY); -CREATE TABLE trigger_table (a CHAR(7)); +CREATE TABLE trigger_table (a TEXT); CREATE TABLE trigger_table2 (a INT); ==== Non-deterministic statements ==== INSERT DELAYED INTO t1 VALUES (5); @@ -28,7 +28,6 @@ Warnings: Note 1592 Statement may not be safe to log in statement format. INSERT INTO t2 VALUES (@@hostname); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 Note 1592 Statement may not be safe to log in statement format. ---- Insert from stored procedure ---- CREATE PROCEDURE proc() @@ -49,7 +48,6 @@ 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. -Warning 1265 Data truncated for column 'a' at row 6 Note 1592 Statement may not be safe to log in statement format. ---- Insert from stored function ---- CREATE FUNCTION func() @@ -74,7 +72,6 @@ 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. -Warning 1265 Data truncated for column 'a' at row 6 Note 1592 Statement may not be safe to log in statement format. ---- Insert from trigger ---- CREATE TRIGGER trig @@ -97,7 +94,6 @@ 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. -Warning 1265 Data truncated for column 'a' at row 6 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 ---- @@ -128,7 +124,6 @@ Warnings: Note 1592 Statement may not be safe to log in statement format. EXECUTE p7; Warnings: -Warning 1265 Data truncated for column 'a' at row 1 Note 1592 Statement may not be safe to log in statement format. ---- Insert from nested call of triggers / functions / procedures ---- CREATE PROCEDURE proc1() @@ -165,7 +160,6 @@ 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. -Warning 1265 Data truncated for column 'a' at row 6 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); @@ -309,8 +303,6 @@ INSERT INTO t2 VALUES (@@global.init_slave); INSERT INTO t2 VALUES (@@hostname); END| INSERT INTO trigger_table VALUES ('bye.'); -Warnings: -Warning 1265 Data truncated for column 'a' at row 6 DROP FUNCTION fun_check_log_bin; DROP FUNCTION func6; DROP FUNCTION func7; diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index 5e399f3e602..a86e49e475a 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -71,9 +71,9 @@ source include/have_binlog_format_statement.inc; --echo ==== Setup tables ==== CREATE TABLE t1 (a INT); -CREATE TABLE t2 (a CHAR(40)); +CREATE TABLE t2 (a TEXT); CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY); -CREATE TABLE trigger_table (a CHAR(7)); +CREATE TABLE trigger_table (a TEXT); CREATE TABLE trigger_table2 (a INT); -- cgit v1.2.1 From d5bf6b8aa8bb1c745abeb5e245f0398858ca1461 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Dec 2010 12:47:22 +0800 Subject: Bug #56662 Assertion failed: next_insert_id == 0, file .\handler.cc Normally, auto_increment value is generated for the column by inserting either NULL or 0 into it. NO_AUTO_VALUE_ON_ZERO suppresses this behavior for 0 so that only NULL generates the auto_increment value. This behavior is also followed by a slave, specifically by the SQL Thread, when applying events in the statement format from a master. However, when applying events in the row format, the flag was ignored thus causing an assertion failure: "Assertion failed: next_insert_id == 0, file .\handler.cc" In fact, we never need to generate a auto_increment value for the column when applying events in row format on slave. So we don't allow it to happen by using 'MODE_NO_AUTO_VALUE_ON_ZERO'. Refactoring: Get rid of all the sql_mode checks to rows_log_event when applying it for avoiding problems caused by the inconsistency of the sql_mode on slave and master as the sql_mode is not set for Rows_log_event. mysql-test/extra/rpl_tests/rpl_auto_increment.test: Added test to verify if the assertion of "next_insert_id == 0" will fail in ha_external_lock() function. mysql-test/suite/rpl/r/rpl_auto_increment.result: Test result for bug#56662. sql/log_event.cc: Added code to not allow generation of auto_increment value when processing rows event by adding 'MODE_NO_AUTO_VALUE_ON_ZERO' to sql_mode. sql/rpl_record.cc: Added code to get rid of the 'MODE_STRICT_TRANS_TABLES' and MODE_STRICT_ALL_TABLES check to the table when appling the rows event and treat it as no strict. --- mysql-test/suite/rpl/r/rpl_auto_increment.result | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index 2ab515c8d93..03b413e1b12 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -303,4 +303,21 @@ include/diff_tables.inc [master:t2, slave:t2] DROP TABLE t1; DROP TABLE t2; SET SQL_MODE=''; +CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=innodb; +BEGIN; +# Set sql_mode with NO_AUTO_VALUE_ON_ZERO for allowing +# zero to fill the auto_increment field. +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +INSERT INTO t1(id,data) VALUES(0,2); +# Resetting sql_mode without NO_AUTO_VALUE_ON_ZERO to +# affect the execution of the transaction on slave. +SET SQL_MODE=0; +COMMIT; +SELECT * FROM t1; +id data +0 2 +SELECT * FROM t1; +id data +0 2 +DROP TABLE t1; include/rpl_end.inc -- cgit v1.2.1 From 590fdf7792df16bf7866574432d19e48e49254c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 21 Dec 2010 11:39:19 +0200 Subject: Bug#58912 InnoDB unnecessarily avoids update-in-place on column prefix indexes row_upd_changes_ord_field_binary(): Do not return TRUE if the update vector changes a column that is covered by a prefix index, but does not change the column prefix. Add the row_ext_t parameter for determining whether the prefixes of externally stored columns match. dfield_datas_are_binary_equal(): Add the parameter len, for comparing column prefixes when len > 0. innodb.test: Add a test case where the patch of Bug #55284 failed without this fix. rb:537 approved by Jimmy Yang --- mysql-test/suite/innodb_plugin/r/innodb.result | 8 ++++++-- mysql-test/suite/innodb_plugin/t/innodb.test | 12 ++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb_plugin/r/innodb.result b/mysql-test/suite/innodb_plugin/r/innodb.result index 75a7023f9d0..d3f7a0b9fff 100644 --- a/mysql-test/suite/innodb_plugin/r/innodb.result +++ b/mysql-test/suite/innodb_plugin/r/innodb.result @@ -1,5 +1,8 @@ drop table if exists t1,t2,t3,t4; drop database if exists mysqltest; +CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB; +INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000)); +UPDATE bug58912 SET a=REPEAT('a',7999); create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb; insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt'); select id, code, name from t1 order by id; @@ -1676,10 +1679,10 @@ variable_value - @innodb_rows_deleted_orig 71 SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted'; variable_value - @innodb_rows_inserted_orig -1066 +1067 SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated'; variable_value - @innodb_rows_updated_orig -865 +866 SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits'; variable_value - @innodb_row_lock_waits_orig 0 @@ -3239,3 +3242,4 @@ Variable_name Value Handler_update 1 Variable_name Value Handler_delete 1 +DROP TABLE bug58912; diff --git a/mysql-test/suite/innodb_plugin/t/innodb.test b/mysql-test/suite/innodb_plugin/t/innodb.test index 60ba7d1e3bf..cfc2277d501 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb.test +++ b/mysql-test/suite/innodb_plugin/t/innodb.test @@ -43,6 +43,15 @@ drop table if exists t1,t2,t3,t4; drop database if exists mysqltest; --enable_warnings +# Bug#58912 InnoDB unnecessarily avoids update-in-place on column prefixes +CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB; +INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000)); +UPDATE bug58912 SET a=REPEAT('a',7999); +# The above statements used to trigger a failure during purge when +# Bug#55284 was fixed while Bug#58912 was not. Defer the DROP TABLE, +# so that purge gets a chance to run (and a double free of the +# off-page column can be detected, if one is to occur.) + # # Small basic test with ignore # @@ -2541,6 +2550,9 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig; -- enable_query_log +# Clean up after the Bug#55284/Bug#58912 test case. +DROP TABLE bug58912; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # -- cgit v1.2.1 From 8493c111874564df175dcd18f96bcc20559ffa73 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Tue, 21 Dec 2010 13:09:38 +0100 Subject: BUG#59084: rpl_do_grant started to fail on FreeBSD (presumably after BUG#49978) Problem: master executed a statement that would fail on slave (namely, DROP USER 'create_rout_db'@'localhost'). Then the test did: --let $rpl_only_running_threads= 1 --source include/rpl_reset.inc rpl_reset.inc calls rpl_sync.inc, which first checks which of the threads are running and then syncs those threads that are running. If the SQL thread fails after the check, the sync will fail. So there was a race in the test and it failed on some slow hosts. Fix: Don't replicate the failing statement. --- mysql-test/suite/rpl/r/rpl_do_grant.result | 2 ++ mysql-test/suite/rpl/t/rpl_do_grant.test | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index dea58316287..611d1a613a7 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -162,7 +162,9 @@ USE bug42217_db; DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; +SET SQL_LOG_BIN= 0; DROP USER 'create_rout_db'@'localhost'; +SET SQL_LOG_BIN= 1; include/rpl_reset.inc USE test; ######## BUG#49119 ####### diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index 7b535637658..ded4dac125f 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -216,10 +216,10 @@ DROP DATABASE bug42217_db; -- connection master # user was already dropped in the slave before -# so no need to wait for the slave to replicate -# this statement (if it did and we later synced -# the slave it would end up in an error anyway) +# so we should not replicate this statement. +SET SQL_LOG_BIN= 0; DROP USER 'create_rout_db'@'localhost'; +SET SQL_LOG_BIN= 1; # finish entire clean up (remove binlogs) # so that we leave a pristine environment for the -- cgit v1.2.1 From 865685dc0c0d7dec7415b82bf93ad63ca26cbacc Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Tue, 21 Dec 2010 19:22:20 +0200 Subject: Fixed bug in Aria that caused REPAIR to find old deleted rows. BUILD/compile-pentium64: Added --with-zlib-dir=bundled when doing static build. mysql-test/suite/maria/r/maria.result: Added test case mysql-test/suite/maria/t/maria.test: Added test case storage/maria/ma_blockrec.c: We need to flush blob pages to disk to ensure they overwrite any reused head/tail pages. If not, REPAIR will find rows that was previously deleted. --- mysql-test/suite/maria/r/maria.result | 16 ++++++++++++++++ mysql-test/suite/maria/t/maria.test | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/maria/r/maria.result b/mysql-test/suite/maria/r/maria.result index 46ae485b678..9f34f60ca24 100644 --- a/mysql-test/suite/maria/r/maria.result +++ b/mysql-test/suite/maria/r/maria.result @@ -2624,3 +2624,19 @@ KEY (v3) INSERT INTO t1 ( f1 , f2 , f3 , f4 ) SELECT f1 , f4 , f1 , f4 FROM t1; DELETE FROM t1; drop table t1; +create table t1 (a int not null primary key, b blob) engine=maria transactional=1; +insert into t1 values(1,repeat('a',8000)); +insert into t1 values(2,repeat('b',8000)); +insert into t1 values(3,repeat('c',8000)); +flush tables; +delete from t1 where a>1; +insert into t1 values(1,repeat('d',8000*3)); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +flush tables; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1 extended; +Table Op Msg_type Msg_text +test.t1 repair status OK +drop table t1; diff --git a/mysql-test/suite/maria/t/maria.test b/mysql-test/suite/maria/t/maria.test index 4dde6364bb1..fe2bd43988e 100644 --- a/mysql-test/suite/maria/t/maria.test +++ b/mysql-test/suite/maria/t/maria.test @@ -1910,6 +1910,24 @@ INSERT INTO t1 ( f1 , f2 , f3 , f4 ) SELECT f1 , f4 , f1 , f4 FROM t1; DELETE FROM t1; drop table t1; +# +# Test of problem where REPAIR finds old deleted rows. +# + +create table t1 (a int not null primary key, b blob) engine=maria transactional=1; +insert into t1 values(1,repeat('a',8000)); +insert into t1 values(2,repeat('b',8000)); +insert into t1 values(3,repeat('c',8000)); +flush tables; +delete from t1 where a>1; +--error 1062 +insert into t1 values(1,repeat('d',8000*3)); +flush tables; +check table t1; +# This failed by finding 2 extra rows. +repair table t1 extended; +drop table t1; + # # End of test # -- cgit v1.2.1 From 1615419d7265ccc76db6fbe667651f2dce345ca8 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 22 Dec 2010 10:50:36 +0100 Subject: Bug#54483: valgrind errors when making warnings for multiline inserts into partition Bug#57071: EXTRACT(WEEK from date_col) cannot be allowed as partitioning function There were functions allowed as partitioning functions that implicit allowed cast. That could result in unacceptable behaviour. Solution was to check that the arguments of date and time functions have allowed types (field and date/datetime/time depending on function). mysql-test/r/partition.result: Updated result mysql-test/r/partition_error.result: Updated result mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc: disabled test with not allowed arguments. mysql-test/suite/parts/r/part_supported_sql_func_innodb.result: Updated result mysql-test/suite/parts/r/part_supported_sql_func_myisam.result: Updated result mysql-test/t/partition.test: Fixed typo in bug number and removed non allowed function (bad argument) mysql-test/t/partition_error.test: Added tests to verify correct type of argument. sql/item.h: Renamed processor since it is no longer only for timezone sql/item_func.h: Added help functions for checking date/time/datetime arguments. sql/item_timefunc.h: Added processors for argument correctness sql/sql_partition.cc: renamed the processor for checking arguments. --- .../parts/inc/part_supported_sql_funcs_main.inc | 48 +- .../parts/r/part_supported_sql_func_innodb.result | 5210 ++++++-------------- .../parts/r/part_supported_sql_func_myisam.result | 5210 ++++++-------------- 3 files changed, 3192 insertions(+), 7276 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc b/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc index 45d77225a23..b7a170dd9d8 100644 --- a/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc +++ b/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc @@ -88,8 +88,9 @@ let $val2 = '2006-01-17'; let $val3 = '2006-02-25'; let $val4 = '2006-02-05'; --source suite/parts/inc/partition_supported_sql_funcs.inc -let $coltype = char(30); ---source suite/parts/inc/partition_supported_sql_funcs.inc +# Disabled after fixing bug#54483. +#let $coltype = char(30); +#--source suite/parts/inc/partition_supported_sql_funcs.inc let $sqlfunc = extract(month from col1); let $valsqlfunc = extract(year from '1998-11-23'); @@ -139,8 +140,9 @@ let $val2 = '14:30:20'; let $val3 = '21:59:22'; let $val4 = '10:22:33'; --source suite/parts/inc/partition_supported_sql_funcs.inc -let $coltype = char(30); ---source suite/parts/inc/partition_supported_sql_funcs.inc +# second(non_time_col) is disabled after bug#54483. +#let $coltype = char(30); +#--source suite/parts/inc/partition_supported_sql_funcs.inc let $sqlfunc = month(col1); let $valsqlfunc = month('2006-10-14'); @@ -172,26 +174,28 @@ let $val3 = '21:59:22'; let $val4 = '10:33:11'; --source suite/parts/inc/partition_supported_sql_funcs.inc -let $sqlfunc = to_days(col1)-to_days('2006-01-01'); -let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01'); -let $coltype = date; -let $infile = part_supported_sql_funcs_int_date.inc; -let $val1 = '2006-02-03'; -let $val2 = '2006-01-17'; -let $val3 = '2006-01-25'; -let $val4 = '2006-02-06'; ---source suite/parts/inc/partition_supported_sql_funcs.inc +# to_days(non_date_col) is disabled after bug#54483. +#let $sqlfunc = to_days(col1)-to_days('2006-01-01'); +#let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01'); +#let $coltype = date; +#let $infile = part_supported_sql_funcs_int_date.inc; +#let $val1 = '2006-02-03'; +#let $val2 = '2006-01-17'; +#let $val3 = '2006-01-25'; +#let $val4 = '2006-02-06'; +#--source suite/parts/inc/partition_supported_sql_funcs.inc +# to_days(non_date_col) is disabled after bug#54483. # DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2)) -let $sqlfunc = datediff(col1, '2006-01-01'); -let $valsqlfunc = datediff('2006-02-02', '2006-01-01'); -let $coltype = date; -let $infile = part_supported_sql_funcs_int_date.inc; -let $val1 = '2006-02-03'; -let $val2 = '2006-01-17'; -let $val3 = '2006-01-25'; -let $val4 = '2006-02-06'; ---source suite/parts/inc/partition_supported_sql_funcs.inc +#let $sqlfunc = datediff(col1, '2006-01-01'); +#let $valsqlfunc = datediff('2006-02-02', '2006-01-01'); +#let $coltype = date; +#let $infile = part_supported_sql_funcs_int_date.inc; +#let $val1 = '2006-02-03'; +#let $val2 = '2006-01-17'; +#let $val3 = '2006-01-25'; +#let $val4 = '2006-02-06'; +#--source suite/parts/inc/partition_supported_sql_funcs.inc let $sqlfunc = weekday(col1); let $valsqlfunc = weekday('2006-10-14'); diff --git a/mysql-test/suite/parts/r/part_supported_sql_func_innodb.result b/mysql-test/suite/parts/r/part_supported_sql_func_innodb.result index 79462c25050..c5b4e0a8665 100644 --- a/mysql-test/suite/parts/r/part_supported_sql_func_innodb.result +++ b/mysql-test/suite/parts/r/part_supported_sql_func_innodb.result @@ -5425,7 +5425,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- dayofyear(col1) in partition with coltype char(30) +--- extract(month from col1) in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -5434,14 +5434,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with dayofyear(col1) +--- Create tables with extract(month from col1) ------------------------------------------------------------------------- -create table t1 (col1 char(30)) engine='INNODB' -partition by range(dayofyear(col1)) +create table t1 (col1 date) engine='INNODB' +partition by range(extract(month from col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 char(30)) engine='INNODB' -partition by list(dayofyear(col1)) +create table t2 (col1 date) engine='INNODB' +partition by list(extract(month from col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5449,16 +5449,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 char(30)) engine='INNODB' -partition by hash(dayofyear(col1)); -create table t4 (colint int, col1 char(30)) engine='INNODB' +create table t3 (col1 date) engine='INNODB' +partition by hash(extract(month from col1)); +create table t4 (colint int, col1 date) engine='INNODB' partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 +subpartition by hash(extract(month from col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(30)) engine='INNODB' +create table t5 (colint int, col1 date) engine='INNODB' partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 +subpartition by hash(extract(month from col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5466,42 +5466,42 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 char(30)) engine='INNODB' +create table t6 (colint int, col1 date) engine='INNODB' partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), +(partition p0 values less than (extract(year from '1998-11-23')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with dayofyear(col1) +--- Access tables with extract(month from col1) ------------------------------------------------------------------------- insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-01-17'); +insert into t1 values ('2006-02-17'); insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-02-25'); +insert into t2 values ('2006-02-17'); +insert into t2 values ('2006-01-25'); insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-02-25'); +insert into t3 values ('2006-02-17'); +insert into t3 values ('2006-01-25'); load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofyear(col1) from t1 order by col1; -dayofyear(col1) -3 -17 +select extract(month from col1) from t1 order by col1; +extract(month from col1) +1 +2 select * from t1 order by col1; col1 2006-01-03 -2006-01-17 +2006-02-17 select * from t2 order by col1; col1 2006-01-03 -2006-01-17 -2006-02-25 +2006-01-25 +2006-02-17 select * from t3 order by col1; col1 2006-01-03 -2006-01-17 -2006-02-25 +2006-01-25 +2006-02-17 select * from t4 order by colint; colint col1 1 2006-02-03 @@ -5528,18 +5528,18 @@ update t5 set col1='2006-02-05' where col1='2006-01-03'; update t6 set col1='2006-02-05' where col1='2006-01-03'; select * from t1 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 select * from t2 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t3 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t4 order by colint; colint col1 1 2006-02-03 @@ -5559,7 +5559,7 @@ colint col1 3 2006-01-25 4 2006-02-05 ------------------------------------------------------------------------- ---- Alter tables with dayofyear(col1) +--- Alter tables with extract(month from col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -5574,11 +5574,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(dayofyear(col1)) +partition by range(extract(month from col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(dayofyear(col1)) +partition by list(extract(month from col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5587,15 +5587,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(dayofyear(col1)); +partition by hash(extract(month from col1)); alter table t44 partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 +subpartition by hash(extract(month from col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 +subpartition by hash(extract(month from col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5605,22 +5605,22 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), +(partition p0 values less than (extract(year from '1998-11-23')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 select * from t22 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t33 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t44 order by colint; colint col1 1 2006-02-03 @@ -5647,19 +5647,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 alter table t55 partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 5 +subpartition by hash(extract(month from col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5671,10 +5671,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` char(30) DEFAULT NULL + `col1` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofyear(col1)) +SUBPARTITION BY HASH (extract(month from col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, @@ -5699,7 +5699,7 @@ colint col1 4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (dayofyear('2006-12-25')), +(partition p0 values less than (extract(year from '1998-11-23')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 @@ -5718,7 +5718,7 @@ colint col1 4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (dayofyear('2006-12-25')), +(partition p0 values less than (extract(year from '1998-11-23')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 @@ -5727,73 +5727,78 @@ colint col1 3 2006-01-25 4 2006-02-05 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) +--- Delete rows and partitions of tables with extract(month from col1) ------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; +delete from t1 where col1='2006-02-17'; +delete from t2 where col1='2006-02-17'; +delete from t3 where col1='2006-02-17'; +delete from t4 where col1='2006-02-17'; +delete from t5 where col1='2006-02-17'; +delete from t6 where col1='2006-02-17'; select * from t1 order by col1; col1 2006-02-05 select * from t2 order by col1; col1 +2006-01-25 2006-02-05 -2006-02-25 select * from t3 order by col1; col1 +2006-01-25 2006-02-05 -2006-02-25 select * from t4 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 select * from t5 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); +insert into t1 values ('2006-02-17'); +insert into t2 values ('2006-02-17'); +insert into t3 values ('2006-02-17'); +insert into t4 values (60,'2006-02-17'); +insert into t5 values (60,'2006-02-17'); +insert into t6 values (60,'2006-02-17'); select * from t1 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 select * from t2 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t3 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t4 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 select * from t5 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 select * from t6 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -5801,94 +5806,94 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -2006-01-17 -2006-02-05 select * from t2 order by col1; col1 -2006-01-17 -2006-02-05 -2006-02-25 select * from t3 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t4 order by colint; colint col1 -60 2006-01-17 +60 2006-02-17 select * from t5 order by colint; colint col1 -60 2006-01-17 +60 2006-02-17 select * from t6 order by colint; colint col1 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) +--- Delete rows and partitions of tables with extract(month from col1) ------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; +delete from t11 where col1='2006-02-17'; +delete from t22 where col1='2006-02-17'; +delete from t33 where col1='2006-02-17'; +delete from t44 where col1='2006-02-17'; +delete from t55 where col1='2006-02-17'; +delete from t66 where col1='2006-02-17'; select * from t11 order by col1; col1 2006-02-05 select * from t22 order by col1; col1 +2006-01-25 2006-02-05 -2006-02-25 select * from t33 order by col1; col1 +2006-01-25 2006-02-05 -2006-02-25 select * from t44 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 select * from t55 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); +insert into t11 values ('2006-02-17'); +insert into t22 values ('2006-02-17'); +insert into t33 values ('2006-02-17'); +insert into t44 values (60,'2006-02-17'); +insert into t55 values (60,'2006-02-17'); +insert into t66 values (60,'2006-02-17'); select * from t11 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 select * from t22 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t33 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t44 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 select * from t55 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 select * from t66 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -5896,24 +5901,19 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -2006-01-17 -2006-02-05 select * from t22 order by col1; col1 -2006-01-17 -2006-02-05 -2006-02-25 select * from t33 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t44 order by colint; colint col1 -60 2006-01-17 +60 2006-02-17 select * from t55 order by colint; colint col1 -60 2006-01-17 +60 2006-02-17 select * from t66 order by colint; colint col1 ------------------------- @@ -5932,7 +5932,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- extract(month from col1) in partition with coltype date +--- hour(col1) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -5941,14 +5941,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with extract(month from col1) +--- Create tables with hour(col1) ------------------------------------------------------------------------- -create table t1 (col1 date) engine='INNODB' -partition by range(extract(month from col1)) +create table t1 (col1 time) engine='INNODB' +partition by range(hour(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 date) engine='INNODB' -partition by list(extract(month from col1)) +create table t2 (col1 time) engine='INNODB' +partition by list(hour(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5956,16 +5956,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 date) engine='INNODB' -partition by hash(extract(month from col1)); -create table t4 (colint int, col1 date) engine='INNODB' +create table t3 (col1 time) engine='INNODB' +partition by hash(hour(col1)); +create table t4 (colint int, col1 time) engine='INNODB' partition by range(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 +subpartition by hash(hour(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='INNODB' +create table t5 (colint int, col1 time) engine='INNODB' partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 +subpartition by hash(hour(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5973,100 +5973,100 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 date) engine='INNODB' +create table t6 (colint int, col1 time) engine='INNODB' partition by range(colint) -(partition p0 values less than (extract(year from '1998-11-23')), +(partition p0 values less than (hour('18:30')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with extract(month from col1) +--- Access tables with hour(col1) ------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-02-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-02-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select extract(month from col1) from t1 order by col1; -extract(month from col1) -1 -2 +insert into t1 values ('09:09'); +insert into t1 values ('14:30'); +insert into t2 values ('09:09'); +insert into t2 values ('14:30'); +insert into t2 values ('21:59'); +insert into t3 values ('09:09'); +insert into t3 values ('14:30'); +insert into t3 values ('21:59'); +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; +select hour(col1) from t1 order by col1; +hour(col1) +9 +14 select * from t1 order by col1; col1 -2006-01-03 -2006-02-17 +09:09:00 +14:30:00 select * from t2 order by col1; col1 -2006-01-03 -2006-01-25 -2006-02-17 +09:09:00 +14:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-03 -2006-01-25 -2006-02-17 +09:09:00 +14:30:00 +21:59:00 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +update t1 set col1='10:30' where col1='09:09'; +update t2 set col1='10:30' where col1='09:09'; +update t3 set col1='10:30' where col1='09:09'; +update t4 set col1='10:30' where col1='09:09'; +update t5 set col1='10:30' where col1='09:09'; +update t6 set col1='10:30' where col1='09:09'; select * from t1 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 select * from t2 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with extract(month from col1) +--- Alter tables with hour(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -6081,11 +6081,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(extract(month from col1)) +partition by range(hour(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(extract(month from col1)) +partition by list(hour(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6094,15 +6094,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(extract(month from col1)); +partition by hash(hour(col1)); alter table t44 partition by range(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 +subpartition by hash(hour(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 +subpartition by hash(hour(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6112,40 +6112,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (extract(year from '1998-11-23')), +(partition p0 values less than (hour('18:30')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 select * from t22 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t33 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t44 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 --------------------------- ---- some alter table begin --------------------------- @@ -6154,19 +6154,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 alter table t55 partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 5 +subpartition by hash(hour(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6178,10 +6178,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL + `col1` time DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (extract(month from col1)) +SUBPARTITION BY HASH (hour(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, @@ -6191,121 +6191,121 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (extract(year from '1998-11-23')), +(partition p0 values less than (hour('18:30')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (extract(year from '1998-11-23')), +(partition p0 values less than (hour('18:30')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with extract(month from col1) +--- Delete rows and partitions of tables with hour(col1) ------------------------------------------------------------------------- -delete from t1 where col1='2006-02-17'; -delete from t2 where col1='2006-02-17'; -delete from t3 where col1='2006-02-17'; -delete from t4 where col1='2006-02-17'; -delete from t5 where col1='2006-02-17'; -delete from t6 where col1='2006-02-17'; +delete from t1 where col1='14:30'; +delete from t2 where col1='14:30'; +delete from t3 where col1='14:30'; +delete from t4 where col1='14:30'; +delete from t5 where col1='14:30'; +delete from t6 where col1='14:30'; select * from t1 order by col1; col1 -2006-02-05 +10:30:00 select * from t2 order by col1; col1 -2006-01-25 -2006-02-05 +10:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-25 -2006-02-05 +10:30:00 +21:59:00 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-02-17'); -insert into t3 values ('2006-02-17'); -insert into t4 values (60,'2006-02-17'); -insert into t5 values (60,'2006-02-17'); -insert into t6 values (60,'2006-02-17'); +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +insert into t1 values ('14:30'); +insert into t2 values ('14:30'); +insert into t3 values ('14:30'); +insert into t4 values (60,'14:30'); +insert into t5 values (60,'14:30'); +insert into t6 values (60,'14:30'); select * from t1 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 select * from t2 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -6315,92 +6315,95 @@ select * from t1 order by col1; col1 select * from t2 order by col1; col1 +14:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t4 order by colint; colint col1 -60 2006-02-17 +60 14:30:00 select * from t5 order by colint; colint col1 -60 2006-02-17 +60 14:30:00 select * from t6 order by colint; colint col1 +60 14:30:00 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with extract(month from col1) +--- Delete rows and partitions of tables with hour(col1) ------------------------------------------------------------------------- -delete from t11 where col1='2006-02-17'; -delete from t22 where col1='2006-02-17'; -delete from t33 where col1='2006-02-17'; -delete from t44 where col1='2006-02-17'; -delete from t55 where col1='2006-02-17'; -delete from t66 where col1='2006-02-17'; +delete from t11 where col1='14:30'; +delete from t22 where col1='14:30'; +delete from t33 where col1='14:30'; +delete from t44 where col1='14:30'; +delete from t55 where col1='14:30'; +delete from t66 where col1='14:30'; select * from t11 order by col1; col1 -2006-02-05 +10:30:00 select * from t22 order by col1; col1 -2006-01-25 -2006-02-05 +10:30:00 +21:59:00 select * from t33 order by col1; col1 -2006-01-25 -2006-02-05 +10:30:00 +21:59:00 select * from t44 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-02-17'); -insert into t22 values ('2006-02-17'); -insert into t33 values ('2006-02-17'); -insert into t44 values (60,'2006-02-17'); -insert into t55 values (60,'2006-02-17'); -insert into t66 values (60,'2006-02-17'); +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +insert into t11 values ('14:30'); +insert into t22 values ('14:30'); +insert into t33 values ('14:30'); +insert into t44 values (60,'14:30'); +insert into t55 values (60,'14:30'); +insert into t66 values (60,'14:30'); select * from t11 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 select * from t22 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t33 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t44 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -6410,19 +6413,22 @@ select * from t11 order by col1; col1 select * from t22 order by col1; col1 +14:30:00 +21:59:00 select * from t33 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t44 order by colint; colint col1 -60 2006-02-17 +60 14:30:00 select * from t55 order by colint; colint col1 -60 2006-02-17 +60 14:30:00 select * from t66 order by colint; colint col1 +60 14:30:00 ------------------------- ---- some alter table end ------------------------- @@ -6439,7 +6445,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- hour(col1) in partition with coltype time +--- microsecond(col1) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -6448,14 +6454,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with hour(col1) +--- Create tables with microsecond(col1) ------------------------------------------------------------------------- create table t1 (col1 time) engine='INNODB' -partition by range(hour(col1)) +partition by range(microsecond(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); create table t2 (col1 time) engine='INNODB' -partition by list(hour(col1)) +partition by list(microsecond(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6464,15 +6470,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t3 (col1 time) engine='INNODB' -partition by hash(hour(col1)); +partition by hash(microsecond(col1)); create table t4 (colint int, col1 time) engine='INNODB' partition by range(colint) -subpartition by hash(hour(col1)) subpartitions 2 +subpartition by hash(microsecond(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); create table t5 (colint int, col1 time) engine='INNODB' partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 2 +subpartition by hash(microsecond(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6482,41 +6488,41 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t6 (colint int, col1 time) engine='INNODB' partition by range(colint) -(partition p0 values less than (hour('18:30')), +(partition p0 values less than (microsecond('10:30:10.000010')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with hour(col1) +--- Access tables with microsecond(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09'); -insert into t1 values ('14:30'); -insert into t2 values ('09:09'); -insert into t2 values ('14:30'); -insert into t2 values ('21:59'); -insert into t3 values ('09:09'); -insert into t3 values ('14:30'); -insert into t3 values ('21:59'); +insert into t1 values ('09:09:15.000002'); +insert into t1 values ('04:30:01.000018'); +insert into t2 values ('09:09:15.000002'); +insert into t2 values ('04:30:01.000018'); +insert into t2 values ('00:59:22.000024'); +insert into t3 values ('09:09:15.000002'); +insert into t3 values ('04:30:01.000018'); +insert into t3 values ('00:59:22.000024'); load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select hour(col1) from t1 order by col1; -hour(col1) -9 -14 +select microsecond(col1) from t1 order by col1; +microsecond(col1) +0 +0 select * from t1 order by col1; col1 -09:09:00 -14:30:00 +04:30:01 +09:09:15 select * from t2 order by col1; col1 -09:09:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +09:09:15 select * from t3 order by col1; col1 -09:09:00 -14:30:00 -21:59:00 -select * from t4 order by colint; +00:59:22 +04:30:01 +09:09:15 +select * from t4 order by colint; colint col1 1 09:09:15 2 04:30:01 @@ -6534,46 +6540,46 @@ colint col1 2 04:30:01 3 00:59:22 4 05:30:34 -update t1 set col1='10:30' where col1='09:09'; -update t2 set col1='10:30' where col1='09:09'; -update t3 set col1='10:30' where col1='09:09'; -update t4 set col1='10:30' where col1='09:09'; -update t5 set col1='10:30' where col1='09:09'; -update t6 set col1='10:30' where col1='09:09'; +update t1 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t2 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t3 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t4 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t5 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t6 set col1='05:30:34.000037' where col1='09:09:15.000002'; select * from t1 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 select * from t2 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t3 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t4 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 select * from t6 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with hour(col1) +--- Alter tables with microsecond(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -6588,11 +6594,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(hour(col1)) +partition by range(microsecond(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(hour(col1)) +partition by list(microsecond(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6601,15 +6607,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(hour(col1)); +partition by hash(microsecond(col1)); alter table t44 partition by range(colint) -subpartition by hash(hour(col1)) subpartitions 2 +subpartition by hash(microsecond(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 2 +subpartition by hash(microsecond(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6619,37 +6625,37 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (hour('18:30')), +(partition p0 values less than (microsecond('10:30:10.000010')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 select * from t22 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t33 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t44 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 @@ -6661,19 +6667,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 alter table t55 partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 5 +subpartition by hash(microsecond(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6688,7 +6694,7 @@ t55 CREATE TABLE `t55` ( `col1` time DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (hour(col1)) +SUBPARTITION BY HASH (microsecond(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, @@ -6698,7 +6704,7 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ select * from t55 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 @@ -6707,17 +6713,17 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (hour('18:30')), +(partition p0 values less than (microsecond('10:30:10.000010')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 @@ -6726,93 +6732,88 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (hour('18:30')), +(partition p0 values less than (microsecond('10:30:10.000010')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with hour(col1) +--- Delete rows and partitions of tables with microsecond(col1) ------------------------------------------------------------------------- -delete from t1 where col1='14:30'; -delete from t2 where col1='14:30'; -delete from t3 where col1='14:30'; -delete from t4 where col1='14:30'; -delete from t5 where col1='14:30'; -delete from t6 where col1='14:30'; +delete from t1 where col1='04:30:01.000018'; +delete from t2 where col1='04:30:01.000018'; +delete from t3 where col1='04:30:01.000018'; +delete from t4 where col1='04:30:01.000018'; +delete from t5 where col1='04:30:01.000018'; +delete from t6 where col1='04:30:01.000018'; select * from t1 order by col1; col1 -10:30:00 +05:30:34 select * from t2 order by col1; col1 -10:30:00 -21:59:00 +00:59:22 +05:30:34 select * from t3 order by col1; col1 -10:30:00 -21:59:00 +00:59:22 +05:30:34 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -insert into t1 values ('14:30'); -insert into t2 values ('14:30'); -insert into t3 values ('14:30'); -insert into t4 values (60,'14:30'); -insert into t5 values (60,'14:30'); -insert into t6 values (60,'14:30'); +insert into t1 values ('04:30:01.000018'); +insert into t2 values ('04:30:01.000018'); +insert into t3 values ('04:30:01.000018'); +insert into t4 values (60,'04:30:01.000018'); +insert into t5 values (60,'04:30:01.000018'); +insert into t6 values (60,'04:30:01.000018'); select * from t1 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 select * from t2 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t3 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 select * from t6 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -6822,95 +6823,88 @@ select * from t1 order by col1; col1 select * from t2 order by col1; col1 -14:30:00 -21:59:00 select * from t3 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t4 order by colint; colint col1 -60 14:30:00 +60 04:30:01 select * from t5 order by colint; colint col1 -60 14:30:00 +60 04:30:01 select * from t6 order by colint; colint col1 -60 14:30:00 +60 04:30:01 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with hour(col1) +--- Delete rows and partitions of tables with microsecond(col1) ------------------------------------------------------------------------- -delete from t11 where col1='14:30'; -delete from t22 where col1='14:30'; -delete from t33 where col1='14:30'; -delete from t44 where col1='14:30'; -delete from t55 where col1='14:30'; -delete from t66 where col1='14:30'; +delete from t11 where col1='04:30:01.000018'; +delete from t22 where col1='04:30:01.000018'; +delete from t33 where col1='04:30:01.000018'; +delete from t44 where col1='04:30:01.000018'; +delete from t55 where col1='04:30:01.000018'; +delete from t66 where col1='04:30:01.000018'; select * from t11 order by col1; col1 -10:30:00 +05:30:34 select * from t22 order by col1; col1 -10:30:00 -21:59:00 +00:59:22 +05:30:34 select * from t33 order by col1; col1 -10:30:00 -21:59:00 +00:59:22 +05:30:34 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -insert into t11 values ('14:30'); -insert into t22 values ('14:30'); -insert into t33 values ('14:30'); -insert into t44 values (60,'14:30'); -insert into t55 values (60,'14:30'); -insert into t66 values (60,'14:30'); +insert into t11 values ('04:30:01.000018'); +insert into t22 values ('04:30:01.000018'); +insert into t33 values ('04:30:01.000018'); +insert into t44 values (60,'04:30:01.000018'); +insert into t55 values (60,'04:30:01.000018'); +insert into t66 values (60,'04:30:01.000018'); select * from t11 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 select * from t22 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t33 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -6920,22 +6914,20 @@ select * from t11 order by col1; col1 select * from t22 order by col1; col1 -14:30:00 -21:59:00 select * from t33 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t44 order by colint; colint col1 -60 14:30:00 +60 04:30:01 select * from t55 order by colint; colint col1 -60 14:30:00 +60 04:30:01 select * from t66 order by colint; colint col1 -60 14:30:00 +60 04:30:01 ------------------------- ---- some alter table end ------------------------- @@ -6952,7 +6944,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- microsecond(col1) in partition with coltype time +--- minute(col1) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -6961,14 +6953,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with microsecond(col1) +--- Create tables with minute(col1) ------------------------------------------------------------------------- create table t1 (col1 time) engine='INNODB' -partition by range(microsecond(col1)) +partition by range(minute(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); create table t2 (col1 time) engine='INNODB' -partition by list(microsecond(col1)) +partition by list(minute(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6977,15 +6969,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t3 (col1 time) engine='INNODB' -partition by hash(microsecond(col1)); +partition by hash(minute(col1)); create table t4 (colint int, col1 time) engine='INNODB' partition by range(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 +subpartition by hash(minute(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); create table t5 (colint int, col1 time) engine='INNODB' partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 +subpartition by hash(minute(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6995,40 +6987,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t6 (colint int, col1 time) engine='INNODB' partition by range(colint) -(partition p0 values less than (microsecond('10:30:10.000010')), +(partition p0 values less than (minute('18:30')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with microsecond(col1) +--- Access tables with minute(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09:15.000002'); -insert into t1 values ('04:30:01.000018'); -insert into t2 values ('09:09:15.000002'); -insert into t2 values ('04:30:01.000018'); -insert into t2 values ('00:59:22.000024'); -insert into t3 values ('09:09:15.000002'); -insert into t3 values ('04:30:01.000018'); -insert into t3 values ('00:59:22.000024'); +insert into t1 values ('09:09:15'); +insert into t1 values ('14:30:45'); +insert into t2 values ('09:09:15'); +insert into t2 values ('14:30:45'); +insert into t2 values ('21:59:22'); +insert into t3 values ('09:09:15'); +insert into t3 values ('14:30:45'); +insert into t3 values ('21:59:22'); load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select microsecond(col1) from t1 order by col1; -microsecond(col1) -0 -0 +select minute(col1) from t1 order by col1; +minute(col1) +9 +30 select * from t1 order by col1; col1 -04:30:01 09:09:15 +14:30:45 select * from t2 order by col1; col1 -00:59:22 -04:30:01 09:09:15 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -04:30:01 09:09:15 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 1 09:09:15 @@ -7047,46 +7039,46 @@ colint col1 2 04:30:01 3 00:59:22 4 05:30:34 -update t1 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t2 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t3 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t4 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t5 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t6 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t1 set col1='10:24:23' where col1='09:09:15'; +update t2 set col1='10:24:23' where col1='09:09:15'; +update t3 set col1='10:24:23' where col1='09:09:15'; +update t4 set col1='10:24:23' where col1='09:09:15'; +update t5 set col1='10:24:23' where col1='09:09:15'; +update t6 set col1='10:24:23' where col1='09:09:15'; select * from t1 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 select * from t2 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 select * from t6 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with microsecond(col1) +--- Alter tables with minute(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -7101,11 +7093,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(microsecond(col1)) +partition by range(minute(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(microsecond(col1)) +partition by list(minute(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7114,15 +7106,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(microsecond(col1)); +partition by hash(minute(col1)); alter table t44 partition by range(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 +subpartition by hash(minute(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 +subpartition by hash(minute(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7132,37 +7124,37 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (microsecond('10:30:10.000010')), +(partition p0 values less than (minute('18:30')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 select * from t22 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7174,19 +7166,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 alter table t55 partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 5 +subpartition by hash(minute(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7201,7 +7193,7 @@ t55 CREATE TABLE `t55` ( `col1` time DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (microsecond(col1)) +SUBPARTITION BY HASH (minute(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, @@ -7211,7 +7203,7 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ select * from t55 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7220,17 +7212,17 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (microsecond('10:30:10.000010')), +(partition p0 values less than (minute('18:30')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7239,88 +7231,93 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (microsecond('10:30:10.000010')), +(partition p0 values less than (minute('18:30')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with microsecond(col1) +--- Delete rows and partitions of tables with minute(col1) ------------------------------------------------------------------------- -delete from t1 where col1='04:30:01.000018'; -delete from t2 where col1='04:30:01.000018'; -delete from t3 where col1='04:30:01.000018'; -delete from t4 where col1='04:30:01.000018'; -delete from t5 where col1='04:30:01.000018'; -delete from t6 where col1='04:30:01.000018'; +delete from t1 where col1='14:30:45'; +delete from t2 where col1='14:30:45'; +delete from t3 where col1='14:30:45'; +delete from t4 where col1='14:30:45'; +delete from t5 where col1='14:30:45'; +delete from t6 where col1='14:30:45'; select * from t1 order by col1; col1 -05:30:34 +10:24:23 select * from t2 order by col1; col1 -00:59:22 -05:30:34 +10:24:23 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -05:30:34 +10:24:23 +21:59:22 select * from t4 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -insert into t1 values ('04:30:01.000018'); -insert into t2 values ('04:30:01.000018'); -insert into t3 values ('04:30:01.000018'); -insert into t4 values (60,'04:30:01.000018'); -insert into t5 values (60,'04:30:01.000018'); -insert into t6 values (60,'04:30:01.000018'); +insert into t1 values ('14:30:45'); +insert into t2 values ('14:30:45'); +insert into t3 values ('14:30:45'); +insert into t4 values (60,'14:30:45'); +insert into t5 values (60,'14:30:45'); +insert into t6 values (60,'14:30:45'); select * from t1 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 select * from t2 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 select * from t5 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 select * from t6 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -7328,90 +7325,100 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 +10:24:23 +14:30:45 select * from t2 order by col1; col1 +10:24:23 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -60 04:30:01 +60 14:30:45 select * from t5 order by colint; colint col1 -60 04:30:01 +60 14:30:45 select * from t6 order by colint; colint col1 -60 04:30:01 +60 14:30:45 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with microsecond(col1) +--- Delete rows and partitions of tables with minute(col1) ------------------------------------------------------------------------- -delete from t11 where col1='04:30:01.000018'; -delete from t22 where col1='04:30:01.000018'; -delete from t33 where col1='04:30:01.000018'; -delete from t44 where col1='04:30:01.000018'; -delete from t55 where col1='04:30:01.000018'; -delete from t66 where col1='04:30:01.000018'; +delete from t11 where col1='14:30:45'; +delete from t22 where col1='14:30:45'; +delete from t33 where col1='14:30:45'; +delete from t44 where col1='14:30:45'; +delete from t55 where col1='14:30:45'; +delete from t66 where col1='14:30:45'; select * from t11 order by col1; col1 -05:30:34 +10:24:23 select * from t22 order by col1; col1 -00:59:22 -05:30:34 +10:24:23 +21:59:22 select * from t33 order by col1; col1 -00:59:22 -05:30:34 +10:24:23 +21:59:22 select * from t44 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -insert into t11 values ('04:30:01.000018'); -insert into t22 values ('04:30:01.000018'); -insert into t33 values ('04:30:01.000018'); -insert into t44 values (60,'04:30:01.000018'); -insert into t55 values (60,'04:30:01.000018'); -insert into t66 values (60,'04:30:01.000018'); +insert into t11 values ('14:30:45'); +insert into t22 values ('14:30:45'); +insert into t33 values ('14:30:45'); +insert into t44 values (60,'14:30:45'); +insert into t55 values (60,'14:30:45'); +insert into t66 values (60,'14:30:45'); select * from t11 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 select * from t22 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 select * from t55 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -7419,22 +7426,27 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 +10:24:23 +14:30:45 select * from t22 order by col1; col1 +10:24:23 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -60 04:30:01 +60 14:30:45 select * from t55 order by colint; colint col1 -60 04:30:01 +60 14:30:45 select * from t66 order by colint; colint col1 -60 04:30:01 +60 14:30:45 ------------------------- ---- some alter table end ------------------------- @@ -7451,7 +7463,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- minute(col1) in partition with coltype time +--- second(col1) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -7460,14 +7472,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with minute(col1) +--- Create tables with second(col1) ------------------------------------------------------------------------- create table t1 (col1 time) engine='INNODB' -partition by range(minute(col1)) +partition by range(second(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); create table t2 (col1 time) engine='INNODB' -partition by list(minute(col1)) +partition by list(second(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7476,15 +7488,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t3 (col1 time) engine='INNODB' -partition by hash(minute(col1)); +partition by hash(second(col1)); create table t4 (colint int, col1 time) engine='INNODB' partition by range(colint) -subpartition by hash(minute(col1)) subpartitions 2 +subpartition by hash(second(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); create table t5 (colint int, col1 time) engine='INNODB' partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 2 +subpartition by hash(second(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7494,39 +7506,39 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t6 (colint int, col1 time) engine='INNODB' partition by range(colint) -(partition p0 values less than (minute('18:30')), +(partition p0 values less than (second('18:30:14')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with minute(col1) +--- Access tables with second(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09:15'); -insert into t1 values ('14:30:45'); -insert into t2 values ('09:09:15'); -insert into t2 values ('14:30:45'); +insert into t1 values ('09:09:09'); +insert into t1 values ('14:30:20'); +insert into t2 values ('09:09:09'); +insert into t2 values ('14:30:20'); insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:15'); -insert into t3 values ('14:30:45'); +insert into t3 values ('09:09:09'); +insert into t3 values ('14:30:20'); insert into t3 values ('21:59:22'); load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select minute(col1) from t1 order by col1; -minute(col1) +select second(col1) from t1 order by col1; +second(col1) 9 -30 +20 select * from t1 order by col1; col1 -09:09:15 -14:30:45 +09:09:09 +14:30:20 select * from t2 order by col1; col1 -09:09:15 -14:30:45 +09:09:09 +14:30:20 21:59:22 select * from t3 order by col1; col1 -09:09:15 -14:30:45 +09:09:09 +14:30:20 21:59:22 select * from t4 order by colint; colint col1 @@ -7546,46 +7558,46 @@ colint col1 2 04:30:01 3 00:59:22 4 05:30:34 -update t1 set col1='10:24:23' where col1='09:09:15'; -update t2 set col1='10:24:23' where col1='09:09:15'; -update t3 set col1='10:24:23' where col1='09:09:15'; -update t4 set col1='10:24:23' where col1='09:09:15'; -update t5 set col1='10:24:23' where col1='09:09:15'; -update t6 set col1='10:24:23' where col1='09:09:15'; +update t1 set col1='10:22:33' where col1='09:09:09'; +update t2 set col1='10:22:33' where col1='09:09:09'; +update t3 set col1='10:22:33' where col1='09:09:09'; +update t4 set col1='10:22:33' where col1='09:09:09'; +update t5 set col1='10:22:33' where col1='09:09:09'; +update t6 set col1='10:22:33' where col1='09:09:09'; select * from t1 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t2 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t3 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t4 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t6 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with minute(col1) +--- Alter tables with second(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -7600,11 +7612,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(minute(col1)) +partition by range(second(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(minute(col1)) +partition by list(second(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7613,15 +7625,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(minute(col1)); +partition by hash(second(col1)); alter table t44 partition by range(colint) -subpartition by hash(minute(col1)) subpartitions 2 +subpartition by hash(second(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 2 +subpartition by hash(second(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7631,37 +7643,37 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (minute('18:30')), +(partition p0 values less than (second('18:30:14')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t22 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t33 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t44 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7673,19 +7685,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 alter table t55 partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 5 +subpartition by hash(second(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7700,7 +7712,7 @@ t55 CREATE TABLE `t55` ( `col1` time DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (minute(col1)) +SUBPARTITION BY HASH (second(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, @@ -7710,7 +7722,7 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ select * from t55 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7719,17 +7731,17 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (minute('18:30')), +(partition p0 values less than (second('18:30:14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7738,93 +7750,93 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (minute('18:30')), +(partition p0 values less than (second('18:30:14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with minute(col1) +--- Delete rows and partitions of tables with second(col1) ------------------------------------------------------------------------- -delete from t1 where col1='14:30:45'; -delete from t2 where col1='14:30:45'; -delete from t3 where col1='14:30:45'; -delete from t4 where col1='14:30:45'; -delete from t5 where col1='14:30:45'; -delete from t6 where col1='14:30:45'; +delete from t1 where col1='14:30:20'; +delete from t2 where col1='14:30:20'; +delete from t3 where col1='14:30:20'; +delete from t4 where col1='14:30:20'; +delete from t5 where col1='14:30:20'; +delete from t6 where col1='14:30:20'; select * from t1 order by col1; col1 -10:24:23 +10:22:33 select * from t2 order by col1; col1 -10:24:23 +10:22:33 21:59:22 select * from t3 order by col1; col1 -10:24:23 +10:22:33 21:59:22 select * from t4 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -insert into t1 values ('14:30:45'); -insert into t2 values ('14:30:45'); -insert into t3 values ('14:30:45'); -insert into t4 values (60,'14:30:45'); -insert into t5 values (60,'14:30:45'); -insert into t6 values (60,'14:30:45'); +insert into t1 values ('14:30:20'); +insert into t2 values ('14:30:20'); +insert into t3 values ('14:30:20'); +insert into t4 values (60,'14:30:20'); +insert into t5 values (60,'14:30:20'); +insert into t6 values (60,'14:30:20'); select * from t1 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t2 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t3 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t4 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 select * from t5 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 select * from t6 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -7832,100 +7844,100 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t2 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t3 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t4 order by colint; colint col1 -60 14:30:45 +60 14:30:20 select * from t5 order by colint; colint col1 -60 14:30:45 +60 14:30:20 select * from t6 order by colint; colint col1 -60 14:30:45 +60 14:30:20 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with minute(col1) +--- Delete rows and partitions of tables with second(col1) ------------------------------------------------------------------------- -delete from t11 where col1='14:30:45'; -delete from t22 where col1='14:30:45'; -delete from t33 where col1='14:30:45'; -delete from t44 where col1='14:30:45'; -delete from t55 where col1='14:30:45'; -delete from t66 where col1='14:30:45'; +delete from t11 where col1='14:30:20'; +delete from t22 where col1='14:30:20'; +delete from t33 where col1='14:30:20'; +delete from t44 where col1='14:30:20'; +delete from t55 where col1='14:30:20'; +delete from t66 where col1='14:30:20'; select * from t11 order by col1; col1 -10:24:23 +10:22:33 select * from t22 order by col1; col1 -10:24:23 +10:22:33 21:59:22 select * from t33 order by col1; col1 -10:24:23 +10:22:33 21:59:22 select * from t44 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -insert into t11 values ('14:30:45'); -insert into t22 values ('14:30:45'); -insert into t33 values ('14:30:45'); -insert into t44 values (60,'14:30:45'); -insert into t55 values (60,'14:30:45'); -insert into t66 values (60,'14:30:45'); +insert into t11 values ('14:30:20'); +insert into t22 values ('14:30:20'); +insert into t33 values ('14:30:20'); +insert into t44 values (60,'14:30:20'); +insert into t55 values (60,'14:30:20'); +insert into t66 values (60,'14:30:20'); select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t22 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t33 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t44 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 select * from t55 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -7933,27 +7945,27 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t22 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t33 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t44 order by colint; colint col1 -60 14:30:45 +60 14:30:20 select * from t55 order by colint; colint col1 -60 14:30:45 +60 14:30:20 select * from t66 order by colint; colint col1 -60 14:30:45 +60 14:30:20 ------------------------- ---- some alter table end ------------------------- @@ -7970,7 +7982,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- second(col1) in partition with coltype time +--- month(col1) in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -7979,14 +7991,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with second(col1) +--- Create tables with month(col1) ------------------------------------------------------------------------- -create table t1 (col1 time) engine='INNODB' -partition by range(second(col1)) +create table t1 (col1 date) engine='INNODB' +partition by range(month(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 time) engine='INNODB' -partition by list(second(col1)) +create table t2 (col1 date) engine='INNODB' +partition by list(month(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7994,16 +8006,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 time) engine='INNODB' -partition by hash(second(col1)); -create table t4 (colint int, col1 time) engine='INNODB' +create table t3 (col1 date) engine='INNODB' +partition by hash(month(col1)); +create table t4 (colint int, col1 date) engine='INNODB' partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(month(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='INNODB' +create table t5 (colint int, col1 date) engine='INNODB' partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(month(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8011,100 +8023,100 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 time) engine='INNODB' +create table t6 (colint int, col1 date) engine='INNODB' partition by range(colint) -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (month('2006-10-14')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with second(col1) +--- Access tables with month(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09:09'); -insert into t1 values ('14:30:20'); -insert into t2 values ('09:09:09'); -insert into t2 values ('14:30:20'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:09'); -insert into t3 values ('14:30:20'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select second(col1) from t1 order by col1; -second(col1) -9 -20 +insert into t1 values ('2006-01-03'); +insert into t1 values ('2006-12-17'); +insert into t2 values ('2006-01-03'); +insert into t2 values ('2006-12-17'); +insert into t2 values ('2006-05-25'); +insert into t3 values ('2006-01-03'); +insert into t3 values ('2006-12-17'); +insert into t3 values ('2006-05-25'); +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; +select month(col1) from t1 order by col1; +month(col1) +1 +12 select * from t1 order by col1; col1 -09:09:09 -14:30:20 +2006-01-03 +2006-12-17 select * from t2 order by col1; col1 -09:09:09 -14:30:20 -21:59:22 +2006-01-03 +2006-05-25 +2006-12-17 select * from t3 order by col1; col1 -09:09:09 -14:30:20 -21:59:22 +2006-01-03 +2006-05-25 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t6 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:22:33' where col1='09:09:09'; -update t2 set col1='10:22:33' where col1='09:09:09'; -update t3 set col1='10:22:33' where col1='09:09:09'; -update t4 set col1='10:22:33' where col1='09:09:09'; -update t5 set col1='10:22:33' where col1='09:09:09'; -update t6 set col1='10:22:33' where col1='09:09:09'; +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +update t1 set col1='2006-11-06' where col1='2006-01-03'; +update t2 set col1='2006-11-06' where col1='2006-01-03'; +update t3 set col1='2006-11-06' where col1='2006-01-03'; +update t4 set col1='2006-11-06' where col1='2006-01-03'; +update t5 set col1='2006-11-06' where col1='2006-01-03'; +update t6 set col1='2006-11-06' where col1='2006-01-03'; select * from t1 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t6 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 ------------------------------------------------------------------------- ---- Alter tables with second(col1) +--- Alter tables with month(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -8119,11 +8131,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(second(col1)) +partition by range(month(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(second(col1)) +partition by list(month(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8132,15 +8144,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(second(col1)); +partition by hash(month(col1)); alter table t44 partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(month(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(month(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8150,40 +8162,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (month('2006-10-14')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 --------------------------- ---- some alter table begin --------------------------- @@ -8192,19 +8204,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 alter table t55 partition by list(colint) -subpartition by hash(second(col1)) subpartitions 5 +subpartition by hash(month(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8216,10 +8228,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL + `col1` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (second(col1)) +SUBPARTITION BY HASH (month(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, @@ -8229,121 +8241,121 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (month('2006-10-14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (month('2006-10-14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) +--- Delete rows and partitions of tables with month(col1) ------------------------------------------------------------------------- -delete from t1 where col1='14:30:20'; -delete from t2 where col1='14:30:20'; -delete from t3 where col1='14:30:20'; -delete from t4 where col1='14:30:20'; -delete from t5 where col1='14:30:20'; -delete from t6 where col1='14:30:20'; +delete from t1 where col1='2006-12-17'; +delete from t2 where col1='2006-12-17'; +delete from t3 where col1='2006-12-17'; +delete from t4 where col1='2006-12-17'; +delete from t5 where col1='2006-12-17'; +delete from t6 where col1='2006-12-17'; select * from t1 order by col1; col1 -10:22:33 +2006-11-06 select * from t2 order by col1; col1 -10:22:33 -21:59:22 +2006-05-25 +2006-11-06 select * from t3 order by col1; col1 -10:22:33 -21:59:22 +2006-05-25 +2006-11-06 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:20'); -insert into t2 values ('14:30:20'); -insert into t3 values ('14:30:20'); -insert into t4 values (60,'14:30:20'); -insert into t5 values (60,'14:30:20'); -insert into t6 values (60,'14:30:20'); +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +insert into t1 values ('2006-12-17'); +insert into t2 values ('2006-12-17'); +insert into t3 values ('2006-12-17'); +insert into t4 values (60,'2006-12-17'); +insert into t5 values (60,'2006-12-17'); +insert into t6 values (60,'2006-12-17'); select * from t1 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t6 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -8351,100 +8363,97 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -10:22:33 -14:30:20 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-11-06 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t4 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t5 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t6 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) +--- Delete rows and partitions of tables with month(col1) ------------------------------------------------------------------------- -delete from t11 where col1='14:30:20'; -delete from t22 where col1='14:30:20'; -delete from t33 where col1='14:30:20'; -delete from t44 where col1='14:30:20'; -delete from t55 where col1='14:30:20'; -delete from t66 where col1='14:30:20'; +delete from t11 where col1='2006-12-17'; +delete from t22 where col1='2006-12-17'; +delete from t33 where col1='2006-12-17'; +delete from t44 where col1='2006-12-17'; +delete from t55 where col1='2006-12-17'; +delete from t66 where col1='2006-12-17'; select * from t11 order by col1; col1 -10:22:33 +2006-11-06 select * from t22 order by col1; col1 -10:22:33 -21:59:22 +2006-05-25 +2006-11-06 select * from t33 order by col1; col1 -10:22:33 -21:59:22 +2006-05-25 +2006-11-06 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:20'); -insert into t22 values ('14:30:20'); -insert into t33 values ('14:30:20'); -insert into t44 values (60,'14:30:20'); -insert into t55 values (60,'14:30:20'); -insert into t66 values (60,'14:30:20'); +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +insert into t11 values ('2006-12-17'); +insert into t22 values ('2006-12-17'); +insert into t33 values ('2006-12-17'); +insert into t44 values (60,'2006-12-17'); +insert into t55 values (60,'2006-12-17'); +insert into t66 values (60,'2006-12-17'); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -8452,27 +8461,24 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -10:22:33 -14:30:20 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-11-06 +2006-12-17 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t44 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t55 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t66 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 ------------------------- ---- some alter table end ------------------------- @@ -8489,7 +8495,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- second(col1) in partition with coltype char(30) +--- quarter(col1) in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -8498,14 +8504,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with second(col1) +--- Create tables with quarter(col1) ------------------------------------------------------------------------- -create table t1 (col1 char(30)) engine='INNODB' -partition by range(second(col1)) +create table t1 (col1 date) engine='INNODB' +partition by range(quarter(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 char(30)) engine='INNODB' -partition by list(second(col1)) +create table t2 (col1 date) engine='INNODB' +partition by list(quarter(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8513,16 +8519,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 char(30)) engine='INNODB' -partition by hash(second(col1)); -create table t4 (colint int, col1 char(30)) engine='INNODB' +create table t3 (col1 date) engine='INNODB' +partition by hash(quarter(col1)); +create table t4 (colint int, col1 date) engine='INNODB' partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(quarter(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(30)) engine='INNODB' +create table t5 (colint int, col1 date) engine='INNODB' partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(quarter(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8530,100 +8536,100 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 char(30)) engine='INNODB' +create table t6 (colint int, col1 date) engine='INNODB' partition by range(colint) -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (quarter('2006-10-14')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with second(col1) +--- Access tables with quarter(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09:09'); -insert into t1 values ('14:30:20'); -insert into t2 values ('09:09:09'); -insert into t2 values ('14:30:20'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:09'); -insert into t3 values ('14:30:20'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select second(col1) from t1 order by col1; -second(col1) -9 -20 +insert into t1 values ('2006-01-03'); +insert into t1 values ('2006-12-17'); +insert into t2 values ('2006-01-03'); +insert into t2 values ('2006-12-17'); +insert into t2 values ('2006-09-25'); +insert into t3 values ('2006-01-03'); +insert into t3 values ('2006-12-17'); +insert into t3 values ('2006-09-25'); +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; +select quarter(col1) from t1 order by col1; +quarter(col1) +1 +4 select * from t1 order by col1; col1 -09:09:09 -14:30:20 +2006-01-03 +2006-12-17 select * from t2 order by col1; col1 -09:09:09 -14:30:20 -21:59:22 +2006-01-03 +2006-09-25 +2006-12-17 select * from t3 order by col1; col1 -09:09:09 -14:30:20 -21:59:22 +2006-01-03 +2006-09-25 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t6 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -update t1 set col1='10:22:33' where col1='09:09:09'; -update t2 set col1='10:22:33' where col1='09:09:09'; -update t3 set col1='10:22:33' where col1='09:09:09'; -update t4 set col1='10:22:33' where col1='09:09:09'; -update t5 set col1='10:22:33' where col1='09:09:09'; -update t6 set col1='10:22:33' where col1='09:09:09'; +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +update t1 set col1='2006-07-30' where col1='2006-01-03'; +update t2 set col1='2006-07-30' where col1='2006-01-03'; +update t3 set col1='2006-07-30' where col1='2006-01-03'; +update t4 set col1='2006-07-30' where col1='2006-01-03'; +update t5 set col1='2006-07-30' where col1='2006-01-03'; +update t6 set col1='2006-07-30' where col1='2006-01-03'; select * from t1 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t6 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 ------------------------------------------------------------------------- ---- Alter tables with second(col1) +--- Alter tables with quarter(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -8638,11 +8644,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(second(col1)) +partition by range(quarter(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(second(col1)) +partition by list(quarter(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8651,15 +8657,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(second(col1)); +partition by hash(quarter(col1)); alter table t44 partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(quarter(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(quarter(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8669,40 +8675,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (quarter('2006-10-14')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 +select * from t33 order by col1; +col1 +2006-07-30 +2006-09-25 +2006-12-17 select * from t44 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t55 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 --------------------------- ---- some alter table begin --------------------------- @@ -8711,19 +8717,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 alter table t55 partition by list(colint) -subpartition by hash(second(col1)) subpartitions 5 +subpartition by hash(quarter(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8735,10 +8741,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` char(30) DEFAULT NULL + `col1` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (second(col1)) +SUBPARTITION BY HASH (quarter(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, @@ -8748,121 +8754,121 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ select * from t55 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (quarter('2006-10-14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (quarter('2006-10-14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) +--- Delete rows and partitions of tables with quarter(col1) ------------------------------------------------------------------------- -delete from t1 where col1='14:30:20'; -delete from t2 where col1='14:30:20'; -delete from t3 where col1='14:30:20'; -delete from t4 where col1='14:30:20'; -delete from t5 where col1='14:30:20'; -delete from t6 where col1='14:30:20'; +delete from t1 where col1='2006-12-17'; +delete from t2 where col1='2006-12-17'; +delete from t3 where col1='2006-12-17'; +delete from t4 where col1='2006-12-17'; +delete from t5 where col1='2006-12-17'; +delete from t6 where col1='2006-12-17'; select * from t1 order by col1; col1 -10:22:33 +2006-07-30 select * from t2 order by col1; col1 -10:22:33 -21:59:22 +2006-07-30 +2006-09-25 select * from t3 order by col1; col1 -10:22:33 -21:59:22 +2006-07-30 +2006-09-25 select * from t4 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -insert into t1 values ('14:30:20'); -insert into t2 values ('14:30:20'); -insert into t3 values ('14:30:20'); -insert into t4 values (60,'14:30:20'); -insert into t5 values (60,'14:30:20'); -insert into t6 values (60,'14:30:20'); +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +insert into t1 values ('2006-12-17'); +insert into t2 values ('2006-12-17'); +insert into t3 values ('2006-12-17'); +insert into t4 values (60,'2006-12-17'); +insert into t5 values (60,'2006-12-17'); +insert into t6 values (60,'2006-12-17'); select * from t1 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t5 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t6 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -8870,100 +8876,96 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -10:22:33 -14:30:20 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t4 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t5 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t6 order by colint; colint col1 -60 14:30:20 +4 2006-02-05 +60 2006-12-17 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) +--- Delete rows and partitions of tables with quarter(col1) ------------------------------------------------------------------------- -delete from t11 where col1='14:30:20'; -delete from t22 where col1='14:30:20'; -delete from t33 where col1='14:30:20'; -delete from t44 where col1='14:30:20'; -delete from t55 where col1='14:30:20'; -delete from t66 where col1='14:30:20'; +delete from t11 where col1='2006-12-17'; +delete from t22 where col1='2006-12-17'; +delete from t33 where col1='2006-12-17'; +delete from t44 where col1='2006-12-17'; +delete from t55 where col1='2006-12-17'; +delete from t66 where col1='2006-12-17'; select * from t11 order by col1; col1 -10:22:33 +2006-07-30 select * from t22 order by col1; col1 -10:22:33 -21:59:22 +2006-07-30 +2006-09-25 select * from t33 order by col1; col1 -10:22:33 -21:59:22 +2006-07-30 +2006-09-25 select * from t44 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t55 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -insert into t11 values ('14:30:20'); -insert into t22 values ('14:30:20'); -insert into t33 values ('14:30:20'); -insert into t44 values (60,'14:30:20'); -insert into t55 values (60,'14:30:20'); -insert into t66 values (60,'14:30:20'); +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +insert into t11 values ('2006-12-17'); +insert into t22 values ('2006-12-17'); +insert into t33 values ('2006-12-17'); +insert into t44 values (60,'2006-12-17'); +insert into t55 values (60,'2006-12-17'); +insert into t66 values (60,'2006-12-17'); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t44 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t55 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -8971,27 +8973,23 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -10:22:33 -14:30:20 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t44 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t55 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t66 order by colint; colint col1 -60 14:30:20 +4 2006-02-05 +60 2006-12-17 ------------------------- ---- some alter table end ------------------------- @@ -9008,7 +9006,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- month(col1) in partition with coltype date +--- time_to_sec(col1)-(time_to_sec(col1)-20) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -9017,14 +9015,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with month(col1) +--- Create tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- -create table t1 (col1 date) engine='INNODB' -partition by range(month(col1)) +create table t1 (col1 time) engine='INNODB' +partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 date) engine='INNODB' -partition by list(month(col1)) +create table t2 (col1 time) engine='INNODB' +partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9032,16 +9030,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 date) engine='INNODB' -partition by hash(month(col1)); -create table t4 (colint int, col1 date) engine='INNODB' +create table t3 (col1 time) engine='INNODB' +partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); +create table t4 (colint int, col1 time) engine='INNODB' partition by range(colint) -subpartition by hash(month(col1)) subpartitions 2 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='INNODB' +create table t5 (colint int, col1 time) engine='INNODB' partition by list(colint) -subpartition by hash(month(col1)) subpartitions 2 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9049,100 +9047,100 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 date) engine='INNODB' +create table t6 (colint int, col1 time) engine='INNODB' partition by range(colint) -(partition p0 values less than (month('2006-10-14')), +(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with month(col1) +--- Access tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-12-17'); -insert into t2 values ('2006-05-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-12-17'); -insert into t3 values ('2006-05-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select month(col1) from t1 order by col1; -month(col1) -1 -12 +insert into t1 values ('09:09:15'); +insert into t1 values ('14:30:45'); +insert into t2 values ('09:09:15'); +insert into t2 values ('14:30:45'); +insert into t2 values ('21:59:22'); +insert into t3 values ('09:09:15'); +insert into t3 values ('14:30:45'); +insert into t3 values ('21:59:22'); +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; +select time_to_sec(col1)-(time_to_sec(col1)-20) from t1 order by col1; +time_to_sec(col1)-(time_to_sec(col1)-20) +20 +20 select * from t1 order by col1; col1 -2006-01-03 -2006-12-17 +09:09:15 +14:30:45 select * from t2 order by col1; col1 -2006-01-03 -2006-05-25 -2006-12-17 +09:09:15 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -2006-01-03 -2006-05-25 -2006-12-17 +09:09:15 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-11-06' where col1='2006-01-03'; -update t2 set col1='2006-11-06' where col1='2006-01-03'; -update t3 set col1='2006-11-06' where col1='2006-01-03'; -update t4 set col1='2006-11-06' where col1='2006-01-03'; -update t5 set col1='2006-11-06' where col1='2006-01-03'; -update t6 set col1='2006-11-06' where col1='2006-01-03'; +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +update t1 set col1='10:33:11' where col1='09:09:15'; +update t2 set col1='10:33:11' where col1='09:09:15'; +update t3 set col1='10:33:11' where col1='09:09:15'; +update t4 set col1='10:33:11' where col1='09:09:15'; +update t5 set col1='10:33:11' where col1='09:09:15'; +update t6 set col1='10:33:11' where col1='09:09:15'; select * from t1 order by col1; col1 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 select * from t2 order by col1; col1 -2006-05-25 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -2006-05-25 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with month(col1) +--- Alter tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -9157,11 +9155,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(month(col1)) +partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(month(col1)) +partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9170,15 +9168,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(month(col1)); +partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); alter table t44 partition by range(colint) -subpartition by hash(month(col1)) subpartitions 2 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(month(col1)) subpartitions 2 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9188,40 +9186,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (month('2006-10-14')), +(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 select * from t22 order by col1; col1 -2006-05-25 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -2006-05-25 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 --------------------------- ---- some alter table begin --------------------------- @@ -9230,19 +9228,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 alter table t55 partition by list(colint) -subpartition by hash(month(col1)) subpartitions 5 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9254,10 +9252,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL + `col1` time DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (month(col1)) +SUBPARTITION BY HASH (time_to_sec(col1)-(time_to_sec(col1)-20)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, @@ -9267,2166 +9265,121 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (month('2006-10-14')), +(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (month('2006-10-14')), +(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with month(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-12-17'; -delete from t2 where col1='2006-12-17'; -delete from t3 where col1='2006-12-17'; -delete from t4 where col1='2006-12-17'; -delete from t5 where col1='2006-12-17'; -delete from t6 where col1='2006-12-17'; -select * from t1 order by col1; -col1 -2006-11-06 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-12-17'); -insert into t3 values ('2006-12-17'); -insert into t4 values (60,'2006-12-17'); -insert into t5 values (60,'2006-12-17'); -insert into t6 values (60,'2006-12-17'); -select * from t1 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -select * from t2 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t4 order by colint; -colint col1 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -60 2006-12-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with month(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-12-17'; -delete from t22 where col1='2006-12-17'; -delete from t33 where col1='2006-12-17'; -delete from t44 where col1='2006-12-17'; -delete from t55 where col1='2006-12-17'; -delete from t66 where col1='2006-12-17'; -select * from t11 order by col1; -col1 -2006-11-06 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-12-17'); -insert into t22 values ('2006-12-17'); -insert into t33 values ('2006-12-17'); -insert into t44 values (60,'2006-12-17'); -insert into t55 values (60,'2006-12-17'); -insert into t66 values (60,'2006-12-17'); -select * from t11 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -select * from t22 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t44 order by colint; -colint col1 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -60 2006-12-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- quarter(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with quarter(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='INNODB' -partition by range(quarter(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='INNODB' -partition by list(quarter(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='INNODB' -partition by hash(quarter(col1)); -create table t4 (colint int, col1 date) engine='INNODB' -partition by range(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='INNODB' -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='INNODB' -partition by range(colint) -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with quarter(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-12-17'); -insert into t2 values ('2006-09-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-12-17'); -insert into t3 values ('2006-09-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select quarter(col1) from t1 order by col1; -quarter(col1) -1 -4 -select * from t1 order by col1; -col1 -2006-01-03 -2006-12-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-07-30' where col1='2006-01-03'; -update t2 set col1='2006-07-30' where col1='2006-01-03'; -update t3 set col1='2006-07-30' where col1='2006-01-03'; -update t4 set col1='2006-07-30' where col1='2006-01-03'; -update t5 set col1='2006-07-30' where col1='2006-01-03'; -update t6 set col1='2006-07-30' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with quarter(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(quarter(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(quarter(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(quarter(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -alter table t55 -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (quarter(col1)) -SUBPARTITIONS 5 -(PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, - PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, - PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, - PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, - PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with quarter(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-12-17'; -delete from t2 where col1='2006-12-17'; -delete from t3 where col1='2006-12-17'; -delete from t4 where col1='2006-12-17'; -delete from t5 where col1='2006-12-17'; -delete from t6 where col1='2006-12-17'; -select * from t1 order by col1; -col1 -2006-07-30 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-12-17'); -insert into t3 values ('2006-12-17'); -insert into t4 values (60,'2006-12-17'); -insert into t5 values (60,'2006-12-17'); -insert into t6 values (60,'2006-12-17'); -select * from t1 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -select * from t2 order by col1; -col1 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -4 2006-02-05 -60 2006-12-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with quarter(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-12-17'; -delete from t22 where col1='2006-12-17'; -delete from t33 where col1='2006-12-17'; -delete from t44 where col1='2006-12-17'; -delete from t55 where col1='2006-12-17'; -delete from t66 where col1='2006-12-17'; -select * from t11 order by col1; -col1 -2006-07-30 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-12-17'); -insert into t22 values ('2006-12-17'); -insert into t33 values ('2006-12-17'); -insert into t44 values (60,'2006-12-17'); -insert into t55 values (60,'2006-12-17'); -insert into t66 values (60,'2006-12-17'); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -select * from t22 order by col1; -col1 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -4 2006-02-05 -60 2006-12-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- time_to_sec(col1)-(time_to_sec(col1)-20) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='INNODB' -partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='INNODB' -partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='INNODB' -partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); -create table t4 (colint int, col1 time) engine='INNODB' -partition by range(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='INNODB' -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='INNODB' -partition by range(colint) -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -insert into t1 values ('09:09:15'); -insert into t1 values ('14:30:45'); -insert into t2 values ('09:09:15'); -insert into t2 values ('14:30:45'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:15'); -insert into t3 values ('14:30:45'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select time_to_sec(col1)-(time_to_sec(col1)-20) from t1 order by col1; -time_to_sec(col1)-(time_to_sec(col1)-20) -20 -20 -select * from t1 order by col1; -col1 -09:09:15 -14:30:45 -select * from t2 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:33:11' where col1='09:09:15'; -update t2 set col1='10:33:11' where col1='09:09:15'; -update t3 set col1='10:33:11' where col1='09:09:15'; -update t4 set col1='10:33:11' where col1='09:09:15'; -update t5 set col1='10:33:11' where col1='09:09:15'; -update t6 set col1='10:33:11' where col1='09:09:15'; -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); -alter table t44 -partition by range(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -alter table t55 -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (time_to_sec(col1)-(time_to_sec(col1)-20)) -SUBPARTITIONS 5 -(PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, - PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, - PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, - PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, - PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:45'; -delete from t2 where col1='14:30:45'; -delete from t3 where col1='14:30:45'; -delete from t4 where col1='14:30:45'; -delete from t5 where col1='14:30:45'; -delete from t6 where col1='14:30:45'; -select * from t1 order by col1; -col1 -10:33:11 -select * from t2 order by col1; -col1 -10:33:11 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:45'); -insert into t2 values ('14:30:45'); -insert into t3 values ('14:30:45'); -insert into t4 values (60,'14:30:45'); -insert into t5 values (60,'14:30:45'); -insert into t6 values (60,'14:30:45'); -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t6 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -60 14:30:45 -select * from t5 order by colint; -colint col1 -60 14:30:45 -select * from t6 order by colint; -colint col1 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:45'; -delete from t22 where col1='14:30:45'; -delete from t33 where col1='14:30:45'; -delete from t44 where col1='14:30:45'; -delete from t55 where col1='14:30:45'; -delete from t66 where col1='14:30:45'; -select * from t11 order by col1; -col1 -10:33:11 -select * from t22 order by col1; -col1 -10:33:11 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:45'); -insert into t22 values ('14:30:45'); -insert into t33 values ('14:30:45'); -insert into t44 values (60,'14:30:45'); -insert into t55 values (60,'14:30:45'); -insert into t66 values (60,'14:30:45'); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -60 14:30:45 -select * from t55 order by colint; -colint col1 -60 14:30:45 -select * from t66 order by colint; -colint col1 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- to_days(col1)-to_days('2006-01-01') in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -create table t1 (col1 date) engine='INNODB' -partition by range(to_days(col1)-to_days('2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='INNODB' -partition by list(to_days(col1)-to_days('2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='INNODB' -partition by hash(to_days(col1)-to_days('2006-01-01')); -create table t4 (colint int, col1 date) engine='INNODB' -partition by range(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='INNODB' -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='INNODB' -partition by range(colint) -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select to_days(col1)-to_days('2006-01-01') from t1 order by col1; -to_days(col1)-to_days('2006-01-01') -16 -33 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-02-03'; -update t2 set col1='2006-02-06' where col1='2006-02-03'; -update t3 set col1='2006-02-06' where col1='2006-02-03'; -update t4 set col1='2006-02-06' where col1='2006-02-03'; -update t5 set col1='2006-02-06' where col1='2006-02-03'; -update t6 set col1='2006-02-06' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(to_days(col1)-to_days('2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(to_days(col1)-to_days('2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(to_days(col1)-to_days('2006-01-01')); -alter table t44 -partition by range(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -alter table t55 -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (to_days(col1)-to_days('2006-01-01')) -SUBPARTITIONS 5 -(PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, - PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, - PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, - PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, - PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- datediff(col1, '2006-01-01') in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -create table t1 (col1 date) engine='INNODB' -partition by range(datediff(col1, '2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='INNODB' -partition by list(datediff(col1, '2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='INNODB' -partition by hash(datediff(col1, '2006-01-01')); -create table t4 (colint int, col1 date) engine='INNODB' -partition by range(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='INNODB' -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='INNODB' -partition by range(colint) -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select datediff(col1, '2006-01-01') from t1 order by col1; -datediff(col1, '2006-01-01') -16 -33 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-02-03'; -update t2 set col1='2006-02-06' where col1='2006-02-03'; -update t3 set col1='2006-02-06' where col1='2006-02-03'; -update t4 set col1='2006-02-06' where col1='2006-02-03'; -update t5 set col1='2006-02-06' where col1='2006-02-03'; -update t6 set col1='2006-02-06' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(datediff(col1, '2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(datediff(col1, '2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(datediff(col1, '2006-01-01')); -alter table t44 -partition by range(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (datediff(col1, '2006-01-01')) -SUBPARTITIONS 5 -(PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, - PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, - PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, - PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, - PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with datediff(col1, '2006-01-01') +--- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; +delete from t1 where col1='14:30:45'; +delete from t2 where col1='14:30:45'; +delete from t3 where col1='14:30:45'; +delete from t4 where col1='14:30:45'; +delete from t5 where col1='14:30:45'; +delete from t6 where col1='14:30:45'; select * from t1 order by col1; col1 -2006-02-06 +10:33:11 select * from t2 order by col1; col1 -2006-01-25 -2006-02-06 +10:33:11 +21:59:22 select * from t3 order by col1; col1 -2006-01-25 -2006-02-06 +10:33:11 +21:59:22 select * from t4 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +insert into t1 values ('14:30:45'); +insert into t2 values ('14:30:45'); +insert into t3 values ('14:30:45'); +insert into t4 values (60,'14:30:45'); +insert into t5 values (60,'14:30:45'); +insert into t6 values (60,'14:30:45'); select * from t1 order by col1; col1 -2006-01-17 -2006-02-06 +10:33:11 +14:30:45 select * from t2 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 select * from t5 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 select * from t6 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -11434,95 +9387,99 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -2006-01-17 -2006-02-06 +10:33:11 +14:30:45 select * from t2 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -60 2006-01-17 +60 14:30:45 select * from t5 order by colint; colint col1 -60 2006-01-17 +60 14:30:45 select * from t6 order by colint; colint col1 -60 2006-01-17 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with datediff(col1, '2006-01-01') +--- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; +delete from t11 where col1='14:30:45'; +delete from t22 where col1='14:30:45'; +delete from t33 where col1='14:30:45'; +delete from t44 where col1='14:30:45'; +delete from t55 where col1='14:30:45'; +delete from t66 where col1='14:30:45'; select * from t11 order by col1; col1 -2006-02-06 +10:33:11 select * from t22 order by col1; col1 -2006-01-25 -2006-02-06 +10:33:11 +21:59:22 select * from t33 order by col1; col1 -2006-01-25 -2006-02-06 +10:33:11 +21:59:22 select * from t44 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t55 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +insert into t11 values ('14:30:45'); +insert into t22 values ('14:30:45'); +insert into t33 values ('14:30:45'); +insert into t44 values (60,'14:30:45'); +insert into t55 values (60,'14:30:45'); +insert into t66 values (60,'14:30:45'); select * from t11 order by col1; col1 -2006-01-17 -2006-02-06 +10:33:11 +14:30:45 select * from t22 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 select * from t55 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 select * from t66 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -11530,27 +9487,26 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -2006-01-17 -2006-02-06 +10:33:11 +14:30:45 select * from t22 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -60 2006-01-17 +60 14:30:45 select * from t55 order by colint; colint col1 -60 2006-01-17 +60 14:30:45 select * from t66 order by colint; colint col1 -60 2006-01-17 ------------------------- ---- some alter table end ------------------------- diff --git a/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result b/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result index 375a6e130be..3cd8e10a4f3 100644 --- a/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result +++ b/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result @@ -5425,7 +5425,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- dayofyear(col1) in partition with coltype char(30) +--- extract(month from col1) in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -5434,14 +5434,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with dayofyear(col1) +--- Create tables with extract(month from col1) ------------------------------------------------------------------------- -create table t1 (col1 char(30)) engine='MYISAM' -partition by range(dayofyear(col1)) +create table t1 (col1 date) engine='MYISAM' +partition by range(extract(month from col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 char(30)) engine='MYISAM' -partition by list(dayofyear(col1)) +create table t2 (col1 date) engine='MYISAM' +partition by list(extract(month from col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5449,16 +5449,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 char(30)) engine='MYISAM' -partition by hash(dayofyear(col1)); -create table t4 (colint int, col1 char(30)) engine='MYISAM' +create table t3 (col1 date) engine='MYISAM' +partition by hash(extract(month from col1)); +create table t4 (colint int, col1 date) engine='MYISAM' partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 +subpartition by hash(extract(month from col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(30)) engine='MYISAM' +create table t5 (colint int, col1 date) engine='MYISAM' partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 +subpartition by hash(extract(month from col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5466,42 +5466,42 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 char(30)) engine='MYISAM' +create table t6 (colint int, col1 date) engine='MYISAM' partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), +(partition p0 values less than (extract(year from '1998-11-23')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with dayofyear(col1) +--- Access tables with extract(month from col1) ------------------------------------------------------------------------- insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-01-17'); +insert into t1 values ('2006-02-17'); insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-02-25'); +insert into t2 values ('2006-02-17'); +insert into t2 values ('2006-01-25'); insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-02-25'); +insert into t3 values ('2006-02-17'); +insert into t3 values ('2006-01-25'); load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select dayofyear(col1) from t1 order by col1; -dayofyear(col1) -3 -17 +select extract(month from col1) from t1 order by col1; +extract(month from col1) +1 +2 select * from t1 order by col1; col1 2006-01-03 -2006-01-17 +2006-02-17 select * from t2 order by col1; col1 2006-01-03 -2006-01-17 -2006-02-25 +2006-01-25 +2006-02-17 select * from t3 order by col1; col1 2006-01-03 -2006-01-17 -2006-02-25 +2006-01-25 +2006-02-17 select * from t4 order by colint; colint col1 1 2006-02-03 @@ -5528,18 +5528,18 @@ update t5 set col1='2006-02-05' where col1='2006-01-03'; update t6 set col1='2006-02-05' where col1='2006-01-03'; select * from t1 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 select * from t2 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t3 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t4 order by colint; colint col1 1 2006-02-03 @@ -5559,7 +5559,7 @@ colint col1 3 2006-01-25 4 2006-02-05 ------------------------------------------------------------------------- ---- Alter tables with dayofyear(col1) +--- Alter tables with extract(month from col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -5574,11 +5574,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(dayofyear(col1)) +partition by range(extract(month from col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(dayofyear(col1)) +partition by list(extract(month from col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5587,15 +5587,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(dayofyear(col1)); +partition by hash(extract(month from col1)); alter table t44 partition by range(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 +subpartition by hash(extract(month from col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 2 +subpartition by hash(extract(month from col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5605,22 +5605,22 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (dayofyear('2006-12-25')), +(partition p0 values less than (extract(year from '1998-11-23')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 select * from t22 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t33 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t44 order by colint; colint col1 1 2006-02-03 @@ -5647,19 +5647,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 alter table t55 partition by list(colint) -subpartition by hash(dayofyear(col1)) subpartitions 5 +subpartition by hash(extract(month from col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5671,10 +5671,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` char(30) DEFAULT NULL + `col1` date DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (dayofyear(col1)) +SUBPARTITION BY HASH (extract(month from col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, @@ -5699,7 +5699,7 @@ colint col1 4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (dayofyear('2006-12-25')), +(partition p0 values less than (extract(year from '1998-11-23')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 @@ -5718,7 +5718,7 @@ colint col1 4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (dayofyear('2006-12-25')), +(partition p0 values less than (extract(year from '1998-11-23')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 @@ -5727,73 +5727,78 @@ colint col1 3 2006-01-25 4 2006-02-05 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) +--- Delete rows and partitions of tables with extract(month from col1) ------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; +delete from t1 where col1='2006-02-17'; +delete from t2 where col1='2006-02-17'; +delete from t3 where col1='2006-02-17'; +delete from t4 where col1='2006-02-17'; +delete from t5 where col1='2006-02-17'; +delete from t6 where col1='2006-02-17'; select * from t1 order by col1; col1 2006-02-05 select * from t2 order by col1; col1 +2006-01-25 2006-02-05 -2006-02-25 select * from t3 order by col1; col1 +2006-01-25 2006-02-05 -2006-02-25 select * from t4 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 select * from t5 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); +insert into t1 values ('2006-02-17'); +insert into t2 values ('2006-02-17'); +insert into t3 values ('2006-02-17'); +insert into t4 values (60,'2006-02-17'); +insert into t5 values (60,'2006-02-17'); +insert into t6 values (60,'2006-02-17'); select * from t1 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 select * from t2 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t3 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t4 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 select * from t5 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 select * from t6 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -5801,94 +5806,94 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -2006-01-17 -2006-02-05 select * from t2 order by col1; col1 -2006-01-17 -2006-02-05 -2006-02-25 select * from t3 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t4 order by colint; colint col1 -60 2006-01-17 +60 2006-02-17 select * from t5 order by colint; colint col1 -60 2006-01-17 +60 2006-02-17 select * from t6 order by colint; colint col1 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with dayofyear(col1) +--- Delete rows and partitions of tables with extract(month from col1) ------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; +delete from t11 where col1='2006-02-17'; +delete from t22 where col1='2006-02-17'; +delete from t33 where col1='2006-02-17'; +delete from t44 where col1='2006-02-17'; +delete from t55 where col1='2006-02-17'; +delete from t66 where col1='2006-02-17'; select * from t11 order by col1; col1 2006-02-05 select * from t22 order by col1; col1 +2006-01-25 2006-02-05 -2006-02-25 select * from t33 order by col1; col1 +2006-01-25 2006-02-05 -2006-02-25 select * from t44 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 select * from t55 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); +insert into t11 values ('2006-02-17'); +insert into t22 values ('2006-02-17'); +insert into t33 values ('2006-02-17'); +insert into t44 values (60,'2006-02-17'); +insert into t55 values (60,'2006-02-17'); +insert into t66 values (60,'2006-02-17'); select * from t11 order by col1; col1 -2006-01-17 2006-02-05 +2006-02-17 select * from t22 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t33 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t44 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 select * from t55 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 select * from t66 order by colint; colint col1 1 2006-02-03 +2 2006-01-17 3 2006-01-25 4 2006-02-05 -60 2006-01-17 +60 2006-02-17 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -5896,24 +5901,19 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -2006-01-17 -2006-02-05 select * from t22 order by col1; col1 -2006-01-17 -2006-02-05 -2006-02-25 select * from t33 order by col1; col1 -2006-01-17 +2006-01-25 2006-02-05 -2006-02-25 +2006-02-17 select * from t44 order by colint; colint col1 -60 2006-01-17 +60 2006-02-17 select * from t55 order by colint; colint col1 -60 2006-01-17 +60 2006-02-17 select * from t66 order by colint; colint col1 ------------------------- @@ -5932,7 +5932,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- extract(month from col1) in partition with coltype date +--- hour(col1) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -5941,14 +5941,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with extract(month from col1) +--- Create tables with hour(col1) ------------------------------------------------------------------------- -create table t1 (col1 date) engine='MYISAM' -partition by range(extract(month from col1)) +create table t1 (col1 time) engine='MYISAM' +partition by range(hour(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 date) engine='MYISAM' -partition by list(extract(month from col1)) +create table t2 (col1 time) engine='MYISAM' +partition by list(hour(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5956,16 +5956,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 date) engine='MYISAM' -partition by hash(extract(month from col1)); -create table t4 (colint int, col1 date) engine='MYISAM' +create table t3 (col1 time) engine='MYISAM' +partition by hash(hour(col1)); +create table t4 (colint int, col1 time) engine='MYISAM' partition by range(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 +subpartition by hash(hour(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='MYISAM' +create table t5 (colint int, col1 time) engine='MYISAM' partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 +subpartition by hash(hour(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -5973,100 +5973,100 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 date) engine='MYISAM' +create table t6 (colint int, col1 time) engine='MYISAM' partition by range(colint) -(partition p0 values less than (extract(year from '1998-11-23')), +(partition p0 values less than (hour('18:30')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with extract(month from col1) +--- Access tables with hour(col1) ------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-02-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-02-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select extract(month from col1) from t1 order by col1; -extract(month from col1) -1 -2 +insert into t1 values ('09:09'); +insert into t1 values ('14:30'); +insert into t2 values ('09:09'); +insert into t2 values ('14:30'); +insert into t2 values ('21:59'); +insert into t3 values ('09:09'); +insert into t3 values ('14:30'); +insert into t3 values ('21:59'); +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; +select hour(col1) from t1 order by col1; +hour(col1) +9 +14 select * from t1 order by col1; col1 -2006-01-03 -2006-02-17 +09:09:00 +14:30:00 select * from t2 order by col1; col1 -2006-01-03 -2006-01-25 -2006-02-17 +09:09:00 +14:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-03 -2006-01-25 -2006-02-17 +09:09:00 +14:30:00 +21:59:00 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-05' where col1='2006-01-03'; -update t2 set col1='2006-02-05' where col1='2006-01-03'; -update t3 set col1='2006-02-05' where col1='2006-01-03'; -update t4 set col1='2006-02-05' where col1='2006-01-03'; -update t5 set col1='2006-02-05' where col1='2006-01-03'; -update t6 set col1='2006-02-05' where col1='2006-01-03'; +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +update t1 set col1='10:30' where col1='09:09'; +update t2 set col1='10:30' where col1='09:09'; +update t3 set col1='10:30' where col1='09:09'; +update t4 set col1='10:30' where col1='09:09'; +update t5 set col1='10:30' where col1='09:09'; +update t6 set col1='10:30' where col1='09:09'; select * from t1 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 select * from t2 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with extract(month from col1) +--- Alter tables with hour(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -6081,11 +6081,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(extract(month from col1)) +partition by range(hour(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(extract(month from col1)) +partition by list(hour(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6094,15 +6094,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(extract(month from col1)); +partition by hash(hour(col1)); alter table t44 partition by range(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 +subpartition by hash(hour(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 2 +subpartition by hash(hour(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6112,40 +6112,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (extract(year from '1998-11-23')), +(partition p0 values less than (hour('18:30')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 select * from t22 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t33 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t44 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 --------------------------- ---- some alter table begin --------------------------- @@ -6154,19 +6154,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 alter table t55 partition by list(colint) -subpartition by hash(extract(month from col1)) subpartitions 5 +subpartition by hash(hour(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6178,10 +6178,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL + `col1` time DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (extract(month from col1)) +SUBPARTITION BY HASH (hour(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, @@ -6191,121 +6191,121 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (extract(year from '1998-11-23')), +(partition p0 values less than (hour('18:30')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (extract(year from '1998-11-23')), +(partition p0 values less than (hour('18:30')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with extract(month from col1) +--- Delete rows and partitions of tables with hour(col1) ------------------------------------------------------------------------- -delete from t1 where col1='2006-02-17'; -delete from t2 where col1='2006-02-17'; -delete from t3 where col1='2006-02-17'; -delete from t4 where col1='2006-02-17'; -delete from t5 where col1='2006-02-17'; -delete from t6 where col1='2006-02-17'; +delete from t1 where col1='14:30'; +delete from t2 where col1='14:30'; +delete from t3 where col1='14:30'; +delete from t4 where col1='14:30'; +delete from t5 where col1='14:30'; +delete from t6 where col1='14:30'; select * from t1 order by col1; col1 -2006-02-05 +10:30:00 select * from t2 order by col1; col1 -2006-01-25 -2006-02-05 +10:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-25 -2006-02-05 +10:30:00 +21:59:00 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-02-17'); -insert into t2 values ('2006-02-17'); -insert into t3 values ('2006-02-17'); -insert into t4 values (60,'2006-02-17'); -insert into t5 values (60,'2006-02-17'); -insert into t6 values (60,'2006-02-17'); +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +insert into t1 values ('14:30'); +insert into t2 values ('14:30'); +insert into t3 values ('14:30'); +insert into t4 values (60,'14:30'); +insert into t5 values (60,'14:30'); +insert into t6 values (60,'14:30'); select * from t1 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 select * from t2 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -6315,92 +6315,95 @@ select * from t1 order by col1; col1 select * from t2 order by col1; col1 +14:30:00 +21:59:00 select * from t3 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t4 order by colint; colint col1 -60 2006-02-17 +60 14:30:00 select * from t5 order by colint; colint col1 -60 2006-02-17 +60 14:30:00 select * from t6 order by colint; colint col1 +60 14:30:00 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with extract(month from col1) +--- Delete rows and partitions of tables with hour(col1) ------------------------------------------------------------------------- -delete from t11 where col1='2006-02-17'; -delete from t22 where col1='2006-02-17'; -delete from t33 where col1='2006-02-17'; -delete from t44 where col1='2006-02-17'; -delete from t55 where col1='2006-02-17'; -delete from t66 where col1='2006-02-17'; +delete from t11 where col1='14:30'; +delete from t22 where col1='14:30'; +delete from t33 where col1='14:30'; +delete from t44 where col1='14:30'; +delete from t55 where col1='14:30'; +delete from t66 where col1='14:30'; select * from t11 order by col1; col1 -2006-02-05 +10:30:00 select * from t22 order by col1; col1 -2006-01-25 -2006-02-05 +10:30:00 +21:59:00 select * from t33 order by col1; col1 -2006-01-25 -2006-02-05 +10:30:00 +21:59:00 select * from t44 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-02-17'); -insert into t22 values ('2006-02-17'); -insert into t33 values ('2006-02-17'); -insert into t44 values (60,'2006-02-17'); -insert into t55 values (60,'2006-02-17'); -insert into t66 values (60,'2006-02-17'); +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +insert into t11 values ('14:30'); +insert into t22 values ('14:30'); +insert into t33 values ('14:30'); +insert into t44 values (60,'14:30'); +insert into t55 values (60,'14:30'); +insert into t66 values (60,'14:30'); select * from t11 order by col1; col1 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 select * from t22 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t33 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t44 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-02-17 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:00 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -6410,19 +6413,22 @@ select * from t11 order by col1; col1 select * from t22 order by col1; col1 +14:30:00 +21:59:00 select * from t33 order by col1; col1 -2006-01-25 -2006-02-05 -2006-02-17 +10:30:00 +14:30:00 +21:59:00 select * from t44 order by colint; colint col1 -60 2006-02-17 +60 14:30:00 select * from t55 order by colint; colint col1 -60 2006-02-17 +60 14:30:00 select * from t66 order by colint; colint col1 +60 14:30:00 ------------------------- ---- some alter table end ------------------------- @@ -6439,7 +6445,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- hour(col1) in partition with coltype time +--- microsecond(col1) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -6448,14 +6454,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with hour(col1) +--- Create tables with microsecond(col1) ------------------------------------------------------------------------- create table t1 (col1 time) engine='MYISAM' -partition by range(hour(col1)) +partition by range(microsecond(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); create table t2 (col1 time) engine='MYISAM' -partition by list(hour(col1)) +partition by list(microsecond(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6464,15 +6470,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t3 (col1 time) engine='MYISAM' -partition by hash(hour(col1)); +partition by hash(microsecond(col1)); create table t4 (colint int, col1 time) engine='MYISAM' partition by range(colint) -subpartition by hash(hour(col1)) subpartitions 2 +subpartition by hash(microsecond(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); create table t5 (colint int, col1 time) engine='MYISAM' partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 2 +subpartition by hash(microsecond(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6482,41 +6488,41 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t6 (colint int, col1 time) engine='MYISAM' partition by range(colint) -(partition p0 values less than (hour('18:30')), +(partition p0 values less than (microsecond('10:30:10.000010')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with hour(col1) +--- Access tables with microsecond(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09'); -insert into t1 values ('14:30'); -insert into t2 values ('09:09'); -insert into t2 values ('14:30'); -insert into t2 values ('21:59'); -insert into t3 values ('09:09'); -insert into t3 values ('14:30'); -insert into t3 values ('21:59'); +insert into t1 values ('09:09:15.000002'); +insert into t1 values ('04:30:01.000018'); +insert into t2 values ('09:09:15.000002'); +insert into t2 values ('04:30:01.000018'); +insert into t2 values ('00:59:22.000024'); +insert into t3 values ('09:09:15.000002'); +insert into t3 values ('04:30:01.000018'); +insert into t3 values ('00:59:22.000024'); load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select hour(col1) from t1 order by col1; -hour(col1) -9 -14 +select microsecond(col1) from t1 order by col1; +microsecond(col1) +0 +0 select * from t1 order by col1; col1 -09:09:00 -14:30:00 +04:30:01 +09:09:15 select * from t2 order by col1; col1 -09:09:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +09:09:15 select * from t3 order by col1; col1 -09:09:00 -14:30:00 -21:59:00 -select * from t4 order by colint; +00:59:22 +04:30:01 +09:09:15 +select * from t4 order by colint; colint col1 1 09:09:15 2 04:30:01 @@ -6534,46 +6540,46 @@ colint col1 2 04:30:01 3 00:59:22 4 05:30:34 -update t1 set col1='10:30' where col1='09:09'; -update t2 set col1='10:30' where col1='09:09'; -update t3 set col1='10:30' where col1='09:09'; -update t4 set col1='10:30' where col1='09:09'; -update t5 set col1='10:30' where col1='09:09'; -update t6 set col1='10:30' where col1='09:09'; +update t1 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t2 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t3 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t4 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t5 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t6 set col1='05:30:34.000037' where col1='09:09:15.000002'; select * from t1 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 select * from t2 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t3 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t4 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 select * from t6 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with hour(col1) +--- Alter tables with microsecond(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -6588,11 +6594,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(hour(col1)) +partition by range(microsecond(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(hour(col1)) +partition by list(microsecond(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6601,15 +6607,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(hour(col1)); +partition by hash(microsecond(col1)); alter table t44 partition by range(colint) -subpartition by hash(hour(col1)) subpartitions 2 +subpartition by hash(microsecond(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 2 +subpartition by hash(microsecond(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6619,37 +6625,37 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (hour('18:30')), +(partition p0 values less than (microsecond('10:30:10.000010')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 select * from t22 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t33 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t44 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 @@ -6661,19 +6667,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 alter table t55 partition by list(colint) -subpartition by hash(hour(col1)) subpartitions 5 +subpartition by hash(microsecond(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6688,7 +6694,7 @@ t55 CREATE TABLE `t55` ( `col1` time DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (hour(col1)) +SUBPARTITION BY HASH (microsecond(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, @@ -6698,7 +6704,7 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ select * from t55 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 @@ -6707,17 +6713,17 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (hour('18:30')), +(partition p0 values less than (microsecond('10:30:10.000010')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 @@ -6726,93 +6732,88 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (hour('18:30')), +(partition p0 values less than (microsecond('10:30:10.000010')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 +1 05:30:34 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with hour(col1) +--- Delete rows and partitions of tables with microsecond(col1) ------------------------------------------------------------------------- -delete from t1 where col1='14:30'; -delete from t2 where col1='14:30'; -delete from t3 where col1='14:30'; -delete from t4 where col1='14:30'; -delete from t5 where col1='14:30'; -delete from t6 where col1='14:30'; +delete from t1 where col1='04:30:01.000018'; +delete from t2 where col1='04:30:01.000018'; +delete from t3 where col1='04:30:01.000018'; +delete from t4 where col1='04:30:01.000018'; +delete from t5 where col1='04:30:01.000018'; +delete from t6 where col1='04:30:01.000018'; select * from t1 order by col1; col1 -10:30:00 +05:30:34 select * from t2 order by col1; col1 -10:30:00 -21:59:00 +00:59:22 +05:30:34 select * from t3 order by col1; col1 -10:30:00 -21:59:00 +00:59:22 +05:30:34 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -insert into t1 values ('14:30'); -insert into t2 values ('14:30'); -insert into t3 values ('14:30'); -insert into t4 values (60,'14:30'); -insert into t5 values (60,'14:30'); -insert into t6 values (60,'14:30'); +insert into t1 values ('04:30:01.000018'); +insert into t2 values ('04:30:01.000018'); +insert into t3 values ('04:30:01.000018'); +insert into t4 values (60,'04:30:01.000018'); +insert into t5 values (60,'04:30:01.000018'); +insert into t6 values (60,'04:30:01.000018'); select * from t1 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 select * from t2 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t3 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 select * from t6 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -6822,95 +6823,88 @@ select * from t1 order by col1; col1 select * from t2 order by col1; col1 -14:30:00 -21:59:00 select * from t3 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t4 order by colint; colint col1 -60 14:30:00 +60 04:30:01 select * from t5 order by colint; colint col1 -60 14:30:00 +60 04:30:01 select * from t6 order by colint; colint col1 -60 14:30:00 +60 04:30:01 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with hour(col1) +--- Delete rows and partitions of tables with microsecond(col1) ------------------------------------------------------------------------- -delete from t11 where col1='14:30'; -delete from t22 where col1='14:30'; -delete from t33 where col1='14:30'; -delete from t44 where col1='14:30'; -delete from t55 where col1='14:30'; -delete from t66 where col1='14:30'; +delete from t11 where col1='04:30:01.000018'; +delete from t22 where col1='04:30:01.000018'; +delete from t33 where col1='04:30:01.000018'; +delete from t44 where col1='04:30:01.000018'; +delete from t55 where col1='04:30:01.000018'; +delete from t66 where col1='04:30:01.000018'; select * from t11 order by col1; col1 -10:30:00 +05:30:34 select * from t22 order by col1; col1 -10:30:00 -21:59:00 +00:59:22 +05:30:34 select * from t33 order by col1; col1 -10:30:00 -21:59:00 +00:59:22 +05:30:34 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -insert into t11 values ('14:30'); -insert into t22 values ('14:30'); -insert into t33 values ('14:30'); -insert into t44 values (60,'14:30'); -insert into t55 values (60,'14:30'); -insert into t66 values (60,'14:30'); +insert into t11 values ('04:30:01.000018'); +insert into t22 values ('04:30:01.000018'); +insert into t33 values ('04:30:01.000018'); +insert into t44 values (60,'04:30:01.000018'); +insert into t55 values (60,'04:30:01.000018'); +insert into t66 values (60,'04:30:01.000018'); select * from t11 order by col1; col1 -10:30:00 -14:30:00 +04:30:01 +05:30:34 select * from t22 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t33 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 +1 05:30:34 3 00:59:22 4 05:30:34 -60 14:30:00 +60 04:30:01 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -6920,22 +6914,20 @@ select * from t11 order by col1; col1 select * from t22 order by col1; col1 -14:30:00 -21:59:00 select * from t33 order by col1; col1 -10:30:00 -14:30:00 -21:59:00 +00:59:22 +04:30:01 +05:30:34 select * from t44 order by colint; colint col1 -60 14:30:00 +60 04:30:01 select * from t55 order by colint; colint col1 -60 14:30:00 +60 04:30:01 select * from t66 order by colint; colint col1 -60 14:30:00 +60 04:30:01 ------------------------- ---- some alter table end ------------------------- @@ -6952,7 +6944,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- microsecond(col1) in partition with coltype time +--- minute(col1) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -6961,14 +6953,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with microsecond(col1) +--- Create tables with minute(col1) ------------------------------------------------------------------------- create table t1 (col1 time) engine='MYISAM' -partition by range(microsecond(col1)) +partition by range(minute(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); create table t2 (col1 time) engine='MYISAM' -partition by list(microsecond(col1)) +partition by list(minute(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6977,15 +6969,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t3 (col1 time) engine='MYISAM' -partition by hash(microsecond(col1)); +partition by hash(minute(col1)); create table t4 (colint int, col1 time) engine='MYISAM' partition by range(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 +subpartition by hash(minute(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); create table t5 (colint int, col1 time) engine='MYISAM' partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 +subpartition by hash(minute(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -6995,40 +6987,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t6 (colint int, col1 time) engine='MYISAM' partition by range(colint) -(partition p0 values less than (microsecond('10:30:10.000010')), +(partition p0 values less than (minute('18:30')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with microsecond(col1) +--- Access tables with minute(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09:15.000002'); -insert into t1 values ('04:30:01.000018'); -insert into t2 values ('09:09:15.000002'); -insert into t2 values ('04:30:01.000018'); -insert into t2 values ('00:59:22.000024'); -insert into t3 values ('09:09:15.000002'); -insert into t3 values ('04:30:01.000018'); -insert into t3 values ('00:59:22.000024'); +insert into t1 values ('09:09:15'); +insert into t1 values ('14:30:45'); +insert into t2 values ('09:09:15'); +insert into t2 values ('14:30:45'); +insert into t2 values ('21:59:22'); +insert into t3 values ('09:09:15'); +insert into t3 values ('14:30:45'); +insert into t3 values ('21:59:22'); load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select microsecond(col1) from t1 order by col1; -microsecond(col1) -0 -0 +select minute(col1) from t1 order by col1; +minute(col1) +9 +30 select * from t1 order by col1; col1 -04:30:01 09:09:15 +14:30:45 select * from t2 order by col1; col1 -00:59:22 -04:30:01 09:09:15 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -04:30:01 09:09:15 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 1 09:09:15 @@ -7047,46 +7039,46 @@ colint col1 2 04:30:01 3 00:59:22 4 05:30:34 -update t1 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t2 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t3 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t4 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t5 set col1='05:30:34.000037' where col1='09:09:15.000002'; -update t6 set col1='05:30:34.000037' where col1='09:09:15.000002'; +update t1 set col1='10:24:23' where col1='09:09:15'; +update t2 set col1='10:24:23' where col1='09:09:15'; +update t3 set col1='10:24:23' where col1='09:09:15'; +update t4 set col1='10:24:23' where col1='09:09:15'; +update t5 set col1='10:24:23' where col1='09:09:15'; +update t6 set col1='10:24:23' where col1='09:09:15'; select * from t1 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 select * from t2 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 select * from t6 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with microsecond(col1) +--- Alter tables with minute(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -7101,11 +7093,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(microsecond(col1)) +partition by range(minute(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(microsecond(col1)) +partition by list(minute(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7114,15 +7106,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(microsecond(col1)); +partition by hash(minute(col1)); alter table t44 partition by range(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 +subpartition by hash(minute(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 2 +subpartition by hash(minute(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7132,37 +7124,37 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (microsecond('10:30:10.000010')), +(partition p0 values less than (minute('18:30')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 select * from t22 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7174,19 +7166,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 alter table t55 partition by list(colint) -subpartition by hash(microsecond(col1)) subpartitions 5 +subpartition by hash(minute(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7201,7 +7193,7 @@ t55 CREATE TABLE `t55` ( `col1` time DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (microsecond(col1)) +SUBPARTITION BY HASH (minute(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, @@ -7211,7 +7203,7 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ select * from t55 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7220,17 +7212,17 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (microsecond('10:30:10.000010')), +(partition p0 values less than (minute('18:30')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7239,88 +7231,93 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (microsecond('10:30:10.000010')), +(partition p0 values less than (minute('18:30')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with microsecond(col1) +--- Delete rows and partitions of tables with minute(col1) ------------------------------------------------------------------------- -delete from t1 where col1='04:30:01.000018'; -delete from t2 where col1='04:30:01.000018'; -delete from t3 where col1='04:30:01.000018'; -delete from t4 where col1='04:30:01.000018'; -delete from t5 where col1='04:30:01.000018'; -delete from t6 where col1='04:30:01.000018'; +delete from t1 where col1='14:30:45'; +delete from t2 where col1='14:30:45'; +delete from t3 where col1='14:30:45'; +delete from t4 where col1='14:30:45'; +delete from t5 where col1='14:30:45'; +delete from t6 where col1='14:30:45'; select * from t1 order by col1; col1 -05:30:34 +10:24:23 select * from t2 order by col1; col1 -00:59:22 -05:30:34 +10:24:23 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -05:30:34 +10:24:23 +21:59:22 select * from t4 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -insert into t1 values ('04:30:01.000018'); -insert into t2 values ('04:30:01.000018'); -insert into t3 values ('04:30:01.000018'); -insert into t4 values (60,'04:30:01.000018'); -insert into t5 values (60,'04:30:01.000018'); -insert into t6 values (60,'04:30:01.000018'); +insert into t1 values ('14:30:45'); +insert into t2 values ('14:30:45'); +insert into t3 values ('14:30:45'); +insert into t4 values (60,'14:30:45'); +insert into t5 values (60,'14:30:45'); +insert into t6 values (60,'14:30:45'); select * from t1 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 select * from t2 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 select * from t5 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 select * from t6 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -7328,90 +7325,100 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 +10:24:23 +14:30:45 select * from t2 order by col1; col1 +10:24:23 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -60 04:30:01 +60 14:30:45 select * from t5 order by colint; colint col1 -60 04:30:01 +60 14:30:45 select * from t6 order by colint; colint col1 -60 04:30:01 +60 14:30:45 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with microsecond(col1) +--- Delete rows and partitions of tables with minute(col1) ------------------------------------------------------------------------- -delete from t11 where col1='04:30:01.000018'; -delete from t22 where col1='04:30:01.000018'; -delete from t33 where col1='04:30:01.000018'; -delete from t44 where col1='04:30:01.000018'; -delete from t55 where col1='04:30:01.000018'; -delete from t66 where col1='04:30:01.000018'; +delete from t11 where col1='14:30:45'; +delete from t22 where col1='14:30:45'; +delete from t33 where col1='14:30:45'; +delete from t44 where col1='14:30:45'; +delete from t55 where col1='14:30:45'; +delete from t66 where col1='14:30:45'; select * from t11 order by col1; col1 -05:30:34 +10:24:23 select * from t22 order by col1; col1 -00:59:22 -05:30:34 +10:24:23 +21:59:22 select * from t33 order by col1; col1 -00:59:22 -05:30:34 +10:24:23 +21:59:22 select * from t44 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -insert into t11 values ('04:30:01.000018'); -insert into t22 values ('04:30:01.000018'); -insert into t33 values ('04:30:01.000018'); -insert into t44 values (60,'04:30:01.000018'); -insert into t55 values (60,'04:30:01.000018'); -insert into t66 values (60,'04:30:01.000018'); +insert into t11 values ('14:30:45'); +insert into t22 values ('14:30:45'); +insert into t33 values ('14:30:45'); +insert into t44 values (60,'14:30:45'); +insert into t55 values (60,'14:30:45'); +insert into t66 values (60,'14:30:45'); select * from t11 order by col1; col1 -04:30:01 -05:30:34 +10:24:23 +14:30:45 select * from t22 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 select * from t55 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 select * from t66 order by colint; colint col1 -1 05:30:34 +1 10:24:23 +2 04:30:01 3 00:59:22 4 05:30:34 -60 04:30:01 +60 14:30:45 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -7419,22 +7426,27 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 +10:24:23 +14:30:45 select * from t22 order by col1; col1 +10:24:23 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -00:59:22 -04:30:01 -05:30:34 +10:24:23 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -60 04:30:01 +60 14:30:45 select * from t55 order by colint; colint col1 -60 04:30:01 +60 14:30:45 select * from t66 order by colint; colint col1 -60 04:30:01 +60 14:30:45 ------------------------- ---- some alter table end ------------------------- @@ -7451,7 +7463,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- minute(col1) in partition with coltype time +--- second(col1) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -7460,14 +7472,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with minute(col1) +--- Create tables with second(col1) ------------------------------------------------------------------------- create table t1 (col1 time) engine='MYISAM' -partition by range(minute(col1)) +partition by range(second(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); create table t2 (col1 time) engine='MYISAM' -partition by list(minute(col1)) +partition by list(second(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7476,15 +7488,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t3 (col1 time) engine='MYISAM' -partition by hash(minute(col1)); +partition by hash(second(col1)); create table t4 (colint int, col1 time) engine='MYISAM' partition by range(colint) -subpartition by hash(minute(col1)) subpartitions 2 +subpartition by hash(second(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); create table t5 (colint int, col1 time) engine='MYISAM' partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 2 +subpartition by hash(second(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7494,39 +7506,39 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); create table t6 (colint int, col1 time) engine='MYISAM' partition by range(colint) -(partition p0 values less than (minute('18:30')), +(partition p0 values less than (second('18:30:14')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with minute(col1) +--- Access tables with second(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09:15'); -insert into t1 values ('14:30:45'); -insert into t2 values ('09:09:15'); -insert into t2 values ('14:30:45'); +insert into t1 values ('09:09:09'); +insert into t1 values ('14:30:20'); +insert into t2 values ('09:09:09'); +insert into t2 values ('14:30:20'); insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:15'); -insert into t3 values ('14:30:45'); +insert into t3 values ('09:09:09'); +insert into t3 values ('14:30:20'); insert into t3 values ('21:59:22'); load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select minute(col1) from t1 order by col1; -minute(col1) +select second(col1) from t1 order by col1; +second(col1) 9 -30 +20 select * from t1 order by col1; col1 -09:09:15 -14:30:45 +09:09:09 +14:30:20 select * from t2 order by col1; col1 -09:09:15 -14:30:45 +09:09:09 +14:30:20 21:59:22 select * from t3 order by col1; col1 -09:09:15 -14:30:45 +09:09:09 +14:30:20 21:59:22 select * from t4 order by colint; colint col1 @@ -7546,46 +7558,46 @@ colint col1 2 04:30:01 3 00:59:22 4 05:30:34 -update t1 set col1='10:24:23' where col1='09:09:15'; -update t2 set col1='10:24:23' where col1='09:09:15'; -update t3 set col1='10:24:23' where col1='09:09:15'; -update t4 set col1='10:24:23' where col1='09:09:15'; -update t5 set col1='10:24:23' where col1='09:09:15'; -update t6 set col1='10:24:23' where col1='09:09:15'; +update t1 set col1='10:22:33' where col1='09:09:09'; +update t2 set col1='10:22:33' where col1='09:09:09'; +update t3 set col1='10:22:33' where col1='09:09:09'; +update t4 set col1='10:22:33' where col1='09:09:09'; +update t5 set col1='10:22:33' where col1='09:09:09'; +update t6 set col1='10:22:33' where col1='09:09:09'; select * from t1 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t2 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t3 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t4 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t6 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with minute(col1) +--- Alter tables with second(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -7600,11 +7612,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(minute(col1)) +partition by range(second(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(minute(col1)) +partition by list(second(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7613,15 +7625,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(minute(col1)); +partition by hash(second(col1)); alter table t44 partition by range(colint) -subpartition by hash(minute(col1)) subpartitions 2 +subpartition by hash(second(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 2 +subpartition by hash(second(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7631,37 +7643,37 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (minute('18:30')), +(partition p0 values less than (second('18:30:14')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t22 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t33 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t44 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7673,19 +7685,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 alter table t55 partition by list(colint) -subpartition by hash(minute(col1)) subpartitions 5 +subpartition by hash(second(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7700,7 +7712,7 @@ t55 CREATE TABLE `t55` ( `col1` time DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (minute(col1)) +SUBPARTITION BY HASH (second(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, @@ -7710,7 +7722,7 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ select * from t55 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7719,17 +7731,17 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (minute('18:30')), +(partition p0 values less than (second('18:30:14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 @@ -7738,93 +7750,93 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (minute('18:30')), +(partition p0 values less than (second('18:30:14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with minute(col1) +--- Delete rows and partitions of tables with second(col1) ------------------------------------------------------------------------- -delete from t1 where col1='14:30:45'; -delete from t2 where col1='14:30:45'; -delete from t3 where col1='14:30:45'; -delete from t4 where col1='14:30:45'; -delete from t5 where col1='14:30:45'; -delete from t6 where col1='14:30:45'; +delete from t1 where col1='14:30:20'; +delete from t2 where col1='14:30:20'; +delete from t3 where col1='14:30:20'; +delete from t4 where col1='14:30:20'; +delete from t5 where col1='14:30:20'; +delete from t6 where col1='14:30:20'; select * from t1 order by col1; col1 -10:24:23 +10:22:33 select * from t2 order by col1; col1 -10:24:23 +10:22:33 21:59:22 select * from t3 order by col1; col1 -10:24:23 +10:22:33 21:59:22 select * from t4 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t5 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -insert into t1 values ('14:30:45'); -insert into t2 values ('14:30:45'); -insert into t3 values ('14:30:45'); -insert into t4 values (60,'14:30:45'); -insert into t5 values (60,'14:30:45'); -insert into t6 values (60,'14:30:45'); +insert into t1 values ('14:30:20'); +insert into t2 values ('14:30:20'); +insert into t3 values ('14:30:20'); +insert into t4 values (60,'14:30:20'); +insert into t5 values (60,'14:30:20'); +insert into t6 values (60,'14:30:20'); select * from t1 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t2 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t3 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t4 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 select * from t5 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 select * from t6 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -7832,100 +7844,100 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t2 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t3 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t4 order by colint; colint col1 -60 14:30:45 +60 14:30:20 select * from t5 order by colint; colint col1 -60 14:30:45 +60 14:30:20 select * from t6 order by colint; colint col1 -60 14:30:45 +60 14:30:20 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with minute(col1) +--- Delete rows and partitions of tables with second(col1) ------------------------------------------------------------------------- -delete from t11 where col1='14:30:45'; -delete from t22 where col1='14:30:45'; -delete from t33 where col1='14:30:45'; -delete from t44 where col1='14:30:45'; -delete from t55 where col1='14:30:45'; -delete from t66 where col1='14:30:45'; +delete from t11 where col1='14:30:20'; +delete from t22 where col1='14:30:20'; +delete from t33 where col1='14:30:20'; +delete from t44 where col1='14:30:20'; +delete from t55 where col1='14:30:20'; +delete from t66 where col1='14:30:20'; select * from t11 order by col1; col1 -10:24:23 +10:22:33 select * from t22 order by col1; col1 -10:24:23 +10:22:33 21:59:22 select * from t33 order by col1; col1 -10:24:23 +10:22:33 21:59:22 select * from t44 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 select * from t55 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -insert into t11 values ('14:30:45'); -insert into t22 values ('14:30:45'); -insert into t33 values ('14:30:45'); -insert into t44 values (60,'14:30:45'); -insert into t55 values (60,'14:30:45'); -insert into t66 values (60,'14:30:45'); +insert into t11 values ('14:30:20'); +insert into t22 values ('14:30:20'); +insert into t33 values ('14:30:20'); +insert into t44 values (60,'14:30:20'); +insert into t55 values (60,'14:30:20'); +insert into t66 values (60,'14:30:20'); select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t22 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t33 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t44 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 select * from t55 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 select * from t66 order by colint; colint col1 -1 10:24:23 +1 09:09:15 2 04:30:01 3 00:59:22 4 05:30:34 -60 14:30:45 +60 14:30:20 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -7933,27 +7945,27 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 select * from t22 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t33 order by col1; col1 -10:24:23 -14:30:45 +10:22:33 +14:30:20 21:59:22 select * from t44 order by colint; colint col1 -60 14:30:45 +60 14:30:20 select * from t55 order by colint; colint col1 -60 14:30:45 +60 14:30:20 select * from t66 order by colint; colint col1 -60 14:30:45 +60 14:30:20 ------------------------- ---- some alter table end ------------------------- @@ -7970,7 +7982,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- second(col1) in partition with coltype time +--- month(col1) in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -7979,14 +7991,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with second(col1) +--- Create tables with month(col1) ------------------------------------------------------------------------- -create table t1 (col1 time) engine='MYISAM' -partition by range(second(col1)) +create table t1 (col1 date) engine='MYISAM' +partition by range(month(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 time) engine='MYISAM' -partition by list(second(col1)) +create table t2 (col1 date) engine='MYISAM' +partition by list(month(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -7994,16 +8006,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 time) engine='MYISAM' -partition by hash(second(col1)); -create table t4 (colint int, col1 time) engine='MYISAM' +create table t3 (col1 date) engine='MYISAM' +partition by hash(month(col1)); +create table t4 (colint int, col1 date) engine='MYISAM' partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(month(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='MYISAM' +create table t5 (colint int, col1 date) engine='MYISAM' partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(month(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8011,100 +8023,100 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 time) engine='MYISAM' +create table t6 (colint int, col1 date) engine='MYISAM' partition by range(colint) -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (month('2006-10-14')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with second(col1) +--- Access tables with month(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09:09'); -insert into t1 values ('14:30:20'); -insert into t2 values ('09:09:09'); -insert into t2 values ('14:30:20'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:09'); -insert into t3 values ('14:30:20'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select second(col1) from t1 order by col1; -second(col1) -9 -20 +insert into t1 values ('2006-01-03'); +insert into t1 values ('2006-12-17'); +insert into t2 values ('2006-01-03'); +insert into t2 values ('2006-12-17'); +insert into t2 values ('2006-05-25'); +insert into t3 values ('2006-01-03'); +insert into t3 values ('2006-12-17'); +insert into t3 values ('2006-05-25'); +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; +select month(col1) from t1 order by col1; +month(col1) +1 +12 select * from t1 order by col1; col1 -09:09:09 -14:30:20 +2006-01-03 +2006-12-17 select * from t2 order by col1; col1 -09:09:09 -14:30:20 -21:59:22 +2006-01-03 +2006-05-25 +2006-12-17 select * from t3 order by col1; col1 -09:09:09 -14:30:20 -21:59:22 +2006-01-03 +2006-05-25 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t6 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:22:33' where col1='09:09:09'; -update t2 set col1='10:22:33' where col1='09:09:09'; -update t3 set col1='10:22:33' where col1='09:09:09'; -update t4 set col1='10:22:33' where col1='09:09:09'; -update t5 set col1='10:22:33' where col1='09:09:09'; -update t6 set col1='10:22:33' where col1='09:09:09'; +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +update t1 set col1='2006-11-06' where col1='2006-01-03'; +update t2 set col1='2006-11-06' where col1='2006-01-03'; +update t3 set col1='2006-11-06' where col1='2006-01-03'; +update t4 set col1='2006-11-06' where col1='2006-01-03'; +update t5 set col1='2006-11-06' where col1='2006-01-03'; +update t6 set col1='2006-11-06' where col1='2006-01-03'; select * from t1 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t6 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 ------------------------------------------------------------------------- ---- Alter tables with second(col1) +--- Alter tables with month(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -8119,11 +8131,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(second(col1)) +partition by range(month(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(second(col1)) +partition by list(month(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8132,15 +8144,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(second(col1)); +partition by hash(month(col1)); alter table t44 partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(month(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(month(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8150,40 +8162,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (month('2006-10-14')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 --------------------------- ---- some alter table begin --------------------------- @@ -8192,19 +8204,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 alter table t55 partition by list(colint) -subpartition by hash(second(col1)) subpartitions 5 +subpartition by hash(month(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8216,10 +8228,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL + `col1` date DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (second(col1)) +SUBPARTITION BY HASH (month(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, @@ -8229,121 +8241,121 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (month('2006-10-14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (month('2006-10-14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) +--- Delete rows and partitions of tables with month(col1) ------------------------------------------------------------------------- -delete from t1 where col1='14:30:20'; -delete from t2 where col1='14:30:20'; -delete from t3 where col1='14:30:20'; -delete from t4 where col1='14:30:20'; -delete from t5 where col1='14:30:20'; -delete from t6 where col1='14:30:20'; +delete from t1 where col1='2006-12-17'; +delete from t2 where col1='2006-12-17'; +delete from t3 where col1='2006-12-17'; +delete from t4 where col1='2006-12-17'; +delete from t5 where col1='2006-12-17'; +delete from t6 where col1='2006-12-17'; select * from t1 order by col1; col1 -10:22:33 +2006-11-06 select * from t2 order by col1; col1 -10:22:33 -21:59:22 +2006-05-25 +2006-11-06 select * from t3 order by col1; col1 -10:22:33 -21:59:22 +2006-05-25 +2006-11-06 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:20'); -insert into t2 values ('14:30:20'); -insert into t3 values ('14:30:20'); -insert into t4 values (60,'14:30:20'); -insert into t5 values (60,'14:30:20'); -insert into t6 values (60,'14:30:20'); +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +insert into t1 values ('2006-12-17'); +insert into t2 values ('2006-12-17'); +insert into t3 values ('2006-12-17'); +insert into t4 values (60,'2006-12-17'); +insert into t5 values (60,'2006-12-17'); +insert into t6 values (60,'2006-12-17'); select * from t1 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t5 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t6 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -8351,100 +8363,97 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -10:22:33 -14:30:20 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-11-06 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t4 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t5 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t6 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) +--- Delete rows and partitions of tables with month(col1) ------------------------------------------------------------------------- -delete from t11 where col1='14:30:20'; -delete from t22 where col1='14:30:20'; -delete from t33 where col1='14:30:20'; -delete from t44 where col1='14:30:20'; -delete from t55 where col1='14:30:20'; -delete from t66 where col1='14:30:20'; +delete from t11 where col1='2006-12-17'; +delete from t22 where col1='2006-12-17'; +delete from t33 where col1='2006-12-17'; +delete from t44 where col1='2006-12-17'; +delete from t55 where col1='2006-12-17'; +delete from t66 where col1='2006-12-17'; select * from t11 order by col1; col1 -10:22:33 +2006-11-06 select * from t22 order by col1; col1 -10:22:33 -21:59:22 +2006-05-25 +2006-11-06 select * from t33 order by col1; col1 -10:22:33 -21:59:22 +2006-05-25 +2006-11-06 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:20'); -insert into t22 values ('14:30:20'); -insert into t33 values ('14:30:20'); -insert into t44 values (60,'14:30:20'); -insert into t55 values (60,'14:30:20'); -insert into t66 values (60,'14:30:20'); +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +insert into t11 values ('2006-12-17'); +insert into t22 values ('2006-12-17'); +insert into t33 values ('2006-12-17'); +insert into t44 values (60,'2006-12-17'); +insert into t55 values (60,'2006-12-17'); +insert into t66 values (60,'2006-12-17'); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-11-06 +2006-12-17 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t44 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t55 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t66 order by colint; colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -8452,27 +8461,24 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -10:22:33 -14:30:20 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-11-06 +2006-12-17 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-05-25 +2006-11-06 +2006-12-17 select * from t44 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t55 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t66 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 ------------------------- ---- some alter table end ------------------------- @@ -8489,7 +8495,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- second(col1) in partition with coltype char(30) +--- quarter(col1) in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -8498,14 +8504,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with second(col1) +--- Create tables with quarter(col1) ------------------------------------------------------------------------- -create table t1 (col1 char(30)) engine='MYISAM' -partition by range(second(col1)) +create table t1 (col1 date) engine='MYISAM' +partition by range(quarter(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 char(30)) engine='MYISAM' -partition by list(second(col1)) +create table t2 (col1 date) engine='MYISAM' +partition by list(quarter(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8513,16 +8519,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 char(30)) engine='MYISAM' -partition by hash(second(col1)); -create table t4 (colint int, col1 char(30)) engine='MYISAM' +create table t3 (col1 date) engine='MYISAM' +partition by hash(quarter(col1)); +create table t4 (colint int, col1 date) engine='MYISAM' partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(quarter(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(30)) engine='MYISAM' +create table t5 (colint int, col1 date) engine='MYISAM' partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(quarter(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8530,100 +8536,100 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 char(30)) engine='MYISAM' +create table t6 (colint int, col1 date) engine='MYISAM' partition by range(colint) -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (quarter('2006-10-14')), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with second(col1) +--- Access tables with quarter(col1) ------------------------------------------------------------------------- -insert into t1 values ('09:09:09'); -insert into t1 values ('14:30:20'); -insert into t2 values ('09:09:09'); -insert into t2 values ('14:30:20'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:09'); -insert into t3 values ('14:30:20'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select second(col1) from t1 order by col1; -second(col1) -9 -20 +insert into t1 values ('2006-01-03'); +insert into t1 values ('2006-12-17'); +insert into t2 values ('2006-01-03'); +insert into t2 values ('2006-12-17'); +insert into t2 values ('2006-09-25'); +insert into t3 values ('2006-01-03'); +insert into t3 values ('2006-12-17'); +insert into t3 values ('2006-09-25'); +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; +select quarter(col1) from t1 order by col1; +quarter(col1) +1 +4 select * from t1 order by col1; col1 -09:09:09 -14:30:20 +2006-01-03 +2006-12-17 select * from t2 order by col1; col1 -09:09:09 -14:30:20 -21:59:22 +2006-01-03 +2006-09-25 +2006-12-17 select * from t3 order by col1; col1 -09:09:09 -14:30:20 -21:59:22 +2006-01-03 +2006-09-25 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t6 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -update t1 set col1='10:22:33' where col1='09:09:09'; -update t2 set col1='10:22:33' where col1='09:09:09'; -update t3 set col1='10:22:33' where col1='09:09:09'; -update t4 set col1='10:22:33' where col1='09:09:09'; -update t5 set col1='10:22:33' where col1='09:09:09'; -update t6 set col1='10:22:33' where col1='09:09:09'; +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +update t1 set col1='2006-07-30' where col1='2006-01-03'; +update t2 set col1='2006-07-30' where col1='2006-01-03'; +update t3 set col1='2006-07-30' where col1='2006-01-03'; +update t4 set col1='2006-07-30' where col1='2006-01-03'; +update t5 set col1='2006-07-30' where col1='2006-01-03'; +update t6 set col1='2006-07-30' where col1='2006-01-03'; select * from t1 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t6 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 ------------------------------------------------------------------------- ---- Alter tables with second(col1) +--- Alter tables with quarter(col1) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -8638,11 +8644,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(second(col1)) +partition by range(quarter(col1)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(second(col1)) +partition by list(quarter(col1)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8651,15 +8657,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(second(col1)); +partition by hash(quarter(col1)); alter table t44 partition by range(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(quarter(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(second(col1)) subpartitions 2 +subpartition by hash(quarter(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8669,40 +8675,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (quarter('2006-10-14')), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 -select * from t33 order by col1; -col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 +select * from t33 order by col1; +col1 +2006-07-30 +2006-09-25 +2006-12-17 select * from t44 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t55 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 --------------------------- ---- some alter table begin --------------------------- @@ -8711,19 +8717,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 alter table t55 partition by list(colint) -subpartition by hash(second(col1)) subpartitions 5 +subpartition by hash(quarter(col1)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -8735,10 +8741,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` char(30) DEFAULT NULL + `col1` date DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (second(col1)) +SUBPARTITION BY HASH (quarter(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, @@ -8748,121 +8754,121 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ select * from t55 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (quarter('2006-10-14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 alter table t66 reorganize partition s1 into -(partition p0 values less than (second('18:30:14')), +(partition p0 values less than (quarter('2006-10-14')), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) +--- Delete rows and partitions of tables with quarter(col1) ------------------------------------------------------------------------- -delete from t1 where col1='14:30:20'; -delete from t2 where col1='14:30:20'; -delete from t3 where col1='14:30:20'; -delete from t4 where col1='14:30:20'; -delete from t5 where col1='14:30:20'; -delete from t6 where col1='14:30:20'; +delete from t1 where col1='2006-12-17'; +delete from t2 where col1='2006-12-17'; +delete from t3 where col1='2006-12-17'; +delete from t4 where col1='2006-12-17'; +delete from t5 where col1='2006-12-17'; +delete from t6 where col1='2006-12-17'; select * from t1 order by col1; col1 -10:22:33 +2006-07-30 select * from t2 order by col1; col1 -10:22:33 -21:59:22 +2006-07-30 +2006-09-25 select * from t3 order by col1; col1 -10:22:33 -21:59:22 +2006-07-30 +2006-09-25 select * from t4 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t5 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -insert into t1 values ('14:30:20'); -insert into t2 values ('14:30:20'); -insert into t3 values ('14:30:20'); -insert into t4 values (60,'14:30:20'); -insert into t5 values (60,'14:30:20'); -insert into t6 values (60,'14:30:20'); +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +insert into t1 values ('2006-12-17'); +insert into t2 values ('2006-12-17'); +insert into t3 values ('2006-12-17'); +insert into t4 values (60,'2006-12-17'); +insert into t5 values (60,'2006-12-17'); +insert into t6 values (60,'2006-12-17'); select * from t1 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t4 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t5 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t6 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -8870,100 +8876,96 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -10:22:33 -14:30:20 select * from t2 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 select * from t3 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t4 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t5 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t6 order by colint; colint col1 -60 14:30:20 +4 2006-02-05 +60 2006-12-17 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with second(col1) +--- Delete rows and partitions of tables with quarter(col1) ------------------------------------------------------------------------- -delete from t11 where col1='14:30:20'; -delete from t22 where col1='14:30:20'; -delete from t33 where col1='14:30:20'; -delete from t44 where col1='14:30:20'; -delete from t55 where col1='14:30:20'; -delete from t66 where col1='14:30:20'; +delete from t11 where col1='2006-12-17'; +delete from t22 where col1='2006-12-17'; +delete from t33 where col1='2006-12-17'; +delete from t44 where col1='2006-12-17'; +delete from t55 where col1='2006-12-17'; +delete from t66 where col1='2006-12-17'; select * from t11 order by col1; col1 -10:22:33 +2006-07-30 select * from t22 order by col1; col1 -10:22:33 -21:59:22 +2006-07-30 +2006-09-25 select * from t33 order by col1; col1 -10:22:33 -21:59:22 +2006-07-30 +2006-09-25 select * from t44 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 select * from t55 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -insert into t11 values ('14:30:20'); -insert into t22 values ('14:30:20'); -insert into t33 values ('14:30:20'); -insert into t44 values (60,'14:30:20'); -insert into t55 values (60,'14:30:20'); -insert into t66 values (60,'14:30:20'); +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +insert into t11 values ('2006-12-17'); +insert into t22 values ('2006-12-17'); +insert into t33 values ('2006-12-17'); +insert into t44 values (60,'2006-12-17'); +insert into t55 values (60,'2006-12-17'); +insert into t66 values (60,'2006-12-17'); select * from t11 order by col1; col1 -10:22:33 -14:30:20 +2006-07-30 +2006-12-17 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t44 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t55 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 select * from t66 order by colint; colint col1 -1 09:09:15.000002 -2 04:30:01.000018 -3 00:59:22.000024 -4 05:30:34.000037 -60 14:30:20 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +60 2006-12-17 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -8971,27 +8973,23 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -10:22:33 -14:30:20 select * from t22 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 select * from t33 order by col1; col1 -10:22:33 -14:30:20 -21:59:22 +2006-07-30 +2006-09-25 +2006-12-17 select * from t44 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t55 order by colint; colint col1 -60 14:30:20 +60 2006-12-17 select * from t66 order by colint; colint col1 -60 14:30:20 +4 2006-02-05 +60 2006-12-17 ------------------------- ---- some alter table end ------------------------- @@ -9008,7 +9006,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- month(col1) in partition with coltype date +--- time_to_sec(col1)-(time_to_sec(col1)-20) in partition with coltype time ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -9017,14 +9015,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with month(col1) +--- Create tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- -create table t1 (col1 date) engine='MYISAM' -partition by range(month(col1)) +create table t1 (col1 time) engine='MYISAM' +partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 date) engine='MYISAM' -partition by list(month(col1)) +create table t2 (col1 time) engine='MYISAM' +partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9032,16 +9030,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 date) engine='MYISAM' -partition by hash(month(col1)); -create table t4 (colint int, col1 date) engine='MYISAM' +create table t3 (col1 time) engine='MYISAM' +partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); +create table t4 (colint int, col1 time) engine='MYISAM' partition by range(colint) -subpartition by hash(month(col1)) subpartitions 2 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='MYISAM' +create table t5 (colint int, col1 time) engine='MYISAM' partition by list(colint) -subpartition by hash(month(col1)) subpartitions 2 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9049,100 +9047,100 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 date) engine='MYISAM' +create table t6 (colint int, col1 time) engine='MYISAM' partition by range(colint) -(partition p0 values less than (month('2006-10-14')), +(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with month(col1) +--- Access tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-12-17'); -insert into t2 values ('2006-05-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-12-17'); -insert into t3 values ('2006-05-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select month(col1) from t1 order by col1; -month(col1) -1 -12 +insert into t1 values ('09:09:15'); +insert into t1 values ('14:30:45'); +insert into t2 values ('09:09:15'); +insert into t2 values ('14:30:45'); +insert into t2 values ('21:59:22'); +insert into t3 values ('09:09:15'); +insert into t3 values ('14:30:45'); +insert into t3 values ('21:59:22'); +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; +select time_to_sec(col1)-(time_to_sec(col1)-20) from t1 order by col1; +time_to_sec(col1)-(time_to_sec(col1)-20) +20 +20 select * from t1 order by col1; col1 -2006-01-03 -2006-12-17 +09:09:15 +14:30:45 select * from t2 order by col1; col1 -2006-01-03 -2006-05-25 -2006-12-17 +09:09:15 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -2006-01-03 -2006-05-25 -2006-12-17 +09:09:15 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-11-06' where col1='2006-01-03'; -update t2 set col1='2006-11-06' where col1='2006-01-03'; -update t3 set col1='2006-11-06' where col1='2006-01-03'; -update t4 set col1='2006-11-06' where col1='2006-01-03'; -update t5 set col1='2006-11-06' where col1='2006-01-03'; -update t6 set col1='2006-11-06' where col1='2006-01-03'; +1 09:09:15 +2 04:30:01 +3 00:59:22 +4 05:30:34 +update t1 set col1='10:33:11' where col1='09:09:15'; +update t2 set col1='10:33:11' where col1='09:09:15'; +update t3 set col1='10:33:11' where col1='09:09:15'; +update t4 set col1='10:33:11' where col1='09:09:15'; +update t5 set col1='10:33:11' where col1='09:09:15'; +update t6 set col1='10:33:11' where col1='09:09:15'; select * from t1 order by col1; col1 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 select * from t2 order by col1; col1 -2006-05-25 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -2006-05-25 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t6 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 ------------------------------------------------------------------------- ---- Alter tables with month(col1) +--- Alter tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -9157,11 +9155,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(month(col1)) +partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(month(col1)) +partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9170,15 +9168,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(month(col1)); +partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); alter table t44 partition by range(colint) -subpartition by hash(month(col1)) subpartitions 2 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(month(col1)) subpartitions 2 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9188,40 +9186,40 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (month('2006-10-14')), +(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 select * from t22 order by col1; col1 -2006-05-25 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -2006-05-25 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 --------------------------- ---- some alter table begin --------------------------- @@ -9230,19 +9228,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -2006-11-06 -2006-12-17 +10:33:11 +14:30:45 alter table t55 partition by list(colint) -subpartition by hash(month(col1)) subpartitions 5 +subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -9254,10 +9252,10 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL + `col1` time DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (month(col1)) +SUBPARTITION BY HASH (time_to_sec(col1)-(time_to_sec(col1)-20)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, @@ -9267,2166 +9265,121 @@ SUBPARTITIONS 5 PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ select * from t55 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (month('2006-10-14')), +(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 alter table t66 reorganize partition s1 into -(partition p0 values less than (month('2006-10-14')), +(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with month(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-12-17'; -delete from t2 where col1='2006-12-17'; -delete from t3 where col1='2006-12-17'; -delete from t4 where col1='2006-12-17'; -delete from t5 where col1='2006-12-17'; -delete from t6 where col1='2006-12-17'; -select * from t1 order by col1; -col1 -2006-11-06 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-12-17'); -insert into t3 values ('2006-12-17'); -insert into t4 values (60,'2006-12-17'); -insert into t5 values (60,'2006-12-17'); -insert into t6 values (60,'2006-12-17'); -select * from t1 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t2 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -select * from t2 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t3 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t4 order by colint; -colint col1 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -60 2006-12-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with month(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-12-17'; -delete from t22 where col1='2006-12-17'; -delete from t33 where col1='2006-12-17'; -delete from t44 where col1='2006-12-17'; -delete from t55 where col1='2006-12-17'; -delete from t66 where col1='2006-12-17'; -select * from t11 order by col1; -col1 -2006-11-06 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-12-17'); -insert into t22 values ('2006-12-17'); -insert into t33 values ('2006-12-17'); -insert into t44 values (60,'2006-12-17'); -insert into t55 values (60,'2006-12-17'); -insert into t66 values (60,'2006-12-17'); -select * from t11 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t22 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -select * from t22 order by col1; -col1 -2006-11-06 -2006-12-17 -select * from t33 order by col1; -col1 -2006-05-25 -2006-11-06 -2006-12-17 -select * from t44 order by colint; -colint col1 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -60 2006-12-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- quarter(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with quarter(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='MYISAM' -partition by range(quarter(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='MYISAM' -partition by list(quarter(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='MYISAM' -partition by hash(quarter(col1)); -create table t4 (colint int, col1 date) engine='MYISAM' -partition by range(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='MYISAM' -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with quarter(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-12-17'); -insert into t2 values ('2006-09-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-12-17'); -insert into t3 values ('2006-09-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select quarter(col1) from t1 order by col1; -quarter(col1) -1 -4 -select * from t1 order by col1; -col1 -2006-01-03 -2006-12-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-01-03 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-07-30' where col1='2006-01-03'; -update t2 set col1='2006-07-30' where col1='2006-01-03'; -update t3 set col1='2006-07-30' where col1='2006-01-03'; -update t4 set col1='2006-07-30' where col1='2006-01-03'; -update t5 set col1='2006-07-30' where col1='2006-01-03'; -update t6 set col1='2006-07-30' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with quarter(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(quarter(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(quarter(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(quarter(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -alter table t55 -partition by list(colint) -subpartition by hash(quarter(col1)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (quarter(col1)) -SUBPARTITIONS 5 -(PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, - PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, - PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, - PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, - PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (quarter('2006-10-14')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with quarter(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-12-17'; -delete from t2 where col1='2006-12-17'; -delete from t3 where col1='2006-12-17'; -delete from t4 where col1='2006-12-17'; -delete from t5 where col1='2006-12-17'; -delete from t6 where col1='2006-12-17'; -select * from t1 order by col1; -col1 -2006-07-30 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-12-17'); -insert into t2 values ('2006-12-17'); -insert into t3 values ('2006-12-17'); -insert into t4 values (60,'2006-12-17'); -insert into t5 values (60,'2006-12-17'); -insert into t6 values (60,'2006-12-17'); -select * from t1 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t2 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -select * from t2 order by col1; -col1 -select * from t3 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t4 order by colint; -colint col1 -60 2006-12-17 -select * from t5 order by colint; -colint col1 -60 2006-12-17 -select * from t6 order by colint; -colint col1 -4 2006-02-05 -60 2006-12-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with quarter(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-12-17'; -delete from t22 where col1='2006-12-17'; -delete from t33 where col1='2006-12-17'; -delete from t44 where col1='2006-12-17'; -delete from t55 where col1='2006-12-17'; -delete from t66 where col1='2006-12-17'; -select * from t11 order by col1; -col1 -2006-07-30 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-12-17'); -insert into t22 values ('2006-12-17'); -insert into t33 values ('2006-12-17'); -insert into t44 values (60,'2006-12-17'); -insert into t55 values (60,'2006-12-17'); -insert into t66 values (60,'2006-12-17'); -select * from t11 order by col1; -col1 -2006-07-30 -2006-12-17 -select * from t22 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-12-17 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -select * from t22 order by col1; -col1 -select * from t33 order by col1; -col1 -2006-07-30 -2006-09-25 -2006-12-17 -select * from t44 order by colint; -colint col1 -60 2006-12-17 -select * from t55 order by colint; -colint col1 -60 2006-12-17 -select * from t66 order by colint; -colint col1 -4 2006-02-05 -60 2006-12-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- time_to_sec(col1)-(time_to_sec(col1)-20) in partition with coltype time -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -create table t1 (col1 time) engine='MYISAM' -partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 time) engine='MYISAM' -partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 time) engine='MYISAM' -partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); -create table t4 (colint int, col1 time) engine='MYISAM' -partition by range(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 time) engine='MYISAM' -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 time) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -insert into t1 values ('09:09:15'); -insert into t1 values ('14:30:45'); -insert into t2 values ('09:09:15'); -insert into t2 values ('14:30:45'); -insert into t2 values ('21:59:22'); -insert into t3 values ('09:09:15'); -insert into t3 values ('14:30:45'); -insert into t3 values ('21:59:22'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_time.inc' into table t6; -select time_to_sec(col1)-(time_to_sec(col1)-20) from t1 order by col1; -time_to_sec(col1)-(time_to_sec(col1)-20) -20 -20 -select * from t1 order by col1; -col1 -09:09:15 -14:30:45 -select * from t2 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -09:09:15 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 09:09:15 -2 04:30:01 -3 00:59:22 -4 05:30:34 -update t1 set col1='10:33:11' where col1='09:09:15'; -update t2 set col1='10:33:11' where col1='09:09:15'; -update t3 set col1='10:33:11' where col1='09:09:15'; -update t4 set col1='10:33:11' where col1='09:09:15'; -update t5 set col1='10:33:11' where col1='09:09:15'; -update t6 set col1='10:33:11' where col1='09:09:15'; -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t6 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Alter tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(time_to_sec(col1)-(time_to_sec(col1)-20)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)); -alter table t44 -partition by range(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -alter table t55 -partition by list(colint) -subpartition by hash(time_to_sec(col1)-(time_to_sec(col1)-20)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` time DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (time_to_sec(col1)-(time_to_sec(col1)-20)) -SUBPARTITIONS 5 -(PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, - PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, - PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, - PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, - PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (time_to_sec('18:30:14')-(time_to_sec('17:59:59'))), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -delete from t1 where col1='14:30:45'; -delete from t2 where col1='14:30:45'; -delete from t3 where col1='14:30:45'; -delete from t4 where col1='14:30:45'; -delete from t5 where col1='14:30:45'; -delete from t6 where col1='14:30:45'; -select * from t1 order by col1; -col1 -10:33:11 -select * from t2 order by col1; -col1 -10:33:11 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t1 values ('14:30:45'); -insert into t2 values ('14:30:45'); -insert into t3 values ('14:30:45'); -insert into t4 values (60,'14:30:45'); -insert into t5 values (60,'14:30:45'); -insert into t6 values (60,'14:30:45'); -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t5 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t6 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -10:33:11 -14:30:45 -select * from t2 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t3 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t4 order by colint; -colint col1 -60 14:30:45 -select * from t5 order by colint; -colint col1 -60 14:30:45 -select * from t6 order by colint; -colint col1 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) -------------------------------------------------------------------------- -delete from t11 where col1='14:30:45'; -delete from t22 where col1='14:30:45'; -delete from t33 where col1='14:30:45'; -delete from t44 where col1='14:30:45'; -delete from t55 where col1='14:30:45'; -delete from t66 where col1='14:30:45'; -select * from t11 order by col1; -col1 -10:33:11 -select * from t22 order by col1; -col1 -10:33:11 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -insert into t11 values ('14:30:45'); -insert into t22 values ('14:30:45'); -insert into t33 values ('14:30:45'); -insert into t44 values (60,'14:30:45'); -insert into t55 values (60,'14:30:45'); -insert into t66 values (60,'14:30:45'); -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t55 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -select * from t66 order by colint; -colint col1 -1 10:33:11 -2 04:30:01 -3 00:59:22 -4 05:30:34 -60 14:30:45 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -10:33:11 -14:30:45 -select * from t22 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t33 order by col1; -col1 -10:33:11 -14:30:45 -21:59:22 -select * from t44 order by colint; -colint col1 -60 14:30:45 -select * from t55 order by colint; -colint col1 -60 14:30:45 -select * from t66 order by colint; -colint col1 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- to_days(col1)-to_days('2006-01-01') in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -create table t1 (col1 date) engine='MYISAM' -partition by range(to_days(col1)-to_days('2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='MYISAM' -partition by list(to_days(col1)-to_days('2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='MYISAM' -partition by hash(to_days(col1)-to_days('2006-01-01')); -create table t4 (colint int, col1 date) engine='MYISAM' -partition by range(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='MYISAM' -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select to_days(col1)-to_days('2006-01-01') from t1 order by col1; -to_days(col1)-to_days('2006-01-01') -16 -33 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-02-03'; -update t2 set col1='2006-02-06' where col1='2006-02-03'; -update t3 set col1='2006-02-06' where col1='2006-02-03'; -update t4 set col1='2006-02-06' where col1='2006-02-03'; -update t5 set col1='2006-02-06' where col1='2006-02-03'; -update t6 set col1='2006-02-06' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(to_days(col1)-to_days('2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(to_days(col1)-to_days('2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(to_days(col1)-to_days('2006-01-01')); -alter table t44 -partition by range(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -alter table t55 -partition by list(colint) -subpartition by hash(to_days(col1)-to_days('2006-01-01')) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (to_days(col1)-to_days('2006-01-01')) -SUBPARTITIONS 5 -(PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, - PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, - PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, - PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, - PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (to_days('2006-02-02')-to_days('2006-01-01')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; -select * from t1 order by col1; -col1 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -60 2006-01-17 -select * from t5 order by colint; -colint col1 -60 2006-01-17 -select * from t6 order by colint; -colint col1 -60 2006-01-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with to_days(col1)-to_days('2006-01-01') -------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; -select * from t11 order by col1; -col1 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -60 2006-01-17 -select * from t55 order by colint; -colint col1 -60 2006-01-17 -select * from t66 order by colint; -colint col1 -60 2006-01-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- datediff(col1, '2006-01-01') in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -create table t1 (col1 date) engine='MYISAM' -partition by range(datediff(col1, '2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='MYISAM' -partition by list(datediff(col1, '2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='MYISAM' -partition by hash(datediff(col1, '2006-01-01')); -create table t4 (colint int, col1 date) engine='MYISAM' -partition by range(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='MYISAM' -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -insert into t1 values ('2006-02-03'); -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-02-03'); -insert into t2 values ('2006-01-17'); -insert into t2 values ('2006-01-25'); -insert into t3 values ('2006-02-03'); -insert into t3 values ('2006-01-17'); -insert into t3 values ('2006-01-25'); -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQLTEST_VARDIR/std_data/parts/part_supported_sql_funcs_int_date.inc' into table t6; -select datediff(col1, '2006-01-01') from t1 order by col1; -datediff(col1, '2006-01-01') -16 -33 -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-03 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-03 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-02-06' where col1='2006-02-03'; -update t2 set col1='2006-02-06' where col1='2006-02-03'; -update t3 set col1='2006-02-06' where col1='2006-02-03'; -update t4 set col1='2006-02-06' where col1='2006-02-03'; -update t5 set col1='2006-02-06' where col1='2006-02-03'; -update t6 set col1='2006-02-06' where col1='2006-02-03'; -select * from t1 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t2 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t3 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t4 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with datediff(col1, '2006-01-01') -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(datediff(col1, '2006-01-01')) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(datediff(col1, '2006-01-01')) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(datediff(col1, '2006-01-01')); -alter table t44 -partition by range(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -select * from t22 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t33 order by col1; -col1 -2006-01-17 -2006-01-25 -2006-02-06 -select * from t44 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-01-17 -2006-02-06 -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) -SUBPARTITION BY HASH (datediff(col1, '2006-01-01')) -SUBPARTITIONS 5 -(PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, - PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, - PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, - PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, - PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-06 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with datediff(col1, '2006-01-01') +--- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- -delete from t1 where col1='2006-01-17'; -delete from t2 where col1='2006-01-17'; -delete from t3 where col1='2006-01-17'; -delete from t4 where col1='2006-01-17'; -delete from t5 where col1='2006-01-17'; -delete from t6 where col1='2006-01-17'; +delete from t1 where col1='14:30:45'; +delete from t2 where col1='14:30:45'; +delete from t3 where col1='14:30:45'; +delete from t4 where col1='14:30:45'; +delete from t5 where col1='14:30:45'; +delete from t6 where col1='14:30:45'; select * from t1 order by col1; col1 -2006-02-06 +10:33:11 select * from t2 order by col1; col1 -2006-01-25 -2006-02-06 +10:33:11 +21:59:22 select * from t3 order by col1; col1 -2006-01-25 -2006-02-06 +10:33:11 +21:59:22 select * from t4 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t5 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-01-17'); -insert into t2 values ('2006-01-17'); -insert into t3 values ('2006-01-17'); -insert into t4 values (60,'2006-01-17'); -insert into t5 values (60,'2006-01-17'); -insert into t6 values (60,'2006-01-17'); +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +insert into t1 values ('14:30:45'); +insert into t2 values ('14:30:45'); +insert into t3 values ('14:30:45'); +insert into t4 values (60,'14:30:45'); +insert into t5 values (60,'14:30:45'); +insert into t6 values (60,'14:30:45'); select * from t1 order by col1; col1 -2006-01-17 -2006-02-06 +10:33:11 +14:30:45 select * from t2 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 select * from t5 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 select * from t6 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -11434,95 +9387,99 @@ alter table t5 drop partition p0; alter table t6 drop partition p0; select * from t1 order by col1; col1 -2006-01-17 -2006-02-06 +10:33:11 +14:30:45 select * from t2 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t3 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t4 order by colint; colint col1 -60 2006-01-17 +60 14:30:45 select * from t5 order by colint; colint col1 -60 2006-01-17 +60 14:30:45 select * from t6 order by colint; colint col1 -60 2006-01-17 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with datediff(col1, '2006-01-01') +--- Delete rows and partitions of tables with time_to_sec(col1)-(time_to_sec(col1)-20) ------------------------------------------------------------------------- -delete from t11 where col1='2006-01-17'; -delete from t22 where col1='2006-01-17'; -delete from t33 where col1='2006-01-17'; -delete from t44 where col1='2006-01-17'; -delete from t55 where col1='2006-01-17'; -delete from t66 where col1='2006-01-17'; +delete from t11 where col1='14:30:45'; +delete from t22 where col1='14:30:45'; +delete from t33 where col1='14:30:45'; +delete from t44 where col1='14:30:45'; +delete from t55 where col1='14:30:45'; +delete from t66 where col1='14:30:45'; select * from t11 order by col1; col1 -2006-02-06 +10:33:11 select * from t22 order by col1; col1 -2006-01-25 -2006-02-06 +10:33:11 +21:59:22 select * from t33 order by col1; col1 -2006-01-25 -2006-02-06 +10:33:11 +21:59:22 select * from t44 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 select * from t55 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-01-17'); -insert into t22 values ('2006-01-17'); -insert into t33 values ('2006-01-17'); -insert into t44 values (60,'2006-01-17'); -insert into t55 values (60,'2006-01-17'); -insert into t66 values (60,'2006-01-17'); +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +insert into t11 values ('14:30:45'); +insert into t22 values ('14:30:45'); +insert into t33 values ('14:30:45'); +insert into t44 values (60,'14:30:45'); +insert into t55 values (60,'14:30:45'); +insert into t66 values (60,'14:30:45'); select * from t11 order by col1; col1 -2006-01-17 -2006-02-06 +10:33:11 +14:30:45 select * from t22 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 select * from t55 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 select * from t66 order by colint; colint col1 -1 2006-02-06 -3 2006-01-25 -4 2006-02-05 -60 2006-01-17 +1 10:33:11 +2 04:30:01 +3 00:59:22 +4 05:30:34 +60 14:30:45 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -11530,27 +9487,26 @@ alter table t55 drop partition p0; alter table t66 drop partition p0; select * from t11 order by col1; col1 -2006-01-17 -2006-02-06 +10:33:11 +14:30:45 select * from t22 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t33 order by col1; col1 -2006-01-17 -2006-01-25 -2006-02-06 +10:33:11 +14:30:45 +21:59:22 select * from t44 order by colint; colint col1 -60 2006-01-17 +60 14:30:45 select * from t55 order by colint; colint col1 -60 2006-01-17 +60 14:30:45 select * from t66 order by colint; colint col1 -60 2006-01-17 ------------------------- ---- some alter table end ------------------------- -- cgit v1.2.1 From c1fce59c3d9a9dd100dd7048f21451505068f27b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 23 Dec 2010 13:35:42 +0200 Subject: fixed the binlog problem --- mysql-test/suite/binlog/r/binlog_unsafe.result | 2 +- mysql-test/suite/binlog/t/binlog_unsafe.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 77fe5eb0b5e..e0e0babb8b7 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -271,7 +271,7 @@ INSERT INTO t1 SELECT * FROM t2 LIMIT 1; DROP TABLE t1,t2; "Should NOT have any warning message issued in the following func7() and trig" CREATE TABLE t1 (a INT); -CREATE TABLE t2 (a CHAR(40)); +CREATE TABLE t2 (a TEXT); CREATE TABLE trigger_table (a CHAR(7)); CREATE FUNCTION func7() RETURNS INT diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index a86e49e475a..1e2e31eacf7 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -329,7 +329,7 @@ DROP TABLE t1,t2; --echo "Should NOT have any warning message issued in the following func7() and trig" CREATE TABLE t1 (a INT); -CREATE TABLE t2 (a CHAR(40)); +CREATE TABLE t2 (a TEXT); CREATE TABLE trigger_table (a CHAR(7)); DELIMITER |; CREATE FUNCTION func7() -- cgit v1.2.1 From 3997d4c694eeafb631831b639f84f29479b0eba7 Mon Sep 17 00:00:00 2001 From: Guilhem Bichot Date: Fri, 31 Dec 2010 12:07:34 +0100 Subject: Test which runs slowly on some machines, is marked as big so will be run only weekly; this closes BUG#50595. --- mysql-test/suite/funcs_1/r/myisam_views-big.result | 24605 +++++++++++++++++++ mysql-test/suite/funcs_1/r/myisam_views.result | 24605 ------------------- mysql-test/suite/funcs_1/t/myisam_views-big.test | 34 + mysql-test/suite/funcs_1/t/myisam_views.test | 31 - 4 files changed, 24639 insertions(+), 24636 deletions(-) create mode 100644 mysql-test/suite/funcs_1/r/myisam_views-big.result delete mode 100644 mysql-test/suite/funcs_1/r/myisam_views.result create mode 100644 mysql-test/suite/funcs_1/t/myisam_views-big.test delete mode 100644 mysql-test/suite/funcs_1/t/myisam_views.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/funcs_1/r/myisam_views-big.result b/mysql-test/suite/funcs_1/r/myisam_views-big.result new file mode 100644 index 00000000000..9b07a0ae45b --- /dev/null +++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result @@ -0,0 +1,24605 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +USE test; +drop table if exists tb2 ; +create table tb2 ( +f59 numeric (0) unsigned, +f60 numeric (64) unsigned, +f61 numeric (0) zerofill, +f62 numeric (64) zerofill, +f63 numeric (0) unsigned zerofill, +f64 numeric (64) unsigned zerofill, +f65 numeric (0,0), +f66 numeric (63,30), +f67 numeric (0,0) unsigned, +f68 numeric (63,30) unsigned, +f69 numeric (0,0) zerofill, +f70 numeric (63,30) zerofill, +f71 numeric (0,0) unsigned zerofill, +f72 numeric (63,30) unsigned zerofill, +f73 real, +f74 real unsigned, +f75 real zerofill, +f76 real unsigned zerofill, +f77 double default 7.7, +f78 double unsigned default 7.7, +f79 double zerofill default 7.7, +f80 double unsigned zerofill default 8.8, +f81 float not null default 8.8, +f82 float unsigned not null default 8.8, +f83 float zerofill not null default 8.8, +f84 float unsigned zerofill not null default 8.8, +f85 float(0) not null default 8.8, +f86 float(23) not null default 8.8, +f87 float(0) unsigned not null default 8.8, +f88 float(23) unsigned not null default 8.8, +f89 float(0) zerofill not null default 8.8, +f90 float(23) zerofill not null default 8.8, +f91 float(0) unsigned zerofill not null default 8.8, +f92 float(23) unsigned zerofill not null default 8.8, +f93 float(24) not null default 8.8, +f94 float(53) not null default 8.8, +f95 float(24) unsigned not null default 8.8, +f96 float(53) unsigned not null default 8.8, +f97 float(24) zerofill not null default 8.8, +f98 float(53) zerofill not null default 8.8, +f99 float(24) unsigned zerofill not null default 8.8, +f100 float(53) unsigned zerofill not null default 8.8, +f101 date not null default '2000-01-01', +f102 time not null default 20, +f103 datetime not null default '2/2/2', +f104 timestamp not null default 20001231235959, +f105 year not null default 2000, +f106 year(3) not null default 2000, +f107 year(4) not null default 2000, +f108 enum("1enum","2enum") not null default "1enum", +f109 set("1set","2set") not null default "1set", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; +load data infile '/std_data/funcs_1/myisam_tb2.txt' +into table tb2; +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +USE test1; +drop table if exists tb2 ; +create table tb2 ( +f59 numeric (0) unsigned, +f60 numeric (64) unsigned, +f61 numeric (0) zerofill, +f62 numeric (64) zerofill, +f63 numeric (0) unsigned zerofill, +f64 numeric (64) unsigned zerofill, +f65 numeric (0,0), +f66 numeric (63,30), +f67 numeric (0,0) unsigned, +f68 numeric (63,30) unsigned, +f69 numeric (0,0) zerofill, +f70 numeric (63,30) zerofill, +f71 numeric (0,0) unsigned zerofill, +f72 numeric (63,30) unsigned zerofill, +f73 real, +f74 real unsigned, +f75 real zerofill, +f76 real unsigned zerofill, +f77 double default 7.7, +f78 double unsigned default 7.7, +f79 double zerofill default 7.7, +f80 double unsigned zerofill default 8.8, +f81 float not null default 8.8, +f82 float unsigned not null default 8.8, +f83 float zerofill not null default 8.8, +f84 float unsigned zerofill not null default 8.8, +f85 float(0) not null default 8.8, +f86 float(23) not null default 8.8, +f87 float(0) unsigned not null default 8.8, +f88 float(23) unsigned not null default 8.8, +f89 float(0) zerofill not null default 8.8, +f90 float(23) zerofill not null default 8.8, +f91 float(0) unsigned zerofill not null default 8.8, +f92 float(23) unsigned zerofill not null default 8.8, +f93 float(24) not null default 8.8, +f94 float(53) not null default 8.8, +f95 float(24) unsigned not null default 8.8, +f96 float(53) unsigned not null default 8.8, +f97 float(24) zerofill not null default 8.8, +f98 float(53) zerofill not null default 8.8, +f99 float(24) unsigned zerofill not null default 8.8, +f100 float(53) unsigned zerofill not null default 8.8, +f101 date not null default '2000-01-01', +f102 time not null default 20, +f103 datetime not null default '2/2/2', +f104 timestamp not null default 20001231235959, +f105 year not null default 2000, +f106 year(3) not null default 2000, +f107 year(4) not null default 2000, +f108 enum("1enum","2enum") not null default "1enum", +f109 set("1set","2set") not null default "1set", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; +load data infile '/std_data/funcs_1/myisam_tb2.txt' +into table tb2; +USE test; + +Attention: The nesting level @max_level in Testcase 3.3.1.A6 +(Complicated nested VIEWs) has to be limited to 20 because of +MyISAM(only) performance issues Bug#11948 +-------------------------------------------------------------------------------- +SET @limit1 = 20; + +! Attention: The file with the expected results is not +| thoroughly checked. +! The server return codes are correct, but +| most result sets where the table tb2 is +! involved are not checked. +-------------------------------------------------------------------------------- + +There are some statements where the ps-protocol is switched off. +Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill +-------------------------------------------------------------------------------- +insert into test.tb2 (f59,f60) values (76710,226546); +insert into test.tb2 (f59,f60) values(2760,985654); +insert into test.tb2 (f59,f60) values(569300,9114376); +insert into test.tb2 (f59,f60) values(660,876546); +insert into test.tb2 (f59,f60) values(250,87895654); +insert into test.tb2 (f59,f60) values(340,9984376); +insert into test.tb2 (f59,f60) values(3410,996546); +insert into test.tb2 (f59,f60) values(2550,775654); +insert into test.tb2 (f59,f60) values(3330,764376); +insert into test.tb2 (f59,f60) values(441,16546); +insert into test.tb2 (f59,f60) values(24,51654); +insert into test.tb2 (f59,f60) values(323,14376); +insert into test.tb2 (f59,f60) values(34,41); +insert into test.tb2 (f59,f60) values(04,74); +insert into test.tb2 (f59,f60) values(15,87); +insert into test.tb2 (f59,f60) values(22,93); +insert into test.tb2 (f59,f60) values(394,41); +insert into test.tb2 (f59,f60) values(094,74); +insert into test.tb2 (f59,f60) values(195,87); +insert into test.tb2 (f59,f60) values(292,93); +insert into test.tb2 (f59,f60) values(0987,41) ; +insert into test.tb2 (f59,f60) values(7876,74) ; +INSERT INTO tb2 (f59,f61) VALUES(321,765 ); +INSERT INTO tb2 (f59,f61) VALUES(9112,8771); +INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; +INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; +INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; +Insert into tb2 (f59,f60,f61) values (107,105,106) ; +Insert into tb2 (f59,f60,f61) values (109,108,104) ; +Insert into tb2 (f59,f60,f61) values (207,205,206) ; +Insert into tb2 (f59,f60,f61) values (209,208,204) ; +Insert into tb2 (f59,f60,f61) values (27,25,26) ; +Insert into tb2 (f59,f60,f61) values (29,28,24) ; +Insert into tb2 (f59,f60,f61) values (17,15,16) ; +Insert into tb2 (f59,f60,f61) values (19,18,14) ; +insert into tb2 (f59,f60,f61) values (107,105,106); +insert into tb2 (f59,f60,f61) values (109,108,104); +INSERT INTO tb2 (f59,f60) VALUES( 299,899 ); +INSERT INTO tb2 (f59,f60) VALUES( 242,79 ); +INSERT INTO tb2 (f59,f60) VALUES( 424,89 ); +SELECT * FROM tb2 ORDER BY f59, f60, f61; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ +2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ +3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set @@@@@@ >@>@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL +4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set @@@@@@ I@I@ @@@@@@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set @@@@ @ @ 9@.@ @@@@ @ @ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@ @@@@ @ @ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ +8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ +9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set @@@@@@ >@>@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL +15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +Use test; + +Testcase 3.3.1.1 +-------------------------------------------------------------------------------- +Drop table if exists t1; +Create table t1 (f59 INT, f60 INT) ; +Insert into t1 values (100,4234); +Insert into t1 values (990,6624); +Insert into t1 values (710,765); +Insert into t1 values (300,433334); +Insert into t1 values (800,9788); +Insert into t1 values (500,9866); +Drop view if exists v1 ; +CREATE VIEW v1 AS select f59,f60,f61 +FROM test.tb2 where f59=250; +select * FROM v1 order by f60,f61 limit 0,10; +f59 f60 f61 +250 87895654 NULL +Drop view if exists v1 ; +CREATE VIEW v1 AS select f59,f60,f61 +FROM test.tb2 limit 100; +select * FROM v1 order by f59,f60,f61 limit 0,10; +f59 f60 f61 +1 1 0000000001 +2 2 0000000002 +3 3 0000000003 +4 4 0000000004 +4 74 NULL +5 5 0000000005 +6 6 0000000006 +7 7 0000000007 +8 8 0000000008 +9 9 0000000009 +CREATE or REPLACE VIEW v1 AS select f59,f60,f61 +FROM test.tb2; +select * FROM v1 order by f59,f60,f61 limit 4,3; +f59 f60 f61 +4 74 NULL +5 5 0000000005 +6 6 0000000006 +CREATE or REPLACE VIEW v1 AS select distinct f59 +FROM test.tb2; +select * FROM v1 order by f59 limit 4,3; +f59 +5 +6 +7 +ALTER VIEW v1 AS select f59 +FROM test.tb2; +select * FROM v1 order by f59 limit 6,2; +f59 +6 +7 +CREATE or REPLACE VIEW v1 AS select f59 +from tb2 order by f59; +select * FROM v1 order by f59 limit 0,10; +f59 +1 +2 +3 +4 +4 +5 +6 +7 +8 +9 +CREATE or REPLACE VIEW v1 AS select f59 +from tb2 order by f59 asc; +select * FROM v1 limit 0,10; +f59 +1 +2 +3 +4 +4 +5 +6 +7 +8 +9 +CREATE or REPLACE VIEW v1 AS select f59 +from tb2 order by f59 desc; +select * FROM v1 limit 0,10; +f59 +569300 +76710 +9112 +7876 +3410 +3330 +2760 +2550 +987 +660 +CREATE or REPLACE VIEW v1 AS select f59 +from tb2 group by f59; +select * FROM v1 order by f59 limit 0,10; +f59 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +CREATE or REPLACE VIEW v1 AS select f59 +from tb2 group by f59 asc; +select * FROM v1 order by f59 limit 0,10; +f59 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +CREATE or REPLACE VIEW v1 AS select f59 +from tb2 group by f59 desc; +select * FROM v1 order by f59 limit 0,10; +f59 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +CREATE or REPLACE VIEW v1 AS (select f59 from tb2) +union (select f59 from t1); +select * FROM v1 order by f59 limit 0,10; +f59 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2) +UNION DISTINCT(select f59 FROM t1) ; +select * FROM v1 order by f59 limit 0,10; +f59 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2) +UNION ALL(select f59 FROM t1) ; +select * FROM v1 order by f59 limit 0,10; +f59 +1 +2 +3 +4 +4 +5 +6 +7 +8 +9 +CREATE or REPLACE VIEW v1 AS select * +FROM test.tb2 WITH LOCAL CHECK OPTION ; +select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50; +f59 1 +f60 1 +f61 0000000001 +f62 0000000000000000000000000000000000000000000000000000000000000001 +f63 0000000001 +f64 0000000000000000000000000000000000000000000000000000000000000001 +f65 -5 +f66 0.000000000000000000000000000000 +f67 1 +f68 0.000000000000000000000000000000 +f69 0000000001 +f70 000000000000000000000000000000000.000000000000000000000000000000 +f71 0000000001 +f72 000000000000000000000000000000000.000000000000000000000000000000 +f73 -1.17549435e-38 +f74 1.175494352e-38 +f75 00000001.175494352e-38 +f76 00000001.175494352e-38 +f77 -1.17549435e-38 +f78 1.175494352e-38 +f79 00000001.175494352e-38 +f80 00000001.175494352e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.17549435e-38 +f95 1.17549e-38 +f96 1.175494352e-38 +f97 01.17549e-38 +f98 00000001.175494352e-38 +f99 01.17549e-38 +f100 00000001.175494352e-38 +f101 1000-01-01 +f102 838:59:58 +f103 1970-01-02 00:00:01 +f104 1970-01-02 00:00:01 +f105 1902 +f106 1902 +f107 1902 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 2 +f60 2 +f61 0000000002 +f62 0000000000000000000000000000000000000000000000000000000000000002 +f63 0000000002 +f64 0000000000000000000000000000000000000000000000000000000000000002 +f65 -4 +f66 1.100000000000000000000000000000 +f67 2 +f68 1.100000000000000000000000000000 +f69 0000000002 +f70 000000000000000000000000000000001.100000000000000000000000000000 +f71 0000000002 +f72 000000000000000000000000000000001.100000000000000000000000000000 +f73 -1.175494349e-38 +f74 1.175494353e-38 +f75 00000001.175494353e-38 +f76 00000001.175494353e-38 +f77 -1.175494349e-38 +f78 1.175494353e-38 +f79 00000001.175494353e-38 +f80 00000001.175494353e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494349e-38 +f95 1.17549e-38 +f96 1.175494353e-38 +f97 01.17549e-38 +f98 00000001.175494353e-38 +f99 01.17549e-38 +f100 00000001.175494353e-38 +f101 1000-01-02 +f102 838:59:57 +f103 1970-01-03 00:00:02 +f104 1970-01-03 00:00:02 +f105 1903 +f106 1903 +f107 1903 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 3 +f60 3 +f61 0000000003 +f62 0000000000000000000000000000000000000000000000000000000000000003 +f63 0000000003 +f64 0000000000000000000000000000000000000000000000000000000000000003 +f65 -3 +f66 2.200000000000000000000000000000 +f67 3 +f68 2.200000000000000000000000000000 +f69 0000000003 +f70 000000000000000000000000000000002.200000000000000000000000000000 +f71 0000000003 +f72 000000000000000000000000000000002.200000000000000000000000000000 +f73 -1.175494348e-38 +f74 1.175494354e-38 +f75 00000001.175494354e-38 +f76 00000001.175494354e-38 +f77 -1.175494348e-38 +f78 1.175494354e-38 +f79 00000001.175494354e-38 +f80 00000001.175494354e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494348e-38 +f95 1.17549e-38 +f96 1.175494354e-38 +f97 01.17549e-38 +f98 00000001.175494354e-38 +f99 01.17549e-38 +f100 00000001.175494354e-38 +f101 1000-01-03 +f102 838:59:56 +f103 1970-01-04 00:00:03 +f104 1970-01-04 00:00:03 +f105 1904 +f106 1904 +f107 1904 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 4 +f60 4 +f61 0000000004 +f62 0000000000000000000000000000000000000000000000000000000000000004 +f63 0000000004 +f64 0000000000000000000000000000000000000000000000000000000000000004 +f65 -2 +f66 3.300000000000000000000000000000 +f67 4 +f68 3.300000000000000000000000000000 +f69 0000000004 +f70 000000000000000000000000000000003.300000000000000000000000000000 +f71 0000000004 +f72 000000000000000000000000000000003.300000000000000000000000000000 +f73 -1.175494347e-38 +f74 1.175494355e-38 +f75 00000001.175494355e-38 +f76 00000001.175494355e-38 +f77 -1.175494347e-38 +f78 1.175494355e-38 +f79 00000001.175494355e-38 +f80 00000001.175494355e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494347e-38 +f95 1.17549e-38 +f96 1.175494355e-38 +f97 01.17549e-38 +f98 00000001.175494355e-38 +f99 01.17549e-38 +f100 00000001.175494355e-38 +f101 1000-01-04 +f102 838:59:55 +f103 1970-01-05 00:00:04 +f104 1970-01-05 00:00:04 +f105 1905 +f106 1905 +f107 1905 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 4 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 5 +f60 5 +f61 0000000005 +f62 0000000000000000000000000000000000000000000000000000000000000005 +f63 0000000005 +f64 0000000000000000000000000000000000000000000000000000000000000005 +f65 -1 +f66 4.400000000000000000000000000000 +f67 5 +f68 4.400000000000000000000000000000 +f69 0000000005 +f70 000000000000000000000000000000004.400000000000000000000000000000 +f71 0000000005 +f72 000000000000000000000000000000004.400000000000000000000000000000 +f73 -1.175494346e-38 +f74 1.175494356e-38 +f75 00000001.175494356e-38 +f76 00000001.175494356e-38 +f77 -1.175494346e-38 +f78 1.175494356e-38 +f79 00000001.175494356e-38 +f80 00000001.175494356e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494346e-38 +f95 1.17549e-38 +f96 1.175494356e-38 +f97 01.17549e-38 +f98 00000001.175494356e-38 +f99 01.17549e-38 +f100 00000001.175494356e-38 +f101 1000-01-05 +f102 838:59:54 +f103 1970-01-06 00:00:05 +f104 1970-01-06 00:00:05 +f105 1906 +f106 1906 +f107 1906 +f108 2enum +f109 1set,2set +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f59 6 +f60 6 +f61 0000000006 +f62 0000000000000000000000000000000000000000000000000000000000000006 +f63 0000000006 +f64 0000000000000000000000000000000000000000000000000000000000000006 +f65 0 +f66 5.500000000000000000000000000000 +f67 6 +f68 5.500000000000000000000000000000 +f69 0000000006 +f70 000000000000000000000000000000005.500000000000000000000000000000 +f71 0000000006 +f72 000000000000000000000000000000005.500000000000000000000000000000 +f73 -1.175494345e-38 +f74 1.175494357e-38 +f75 00000001.175494357e-38 +f76 00000001.175494357e-38 +f77 -1.175494345e-38 +f78 1.175494357e-38 +f79 00000001.175494357e-38 +f80 00000001.175494357e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494345e-38 +f95 1.17549e-38 +f96 1.175494357e-38 +f97 01.17549e-38 +f98 00000001.175494357e-38 +f99 01.17549e-38 +f100 00000001.175494357e-38 +f101 1000-01-06 +f102 838:59:53 +f103 1970-01-07 00:00:06 +f104 1970-01-07 00:00:06 +f105 1907 +f106 1907 +f107 1907 +f108 1enum +f109 1set +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f59 7 +f60 7 +f61 0000000007 +f62 0000000000000000000000000000000000000000000000000000000000000007 +f63 0000000007 +f64 0000000000000000000000000000000000000000000000000000000000000007 +f65 1 +f66 6.600000000000000000000000000000 +f67 7 +f68 6.600000000000000000000000000000 +f69 0000000007 +f70 000000000000000000000000000000006.600000000000000000000000000000 +f71 0000000007 +f72 000000000000000000000000000000006.600000000000000000000000000000 +f73 -1.175494344e-38 +f74 1.175494358e-38 +f75 00000001.175494358e-38 +f76 00000001.175494358e-38 +f77 -1.175494344e-38 +f78 1.175494358e-38 +f79 00000001.175494358e-38 +f80 00000001.175494358e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494344e-38 +f95 1.17549e-38 +f96 1.175494358e-38 +f97 01.17549e-38 +f98 00000001.175494358e-38 +f99 01.17549e-38 +f100 00000001.175494358e-38 +f101 1000-01-07 +f102 838:59:52 +f103 1970-01-08 00:00:07 +f104 1970-01-08 00:00:07 +f105 1908 +f106 1908 +f107 1908 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 8 +f60 8 +f61 0000000008 +f62 0000000000000000000000000000000000000000000000000000000000000008 +f63 0000000008 +f64 0000000000000000000000000000000000000000000000000000000000000008 +f65 2 +f66 7.700000000000000000000000000000 +f67 8 +f68 7.700000000000000000000000000000 +f69 0000000008 +f70 000000000000000000000000000000007.700000000000000000000000000000 +f71 0000000008 +f72 000000000000000000000000000000007.700000000000000000000000000000 +f73 -1.175494343e-38 +f74 1.175494359e-38 +f75 00000001.175494359e-38 +f76 00000001.175494359e-38 +f77 -1.175494343e-38 +f78 1.175494359e-38 +f79 00000001.175494359e-38 +f80 00000001.175494359e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494343e-38 +f95 1.17549e-38 +f96 1.175494359e-38 +f97 01.17549e-38 +f98 00000001.175494359e-38 +f99 01.17549e-38 +f100 00000001.175494359e-38 +f101 1000-01-08 +f102 838:59:51 +f103 1970-01-09 00:00:08 +f104 1970-01-09 00:00:08 +f105 1909 +f106 1909 +f107 1909 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 9 +f60 9 +f61 0000000009 +f62 0000000000000000000000000000000000000000000000000000000000000009 +f63 0000000009 +f64 0000000000000000000000000000000000000000000000000000000000000009 +f65 3 +f66 8.800000000000000000000000000000 +f67 9 +f68 8.800000000000000000000000000000 +f69 0000000009 +f70 000000000000000000000000000000008.800000000000000000000000000000 +f71 0000000009 +f72 000000000000000000000000000000008.800000000000000000000000000000 +f73 -1.175494342e-38 +f74 1.17549436e-38 +f75 000000001.17549436e-38 +f76 000000001.17549436e-38 +f77 -1.175494342e-38 +f78 1.17549436e-38 +f79 000000001.17549436e-38 +f80 000000001.17549436e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494342e-38 +f95 1.17549e-38 +f96 1.17549436e-38 +f97 01.17549e-38 +f98 000000001.17549436e-38 +f99 01.17549e-38 +f100 000000001.17549436e-38 +f101 1000-01-09 +f102 838:59:50 +f103 1970-01-10 00:00:09 +f104 1970-01-10 00:00:09 +f105 1910 +f106 1910 +f107 1910 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 10 +f60 10 +f61 0000000010 +f62 0000000000000000000000000000000000000000000000000000000000000010 +f63 0000000010 +f64 0000000000000000000000000000000000000000000000000000000000000010 +f65 4 +f66 9.900000000000000000000000000000 +f67 10 +f68 9.900000000000000000000000000000 +f69 0000000010 +f70 000000000000000000000000000000009.900000000000000000000000000000 +f71 0000000010 +f72 000000000000000000000000000000009.900000000000000000000000000000 +f73 -1.175494341e-38 +f74 1.175494361e-38 +f75 00000001.175494361e-38 +f76 00000001.175494361e-38 +f77 -1.175494341e-38 +f78 1.175494361e-38 +f79 00000001.175494361e-38 +f80 00000001.175494361e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494341e-38 +f95 1.17549e-38 +f96 1.175494361e-38 +f97 01.17549e-38 +f98 00000001.175494361e-38 +f99 01.17549e-38 +f100 00000001.175494361e-38 +f101 1000-01-10 +f102 838:59:49 +f103 1970-01-11 00:00:10 +f104 1970-01-11 00:00:10 +f105 1911 +f106 1911 +f107 1911 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 15 +f60 87 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 17 +f60 15 +f61 0000000016 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 19 +f60 18 +f61 0000000014 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 22 +f60 93 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 24 +f60 51654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 27 +f60 25 +f61 0000000026 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 29 +f60 28 +f61 0000000024 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 34 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 94 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 107 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 107 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 109 +f60 108 +f61 0000000104 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 109 +f60 108 +f61 0000000104 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 195 +f60 87 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 207 +f60 205 +f61 0000000206 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 209 +f60 208 +f61 0000000204 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 242 +f60 79 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 250 +f60 87895654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 292 +f60 93 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 299 +f60 899 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 321 +f60 NULL +f61 0000000765 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 323 +f60 14376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 340 +f60 9984376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 394 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 424 +f60 89 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 441 +f60 16546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 660 +f60 876546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 987 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 2550 +f60 775654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 2760 +f60 985654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 3330 +f60 764376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 3410 +f60 996546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 7876 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 9112 +f60 NULL +f61 0000008771 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 76710 +f60 226546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 569300 +f60 9114376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +CREATE or REPLACE VIEW v1 AS select * +FROM test.tb2 WITH CASCADED CHECK OPTION ; +select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10; +f59 1 +f60 1 +f61 0000000001 +f62 0000000000000000000000000000000000000000000000000000000000000001 +f63 0000000001 +f64 0000000000000000000000000000000000000000000000000000000000000001 +f65 -5 +f66 0.000000000000000000000000000000 +f67 1 +f68 0.000000000000000000000000000000 +f69 0000000001 +f70 000000000000000000000000000000000.000000000000000000000000000000 +f71 0000000001 +f72 000000000000000000000000000000000.000000000000000000000000000000 +f73 -1.17549435e-38 +f74 1.175494352e-38 +f75 00000001.175494352e-38 +f76 00000001.175494352e-38 +f77 -1.17549435e-38 +f78 1.175494352e-38 +f79 00000001.175494352e-38 +f80 00000001.175494352e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.17549435e-38 +f95 1.17549e-38 +f96 1.175494352e-38 +f97 01.17549e-38 +f98 00000001.175494352e-38 +f99 01.17549e-38 +f100 00000001.175494352e-38 +f101 1000-01-01 +f102 838:59:58 +f103 1970-01-02 00:00:01 +f104 1970-01-02 00:00:01 +f105 1902 +f106 1902 +f107 1902 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 2 +f60 2 +f61 0000000002 +f62 0000000000000000000000000000000000000000000000000000000000000002 +f63 0000000002 +f64 0000000000000000000000000000000000000000000000000000000000000002 +f65 -4 +f66 1.100000000000000000000000000000 +f67 2 +f68 1.100000000000000000000000000000 +f69 0000000002 +f70 000000000000000000000000000000001.100000000000000000000000000000 +f71 0000000002 +f72 000000000000000000000000000000001.100000000000000000000000000000 +f73 -1.175494349e-38 +f74 1.175494353e-38 +f75 00000001.175494353e-38 +f76 00000001.175494353e-38 +f77 -1.175494349e-38 +f78 1.175494353e-38 +f79 00000001.175494353e-38 +f80 00000001.175494353e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494349e-38 +f95 1.17549e-38 +f96 1.175494353e-38 +f97 01.17549e-38 +f98 00000001.175494353e-38 +f99 01.17549e-38 +f100 00000001.175494353e-38 +f101 1000-01-02 +f102 838:59:57 +f103 1970-01-03 00:00:02 +f104 1970-01-03 00:00:02 +f105 1903 +f106 1903 +f107 1903 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 3 +f60 3 +f61 0000000003 +f62 0000000000000000000000000000000000000000000000000000000000000003 +f63 0000000003 +f64 0000000000000000000000000000000000000000000000000000000000000003 +f65 -3 +f66 2.200000000000000000000000000000 +f67 3 +f68 2.200000000000000000000000000000 +f69 0000000003 +f70 000000000000000000000000000000002.200000000000000000000000000000 +f71 0000000003 +f72 000000000000000000000000000000002.200000000000000000000000000000 +f73 -1.175494348e-38 +f74 1.175494354e-38 +f75 00000001.175494354e-38 +f76 00000001.175494354e-38 +f77 -1.175494348e-38 +f78 1.175494354e-38 +f79 00000001.175494354e-38 +f80 00000001.175494354e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494348e-38 +f95 1.17549e-38 +f96 1.175494354e-38 +f97 01.17549e-38 +f98 00000001.175494354e-38 +f99 01.17549e-38 +f100 00000001.175494354e-38 +f101 1000-01-03 +f102 838:59:56 +f103 1970-01-04 00:00:03 +f104 1970-01-04 00:00:03 +f105 1904 +f106 1904 +f107 1904 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 4 +f60 4 +f61 0000000004 +f62 0000000000000000000000000000000000000000000000000000000000000004 +f63 0000000004 +f64 0000000000000000000000000000000000000000000000000000000000000004 +f65 -2 +f66 3.300000000000000000000000000000 +f67 4 +f68 3.300000000000000000000000000000 +f69 0000000004 +f70 000000000000000000000000000000003.300000000000000000000000000000 +f71 0000000004 +f72 000000000000000000000000000000003.300000000000000000000000000000 +f73 -1.175494347e-38 +f74 1.175494355e-38 +f75 00000001.175494355e-38 +f76 00000001.175494355e-38 +f77 -1.175494347e-38 +f78 1.175494355e-38 +f79 00000001.175494355e-38 +f80 00000001.175494355e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494347e-38 +f95 1.17549e-38 +f96 1.175494355e-38 +f97 01.17549e-38 +f98 00000001.175494355e-38 +f99 01.17549e-38 +f100 00000001.175494355e-38 +f101 1000-01-04 +f102 838:59:55 +f103 1970-01-05 00:00:04 +f104 1970-01-05 00:00:04 +f105 1905 +f106 1905 +f107 1905 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 4 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 5 +f60 5 +f61 0000000005 +f62 0000000000000000000000000000000000000000000000000000000000000005 +f63 0000000005 +f64 0000000000000000000000000000000000000000000000000000000000000005 +f65 -1 +f66 4.400000000000000000000000000000 +f67 5 +f68 4.400000000000000000000000000000 +f69 0000000005 +f70 000000000000000000000000000000004.400000000000000000000000000000 +f71 0000000005 +f72 000000000000000000000000000000004.400000000000000000000000000000 +f73 -1.175494346e-38 +f74 1.175494356e-38 +f75 00000001.175494356e-38 +f76 00000001.175494356e-38 +f77 -1.175494346e-38 +f78 1.175494356e-38 +f79 00000001.175494356e-38 +f80 00000001.175494356e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494346e-38 +f95 1.17549e-38 +f96 1.175494356e-38 +f97 01.17549e-38 +f98 00000001.175494356e-38 +f99 01.17549e-38 +f100 00000001.175494356e-38 +f101 1000-01-05 +f102 838:59:54 +f103 1970-01-06 00:00:05 +f104 1970-01-06 00:00:05 +f105 1906 +f106 1906 +f107 1906 +f108 2enum +f109 1set,2set +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f59 6 +f60 6 +f61 0000000006 +f62 0000000000000000000000000000000000000000000000000000000000000006 +f63 0000000006 +f64 0000000000000000000000000000000000000000000000000000000000000006 +f65 0 +f66 5.500000000000000000000000000000 +f67 6 +f68 5.500000000000000000000000000000 +f69 0000000006 +f70 000000000000000000000000000000005.500000000000000000000000000000 +f71 0000000006 +f72 000000000000000000000000000000005.500000000000000000000000000000 +f73 -1.175494345e-38 +f74 1.175494357e-38 +f75 00000001.175494357e-38 +f76 00000001.175494357e-38 +f77 -1.175494345e-38 +f78 1.175494357e-38 +f79 00000001.175494357e-38 +f80 00000001.175494357e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494345e-38 +f95 1.17549e-38 +f96 1.175494357e-38 +f97 01.17549e-38 +f98 00000001.175494357e-38 +f99 01.17549e-38 +f100 00000001.175494357e-38 +f101 1000-01-06 +f102 838:59:53 +f103 1970-01-07 00:00:06 +f104 1970-01-07 00:00:06 +f105 1907 +f106 1907 +f107 1907 +f108 1enum +f109 1set +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f59 7 +f60 7 +f61 0000000007 +f62 0000000000000000000000000000000000000000000000000000000000000007 +f63 0000000007 +f64 0000000000000000000000000000000000000000000000000000000000000007 +f65 1 +f66 6.600000000000000000000000000000 +f67 7 +f68 6.600000000000000000000000000000 +f69 0000000007 +f70 000000000000000000000000000000006.600000000000000000000000000000 +f71 0000000007 +f72 000000000000000000000000000000006.600000000000000000000000000000 +f73 -1.175494344e-38 +f74 1.175494358e-38 +f75 00000001.175494358e-38 +f76 00000001.175494358e-38 +f77 -1.175494344e-38 +f78 1.175494358e-38 +f79 00000001.175494358e-38 +f80 00000001.175494358e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494344e-38 +f95 1.17549e-38 +f96 1.175494358e-38 +f97 01.17549e-38 +f98 00000001.175494358e-38 +f99 01.17549e-38 +f100 00000001.175494358e-38 +f101 1000-01-07 +f102 838:59:52 +f103 1970-01-08 00:00:07 +f104 1970-01-08 00:00:07 +f105 1908 +f106 1908 +f107 1908 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 8 +f60 8 +f61 0000000008 +f62 0000000000000000000000000000000000000000000000000000000000000008 +f63 0000000008 +f64 0000000000000000000000000000000000000000000000000000000000000008 +f65 2 +f66 7.700000000000000000000000000000 +f67 8 +f68 7.700000000000000000000000000000 +f69 0000000008 +f70 000000000000000000000000000000007.700000000000000000000000000000 +f71 0000000008 +f72 000000000000000000000000000000007.700000000000000000000000000000 +f73 -1.175494343e-38 +f74 1.175494359e-38 +f75 00000001.175494359e-38 +f76 00000001.175494359e-38 +f77 -1.175494343e-38 +f78 1.175494359e-38 +f79 00000001.175494359e-38 +f80 00000001.175494359e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494343e-38 +f95 1.17549e-38 +f96 1.175494359e-38 +f97 01.17549e-38 +f98 00000001.175494359e-38 +f99 01.17549e-38 +f100 00000001.175494359e-38 +f101 1000-01-08 +f102 838:59:51 +f103 1970-01-09 00:00:08 +f104 1970-01-09 00:00:08 +f105 1909 +f106 1909 +f107 1909 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 9 +f60 9 +f61 0000000009 +f62 0000000000000000000000000000000000000000000000000000000000000009 +f63 0000000009 +f64 0000000000000000000000000000000000000000000000000000000000000009 +f65 3 +f66 8.800000000000000000000000000000 +f67 9 +f68 8.800000000000000000000000000000 +f69 0000000009 +f70 000000000000000000000000000000008.800000000000000000000000000000 +f71 0000000009 +f72 000000000000000000000000000000008.800000000000000000000000000000 +f73 -1.175494342e-38 +f74 1.17549436e-38 +f75 000000001.17549436e-38 +f76 000000001.17549436e-38 +f77 -1.175494342e-38 +f78 1.17549436e-38 +f79 000000001.17549436e-38 +f80 000000001.17549436e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494342e-38 +f95 1.17549e-38 +f96 1.17549436e-38 +f97 01.17549e-38 +f98 000000001.17549436e-38 +f99 01.17549e-38 +f100 000000001.17549436e-38 +f101 1000-01-09 +f102 838:59:50 +f103 1970-01-10 00:00:09 +f104 1970-01-10 00:00:09 +f105 1910 +f106 1910 +f107 1910 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 WITH CASCADED CHECK OPTION; +SELECT * FROM v1 order by f59,f60 limit 0,10; +F59 F60 +1 1 +2 2 +3 3 +4 4 +4 74 +5 5 +6 6 +7 7 +8 8 +9 9 +CREATE or REPLACE VIEW v1 AS select f59, f60 +from test.tb2 where f59=3330 ; +select * FROM v1 order by f60 limit 0,10; +f59 f60 +3330 764376 +DROP VIEW v1 ; +DROP TABLE t1 ; + +Testcase 3.3.1.2 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1 ; +DROP VIEW IF EXISTS v1 ; +DROP VIEW IF EXISTS v2 ; +CREATE TABLE t1 (f1 BIGINT) ; +SET @x=0; +CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; +ERROR HY000: View's SELECT contains a 'INTO' clause +Select @x; +@x +0 +CREATE or REPLACE VIEW v1 AS Select 1 +FROM (SELECT 1 FROM t1) my_table; +ERROR HY000: View's SELECT contains a subquery in the FROM clause +CREATE VIEW v1 AS SELECT f1 FROM t1; +CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ; +SET @a:=0 ; +SELECT @a ; +@a +0 +INSERT INTO v1 VALUES (1) ; +SELECT @a ; +@a +1 +SELECT * FROM t1; +f1 +1 +DROP TRIGGER tr1 ; +SET @a:=0 ; +CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ; +ERROR HY000: 'test.v1' is not BASE TABLE +RENAME TABLE v1 TO v2; +RENAME VIEW v2 TO v1; +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 'VIEW v2 TO v1' at line 1 +ALTER TABLE v2 RENAME AS v1; +ALTER VIEW v1 RENAME AS v2; +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 'RENAME AS v2' at line 1 +DROP TABLE IF EXISTS t1, t2 ; +DROP VIEW IF EXISTS v1 ; +DROP VIEW IF EXISTS v2 ; +CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE ); +CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1; +ALTER TABLE t1 ADD PRIMARY KEY(f1); +ALTER TABLE v1 ADD PRIMARY KEY(f1); +ERROR HY000: 'test.v1' is not BASE TABLE +ALTER VIEW v1 ADD PRIMARY KEY(f1); +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 'ADD PRIMARY KEY(f1)' at line 1 +CREATE INDEX t1_idx ON t1(f3); +CREATE INDEX v1_idx ON v1(f3); +ERROR HY000: 'test.v1' is not BASE TABLE +DROP TABLE t1; +DROP VIEW v1; + +Testcase 3.3.1.3 + 3.1.1.4 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS v1 ; +CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table; +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 'or REPLACE AS Select * from tb2 my_table' at line 1 +CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select * +from tb2 my_table limit 50; +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 'WITH CASCADED CHECK OPTION AS Select * +from tb2 my_table limit 50' at line 1 +CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select * +from tb2 my_table limit 50; +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 'WITH LOCAL CHECK OPTION AS Select * +from tb2 my_table limit 50' at line 1 +SELECT * FROM tb2 my_table CREATE VIEW As v1; +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 'CREATE VIEW As v1' at line 1 +CREATE or REPLACE VIEW v1 Select f59, f60 +from test.tb2 my_table where f59 = 250 ; +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 'Select f59, f60 +from test.tb2 my_table where f59 = 250' at line 1 +CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table WITH CASCADED CHECK OPTION; +DROP VIEW v1; +REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table WITH CASCADED CHECK OPTION; +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 'OR CREATE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1 +CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 +FROM test.tb2 my_table WITH CASCADED CHECK OPTION; +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 'SELECT AS F59, F60 +FROM test.tb2 my_table WITH CASCADED CHECK OPTION' at line 1 +CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table CASCADED WITH CHECK OPTION; +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 'CASCADED WITH CHECK OPTION' at line 2 +CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table WITH CASCADED OPTION CHECK; +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 'OPTION CHECK' at line 2 +CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table CHECK OPTION WITH CASCADED; +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 'CHECK OPTION WITH CASCADED' at line 2 +CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION +AS SELECT F59, F60 FROM test.tb2 my_table; +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 'WITH CASCADED CHECK OPTION +AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 +CREATE OR REPLACE AS SELECT F59, F60 +FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION; +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 'AS SELECT F59, F60 +FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION' at line 1 +CREATE OR REPLACE AS SELECT F59, F60 +FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1; +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 'AS SELECT F59, F60 +FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1 +REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table WITH LOCAL CHECK OPTION; +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 'OR CREATE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1 +CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 +FROM test.tb2 my_table WITH LOCAL CHECK OPTION; +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 'SELECT AS F59, F60 +FROM test.tb2 my_table WITH LOCAL CHECK OPTION' at line 1 +CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table LOCAL WITH CHECK OPTION; +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 'LOCAL WITH CHECK OPTION' at line 2 +CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table WITH LOCAL OPTION CHECK; +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 'OPTION CHECK' at line 2 +CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 +FROM test.tb2 my_table CHECK OPTION WITH LOCAL; +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 'CHECK OPTION WITH LOCAL' at line 2 +CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION +AS SELECT F59, F60 FROM test.tb2 my_table; +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 'WITH CASCADED CHECK OPTION +AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 +CREATE OR REPLACE AS SELECT F59, F60 +FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION; +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 'AS SELECT F59, F60 +FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION' at line 1 +CREATE OR REPLACE AS SELECT F59, F60 +FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1; +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 'AS SELECT F59, F60 +FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1' at line 1 +Drop table if exists t1 ; +CREATE table t1 (f1 int ,f2 int) ; +INSERT INTO t1 values (235, 22); +INSERT INTO t1 values (554, 11); +CREATE or REPLACE view v1 as (Select from f59 tb2) +Union ALL (Select from f1 t1); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from f59 tb2) +Union ALL (Select from f1 t1)' at line 1 +CREATE or REPLACE view v1 as Select f59, f60 +from tb2 by order f59; +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 'by order f59' at line 2 +CREATE or REPLACE view v1 as Select f59, f60 +from tb2 by group f59 ; +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 'by group f59' at line 2 + +Testcase 3.3.1.5 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS v1 ; +CREATE VIEW v1 SELECT * FROM tb2; +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 'SELECT * FROM tb2' at line 1 +CREATE v1 AS SELECT * FROM tb2; +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 'v1 AS SELECT * FROM tb2' at line 1 +VIEW v1 AS SELECT * FROM tb2; +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 'VIEW v1 AS SELECT * FROM tb2' at line 1 +CREATE VIEW v1 AS SELECT 1; +DROP VIEW v1; +VIEW v1 AS SELECT 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 'VIEW v1 AS SELECT 1' at line 1 +CREATE v1 AS SELECT 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 'v1 AS SELECT 1' at line 1 +CREATE VIEW AS SELECT 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 'AS SELECT 1' at line 1 +CREATE VIEW v1 SELECT 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 'SELECT 1' at line 1 +CREATE VIEW v1 AS ; +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 + +Testcase 3.3.1.6 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS v1 ; +CREATE or REPLACE VIEW v1 +as SELECT * from tb2; +CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1 +as SELECT * from tb2; +CREATE or REPLACE ALGORITHM = MERGE VIEW v1 +as SELECT * from tb2; +CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1 +as SELECT * from tb2; +CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1 +as SELECT * from tb2; +CREATE or REPLACE = TEMPTABLE VIEW v1 +as SELECT * from tb2; +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 '= TEMPTABLE VIEW v1 +as SELECT * from tb2' at line 1 +CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1 +as SELECT * from tb2; +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 'TEMPTABLE VIEW v1 +as SELECT * from tb2' at line 1 +CREATE or REPLACE ALGORITHM = VIEW v1 +as SELECT * from tb2; +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 'VIEW v1 +as SELECT * from tb2' at line 1 +CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1 +as SELECT * from tb2; +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 'TEMPTABLE = ALGORITHM VIEW v1 +as SELECT * from tb2' at line 1 +CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1 +as SELECT * from tb2; +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 'TEMPTABLE - ALGORITHM VIEW v1 +as SELECT * from tb2' at line 1 +CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1 +as SELECT * from tb2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE = TEMPTABLE VIEW v1 +as SELECT * from tb2' at line 1 +CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1 +as SELECT * from tb2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE VIEW v1 +as SELECT * from tb2' at line 1 +Drop view if exists v1 ; +CREATE or REPLACE VIEW v1 +AS SELECT * from tb2 where f59 < 1; +CREATE or REPLACE VIEW v1 +AS SELECT * from tb2 where f59 < 1 WITH CHECK OPTION; +CREATE or REPLACE VIEW v1 +AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION; +CREATE or REPLACE VIEW v1 +AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION; +CREATE or REPLACE VIEW v1 +AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION; +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 'NO CHECK OPTION' at line 2 +CREATE or REPLACE VIEW v1 +AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION; +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 'CASCADED CHECK OPTION' at line 2 +CREATE or REPLACE VIEW v1 +AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION; +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 'OPTION' at line 2 +CREATE or REPLACE VIEW v1 +AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 + +Testcase 3.3.1.7 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS v1 ; +Create view test.v1 AS Select * from test.tb2; +Alter view test.v1 AS Select F59 from test. tb2 limit 100 ; +Drop view test.v1 ; +Create view v1 AS Select * from test.tb2 limit 100 ; +Alter view v1 AS Select F59 from test.tb2 limit 100 ; +Drop view v1 ; + +Testcase 3.3.1.A0 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1 ; +DROP VIEW IF EXISTS v1 ; +DROP VIEW IF EXISTS V1 ; +CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = myisam; +INSERT INTO t1 VALUES(1111), (2222); +CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111; +CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222; +SELECT * FROM v1; +f1 +1111 +DROP TABLE IF EXISTS t1 ; +DROP VIEW IF EXISTS v1 ; +DROP VIEW IF EXISTS V1 ; + +Testcase 3.3.1.8 +-------------------------------------------------------------------------------- +Create view select AS Select * from test.tb2 limit 100; +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 'select AS Select * from test.tb2 limit 100' at line 1 +Create view as AS Select * from test.tb2 limit 100; +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 'as AS Select * from test.tb2 limit 100' at line 1 +Create view where AS Select * from test.tb2 limit 100; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where AS Select * from test.tb2 limit 100' at line 1 +Create view from AS Select * from test.tb2 limit 100; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from AS Select * from test.tb2 limit 100' at line 1 +Create view while AS Select * from test.tb2 limit 100; +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 'while AS Select * from test.tb2 limit 100' at line 1 +Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ; +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 '*(&*&&^ as Select * from test.tb2 limit 100' at line 1 +Drop view if exists test.procedure ; +Create view test.procedure as Select * from test.tb2 limit 100 ; +Drop view if exists test.procedure ; + +Testcase 3.3.1.9 +-------------------------------------------------------------------------------- +Drop TABLE IF EXISTS t1 ; +Drop VIEW IF EXISTS v1; +Drop VIEW IF EXISTS v2; +Drop VIEW IF EXISTS v3; +CREATE TABLE t1 ( f1 char(5)); +INSERT INTO t1 SET f1 = 'abcde'; +CREATE VIEW v1 AS SELECT f1 FROM t1; +CREATE VIEW v2 AS SELECT * FROM v1; +DROP TABLE t1; +SELECT * FROM v1; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +DELETE FROM v1; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +UPDATE v1 SET f1 = 'aaaaa'; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +INSERT INTO v1 SET f1 = "fffff"; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +SELECT * FROM v2; +ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +DELETE FROM v2; +ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +UPDATE v2 SET f1 = 'aaaaa'; +ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +INSERT INTO v2 SET f1 = "fffff"; +ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +DROP VIEW v1; +SELECT * FROM v2; +ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +DELETE FROM v2; +ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +UPDATE v2 SET f1 = 'aaaaa'; +ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +INSERT INTO v2 SET f1 = "fffff"; +ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +DROP VIEW v2; +DROP TABLE IF EXISTS t1 ; +DROP VIEW IF EXISTS v1 ; +CREATE TABLE t1 (f1 FLOAT); +CREATE VIEW v1 AS SELECT * FROM v1; +ERROR 42S02: Table 'test.v1' doesn't exist +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE or REPLACE VIEW v1 AS SELECT * FROM v1; +ERROR 42S02: Table 'test.v1' doesn't exist +DROP VIEW v1; +DROP TABLE t1; + +Testcase 3.3.1.10 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +Create view test.v1 AS Select * from test.tb2 ; +Create view test.v1 AS Select F59 from test.tb2 ; +ERROR 42S01: Table 'v1' already exists +Create view v1 AS Select F59 from test.tb2 ; +ERROR 42S01: Table 'v1' already exists + +Testcase 3.3.1.11 +-------------------------------------------------------------------------------- +Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ; +ERROR 42S01: Table 'tb2' already exists +Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ; +ERROR 42S01: Table 'tb2' already exists +Drop view if exists test.v111 ; +Create view test.v111 as select * from tb2 limit 50; +Create table test.v111(f1 int ); +ERROR 42S01: Table 'v111' already exists +Create table v111(f1 int ); +ERROR 42S01: Table 'v111' already exists +DROP VIEW test.v111; + +Testcase 3.3.1.12 +-------------------------------------------------------------------------------- +USE test; +Drop database if exists test2 ; +Create database test2 ; +DROP TABLE IF EXISTS test.t0, test.t1, test.t2; +DROP VIEW IF EXISTS test.v1; +DROP VIEW IF EXISTS test.v2; +CREATE TABLE test.t1 ( f1 VARCHAR(20)); +CREATE TABLE test2.t1 ( f1 VARCHAR(20)); +CREATE TABLE test.t2 ( f1 VARCHAR(20)); +CREATE TABLE test2.v1 ( f1 VARCHAR(20)); +CREATE TABLE test.t0 ( f1 VARCHAR(20)); +CREATE TABLE test2.t0 ( f1 VARCHAR(20)); +CREATE VIEW test2.t2 AS SELECT * FROM test2.t0; +CREATE VIEW test.v1 AS SELECT * FROM test.t0; +CREATE VIEW test.v2 AS SELECT * FROM test.t0; +CREATE VIEW test2.v2 AS SELECT * FROM test2.t0; +INSERT INTO test.t1 VALUES('test.t1 - 1'); +INSERT INTO test2.t1 VALUES('test2.t1 - 1'); +INSERT INTO test.t2 VALUES('test.t2 - 1'); +INSERT INTO test2.v1 VALUES('test2.v1 - 1'); +INSERT INTO test.t0 VALUES('test.t0 - 1'); +INSERT INTO test2.t0 VALUES('test2.t0 - 1'); +USE test; +INSERT INTO t1 VALUES('test.t1 - 2'); +INSERT INTO t2 VALUES('test.t2 - 2'); +INSERT INTO t0 VALUES('test.t0 - 2'); +USE test2; +INSERT INTO t1 VALUES('test2.t1 - 2'); +INSERT INTO v1 VALUES('test2.v1 - 2'); +INSERT INTO t0 VALUES('test2.t0 - 2'); +SELECT * FROM t1; +f1 +test2.t1 - 1 +test2.t1 - 2 +SELECT * FROM t2; +f1 +test2.t0 - 1 +test2.t0 - 2 +SELECT * FROM v1; +f1 +test2.v1 - 1 +test2.v1 - 2 +SELECT * FROM v2; +f1 +test2.t0 - 1 +test2.t0 - 2 +USE test; +SELECT * FROM t1; +f1 +test.t1 - 1 +test.t1 - 2 +SELECT * FROM t2; +f1 +test.t2 - 1 +test.t2 - 2 +SELECT * FROM v1; +f1 +test.t0 - 1 +test.t0 - 2 +SELECT * FROM v2; +f1 +test.t0 - 1 +test.t0 - 2 + +Testcase 3.3.1.13 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +CREATE TABLE t1 (f1 BIGINT); +INSERT INTO t1 VALUES(1); +CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2; +SHOW CREATE VIEW test.v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci +SELECT * FROM test.v1; +f1 +1 +CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1 +AS SELECT * FROM t1 limit 2; +SHOW CREATE VIEW test.v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci +SELECT * FROM test.v1; +f1 +1 +CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2; +SHOW CREATE VIEW test.v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109`,`tb2`.`f110` AS `f110`,`tb2`.`f111` AS `f111`,`tb2`.`f112` AS `f112`,`tb2`.`f113` AS `f113`,`tb2`.`f114` AS `f114`,`tb2`.`f115` AS `f115`,`tb2`.`f116` AS `f116`,`tb2`.`f117` AS `f117` from `tb2` order by `tb2`.`f59` limit 2 latin1 latin1_swedish_ci +SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65; +f59 1 +f60 1 +f61 0000000001 +f62 0000000000000000000000000000000000000000000000000000000000000001 +f63 0000000001 +f64 0000000000000000000000000000000000000000000000000000000000000001 +f65 -5 +f66 0.000000000000000000000000000000 +f67 1 +f68 0.000000000000000000000000000000 +f69 0000000001 +f70 000000000000000000000000000000000.000000000000000000000000000000 +f71 0000000001 +f72 000000000000000000000000000000000.000000000000000000000000000000 +f73 -1.17549435e-38 +f74 1.175494352e-38 +f75 00000001.175494352e-38 +f76 00000001.175494352e-38 +f77 -1.17549435e-38 +f78 1.175494352e-38 +f79 00000001.175494352e-38 +f80 00000001.175494352e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.17549435e-38 +f95 1.17549e-38 +f96 1.175494352e-38 +f97 01.17549e-38 +f98 00000001.175494352e-38 +f99 01.17549e-38 +f100 00000001.175494352e-38 +f101 1000-01-01 +f102 838:59:58 +f103 1970-01-02 00:00:01 +f104 1970-01-02 00:00:01 +f105 1902 +f106 1902 +f107 1902 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 2 +f60 2 +f61 0000000002 +f62 0000000000000000000000000000000000000000000000000000000000000002 +f63 0000000002 +f64 0000000000000000000000000000000000000000000000000000000000000002 +f65 -4 +f66 1.100000000000000000000000000000 +f67 2 +f68 1.100000000000000000000000000000 +f69 0000000002 +f70 000000000000000000000000000000001.100000000000000000000000000000 +f71 0000000002 +f72 000000000000000000000000000000001.100000000000000000000000000000 +f73 -1.175494349e-38 +f74 1.175494353e-38 +f75 00000001.175494353e-38 +f76 00000001.175494353e-38 +f77 -1.175494349e-38 +f78 1.175494353e-38 +f79 00000001.175494353e-38 +f80 00000001.175494353e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494349e-38 +f95 1.17549e-38 +f96 1.175494353e-38 +f97 01.17549e-38 +f98 00000001.175494353e-38 +f99 01.17549e-38 +f100 00000001.175494353e-38 +f101 1000-01-02 +f102 838:59:57 +f103 1970-01-03 00:00:02 +f104 1970-01-03 00:00:02 +f105 1903 +f106 1903 +f107 1903 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2; +SHOW CREATE VIEW test.v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci +SELECT * FROM test.v1 order by F59 limit 10,100; +F59 +10 +15 +17 +19 +22 +24 +27 +29 +34 +94 +107 +107 +109 +109 +195 +207 +209 +242 +250 +292 +299 +321 +323 +340 +394 +424 +441 +500 +500 +500 +660 +987 +2550 +2760 +3330 +3410 +7876 +9112 +76710 +569300 +Drop table test.t1 ; +Drop view test.v1 ; + +Testcase 3.3.1.14 +-------------------------------------------------------------------------------- +CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2; +ERROR HY000: 'test.tb2' is not VIEW +CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2; +ERROR HY000: 'test.tb2' is not VIEW + +Testcase 3.3.1.15 +-------------------------------------------------------------------------------- +Drop table if exists test.v1 ; +CREATE OR REPLACE view test.v1 as select * from tb2; +SELECT * FROM test.v1; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set +Drop view test.v1 ; + +Testcase 3.3.1.16 + 3.3.1.17 +-------------------------------------------------------------------------------- +Drop table if exists test.v1 ; +CREATE OR REPLACE VIEW v1 AS SELECT * From tb2; +SELECT * FROM tb2 WHERE 1 = 2; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +SELECT * FROM v1 WHERE 1 = 2; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +Drop view v1; +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +CREATE TABLE t1 (f1 NUMERIC(15,3)); +INSERT INTO t1 VALUES(8.8); +CREATE VIEW v1 AS SELECT * FROM t1; +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 `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +f1 +8.800 +CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1; +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 `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +f1 +8.800 +CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1; +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 `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +my_column +8.800 +CREATE OR REPLACE VIEW v1(column1,column2) +AS SELECT f1 As my_column, f1 FROM t1; +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 `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +column1 column2 +8.800 8.800 +CREATE OR REPLACE VIEW test.v1(column1,column2) +AS SELECT f1 As my_column, f1 FROM test.t1; +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 `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +column1 column2 +8.800 8.800 + +Testcase 3.3.1.18 +-------------------------------------------------------------------------------- +Drop view if exists v1 ; +Drop view if exists v1_1 ; +Create view v1 +as Select test.tb2.f59 as NewNameF1, test.tb2.f60 +from test.tb2 limit 0,100 ; +Create view v1_1 +as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2 +from tb2 limit 0,100 ; +SELECT NewNameF1,f60 FROM test.v1_1 ; +ERROR 42S22: Unknown column 'f60' in 'field list' +SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ; +ERROR 42S22: Unknown column 'v1_1.f60' in 'field list' +SELECT f59, f60 FROM test.v1 ; +ERROR 42S22: Unknown column 'f59' in 'field list' +Use test ; +SELECT F59 FROM v1 ; +ERROR 42S22: Unknown column 'F59' in 'field list' + +Testcase 3.3.1.19 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1, t2; +DROP VIEW IF EXISTS v1; +CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2)); +INSERT INTO t1 VALUES(7, 7.7); +CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2)); +INSERT INTO t2 VALUES(6, 6.6); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +f1 f2 +7 7.70 +CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1; +SELECT * FROM v1; +f1 f2 +7 7.70 +CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1; +SELECT * FROM v1; +my_f1 my_f2 +7 7.70 +CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1; +SELECT * FROM v1; +my_f1 my_f2 +7 7.70 +CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2; +SELECT * FROM v1; +my_f1 my_f2 +7 6.60 +SELECT f1, f2 AS f1 FROM t1; +f1 f1 +7 7.70 +CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1; +ERROR 42S21: Duplicate column name 'f1' +SELECT t1.f1, t2.f1 AS f1 FROM t1, t2; +f1 f1 +7 6 +CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2; +ERROR 42S21: Duplicate column name 'f1' +CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1; +ERROR 42S21: Duplicate column name 'my_col' + +Testcase 3.3.1.20 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1; +CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2)); +CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1; +CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1; +CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1; +ERROR HY000: View's SELECT and view's field list have different column counts +CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1; +ERROR HY000: View's SELECT and view's field list have different column counts +CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1; +ERROR HY000: View's SELECT and view's field list have different column counts +CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1; +ERROR HY000: View's SELECT and view's field list have different column counts + +Testcase 3.3.1.21 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS v1; +CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2; +SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2; +F59 F60 +1 1 +2 2 +Drop view if exists test.v1 ; + +Testcase 3.3.1.22 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS v1; +CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3; +SELECT * FROM test.v1; +product +1 +4 +CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2; +SELECT * FROM test.v1; +product +2 +CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); +SELECT * FROM test.v1; +product +root@localhost +Drop view if exists test.v1 ; + +Testcase 3.3.1.23 + 3.3.1.24 +-------------------------------------------------------------------------------- +USE test; +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +DROP VIEW IF EXISTS v2; +CREATE VIEW test.v2 AS SELECT * FROM test.t1; +ERROR 42S02: Table 'test.t1' doesn't exist +CREATE VIEW v2 AS Select * from test.v1; +ERROR 42S02: Table 'test.v1' doesn't exist +DROP VIEW IF EXISTS v2; +Warnings: +Note 1051 Unknown table 'test.v2' + +Testcase 3.3.1.25 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1_temp; +DROP TABLE IF EXISTS t2_temp; +DROP VIEW IF EXISTS v1; +Create table t1_temp(f59 char(10),f60 int) ; +Create temporary table t1_temp(f59 char(10),f60 int) ; +Insert into t1_temp values('FER',90); +Insert into t1_temp values('CAR',27); +Create view v1 as select * from t1_temp ; +ERROR HY000: View's SELECT refers to a temporary table 't1_temp' +Create temporary table t2_temp(f59 char(10),f60 int) ; +Insert into t2_temp values('AAA',11); +Insert into t2_temp values('BBB',22); +Create or replace view v1 +as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ; +ERROR HY000: View's SELECT refers to a temporary table 't1_temp' +DROP temporary table t1_temp; +DROP table t1_temp; +DROP temporary table t2_temp; +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +CREATE TABLE t1 (f1 char(10)); +CREATE TEMPORARY TABLE t2 (f2 char(10)); +INSERT INTO t1 VALUES('t1'); +INSERT INTO t1 VALUES('A'); +INSERT INTO t2 VALUES('t2'); +INSERT INTO t2 VALUES('B'); +CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2; +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2 +WHERE f2 = ( SELECT f1 FROM t1 ); +ERROR HY000: View's SELECT refers to a temporary table 't2' +CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1 +WHERE f1 = ( SELECT f2 FROM t2 ); +ERROR HY000: View's SELECT refers to a temporary table 't2' +DROP TABLE t1; +DROP TEMPORARY TABLE t2; + +Testcase 3.3.1.26 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS v1; +Create view test.v1 AS Select * from test.tb2; +Select * from test.v1; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set +Drop view test.v1 ; + +Testcase 3.3.1.27 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS test.v1; +Drop VIEW IF EXISTS test.v1_1 ; +Create view test.v1 AS Select * from test.tb2; +Create view test.v1_1 AS Select F59 from test.v1 ; +Select * from test.v1_1 order by F59 limit 2; +F59 +1 +2 +Drop view test.v1 ; +Drop view test.v1_1 ; + +Testcase 3.3.1.28 +-------------------------------------------------------------------------------- +Drop database if exists test2 ; +create database test2 ; +Create view test2.v2 AS Select * from test.tb2 limit 50,50; +use test2 ; +Create view v1 AS Select * from test.tb2 limit 50 ; +Select * from v1 order by f59,f60,f61,f62,f63,f64,f65; +f59 1 +f60 1 +f61 0000000001 +f62 0000000000000000000000000000000000000000000000000000000000000001 +f63 0000000001 +f64 0000000000000000000000000000000000000000000000000000000000000001 +f65 -5 +f66 0.000000000000000000000000000000 +f67 1 +f68 0.000000000000000000000000000000 +f69 0000000001 +f70 000000000000000000000000000000000.000000000000000000000000000000 +f71 0000000001 +f72 000000000000000000000000000000000.000000000000000000000000000000 +f73 -1.17549435e-38 +f74 1.175494352e-38 +f75 00000001.175494352e-38 +f76 00000001.175494352e-38 +f77 -1.17549435e-38 +f78 1.175494352e-38 +f79 00000001.175494352e-38 +f80 00000001.175494352e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.17549435e-38 +f95 1.17549e-38 +f96 1.175494352e-38 +f97 01.17549e-38 +f98 00000001.175494352e-38 +f99 01.17549e-38 +f100 00000001.175494352e-38 +f101 1000-01-01 +f102 838:59:58 +f103 1970-01-02 00:00:01 +f104 1970-01-02 00:00:01 +f105 1902 +f106 1902 +f107 1902 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 2 +f60 2 +f61 0000000002 +f62 0000000000000000000000000000000000000000000000000000000000000002 +f63 0000000002 +f64 0000000000000000000000000000000000000000000000000000000000000002 +f65 -4 +f66 1.100000000000000000000000000000 +f67 2 +f68 1.100000000000000000000000000000 +f69 0000000002 +f70 000000000000000000000000000000001.100000000000000000000000000000 +f71 0000000002 +f72 000000000000000000000000000000001.100000000000000000000000000000 +f73 -1.175494349e-38 +f74 1.175494353e-38 +f75 00000001.175494353e-38 +f76 00000001.175494353e-38 +f77 -1.175494349e-38 +f78 1.175494353e-38 +f79 00000001.175494353e-38 +f80 00000001.175494353e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494349e-38 +f95 1.17549e-38 +f96 1.175494353e-38 +f97 01.17549e-38 +f98 00000001.175494353e-38 +f99 01.17549e-38 +f100 00000001.175494353e-38 +f101 1000-01-02 +f102 838:59:57 +f103 1970-01-03 00:00:02 +f104 1970-01-03 00:00:02 +f105 1903 +f106 1903 +f107 1903 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 3 +f60 3 +f61 0000000003 +f62 0000000000000000000000000000000000000000000000000000000000000003 +f63 0000000003 +f64 0000000000000000000000000000000000000000000000000000000000000003 +f65 -3 +f66 2.200000000000000000000000000000 +f67 3 +f68 2.200000000000000000000000000000 +f69 0000000003 +f70 000000000000000000000000000000002.200000000000000000000000000000 +f71 0000000003 +f72 000000000000000000000000000000002.200000000000000000000000000000 +f73 -1.175494348e-38 +f74 1.175494354e-38 +f75 00000001.175494354e-38 +f76 00000001.175494354e-38 +f77 -1.175494348e-38 +f78 1.175494354e-38 +f79 00000001.175494354e-38 +f80 00000001.175494354e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494348e-38 +f95 1.17549e-38 +f96 1.175494354e-38 +f97 01.17549e-38 +f98 00000001.175494354e-38 +f99 01.17549e-38 +f100 00000001.175494354e-38 +f101 1000-01-03 +f102 838:59:56 +f103 1970-01-04 00:00:03 +f104 1970-01-04 00:00:03 +f105 1904 +f106 1904 +f107 1904 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 4 +f60 4 +f61 0000000004 +f62 0000000000000000000000000000000000000000000000000000000000000004 +f63 0000000004 +f64 0000000000000000000000000000000000000000000000000000000000000004 +f65 -2 +f66 3.300000000000000000000000000000 +f67 4 +f68 3.300000000000000000000000000000 +f69 0000000004 +f70 000000000000000000000000000000003.300000000000000000000000000000 +f71 0000000004 +f72 000000000000000000000000000000003.300000000000000000000000000000 +f73 -1.175494347e-38 +f74 1.175494355e-38 +f75 00000001.175494355e-38 +f76 00000001.175494355e-38 +f77 -1.175494347e-38 +f78 1.175494355e-38 +f79 00000001.175494355e-38 +f80 00000001.175494355e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494347e-38 +f95 1.17549e-38 +f96 1.175494355e-38 +f97 01.17549e-38 +f98 00000001.175494355e-38 +f99 01.17549e-38 +f100 00000001.175494355e-38 +f101 1000-01-04 +f102 838:59:55 +f103 1970-01-05 00:00:04 +f104 1970-01-05 00:00:04 +f105 1905 +f106 1905 +f107 1905 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 4 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 5 +f60 5 +f61 0000000005 +f62 0000000000000000000000000000000000000000000000000000000000000005 +f63 0000000005 +f64 0000000000000000000000000000000000000000000000000000000000000005 +f65 -1 +f66 4.400000000000000000000000000000 +f67 5 +f68 4.400000000000000000000000000000 +f69 0000000005 +f70 000000000000000000000000000000004.400000000000000000000000000000 +f71 0000000005 +f72 000000000000000000000000000000004.400000000000000000000000000000 +f73 -1.175494346e-38 +f74 1.175494356e-38 +f75 00000001.175494356e-38 +f76 00000001.175494356e-38 +f77 -1.175494346e-38 +f78 1.175494356e-38 +f79 00000001.175494356e-38 +f80 00000001.175494356e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494346e-38 +f95 1.17549e-38 +f96 1.175494356e-38 +f97 01.17549e-38 +f98 00000001.175494356e-38 +f99 01.17549e-38 +f100 00000001.175494356e-38 +f101 1000-01-05 +f102 838:59:54 +f103 1970-01-06 00:00:05 +f104 1970-01-06 00:00:05 +f105 1906 +f106 1906 +f107 1906 +f108 2enum +f109 1set,2set +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f59 6 +f60 6 +f61 0000000006 +f62 0000000000000000000000000000000000000000000000000000000000000006 +f63 0000000006 +f64 0000000000000000000000000000000000000000000000000000000000000006 +f65 0 +f66 5.500000000000000000000000000000 +f67 6 +f68 5.500000000000000000000000000000 +f69 0000000006 +f70 000000000000000000000000000000005.500000000000000000000000000000 +f71 0000000006 +f72 000000000000000000000000000000005.500000000000000000000000000000 +f73 -1.175494345e-38 +f74 1.175494357e-38 +f75 00000001.175494357e-38 +f76 00000001.175494357e-38 +f77 -1.175494345e-38 +f78 1.175494357e-38 +f79 00000001.175494357e-38 +f80 00000001.175494357e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494345e-38 +f95 1.17549e-38 +f96 1.175494357e-38 +f97 01.17549e-38 +f98 00000001.175494357e-38 +f99 01.17549e-38 +f100 00000001.175494357e-38 +f101 1000-01-06 +f102 838:59:53 +f103 1970-01-07 00:00:06 +f104 1970-01-07 00:00:06 +f105 1907 +f106 1907 +f107 1907 +f108 1enum +f109 1set +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f59 7 +f60 7 +f61 0000000007 +f62 0000000000000000000000000000000000000000000000000000000000000007 +f63 0000000007 +f64 0000000000000000000000000000000000000000000000000000000000000007 +f65 1 +f66 6.600000000000000000000000000000 +f67 7 +f68 6.600000000000000000000000000000 +f69 0000000007 +f70 000000000000000000000000000000006.600000000000000000000000000000 +f71 0000000007 +f72 000000000000000000000000000000006.600000000000000000000000000000 +f73 -1.175494344e-38 +f74 1.175494358e-38 +f75 00000001.175494358e-38 +f76 00000001.175494358e-38 +f77 -1.175494344e-38 +f78 1.175494358e-38 +f79 00000001.175494358e-38 +f80 00000001.175494358e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494344e-38 +f95 1.17549e-38 +f96 1.175494358e-38 +f97 01.17549e-38 +f98 00000001.175494358e-38 +f99 01.17549e-38 +f100 00000001.175494358e-38 +f101 1000-01-07 +f102 838:59:52 +f103 1970-01-08 00:00:07 +f104 1970-01-08 00:00:07 +f105 1908 +f106 1908 +f107 1908 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 8 +f60 8 +f61 0000000008 +f62 0000000000000000000000000000000000000000000000000000000000000008 +f63 0000000008 +f64 0000000000000000000000000000000000000000000000000000000000000008 +f65 2 +f66 7.700000000000000000000000000000 +f67 8 +f68 7.700000000000000000000000000000 +f69 0000000008 +f70 000000000000000000000000000000007.700000000000000000000000000000 +f71 0000000008 +f72 000000000000000000000000000000007.700000000000000000000000000000 +f73 -1.175494343e-38 +f74 1.175494359e-38 +f75 00000001.175494359e-38 +f76 00000001.175494359e-38 +f77 -1.175494343e-38 +f78 1.175494359e-38 +f79 00000001.175494359e-38 +f80 00000001.175494359e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494343e-38 +f95 1.17549e-38 +f96 1.175494359e-38 +f97 01.17549e-38 +f98 00000001.175494359e-38 +f99 01.17549e-38 +f100 00000001.175494359e-38 +f101 1000-01-08 +f102 838:59:51 +f103 1970-01-09 00:00:08 +f104 1970-01-09 00:00:08 +f105 1909 +f106 1909 +f107 1909 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 9 +f60 9 +f61 0000000009 +f62 0000000000000000000000000000000000000000000000000000000000000009 +f63 0000000009 +f64 0000000000000000000000000000000000000000000000000000000000000009 +f65 3 +f66 8.800000000000000000000000000000 +f67 9 +f68 8.800000000000000000000000000000 +f69 0000000009 +f70 000000000000000000000000000000008.800000000000000000000000000000 +f71 0000000009 +f72 000000000000000000000000000000008.800000000000000000000000000000 +f73 -1.175494342e-38 +f74 1.17549436e-38 +f75 000000001.17549436e-38 +f76 000000001.17549436e-38 +f77 -1.175494342e-38 +f78 1.17549436e-38 +f79 000000001.17549436e-38 +f80 000000001.17549436e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494342e-38 +f95 1.17549e-38 +f96 1.17549436e-38 +f97 01.17549e-38 +f98 000000001.17549436e-38 +f99 01.17549e-38 +f100 000000001.17549436e-38 +f101 1000-01-09 +f102 838:59:50 +f103 1970-01-10 00:00:09 +f104 1970-01-10 00:00:09 +f105 1910 +f106 1910 +f107 1910 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 10 +f60 10 +f61 0000000010 +f62 0000000000000000000000000000000000000000000000000000000000000010 +f63 0000000010 +f64 0000000000000000000000000000000000000000000000000000000000000010 +f65 4 +f66 9.900000000000000000000000000000 +f67 10 +f68 9.900000000000000000000000000000 +f69 0000000010 +f70 000000000000000000000000000000009.900000000000000000000000000000 +f71 0000000010 +f72 000000000000000000000000000000009.900000000000000000000000000000 +f73 -1.175494341e-38 +f74 1.175494361e-38 +f75 00000001.175494361e-38 +f76 00000001.175494361e-38 +f77 -1.175494341e-38 +f78 1.175494361e-38 +f79 00000001.175494361e-38 +f80 00000001.175494361e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494341e-38 +f95 1.17549e-38 +f96 1.175494361e-38 +f97 01.17549e-38 +f98 00000001.175494361e-38 +f99 01.17549e-38 +f100 00000001.175494361e-38 +f101 1000-01-10 +f102 838:59:49 +f103 1970-01-11 00:00:10 +f104 1970-01-11 00:00:10 +f105 1911 +f106 1911 +f107 1911 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 15 +f60 87 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 17 +f60 15 +f61 0000000016 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 19 +f60 18 +f61 0000000014 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 22 +f60 93 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 24 +f60 51654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 27 +f60 25 +f61 0000000026 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 29 +f60 28 +f61 0000000024 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 34 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 94 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 107 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 107 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 109 +f60 108 +f61 0000000104 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 109 +f60 108 +f61 0000000104 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 195 +f60 87 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 207 +f60 205 +f61 0000000206 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 209 +f60 208 +f61 0000000204 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 242 +f60 79 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 250 +f60 87895654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 292 +f60 93 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 299 +f60 899 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 321 +f60 NULL +f61 0000000765 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 323 +f60 14376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 340 +f60 9984376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 394 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 424 +f60 89 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 441 +f60 16546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 660 +f60 876546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 987 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 2550 +f60 775654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 2760 +f60 985654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 3330 +f60 764376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 3410 +f60 996546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 7876 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 9112 +f60 NULL +f61 0000008771 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 76710 +f60 226546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 569300 +f60 9114376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +Select * from test2.v2 ; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +Drop view if exists test2.v1 ; +Drop view if exists test2.v2 ; +Drop database test2 ; + +Testcase 3.3.1.29 +-------------------------------------------------------------------------------- +Drop database if exists test2 ; +Drop view if exists test.v1 ; +create database test2 ; +use test2; +Create view test.v1 AS Select * from test.tb2 limit 50 ; +Create view test2.v2 AS Select F59 from test.v1 ; +Drop view if exists test.v1 ; +Drop view if exists test2.v2 ; + +Testcase 3.3.1.31 +-------------------------------------------------------------------------------- +Drop table if exists test.t1 ; +CREATE TABLE test.t1 ( f59 int, f60 int ); +INSERT INTO test.t1 VALUES( 34, 654 ); +INSERT INTO test.t1 VALUES( 906, 434 ); +INSERT INTO test.t1 VALUES( 445, 765 ); +Create or replace view test.v1 +AS SELECT test.t1.F59, test.tb2.F60 +FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59 ; +Select * from test.v1; +F59 F60 +34 41 +Drop view test.v1 ; + +Testcase 3.3.1.32 +-------------------------------------------------------------------------------- +Drop table if exists test.t1 ; +Drop database if exists test2 ; +Drop view if exists test.v1 ; +create database test2 ; +use test2 ; +CREATE TABLE t1 ( f59 int, f60 int ); +INSERT INTO t1 VALUES( 34, 654 ); +INSERT INTO t1 VALUES( 906, 434 ); +INSERT INTO t1 VALUES( 445, 765 ); +CREATE VIEW test2.v1 +AS SELECT test.tb2.F59, test.tb2.F60 +FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59; +Select * from test2.v1; +F59 F60 +34 41 +Use test; + +Testcase 3.3.1.33 +-------------------------------------------------------------------------------- +Drop view if exists test.v1_firstview ; +Drop view if exists test.v1_secondview ; +Drop view if exists test.v1 ; +CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2; +CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2; +CREATE VIEW test.v1 +AS SELECT test.v1_firstview.f59, test.v1_firstview.f60 +FROM test.v1_firstview INNER JOIN test.v1_secondview +ON test.v1_firstview.f59 = test.v1_secondview.f59 ; +SELECT * FROM test.v1 order by f59,f60 limit 0,10; +f59 f60 +1 1 +2 2 +3 3 +4 4 +4 4 +4 74 +4 74 +5 5 +6 6 +7 7 +Drop view if exists test.v1_firstview ; +Drop view if exists test.v1_secondview ; +Drop view if exists test.v1 ; + +Testcase 3.3.1.34 +-------------------------------------------------------------------------------- +Drop database if exists test2 ; +Drop view if exists test.v1_firstview ; +Drop view if exists test.v1_secondview ; +create database test2 ; +use test2 ; +CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ; +CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ; +CREATE VIEW v1 +AS SELECT test.v1_firstview.F59, test.v1_firstview.F60 +FROM test.v1_firstview INNER JOIN test.v1_secondview +ON test.v1_firstview.f59 = test.v1_secondview.f59 ; +SELECT * FROM v1 order by f59,f60 limit 0,10; +F59 F60 +1 1 +2 2 +3 3 +4 4 +4 4 +4 74 +4 74 +5 5 +6 6 +7 7 +Drop view v1 ; +Drop view test.v1_firstview ; +Drop view test.v1_secondview ; + +Testcase 3.3.1.35 +-------------------------------------------------------------------------------- +use test; +Drop view if exists test.v1; +Drop view if exists test.v1_firstview; +CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2; +CREATE VIEW test.v1 +AS SELECT test.v1_firstview.f59, test.v1_firstview.f60 +FROM test.v1_firstview INNER JOIN test.tb2 +ON test.v1_firstview.f59 = test.tb2.f59; +SELECT * FROM test.v1 order by f59,f60 limit 0,10; +f59 f60 +1 1 +2 2 +3 3 +4 4 +4 4 +4 74 +4 74 +5 5 +6 6 +7 7 +Drop view test.v1 ; +Drop view test.v1_firstview; + +Testcase 3.3.1.36 +-------------------------------------------------------------------------------- +Drop database if exists test2 ; +create database test2 ; +use test2 ; +CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ; +CREATE VIEW v1 +AS SELECT v1_firstview.f59, v1_firstview.f60 +FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ; +SELECT * FROM v1 order by f59,f60 limit 0,10; +f59 f60 +1 1 +2 2 +3 3 +4 4 +4 4 +4 74 +4 74 +5 5 +6 6 +7 7 +Drop database test2 ; + +Testcase 3.3.1.37 +-------------------------------------------------------------------------------- +use test; +Drop table if exists t1; +Drop view if exists test.v1 ; +Drop view if exists test.v1_1 ; +Drop view if exists test.v1_1 ; +Drop view if exists test.v1_main ; +Create view test.v1 as Select f59, f60 FROM test.tb2; +Select * from test.v1 order by f59,f60 limit 0,10; +f59 f60 +1 1 +2 2 +3 3 +4 4 +4 74 +5 5 +6 6 +7 7 +8 8 +9 9 +Create table t1(f59 int, f60 int); +Insert into t1 values (90,507) ; +Create view v1_1 as Select f59,f60 from t1 ; +Select * from v1_1 ; +f59 f60 +90 507 +Create view v1_main +as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1 +ON test.tb2.f59 = test.v1.f59; +Select * from v1_main order by f59 limit 0,10; +f59 +1 +2 +3 +4 +4 +4 +4 +5 +6 +7 +Drop table t1; +Drop view test.v1 ; +Drop view test.v1_1 ; +Drop view test.v1_main ; + +Testcase 3.3.1.31 - 3.3.1.37 New Implementation +-------------------------------------------------------------------------------- +USE test; +DROP DATABASE IF EXISTS test2; +DROP TABLE IF EXISTS t0,t1; +DROP VIEW IF EXISTS t3,t4; +CREATE DATABASE test2; +CREATE TABLE test1.t0 (f1 VARCHAR(20)); +CREATE TABLE test1.t1 (f1 VARCHAR(20)); +CREATE TABLE test2.t0 (f1 VARCHAR(20)); +CREATE TABLE test2.t1 (f1 VARCHAR(20)); +CREATE VIEW test1.t2 AS SELECT * FROM test1.t0; +CREATE VIEW test1.t3 AS SELECT * FROM test2.t0; +CREATE VIEW test2.t2 AS SELECT * FROM test2.t0; +CREATE VIEW test2.t3 AS SELECT * FROM test1.t0; +INSERT INTO test1.t0 VALUES('test1.t0'); +INSERT INTO test1.t1 VALUES('test1.t1'); +INSERT INTO test2.t0 VALUES('test2.t0'); +INSERT INTO test2.t1 VALUES('test2.t1'); +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t3 ta, test2.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t3 ta, test1.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t3 ta, test2.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t3 ta, test1.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t3 ta, test2.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t3 ta, test1.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t3 ta, test2.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t3 ta, test1.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t3 ta, test2.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test2.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t3 ta, test1.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test1.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t3 ta, test2.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test2.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t3 ta, test1.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test1.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t2 ta, test2.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t2 ta, test1.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t2 ta, test2.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t2 ta, test1.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t2 ta, test2.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t2 ta, test1.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t2 ta, test2.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t2 ta, test1.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t2 ta, test2.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test2.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t2 ta, test1.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t0 test1.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t2 ta, test2.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test2.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t2 ta, test1.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t0 test1.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t1 ta, test2.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t1 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t1 ta, test1.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t1 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t1 ta, test2.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t1 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t1 ta, test1.t3 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t1 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t1 ta, test2.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t1 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t1 ta, test1.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t1 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t1 ta, test2.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t1 test2.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t1 ta, test1.t2 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t1 test1.t0 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t1 ta, test2.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t1 test2.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test2.t1 ta, test1.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test2.t1 test1.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t1 ta, test2.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t1 test2.t1 +CREATE OR REPLACE VIEW test.v1 AS +SELECT ta.f1 AS col1, +tb.f1 AS col2 +FROM test1.t1 ta, test1.t1 tb; +SELECT * FROM test.v1; +col1 col2 +test1.t1 test1.t1 + +Testcase 3.3.1.38 +-------------------------------------------------------------------------------- +Drop table if exists test1.t1 ; +Drop view if exists test.v1 ; +Drop view if exists test.v1_main; +Drop view if exists test1.v1_1 ; +Drop database if exists test3 ; +Create view test.v1 as Select f59, f60 FROM test.tb2; +Select * from test.v1 order by f59,f60 limit 20; +f59 f60 +1 1 +2 2 +3 3 +4 4 +4 74 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +15 87 +17 15 +19 18 +22 93 +24 51654 +27 25 +29 28 +34 41 +94 74 +Create table test1.t1 (f59 int,f60 int) ; +Insert into test1.t1 values (199,507) ; +Create view test1.v1_1 as Select f59,f60 from test1.t1 ; +Select * from test1.v1_1 ; +f59 f60 +199 507 +Create database test3 ; +Create table test3.t1(f59 int,f60 int) ; +Insert into test3.t1 values (1023,7670) ; +Create view test3.v1_2 as Select f59,f60 from test3.t1 ; +Select * from test3.v1_2 ; +f59 f60 +1023 7670 +use test ; +Create view v1_main +as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2, +test3.v1_2.f59 as f3 +FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2 +ON (test.v1.f59 = test1.v1_1.f59) ; +Select * from v1_main ; +f1 f2 f3 +DROP VIEW test.v1 ; +DROP VIEW test1.v1_1 ; +DROP VIEW test.v1_main ; +DROP DATABASE test3; + +Testcase 3.3.1.39 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +CREATE VIEW test.v1 +AS Select f59 from (Select * FROM tb2 limit 20) tx ; +ERROR HY000: View's SELECT contains a subquery in the FROM clause +SELECT * FROM test.v1 order by f59 ; +ERROR 42S02: Table 'test.v1' doesn't exist +Drop view if exists test.v1 ; + +Testcase 3.3.1.40 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +Set @var1 = 'ABC' ; +Set @var2 = 'XYZ' ; +CREATE VIEW test.v1 AS SELECT @var1, @var2 ; +ERROR HY000: View's SELECT contains a variable or parameter +CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; +ERROR HY000: View's SELECT contains a variable or parameter +Drop view if exists test.v1 ; + +Testcase 3.3.1.41 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +Drop procedure if exists sp1 ; +Create procedure sp1() DETERMINISTIC +Begin +DECLARE x char; +Set x = 200 ; +Create view test.v1 as SELECT * FROM tb2 WHERE f59 = x ; +End // +ERROR HY000: View's SELECT contains a variable or parameter +Call sp1() ; +ERROR 42000: PROCEDURE test.sp1 does not exist +Drop view if exists test.v1 ; +Warnings: +Note 1051 Unknown table 'test.v1' +Drop procedure sp1 ; +ERROR 42000: PROCEDURE test.sp1 does not exist + +Testcase 3.3.1.42 +-------------------------------------------------------------------------------- +Drop VIEW if exists test.v1 ; +CREATE TEMPORARY VIEW test.v1 AS +SELECT * FROM test.tb2 limit 2 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW test.v1 AS +SELECT * FROM test.tb2 limit 2' at line 1 +CREATE OR REPLACE TEMPORARY VIEW test.v1 AS +SELECT * FROM test.tb2 limit 2 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPORARY VIEW test.v1 AS +SELECT * FROM test.tb2 limit 2' at line 1 +Drop view if exists test.v1 ; +Use test; + +Testcase 3.3.1.43 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; +INSERT INTO test.v1 values(122,432); +SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20; +f59 122 +f60 432 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ; +SELECT * FROM test.tb2 where f59 = 3000 limit 0,20; +f59 3000 +f60 432 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +DELETE FROM test.v1 +where test.v1.f59 = 3000 and test.v1.f60 = 432; +SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +drop view test.v1 ; + +Testcase 3.3.1.44 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100; +INSERT INTO test.v1 values(31, 32, 33) ; +ERROR HY000: The target table v1 of the INSERT is not insertable-into +Drop view test.v1 ; + +Testcase 3.3.1.45 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04; +UPDATE test.v1 SET f59 = 30 where F59 = 04 ; +affected rows: 2 +info: Rows matched: 2 Changed: 2 Warnings: 0 +SELECT * FROM test.v1 where f59 = 30 order by f59; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +SELECT * FROM test.tb2 where f59 = 30 ; +f59 30 +f60 4 +f61 0000000004 +f62 0000000000000000000000000000000000000000000000000000000000000004 +f63 0000000004 +f64 0000000000000000000000000000000000000000000000000000000000000004 +f65 -2 +f66 3.300000000000000000000000000000 +f67 4 +f68 3.300000000000000000000000000000 +f69 0000000004 +f70 000000000000000000000000000000003.300000000000000000000000000000 +f71 0000000004 +f72 000000000000000000000000000000003.300000000000000000000000000000 +f73 -1.175494347e-38 +f74 1.175494355e-38 +f75 00000001.175494355e-38 +f76 00000001.175494355e-38 +f77 -1.175494347e-38 +f78 1.175494355e-38 +f79 00000001.175494355e-38 +f80 00000001.175494355e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494347e-38 +f95 1.17549e-38 +f96 1.175494355e-38 +f97 01.17549e-38 +f98 00000001.175494355e-38 +f99 01.17549e-38 +f100 00000001.175494355e-38 +f101 1000-01-04 +f102 838:59:55 +f103 1970-01-05 00:00:04 +f104 1970-01-05 00:00:04 +f105 1905 +f106 1905 +f107 1905 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 30 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +UPDATE tb2 SET f59 = 100 where f59 = 30 ; +affected rows: 2 +info: Rows matched: 2 Changed: 2 Warnings: 0 +SELECT * FROM tb2 where f59 = 100 ; +f59 100 +f60 4 +f61 0000000004 +f62 0000000000000000000000000000000000000000000000000000000000000004 +f63 0000000004 +f64 0000000000000000000000000000000000000000000000000000000000000004 +f65 -2 +f66 3.300000000000000000000000000000 +f67 4 +f68 3.300000000000000000000000000000 +f69 0000000004 +f70 000000000000000000000000000000003.300000000000000000000000000000 +f71 0000000004 +f72 000000000000000000000000000000003.300000000000000000000000000000 +f73 -1.175494347e-38 +f74 1.175494355e-38 +f75 00000001.175494355e-38 +f76 00000001.175494355e-38 +f77 -1.175494347e-38 +f78 1.175494355e-38 +f79 00000001.175494355e-38 +f80 00000001.175494355e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494347e-38 +f95 1.17549e-38 +f96 1.175494355e-38 +f97 01.17549e-38 +f98 00000001.175494355e-38 +f99 01.17549e-38 +f100 00000001.175494355e-38 +f101 1000-01-04 +f102 838:59:55 +f103 1970-01-05 00:00:04 +f104 1970-01-05 00:00:04 +f105 1905 +f106 1905 +f107 1905 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 100 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +SELECT * FROM test.v1 order by f59 ; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +drop view if exists test.v1 ; +Drop TABLE IF EXISTS test.t1 ; +Drop VIEW IF EXISTS test.v1 ; +CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1)) +ENGINE = myisam; +INSERT INTO t1 VALUES(1,'one'); +INSERT INTO t1 VALUES(2,'two'); +INSERT INTO t1 VALUES(3,'three'); +INSERT INTO t1 VALUES(5,'five'); +CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4; +SELECT COUNT(*) FROM v1 WHERE f1 = 2; +COUNT(*) +1 +SELECT COUNT(*) FROM v1 WHERE f1 = 4; +COUNT(*) +0 +SELECT COUNT(*) FROM v1 WHERE f1 = 5; +COUNT(*) +0 +SELECT COUNT(*) FROM v1 WHERE f1 = 10; +COUNT(*) +0 +INSERT INTO t1 VALUES(4,'four'); +DELETE FROM v1 WHERE f1 = 3; +affected rows: 1 +DELETE FROM v1 WHERE f1 = 5; +affected rows: 0 +SELECT * FROM t1 ORDER BY f1; +f1 f2 +1 one +2 two +4 four +5 five +SELECT * FROM v1 ORDER BY f1; +f1 f2 +2 two +4 four +INSERT INTO v1 VALUES(2,'two'); +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +INSERT INTO v1 VALUES(3,'three'); +affected rows: 1 +INSERT INTO v1 VALUES(6,'six'); +affected rows: 1 +SELECT * FROM t1 ORDER BY f1; +f1 f2 +1 one +2 two +3 three +4 four +5 five +6 six +SELECT * FROM v1 ORDER BY f1; +f1 f2 +2 two +3 three +4 four +UPDATE v1 SET f1 = 2 WHERE f1 = 3; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +UPDATE v1 SET f2 = 'number' WHERE f1 = 3; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +UPDATE v1 SET f1 = 10 WHERE f1 = 3; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +UPDATE v1 SET f2 = 'number' WHERE f1 = 1; +affected rows: 0 + +Testcase 3.3.1.46 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT f59,f60 +FROM test.tb2 where f59 = 195 WITH CHECK OPTION ; +UPDATE test.v1 SET f59 = 198 where f59=195 ; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM test.v1 order by f59 ; +f59 f60 +195 87 +drop view if exists test.v1 ; + +Testcase 3.3.1.47 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +Drop view if exists test.v2 ; +CREATE VIEW test.v1 AS SELECT f59,f60 +FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ; +CREATE VIEW test.v2 as SELECT * FROM test.v1 ; +UPDATE test.v1 SET F59 = 919 where f59 = 0987 ; +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM test.v1 order by f59 ; +f59 f60 +987 41 +UPDATE test.v2 SET F59 = 9879 where f59 = 919 ; +SELECT * FROM tb2 where f59 = 9879 ; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +drop view if exists v1 ; +drop view if exists v2 ; + +Testcase 3.3.1.48 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS test.t1; +DROP VIEW IF EXISTS test.v1; +CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER) +ENGINE = myisam; +INSERT INTO t1 VALUES ('A', 1); +SELECT * FROM t1 order by f1, f2; +f1 f2 +A 1 +CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2 +WITH CASCADED CHECK OPTION ; +SELECT * FROM v1 order by f1, f2; +f1 f2 +A 1 +UPDATE v1 SET f2 = 2 WHERE f2 = 1; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +INSERT INTO v1 VALUES('B',2); +affected rows: 1 +SELECT * FROM v1 order by f1, f2; +f1 f2 +A 2 +B 2 +UPDATE v1 SET f2 = 4; +ERROR HY000: CHECK OPTION failed 'test.v1' +INSERT INTO v1 VALUES('B',3); +ERROR HY000: CHECK OPTION failed 'test.v1' +SELECT * FROM v1 order by f1, f2; +f1 f2 +A 2 +B 2 + +Testcase 3.3.1.49 +-------------------------------------------------------------------------------- +Drop table if exists test.t1 ; +Drop view if exists test.v1 ; +Drop view if exists test.v2 ; +Drop view if exists test.v3 ; +Create table test.t1 (f59 INT, f60 INT) ; +Insert into test.t1 values (100,4234); +Insert into test.t1 values (290,6624); +Insert into test.t1 values (410,765); +Insert into test.t1 values (300,433334); +Insert into test.t1 values (800,9788); +Insert into test.t1 values (501,9866); +Create view test.v1 as select f59 +FROM test.t1 where f59<500 with check option ; +Create view test.v2 as select * +from test.v1 where f59>0 with local check option ; +Create view test.v3 as select * +from test.v1 where f59>0 with cascaded check option ; +Insert into test.v2 values(23) ; +Insert into test.v3 values(24) ; +drop view if exists test.v1 ; +drop view if exists test.v2 ; +drop view if exists test.v3 ; + +Testcase 3.3.1.49A +-------------------------------------------------------------------------------- +USE test; +DROP TABLE IF EXISTS test.t1 ; +DROP TABLE IF EXISTS test.t1_results ; +DROP VIEW IF EXISTS test.v1; +DROP VIEW IF EXISTS test.v2; +DROP VIEW IF EXISTS test.v3; +CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20)); +CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10), +v3_to_v1_violation VARCHAR(20), errno CHAR(10)); +CREATE VIEW v1 AS SELECT f1, f2 + FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH LOCAL CHECK OPTION ; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH CHECK OPTION - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 ; +option_variant WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - - WITH LOCAL CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f1, f2 + FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CASCADED CHECK OPTION ; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH CHECK OPTION - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 ; +option_variant WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - - WITH CASCADED CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f1, f2 + FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CHECK OPTION ; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH LOCAL CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH CASCADED CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH CHECK OPTION - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 ; +option_variant WITH LOCAL CHECK OPTION - - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - - WITH CHECK OPTION +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f1, f2 + FROM t1 WHERE f1 BETWEEN 0 AND 10 ; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH LOCAL CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH CASCADED CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; +option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - WITH CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - WITH CHECK OPTION - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 + FROM v1 WHERE f1 BETWEEN 6 AND 16 ; +option_variant WITH LOCAL CHECK OPTION - - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CASCADED CHECK OPTION - - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant WITH CHECK OPTION - - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +ERROR HY000: CHECK OPTION failed 'test.v3' +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(0, 'zero'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(7, 'seven'); +ERROR HY000: CHECK OPTION failed 'test.v3' +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +8 eight +DELETE FROM t1; +DROP VIEW v3; +option_variant - - +option_variant -------------------------------------------------------------------------------- +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +SELECT * FROM v1; +f1 f2 +0 zero +7 seven +8 eight +SELECT * FROM v2; +col1 col2 +7 seven +8 eight +SELECT * FROM v3; +my_col1 my_col2 +8 eight +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +DELETE FROM v3 WHERE my_col1 = 16; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 0; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 7; +affected rows: 0 +DELETE FROM v3 WHERE my_col1 = 8; +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +DELETE FROM t1; +INSERT INTO t1 VALUES(16, 'sixteen'); +INSERT INTO t1 VALUES(0, 'zero'); +INSERT INTO t1 VALUES(7, 'seven'); +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; +affected rows: 0 +info: Rows matched: 0 Changed: 0 Warnings: 0 +UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 whatever +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +7 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +0 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +16 eight +DELETE FROM t1; +INSERT INTO t1 VALUES(8, 'eight'); +UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM t1; +f1 f2 +10 eight +DELETE FROM t1; +INSERT INTO v3 VALUES(16, 'sixteen'); +affected rows: 1 +INSERT INTO v3 VALUES(0, 'zero'); +affected rows: 1 +INSERT INTO v3 VALUES(7, 'seven'); +affected rows: 1 +INSERT INTO v3 VALUES(8, 'eight'); +affected rows: 1 +SELECT * FROM t1; +f1 f2 +16 sixteen +0 zero +7 seven +8 eight +DELETE FROM t1; +DROP VIEW v3; +DROP VIEW v2; +DROP VIEW v1; +SELECT * FROM t1_results ORDER BY v3_to_v1_options; +v3_to_v1_options statement v3_to_v1_violation errno + - - UPDATE _v2_ 0 + - - INSERT _v2_ 0 + - - INSERT _ _v1 0 + - - UPDATE _ _ 0 + - - UPDATE _ _v1 0 + - - UPDATE v3_ _ 0 + - - INSERT _ _ 0 + - - WITH CHECK OPTION UPDATE _v2_ 0 + - - WITH CHECK OPTION INSERT _ _ 0 + - - WITH CHECK OPTION UPDATE _ _v1 0 + - - WITH CHECK OPTION UPDATE _ _ 0 + - - WITH CHECK OPTION UPDATE v3_ _ 0 + - - WITH CHECK OPTION INSERT _v2_ 0 + - - WITH CHECK OPTION INSERT _ _v1 0 + - - WITH CASCADED CHECK OPTION INSERT _v2_ 0 + - - WITH CASCADED CHECK OPTION INSERT _ _ 0 + - - WITH CASCADED CHECK OPTION INSERT _ _v1 0 + - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 + - - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 + - - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 + - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 + - - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 + - - WITH LOCAL CHECK OPTION INSERT _v2_ 0 + - - WITH LOCAL CHECK OPTION INSERT _ _v1 0 + - - WITH LOCAL CHECK OPTION INSERT _ _ 0 + - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 + - - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 + - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 + - WITH CHECK OPTION - UPDATE _v2_ 0 + - WITH CHECK OPTION - INSERT _v2_ 0 + - WITH CHECK OPTION - UPDATE v3_ _ 0 + - WITH CHECK OPTION - UPDATE _ _v1 0 + - WITH CHECK OPTION - UPDATE _ _ 0 + - WITH CHECK OPTION - INSERT _ _v1 0 + - WITH CHECK OPTION - INSERT _ _ 0 + - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 + - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 + - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 + - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 + - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 + - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 + - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 + - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 + - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 + - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 + - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 + - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 + - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 + - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 + - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 + - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 + - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 + - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 + - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 + - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 + - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 + - WITH CASCADED CHECK OPTION - INSERT _ _v1 0 + - WITH CASCADED CHECK OPTION - UPDATE _ _v1 0 + - WITH CASCADED CHECK OPTION - UPDATE _v2_ 0 + - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 + - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 0 + - WITH CASCADED CHECK OPTION - INSERT _ _ 0 + - WITH CASCADED CHECK OPTION - INSERT _v2_ 0 + - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 + - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 + - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 + - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 + - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 + - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 + - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 + - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 + - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 + - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 + - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 + - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 + - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 + - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 + - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 + - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 + - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 + - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 + - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 + - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 + - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 + - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 0 + - WITH LOCAL CHECK OPTION - INSERT _ _ 0 + - WITH LOCAL CHECK OPTION - INSERT _v2_ 0 + - WITH LOCAL CHECK OPTION - INSERT _ _v1 0 + - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 + - WITH LOCAL CHECK OPTION - UPDATE _ _v1 0 + - WITH LOCAL CHECK OPTION - UPDATE _v2_ 0 + - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 + - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 + - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 + - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 + - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 + - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 + - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 + - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 + - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 + - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 + - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 + - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 + - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 + - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 + - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 + - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 + - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 + - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 + - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 + - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 + - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 +WITH CHECK OPTION - - UPDATE v3_ _ 1369 +WITH CHECK OPTION - - INSERT _ _ 0 +WITH CHECK OPTION - - INSERT _v2_ 1369 +WITH CHECK OPTION - - INSERT _ _v1 1369 +WITH CHECK OPTION - - UPDATE _v2_ 1369 +WITH CHECK OPTION - - UPDATE _ _v1 1369 +WITH CHECK OPTION - - UPDATE _ _ 0 +WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 +WITH CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 1369 +WITH CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 +WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - - INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - - INSERT _ _ 0 +WITH CASCADED CHECK OPTION - - UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - - UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - - UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - - UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - - INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 +WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - - INSERT _ _ 0 +WITH LOCAL CHECK OPTION - - UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - - UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - - UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - - INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - - INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - - UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 +WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 + +Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above). +All following SELECTs must give ROW NOT FOUND +-------------------------------------------------------------------------------- +SELECT * FROM t1_results +WHERE v3_to_v1_violation = ' _ _ ' AND errno <> 0 +ORDER BY v3_to_v1_options; +v3_to_v1_options statement v3_to_v1_violation errno +SELECT * FROM t1_results +WHERE v3_to_v1_options LIKE ' %' AND errno <> 0 +ORDER BY v3_to_v1_options; +v3_to_v1_options statement v3_to_v1_violation errno +SELECT * FROM t1_results +WHERE v3_to_v1_options LIKE 'WITH %' + AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0 +ORDER BY v3_to_v1_options; +v3_to_v1_options statement v3_to_v1_violation errno +SELECT * FROM t1_results +WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %' + AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0 +ORDER BY v3_to_v1_options; +v3_to_v1_options statement v3_to_v1_violation errno +SELECT * FROM t1_results +WHERE errno <> 0 AND errno <> 1369 +ORDER BY v3_to_v1_options; +v3_to_v1_options statement v3_to_v1_violation errno + +End of plausibility checks +-------------------------------------------------------------------------------- +DROP TABLE t1_results; + +Testcase 3.3.1.50 - 3.3.1.53 +-------------------------------------------------------------------------------- +DROP VIEW IF EXISTS test.v1; +CREATE VIEW test.v1 AS SELECT * FROM test.tb2; +SELECT * FROM test.v1 order by f59,f60,f61 ; +f59 1 +f60 1 +f61 0000000001 +f62 0000000000000000000000000000000000000000000000000000000000000001 +f63 0000000001 +f64 0000000000000000000000000000000000000000000000000000000000000001 +f65 -5 +f66 0.000000000000000000000000000000 +f67 1 +f68 0.000000000000000000000000000000 +f69 0000000001 +f70 000000000000000000000000000000000.000000000000000000000000000000 +f71 0000000001 +f72 000000000000000000000000000000000.000000000000000000000000000000 +f73 -1.17549435e-38 +f74 1.175494352e-38 +f75 00000001.175494352e-38 +f76 00000001.175494352e-38 +f77 -1.17549435e-38 +f78 1.175494352e-38 +f79 00000001.175494352e-38 +f80 00000001.175494352e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.17549435e-38 +f95 1.17549e-38 +f96 1.175494352e-38 +f97 01.17549e-38 +f98 00000001.175494352e-38 +f99 01.17549e-38 +f100 00000001.175494352e-38 +f101 1000-01-01 +f102 838:59:58 +f103 1970-01-02 00:00:01 +f104 1970-01-02 00:00:01 +f105 1902 +f106 1902 +f107 1902 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 2 +f60 2 +f61 0000000002 +f62 0000000000000000000000000000000000000000000000000000000000000002 +f63 0000000002 +f64 0000000000000000000000000000000000000000000000000000000000000002 +f65 -4 +f66 1.100000000000000000000000000000 +f67 2 +f68 1.100000000000000000000000000000 +f69 0000000002 +f70 000000000000000000000000000000001.100000000000000000000000000000 +f71 0000000002 +f72 000000000000000000000000000000001.100000000000000000000000000000 +f73 -1.175494349e-38 +f74 1.175494353e-38 +f75 00000001.175494353e-38 +f76 00000001.175494353e-38 +f77 -1.175494349e-38 +f78 1.175494353e-38 +f79 00000001.175494353e-38 +f80 00000001.175494353e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494349e-38 +f95 1.17549e-38 +f96 1.175494353e-38 +f97 01.17549e-38 +f98 00000001.175494353e-38 +f99 01.17549e-38 +f100 00000001.175494353e-38 +f101 1000-01-02 +f102 838:59:57 +f103 1970-01-03 00:00:02 +f104 1970-01-03 00:00:02 +f105 1903 +f106 1903 +f107 1903 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 3 +f60 3 +f61 0000000003 +f62 0000000000000000000000000000000000000000000000000000000000000003 +f63 0000000003 +f64 0000000000000000000000000000000000000000000000000000000000000003 +f65 -3 +f66 2.200000000000000000000000000000 +f67 3 +f68 2.200000000000000000000000000000 +f69 0000000003 +f70 000000000000000000000000000000002.200000000000000000000000000000 +f71 0000000003 +f72 000000000000000000000000000000002.200000000000000000000000000000 +f73 -1.175494348e-38 +f74 1.175494354e-38 +f75 00000001.175494354e-38 +f76 00000001.175494354e-38 +f77 -1.175494348e-38 +f78 1.175494354e-38 +f79 00000001.175494354e-38 +f80 00000001.175494354e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494348e-38 +f95 1.17549e-38 +f96 1.175494354e-38 +f97 01.17549e-38 +f98 00000001.175494354e-38 +f99 01.17549e-38 +f100 00000001.175494354e-38 +f101 1000-01-03 +f102 838:59:56 +f103 1970-01-04 00:00:03 +f104 1970-01-04 00:00:03 +f105 1904 +f106 1904 +f107 1904 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 5 +f60 5 +f61 0000000005 +f62 0000000000000000000000000000000000000000000000000000000000000005 +f63 0000000005 +f64 0000000000000000000000000000000000000000000000000000000000000005 +f65 -1 +f66 4.400000000000000000000000000000 +f67 5 +f68 4.400000000000000000000000000000 +f69 0000000005 +f70 000000000000000000000000000000004.400000000000000000000000000000 +f71 0000000005 +f72 000000000000000000000000000000004.400000000000000000000000000000 +f73 -1.175494346e-38 +f74 1.175494356e-38 +f75 00000001.175494356e-38 +f76 00000001.175494356e-38 +f77 -1.175494346e-38 +f78 1.175494356e-38 +f79 00000001.175494356e-38 +f80 00000001.175494356e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494346e-38 +f95 1.17549e-38 +f96 1.175494356e-38 +f97 01.17549e-38 +f98 00000001.175494356e-38 +f99 01.17549e-38 +f100 00000001.175494356e-38 +f101 1000-01-05 +f102 838:59:54 +f103 1970-01-06 00:00:05 +f104 1970-01-06 00:00:05 +f105 1906 +f106 1906 +f107 1906 +f108 2enum +f109 1set,2set +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f59 6 +f60 6 +f61 0000000006 +f62 0000000000000000000000000000000000000000000000000000000000000006 +f63 0000000006 +f64 0000000000000000000000000000000000000000000000000000000000000006 +f65 0 +f66 5.500000000000000000000000000000 +f67 6 +f68 5.500000000000000000000000000000 +f69 0000000006 +f70 000000000000000000000000000000005.500000000000000000000000000000 +f71 0000000006 +f72 000000000000000000000000000000005.500000000000000000000000000000 +f73 -1.175494345e-38 +f74 1.175494357e-38 +f75 00000001.175494357e-38 +f76 00000001.175494357e-38 +f77 -1.175494345e-38 +f78 1.175494357e-38 +f79 00000001.175494357e-38 +f80 00000001.175494357e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494345e-38 +f95 1.17549e-38 +f96 1.175494357e-38 +f97 01.17549e-38 +f98 00000001.175494357e-38 +f99 01.17549e-38 +f100 00000001.175494357e-38 +f101 1000-01-06 +f102 838:59:53 +f103 1970-01-07 00:00:06 +f104 1970-01-07 00:00:06 +f105 1907 +f106 1907 +f107 1907 +f108 1enum +f109 1set +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f59 7 +f60 7 +f61 0000000007 +f62 0000000000000000000000000000000000000000000000000000000000000007 +f63 0000000007 +f64 0000000000000000000000000000000000000000000000000000000000000007 +f65 1 +f66 6.600000000000000000000000000000 +f67 7 +f68 6.600000000000000000000000000000 +f69 0000000007 +f70 000000000000000000000000000000006.600000000000000000000000000000 +f71 0000000007 +f72 000000000000000000000000000000006.600000000000000000000000000000 +f73 -1.175494344e-38 +f74 1.175494358e-38 +f75 00000001.175494358e-38 +f76 00000001.175494358e-38 +f77 -1.175494344e-38 +f78 1.175494358e-38 +f79 00000001.175494358e-38 +f80 00000001.175494358e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494344e-38 +f95 1.17549e-38 +f96 1.175494358e-38 +f97 01.17549e-38 +f98 00000001.175494358e-38 +f99 01.17549e-38 +f100 00000001.175494358e-38 +f101 1000-01-07 +f102 838:59:52 +f103 1970-01-08 00:00:07 +f104 1970-01-08 00:00:07 +f105 1908 +f106 1908 +f107 1908 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 8 +f60 8 +f61 0000000008 +f62 0000000000000000000000000000000000000000000000000000000000000008 +f63 0000000008 +f64 0000000000000000000000000000000000000000000000000000000000000008 +f65 2 +f66 7.700000000000000000000000000000 +f67 8 +f68 7.700000000000000000000000000000 +f69 0000000008 +f70 000000000000000000000000000000007.700000000000000000000000000000 +f71 0000000008 +f72 000000000000000000000000000000007.700000000000000000000000000000 +f73 -1.175494343e-38 +f74 1.175494359e-38 +f75 00000001.175494359e-38 +f76 00000001.175494359e-38 +f77 -1.175494343e-38 +f78 1.175494359e-38 +f79 00000001.175494359e-38 +f80 00000001.175494359e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494343e-38 +f95 1.17549e-38 +f96 1.175494359e-38 +f97 01.17549e-38 +f98 00000001.175494359e-38 +f99 01.17549e-38 +f100 00000001.175494359e-38 +f101 1000-01-08 +f102 838:59:51 +f103 1970-01-09 00:00:08 +f104 1970-01-09 00:00:08 +f105 1909 +f106 1909 +f107 1909 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 9 +f60 9 +f61 0000000009 +f62 0000000000000000000000000000000000000000000000000000000000000009 +f63 0000000009 +f64 0000000000000000000000000000000000000000000000000000000000000009 +f65 3 +f66 8.800000000000000000000000000000 +f67 9 +f68 8.800000000000000000000000000000 +f69 0000000009 +f70 000000000000000000000000000000008.800000000000000000000000000000 +f71 0000000009 +f72 000000000000000000000000000000008.800000000000000000000000000000 +f73 -1.175494342e-38 +f74 1.17549436e-38 +f75 000000001.17549436e-38 +f76 000000001.17549436e-38 +f77 -1.175494342e-38 +f78 1.17549436e-38 +f79 000000001.17549436e-38 +f80 000000001.17549436e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494342e-38 +f95 1.17549e-38 +f96 1.17549436e-38 +f97 01.17549e-38 +f98 000000001.17549436e-38 +f99 01.17549e-38 +f100 000000001.17549436e-38 +f101 1000-01-09 +f102 838:59:50 +f103 1970-01-10 00:00:09 +f104 1970-01-10 00:00:09 +f105 1910 +f106 1910 +f107 1910 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 10 +f60 10 +f61 0000000010 +f62 0000000000000000000000000000000000000000000000000000000000000010 +f63 0000000010 +f64 0000000000000000000000000000000000000000000000000000000000000010 +f65 4 +f66 9.900000000000000000000000000000 +f67 10 +f68 9.900000000000000000000000000000 +f69 0000000010 +f70 000000000000000000000000000000009.900000000000000000000000000000 +f71 0000000010 +f72 000000000000000000000000000000009.900000000000000000000000000000 +f73 -1.175494341e-38 +f74 1.175494361e-38 +f75 00000001.175494361e-38 +f76 00000001.175494361e-38 +f77 -1.175494341e-38 +f78 1.175494361e-38 +f79 00000001.175494361e-38 +f80 00000001.175494361e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494341e-38 +f95 1.17549e-38 +f96 1.175494361e-38 +f97 01.17549e-38 +f98 00000001.175494361e-38 +f99 01.17549e-38 +f100 00000001.175494361e-38 +f101 1000-01-10 +f102 838:59:49 +f103 1970-01-11 00:00:10 +f104 1970-01-11 00:00:10 +f105 1911 +f106 1911 +f107 1911 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 15 +f60 87 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 17 +f60 15 +f61 0000000016 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 19 +f60 18 +f61 0000000014 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 22 +f60 93 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 24 +f60 51654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 27 +f60 25 +f61 0000000026 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 29 +f60 28 +f61 0000000024 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 34 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 94 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 100 +f60 4 +f61 0000000004 +f62 0000000000000000000000000000000000000000000000000000000000000004 +f63 0000000004 +f64 0000000000000000000000000000000000000000000000000000000000000004 +f65 -2 +f66 3.300000000000000000000000000000 +f67 4 +f68 3.300000000000000000000000000000 +f69 0000000004 +f70 000000000000000000000000000000003.300000000000000000000000000000 +f71 0000000004 +f72 000000000000000000000000000000003.300000000000000000000000000000 +f73 -1.175494347e-38 +f74 1.175494355e-38 +f75 00000001.175494355e-38 +f76 00000001.175494355e-38 +f77 -1.175494347e-38 +f78 1.175494355e-38 +f79 00000001.175494355e-38 +f80 00000001.175494355e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494347e-38 +f95 1.17549e-38 +f96 1.175494355e-38 +f97 01.17549e-38 +f98 00000001.175494355e-38 +f99 01.17549e-38 +f100 00000001.175494355e-38 +f101 1000-01-04 +f102 838:59:55 +f103 1970-01-05 00:00:04 +f104 1970-01-05 00:00:04 +f105 1905 +f106 1905 +f107 1905 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 100 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 107 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 107 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 109 +f60 108 +f61 0000000104 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 109 +f60 108 +f61 0000000104 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 195 +f60 87 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 207 +f60 205 +f61 0000000206 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 209 +f60 208 +f61 0000000204 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 242 +f60 79 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 250 +f60 87895654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 292 +f60 93 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 299 +f60 899 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 321 +f60 NULL +f61 0000000765 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 323 +f60 14376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 340 +f60 9984376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 394 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 424 +f60 89 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 441 +f60 16546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 660 +f60 876546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 987 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 2550 +f60 775654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 2760 +f60 985654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 3330 +f60 764376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 3410 +f60 996546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 7876 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 9112 +f60 NULL +f61 0000008771 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 76710 +f60 226546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 569300 +f60 9114376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +drop view test.v1 ; +CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2; +SELECT * FROM test.v1 order by F59, F61 limit 50; +F59 F61 +1 0000000001 +2 0000000002 +3 0000000003 +5 0000000005 +6 0000000006 +7 0000000007 +8 0000000008 +9 0000000009 +10 0000000010 +15 NULL +17 0000000016 +19 0000000014 +22 NULL +24 NULL +27 0000000026 +29 0000000024 +34 NULL +94 NULL +100 NULL +100 0000000004 +107 0000000106 +107 0000000106 +109 0000000104 +109 0000000104 +195 NULL +207 0000000206 +209 0000000204 +242 NULL +250 NULL +292 NULL +299 NULL +321 0000000765 +323 NULL +340 NULL +394 NULL +424 NULL +441 NULL +500 0000000900 +500 0000000900 +500 0000000900 +660 NULL +987 NULL +2550 NULL +2760 NULL +3330 NULL +3410 NULL +7876 NULL +9112 0000008771 +76710 NULL +569300 NULL +drop view test.v1 ; +CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61; +SELECT * FROM test.v1 order by f59,f60,f61 ; +f59 1 +f60 1 +f61 0000000001 +f62 0000000000000000000000000000000000000000000000000000000000000001 +f63 0000000001 +f64 0000000000000000000000000000000000000000000000000000000000000001 +f65 -5 +f66 0.000000000000000000000000000000 +f67 1 +f68 0.000000000000000000000000000000 +f69 0000000001 +f70 000000000000000000000000000000000.000000000000000000000000000000 +f71 0000000001 +f72 000000000000000000000000000000000.000000000000000000000000000000 +f73 -1.17549435e-38 +f74 1.175494352e-38 +f75 00000001.175494352e-38 +f76 00000001.175494352e-38 +f77 -1.17549435e-38 +f78 1.175494352e-38 +f79 00000001.175494352e-38 +f80 00000001.175494352e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.17549435e-38 +f95 1.17549e-38 +f96 1.175494352e-38 +f97 01.17549e-38 +f98 00000001.175494352e-38 +f99 01.17549e-38 +f100 00000001.175494352e-38 +f101 1000-01-01 +f102 838:59:58 +f103 1970-01-02 00:00:01 +f104 1970-01-02 00:00:01 +f105 1902 +f106 1902 +f107 1902 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 2 +f60 2 +f61 0000000002 +f62 0000000000000000000000000000000000000000000000000000000000000002 +f63 0000000002 +f64 0000000000000000000000000000000000000000000000000000000000000002 +f65 -4 +f66 1.100000000000000000000000000000 +f67 2 +f68 1.100000000000000000000000000000 +f69 0000000002 +f70 000000000000000000000000000000001.100000000000000000000000000000 +f71 0000000002 +f72 000000000000000000000000000000001.100000000000000000000000000000 +f73 -1.175494349e-38 +f74 1.175494353e-38 +f75 00000001.175494353e-38 +f76 00000001.175494353e-38 +f77 -1.175494349e-38 +f78 1.175494353e-38 +f79 00000001.175494353e-38 +f80 00000001.175494353e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494349e-38 +f95 1.17549e-38 +f96 1.175494353e-38 +f97 01.17549e-38 +f98 00000001.175494353e-38 +f99 01.17549e-38 +f100 00000001.175494353e-38 +f101 1000-01-02 +f102 838:59:57 +f103 1970-01-03 00:00:02 +f104 1970-01-03 00:00:02 +f105 1903 +f106 1903 +f107 1903 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 3 +f60 3 +f61 0000000003 +f62 0000000000000000000000000000000000000000000000000000000000000003 +f63 0000000003 +f64 0000000000000000000000000000000000000000000000000000000000000003 +f65 -3 +f66 2.200000000000000000000000000000 +f67 3 +f68 2.200000000000000000000000000000 +f69 0000000003 +f70 000000000000000000000000000000002.200000000000000000000000000000 +f71 0000000003 +f72 000000000000000000000000000000002.200000000000000000000000000000 +f73 -1.175494348e-38 +f74 1.175494354e-38 +f75 00000001.175494354e-38 +f76 00000001.175494354e-38 +f77 -1.175494348e-38 +f78 1.175494354e-38 +f79 00000001.175494354e-38 +f80 00000001.175494354e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494348e-38 +f95 1.17549e-38 +f96 1.175494354e-38 +f97 01.17549e-38 +f98 00000001.175494354e-38 +f99 01.17549e-38 +f100 00000001.175494354e-38 +f101 1000-01-03 +f102 838:59:56 +f103 1970-01-04 00:00:03 +f104 1970-01-04 00:00:03 +f105 1904 +f106 1904 +f107 1904 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 5 +f60 5 +f61 0000000005 +f62 0000000000000000000000000000000000000000000000000000000000000005 +f63 0000000005 +f64 0000000000000000000000000000000000000000000000000000000000000005 +f65 -1 +f66 4.400000000000000000000000000000 +f67 5 +f68 4.400000000000000000000000000000 +f69 0000000005 +f70 000000000000000000000000000000004.400000000000000000000000000000 +f71 0000000005 +f72 000000000000000000000000000000004.400000000000000000000000000000 +f73 -1.175494346e-38 +f74 1.175494356e-38 +f75 00000001.175494356e-38 +f76 00000001.175494356e-38 +f77 -1.175494346e-38 +f78 1.175494356e-38 +f79 00000001.175494356e-38 +f80 00000001.175494356e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494346e-38 +f95 1.17549e-38 +f96 1.175494356e-38 +f97 01.17549e-38 +f98 00000001.175494356e-38 +f99 01.17549e-38 +f100 00000001.175494356e-38 +f101 1000-01-05 +f102 838:59:54 +f103 1970-01-06 00:00:05 +f104 1970-01-06 00:00:05 +f105 1906 +f106 1906 +f107 1906 +f108 2enum +f109 1set,2set +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f59 6 +f60 6 +f61 0000000006 +f62 0000000000000000000000000000000000000000000000000000000000000006 +f63 0000000006 +f64 0000000000000000000000000000000000000000000000000000000000000006 +f65 0 +f66 5.500000000000000000000000000000 +f67 6 +f68 5.500000000000000000000000000000 +f69 0000000006 +f70 000000000000000000000000000000005.500000000000000000000000000000 +f71 0000000006 +f72 000000000000000000000000000000005.500000000000000000000000000000 +f73 -1.175494345e-38 +f74 1.175494357e-38 +f75 00000001.175494357e-38 +f76 00000001.175494357e-38 +f77 -1.175494345e-38 +f78 1.175494357e-38 +f79 00000001.175494357e-38 +f80 00000001.175494357e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494345e-38 +f95 1.17549e-38 +f96 1.175494357e-38 +f97 01.17549e-38 +f98 00000001.175494357e-38 +f99 01.17549e-38 +f100 00000001.175494357e-38 +f101 1000-01-06 +f102 838:59:53 +f103 1970-01-07 00:00:06 +f104 1970-01-07 00:00:06 +f105 1907 +f106 1907 +f107 1907 +f108 1enum +f109 1set +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f59 7 +f60 7 +f61 0000000007 +f62 0000000000000000000000000000000000000000000000000000000000000007 +f63 0000000007 +f64 0000000000000000000000000000000000000000000000000000000000000007 +f65 1 +f66 6.600000000000000000000000000000 +f67 7 +f68 6.600000000000000000000000000000 +f69 0000000007 +f70 000000000000000000000000000000006.600000000000000000000000000000 +f71 0000000007 +f72 000000000000000000000000000000006.600000000000000000000000000000 +f73 -1.175494344e-38 +f74 1.175494358e-38 +f75 00000001.175494358e-38 +f76 00000001.175494358e-38 +f77 -1.175494344e-38 +f78 1.175494358e-38 +f79 00000001.175494358e-38 +f80 00000001.175494358e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494344e-38 +f95 1.17549e-38 +f96 1.175494358e-38 +f97 01.17549e-38 +f98 00000001.175494358e-38 +f99 01.17549e-38 +f100 00000001.175494358e-38 +f101 1000-01-07 +f102 838:59:52 +f103 1970-01-08 00:00:07 +f104 1970-01-08 00:00:07 +f105 1908 +f106 1908 +f107 1908 +f108 2enum +f109 2set +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +f59 8 +f60 8 +f61 0000000008 +f62 0000000000000000000000000000000000000000000000000000000000000008 +f63 0000000008 +f64 0000000000000000000000000000000000000000000000000000000000000008 +f65 2 +f66 7.700000000000000000000000000000 +f67 8 +f68 7.700000000000000000000000000000 +f69 0000000008 +f70 000000000000000000000000000000007.700000000000000000000000000000 +f71 0000000008 +f72 000000000000000000000000000000007.700000000000000000000000000000 +f73 -1.175494343e-38 +f74 1.175494359e-38 +f75 00000001.175494359e-38 +f76 00000001.175494359e-38 +f77 -1.175494343e-38 +f78 1.175494359e-38 +f79 00000001.175494359e-38 +f80 00000001.175494359e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494343e-38 +f95 1.17549e-38 +f96 1.175494359e-38 +f97 01.17549e-38 +f98 00000001.175494359e-38 +f99 01.17549e-38 +f100 00000001.175494359e-38 +f101 1000-01-08 +f102 838:59:51 +f103 1970-01-09 00:00:08 +f104 1970-01-09 00:00:08 +f105 1909 +f106 1909 +f107 1909 +f108 1enum +f109 1set,2set +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f59 9 +f60 9 +f61 0000000009 +f62 0000000000000000000000000000000000000000000000000000000000000009 +f63 0000000009 +f64 0000000000000000000000000000000000000000000000000000000000000009 +f65 3 +f66 8.800000000000000000000000000000 +f67 9 +f68 8.800000000000000000000000000000 +f69 0000000009 +f70 000000000000000000000000000000008.800000000000000000000000000000 +f71 0000000009 +f72 000000000000000000000000000000008.800000000000000000000000000000 +f73 -1.175494342e-38 +f74 1.17549436e-38 +f75 000000001.17549436e-38 +f76 000000001.17549436e-38 +f77 -1.175494342e-38 +f78 1.17549436e-38 +f79 000000001.17549436e-38 +f80 000000001.17549436e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494342e-38 +f95 1.17549e-38 +f96 1.17549436e-38 +f97 01.17549e-38 +f98 000000001.17549436e-38 +f99 01.17549e-38 +f100 000000001.17549436e-38 +f101 1000-01-09 +f102 838:59:50 +f103 1970-01-10 00:00:09 +f104 1970-01-10 00:00:09 +f105 1910 +f106 1910 +f107 1910 +f108 2enum +f109 1set +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f59 10 +f60 10 +f61 0000000010 +f62 0000000000000000000000000000000000000000000000000000000000000010 +f63 0000000010 +f64 0000000000000000000000000000000000000000000000000000000000000010 +f65 4 +f66 9.900000000000000000000000000000 +f67 10 +f68 9.900000000000000000000000000000 +f69 0000000010 +f70 000000000000000000000000000000009.900000000000000000000000000000 +f71 0000000010 +f72 000000000000000000000000000000009.900000000000000000000000000000 +f73 -1.175494341e-38 +f74 1.175494361e-38 +f75 00000001.175494361e-38 +f76 00000001.175494361e-38 +f77 -1.175494341e-38 +f78 1.175494361e-38 +f79 00000001.175494361e-38 +f80 00000001.175494361e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494341e-38 +f95 1.17549e-38 +f96 1.175494361e-38 +f97 01.17549e-38 +f98 00000001.175494361e-38 +f99 01.17549e-38 +f100 00000001.175494361e-38 +f101 1000-01-10 +f102 838:59:49 +f103 1970-01-11 00:00:10 +f104 1970-01-11 00:00:10 +f105 1911 +f106 1911 +f107 1911 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 15 +f60 87 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 17 +f60 15 +f61 0000000016 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 19 +f60 18 +f61 0000000014 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 22 +f60 93 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 24 +f60 51654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 27 +f60 25 +f61 0000000026 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 29 +f60 28 +f61 0000000024 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 34 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 94 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 100 +f60 4 +f61 0000000004 +f62 0000000000000000000000000000000000000000000000000000000000000004 +f63 0000000004 +f64 0000000000000000000000000000000000000000000000000000000000000004 +f65 -2 +f66 3.300000000000000000000000000000 +f67 4 +f68 3.300000000000000000000000000000 +f69 0000000004 +f70 000000000000000000000000000000003.300000000000000000000000000000 +f71 0000000004 +f72 000000000000000000000000000000003.300000000000000000000000000000 +f73 -1.175494347e-38 +f74 1.175494355e-38 +f75 00000001.175494355e-38 +f76 00000001.175494355e-38 +f77 -1.175494347e-38 +f78 1.175494355e-38 +f79 00000001.175494355e-38 +f80 00000001.175494355e-38 +f81 -1.17549e-38 +f82 1.17549e-38 +f83 01.17549e-38 +f84 01.17549e-38 +f85 -1.17549e-38 +f86 -1.17549e-38 +f87 1.17549e-38 +f88 1.17549e-38 +f89 01.17549e-38 +f90 01.17549e-38 +f91 01.17549e-38 +f92 01.17549e-38 +f93 -1.17549e-38 +f94 -1.175494347e-38 +f95 1.17549e-38 +f96 1.175494355e-38 +f97 01.17549e-38 +f98 00000001.175494355e-38 +f99 01.17549e-38 +f100 00000001.175494355e-38 +f101 1000-01-04 +f102 838:59:55 +f103 1970-01-05 00:00:04 +f104 1970-01-05 00:00:04 +f105 1905 +f106 1905 +f107 1905 +f108 1enum +f109 2set +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +f59 100 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 107 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 107 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 109 +f60 108 +f61 0000000104 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 109 +f60 108 +f61 0000000104 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 195 +f60 87 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 207 +f60 205 +f61 0000000206 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 209 +f60 208 +f61 0000000204 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 242 +f60 79 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 250 +f60 87895654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 292 +f60 93 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 299 +f60 899 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 321 +f60 NULL +f61 0000000765 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 323 +f60 14376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 340 +f60 9984376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 394 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 424 +f60 89 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 441 +f60 16546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 500 +f60 NULL +f61 0000000900 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 660 +f60 876546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 987 +f60 41 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 2550 +f60 775654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 2760 +f60 985654 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 3330 +f60 764376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 3410 +f60 996546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 7876 +f60 74 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 9112 +f60 NULL +f61 0000008771 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 76710 +f60 226546 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 569300 +f60 9114376 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +drop view test.v1 ; +CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2; +SELECT * FROM test.v1 order by f59,f61 desc limit 20; +F59 f61 +1 0000000001 +2 0000000002 +3 0000000003 +5 0000000005 +6 0000000006 +7 0000000007 +8 0000000008 +9 0000000009 +10 0000000010 +15 NULL +17 0000000016 +19 0000000014 +22 NULL +24 NULL +27 0000000026 +29 0000000024 +34 NULL +94 NULL +100 0000000004 +100 NULL +drop view test.v1 ; + +Testcase 3.3.1.54 +-------------------------------------------------------------------------------- +USE test; +drop table if exists test.t1 ; +drop table if exists test.t2 ; +drop view if exists test.v1 ; +Create table t1 (f59 int, f60 int) ; +Create table t2 (f59 int, f60 int) ; +Insert into t1 values (1,10) ; +Insert into t1 values (2,20) ; +Insert into t1 values (47,80) ; +Insert into t2 values (1,1000) ; +Insert into t2 values (2,2000) ; +Insert into t2 values (31,97) ; +Create view test.v1 as select t1.f59, t1.f60 +from t1,t2 where t1.f59=t2.f59 ; +Select * from test.v1 order by f59 limit 50 ; +f59 f60 +1 10 +2 20 +drop table test.t1 ; +drop table test.t2 ; +drop view test.v1 ; + +Testcase 3.3.1.50 - 3.3.1.54 additional implementation +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1 ; +DROP VIEW IF EXISTS v1 ; +CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) ); +INSERT INTO t1 VALUES(1, 'one', 1.1); +INSERT INTO t1 VALUES(2, 'two', 2.2); +INSERT INTO t1 VALUES(3, 'three', 3.3); +CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +f1 f2 f3 +1 one 1.10000 +2 two 2.20000 +3 three 3.30000 +CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1; +SELECT * FROM v1; +f2 +one +two +three +CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2; +SELECT * FROM v1; +f1 f2 f3 +2 two 2.20000 +CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2; +SELECT * FROM v1; +f2 +two +SET sql_mode = 'traditional,ansi'; +CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", +3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", +'->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", +3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", +'->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " +FROM t1 WHERE f1 = 2; +ERROR 42000: Incorrect column name 'pure column f3: ' +SELECT * FROM v1; +pure column f3: 2.20000 +sum of columns f1 + f3 = 4.20000 +product of constants 3 * (- 0.11111E+1): -3.3333 +expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- +SET sql_mode = ''; + +Testcases 3.3.1.55 - 3.3.1.62 +-------------------------------------------------------------------------------- +Drop table if exists t1, t2 ; +Drop view if exists v1 ; +Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ; +Insert into t1 values (1, 'single', 3, '1') ; +Insert into t1 values (2, 'double', 6, '2') ; +Insert into t1 values (3, 'single-f3', 4, '3') ; +Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ; +Insert into t2 values (2, 'double', 6, '2') ; +Insert into t2 values (3, 'single-f3', 6, '3') ; +Insert into t2 values (4, 'single', 4, '4') ; +create or replace view test.v1 as +Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, +t1.f61 t1_f61, t2.f61 t2_f61 +from t1 inner join t2 where t1.f59 = t2.f59 ; +select * from test.v1 order by t1_f59 ; +t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 +2 2 double double 6 6 +3 3 single-f3 single-f3 4 6 +Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, +t1.f61 t1_f61, t2.f61 t2_f61 +from t1 inner join t2 where t1.f59 = t2.f59; +t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 +2 2 double double 6 6 +3 3 single-f3 single-f3 4 6 +Create or replace view test.v1 as +Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 +FROM t2 cross join t1; +Select * from v1 order by t1_f59,t2_f59; +t1_f59 t2_f59 +1 2 +1 3 +1 4 +2 2 +2 3 +2 4 +3 2 +3 3 +3 4 +Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 +FROM t2 cross join t1; +t1_f59 t2_f59 +1 2 +1 3 +1 4 +2 2 +2 3 +2 4 +3 2 +3 3 +3 4 +Create or replace view test.v1 as +Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 +FROM t2,t1; +Select * from v1 order by t1_f59,t2_f59; +t1_f59 t2_f59 +1 2 +1 3 +1 4 +2 2 +2 3 +2 4 +3 2 +3 3 +3 4 +Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 +FROM t2,t1; +t1_f59 t2_f59 +1 2 +1 3 +1 4 +2 2 +2 3 +2 4 +3 2 +3 3 +3 4 +Create or replace view test.v1 as +Select f59, f60, f61, a, b +FROM t2 natural join t1; +Select * from v1 order by f59; +f59 f60 f61 a b +2 double 6 2 2 +Select f59, f60, f61, a, b +FROM t2 natural join t1; +f59 f60 f61 a b +2 double 6 2 2 +Create or replace view test.v1 as +Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, +t1.f61 t1_f61, t2.f61 t2_f61 +FROM t2 left outer join t1 on t2.f59=t1.f59; +Select * from v1 order by t1_f59; +t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 +NULL 4 NULL single NULL 4 +2 2 double double 6 6 +3 3 single-f3 single-f3 4 6 +Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, +t1.f61 t1_f61, t2.f61 t2_f61 +FROM t2 left outer join t1 on t2.f59=t1.f59; +t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 +2 2 double double 6 6 +3 3 single-f3 single-f3 4 6 +NULL 4 NULL single NULL 4 +Create or replace view test.v1 as +Select f59, f60, f61, t1.a, t2.b +FROM t2 natural left outer join t1; +Select * from v1 order by f59; +f59 f60 f61 a b +2 double 6 2 2 +3 single-f3 6 NULL 3 +4 single 4 NULL 4 +Select f59, f60, f61, t1.a, t2.b +FROM t2 natural left outer join t1; +f59 f60 f61 a b +2 double 6 2 2 +3 single-f3 6 NULL 3 +4 single 4 NULL 4 +Create or replace view test.v1 as +Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, +t1.f61 t1_f61, t2.f61 t2_f61 +FROM t2 right outer join t1 on t2.f59=t1.f59; +Select * from v1 order by t1_f59; +t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 +1 NULL single NULL 3 NULL +2 2 double double 6 6 +3 3 single-f3 single-f3 4 6 +Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, +t1.f61 t1_f61, t2.f61 t2_f61 +FROM t2 right outer join t1 on t2.f59=t1.f59; +t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 +1 NULL single NULL 3 NULL +2 2 double double 6 6 +3 3 single-f3 single-f3 4 6 +Create or replace view test.v1 as +Select f59, f60, a, b +FROM t2 natural right outer join t1; +Select * from v1 order by f59 desc; +f59 f60 a b +3 single-f3 3 NULL +2 double 2 2 +1 single 1 NULL +Select f59, f60, a, b +FROM t2 natural right outer join t1; +f59 f60 a b +1 single 1 NULL +2 double 2 2 +3 single-f3 3 NULL +drop table t1, t2; +drop view v1 ; +Use test; + +Testcase 3.3.1.A1 - 3.3.1.A3 +-------------------------------------------------------------------------------- +Drop table if exists t1 ; +Drop view if exists v1; +Create table t1 (f59 int, f60 int, f61 int) ; +Insert into t1 values (101,201,301) ; +Insert into t1 values (107,501,601) ; +Insert into t1 values (901,801,401) ; +Create or replace view test.v1 as +Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ; +Select * from test.v1 order by f59 limit 0,10; +f59 +1 +2 +3 +5 +6 +7 +8 +9 +10 +15 +Drop view if exists test.v1 ; +Drop table if exists t1 ; +Drop view if exists v1; +Create table t1 (f59 int, f60 int, f61 int) ; +Insert into t1 values (201,201,201) ; +Insert into t1 values (207,201,201) ; +Insert into t1 values (201,201,201) ; +Create or replace view test.v1 +as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ; +Select * from test.v1 order by f59 limit 0,10; +f59 +207 +Drop view if exists test.v1 ; +Drop table if exists t1 ; +Drop view if exists v1; +Create table t1 (f59 int, f60 int, f61 int) ; +Insert into t1 values (21,21,21) ; +Insert into t1 values (27,21,21) ; +Insert into t1 values (21,21,21) ; +Create or replace view test.v1 +as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ; +Select * from test.v1 order by f59 limit 0,10; +f59 +27 +Drop view test.v1 ; + +Testcase 3.3.1.63 +-------------------------------------------------------------------------------- +Drop table if exists t1 ; +Drop view if exists test.v1 ; +Create table t1 (f59 int, f60 int, f61 int) ; +Insert into t1 values (11,21,31) ; +Insert into t1 values (17,51,61) ; +Insert into t1 values (91,81,41) ; +Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) +Union ALL (Select f59 from t1 where f59=17 ); +Select * from test.v1 order by f59 limit 0,10; +f59 +17 +17 +Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) +Union (Select f59 from t1 where f59=17 ); +Select * from test.v1 order by f59 limit 0,10; +f59 +17 +Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) +Union Distinct (Select f59 from t1 where f60=17 ); +Select * from test.v1 order by f59 limit 0,10; +f59 +17 +Drop view test.v1 ; +drop table if exists t1; +drop view if exists test.v1; +create table t1 (f59 int, f60 int, f61 int); +insert into t1 values (101,201,301); +insert into t1 values (107,501,601); +insert into t1 values (901,801,401); +create or replace view test.v1 as +select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59; +select * from test.v1 order by f59 limit 0,10; +f59 +107 +107 +create or replace view test.v1 as +(select f59 from tb2 where f59=107 ) +union all +(select f59 from t1 where f59=107 ); +select * from test.v1 order by f59 limit 0,10; +f59 +107 +107 +107 +create or replace view test.v1 as +(select f59 from tb2 where f59=107 ) +union +(select f59 from t1 where f59=107 ); +select * from test.v1 order by f59 limit 0,10; +f59 +107 +create or replace view test.v1 as +(select f59 from tb2 where f59=107 ) +union distinct +(select f59 from t1 where f59=107 ); +select * from test.v1 order by f59 limit 0,10; +f59 +107 +drop view if exists test.v1 ; +drop table t1; + +Testcase 3.3.1.64 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT F59 +FROM test.tb2 where test.tb2.F59 = 109; +SELECT * FROM test.v1 order by f59 limit 0,10; +F59 +109 +109 +ALTER VIEW test.v1 AS SELECT * +FROM test.tb2 WHERE test.tb2.f59 = 242 ; +SELECT * FROM test.v1 order by f59 limit 0,10; +f59 242 +f60 79 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +Drop view test.v1 ; + +Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS test.v1 ; +CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = myisam ; +CREATE VIEW v1 AS SELECT f1 FROM t1; +DROP VIEW v1; +DROP VIEW v1; +ERROR 42S02: Unknown table 'v1' +CREATE VIEW v1 AS SELECT f1 FROM t1; +DROP VIEW IF EXISTS v1; +DROP VIEW IF EXISTS v1; +Warnings: +Note 1051 Unknown table 'test.v1' + +Testcase 3.3.1.68 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1_base ; +DROP VIEW IF EXISTS v1_top ; +CREATE TABLE t1 ( f1 DOUBLE); +CREATE VIEW v1_base AS SELECT * FROM t1; +CREATE VIEW v1_top AS SELECT * FROM v1_base; +DROP VIEW v1_top ; +DROP VIEW v1_top; +ERROR 42S02: Unknown table 'v1_top' +CREATE VIEW v1_top AS SELECT * FROM v1_base; +DROP VIEW v1_base ; +DROP VIEW v1_base; +ERROR 42S02: Unknown table 'v1_base' +DROP VIEW v1_top; +CREATE VIEW v1_base AS SELECT * FROM t1; +CREATE VIEW v1_top AS SELECT * FROM v1_base; +DROP VIEW v1_top CASCADE ; +DROP VIEW v1_top; +ERROR 42S02: Unknown table 'v1_top' +CREATE VIEW v1_top AS SELECT * FROM v1_base; +DROP VIEW v1_base CASCADE ; +DROP VIEW v1_base; +ERROR 42S02: Unknown table 'v1_base' +DROP VIEW v1_top; +CREATE VIEW v1_base AS SELECT * FROM t1; +CREATE VIEW v1_top AS SELECT * FROM v1_base; +DROP VIEW v1_top RESTRICT ; +DROP VIEW v1_top; +ERROR 42S02: Unknown table 'v1_top' +CREATE VIEW v1_top AS SELECT * FROM v1_base; +DROP VIEW v1_base RESTRICT ; +DROP VIEW v1_base; +ERROR 42S02: Unknown table 'v1_base' +DROP VIEW v1_top; + +Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1 ; +DROP VIEW IF EXISTS v1 ; +CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = myisam; +CREATE VIEW v1 AS SELECT * FROM t1; +DROP VIEW v1 ; +SELECT * FROM v1 ; +ERROR 42S02: Table 'test.v1' doesn't exist +SHOW CREATE VIEW v1 ; +ERROR 42S02: Table 'test.v1' doesn't exist +SHOW CREATE TABLE v1 ; +ERROR 42S02: Table 'test.v1' doesn't exist +SHOW TABLE STATUS like 'v1' ; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +SHOW TABLES LIKE 'v1'; +Tables_in_test (v1) +SHOW COLUMNS FROM v1; +ERROR 42S02: Table 'test.v1' doesn't exist +SHOW FIELDS FROM v1; +ERROR 42S02: Table 'test.v1' doesn't exist +CHECK TABLE v1; +Table Op Msg_type Msg_text +test.v1 check Error Table 'test.v1' doesn't exist +test.v1 check status Operation failed +DESCRIBE v1; +ERROR 42S02: Table 'test.v1' doesn't exist +EXPLAIN SELECT * FROM v1; +ERROR 42S02: Table 'test.v1' doesn't exist +Use test; + +Testcase 3.3.1.A6 +-------------------------------------------------------------------------------- +DROP DATABASE IF EXISTS test3; +CREATE DATABASE test3; +CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = myisam; +INSERT INTO test3.t1 SET f1 = 1.0; +CREATE VIEW test3.v0 AS SELECT * FROM test3.t1; +CREATE VIEW test3.v1 AS SELECT * FROM test3.v0; +CREATE VIEW test3.v2 AS SELECT * FROM test3.v1; +CREATE VIEW test3.v3 AS SELECT * FROM test3.v2; +CREATE VIEW test3.v4 AS SELECT * FROM test3.v3; +CREATE VIEW test3.v5 AS SELECT * FROM test3.v4; +CREATE VIEW test3.v6 AS SELECT * FROM test3.v5; +CREATE VIEW test3.v7 AS SELECT * FROM test3.v6; +CREATE VIEW test3.v8 AS SELECT * FROM test3.v7; +CREATE VIEW test3.v9 AS SELECT * FROM test3.v8; +CREATE VIEW test3.v10 AS SELECT * FROM test3.v9; +CREATE VIEW test3.v11 AS SELECT * FROM test3.v10; +CREATE VIEW test3.v12 AS SELECT * FROM test3.v11; +CREATE VIEW test3.v13 AS SELECT * FROM test3.v12; +CREATE VIEW test3.v14 AS SELECT * FROM test3.v13; +CREATE VIEW test3.v15 AS SELECT * FROM test3.v14; +CREATE VIEW test3.v16 AS SELECT * FROM test3.v15; +CREATE VIEW test3.v17 AS SELECT * FROM test3.v16; +CREATE VIEW test3.v18 AS SELECT * FROM test3.v17; +CREATE VIEW test3.v19 AS SELECT * FROM test3.v18; +CREATE VIEW test3.v20 AS SELECT * FROM test3.v19; +CREATE VIEW test3.v21 AS SELECT * FROM test3.v20; +CREATE VIEW test3.v22 AS SELECT * FROM test3.v21; +CREATE VIEW test3.v23 AS SELECT * FROM test3.v22; +CREATE VIEW test3.v24 AS SELECT * FROM test3.v23; +CREATE VIEW test3.v25 AS SELECT * FROM test3.v24; +CREATE VIEW test3.v26 AS SELECT * FROM test3.v25; +CREATE VIEW test3.v27 AS SELECT * FROM test3.v26; +CREATE VIEW test3.v28 AS SELECT * FROM test3.v27; +CREATE VIEW test3.v29 AS SELECT * FROM test3.v28; +CREATE VIEW test3.v30 AS SELECT * FROM test3.v29; +CREATE VIEW test3.v31 AS SELECT * FROM test3.v30; +CREATE VIEW test3.v32 AS SELECT * FROM test3.v31; +SHOW CREATE VIEW test3.v32; +View Create View character_set_client collation_connection +v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci +SELECT * FROM test3.v32; +f1 +1.000 +EXPLAIN SELECT * FROM test3.v32; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +DROP VIEW test3.v0; +SHOW CREATE VIEW test3.v32; +View Create View character_set_client collation_connection +v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci +Warnings: +Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +SELECT * FROM test3.v32; +ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +EXPLAIN SELECT * FROM test3.v32; +ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them + +FIXME - Setting join_limit to 28 - hangs for higher values +---------------------------------------------------------- +SET @join_limit = 28; +SET @max_level = @join_limit - 1; +DROP DATABASE IF EXISTS test3; +DROP TABLE IF EXISTS test1.t1; +DROP TABLE IF EXISTS test2.t1; +DROP VIEW IF EXISTS test1.v27; +DROP VIEW IF EXISTS test1.v26; +DROP VIEW IF EXISTS test1.v25; +DROP VIEW IF EXISTS test1.v24; +DROP VIEW IF EXISTS test1.v23; +DROP VIEW IF EXISTS test1.v22; +DROP VIEW IF EXISTS test1.v21; +DROP VIEW IF EXISTS test1.v20; +DROP VIEW IF EXISTS test1.v19; +DROP VIEW IF EXISTS test1.v18; +DROP VIEW IF EXISTS test1.v17; +DROP VIEW IF EXISTS test1.v16; +DROP VIEW IF EXISTS test1.v15; +DROP VIEW IF EXISTS test1.v14; +DROP VIEW IF EXISTS test1.v13; +DROP VIEW IF EXISTS test1.v12; +DROP VIEW IF EXISTS test1.v11; +DROP VIEW IF EXISTS test1.v10; +DROP VIEW IF EXISTS test1.v9; +DROP VIEW IF EXISTS test1.v8; +DROP VIEW IF EXISTS test1.v7; +DROP VIEW IF EXISTS test1.v6; +DROP VIEW IF EXISTS test1.v5; +DROP VIEW IF EXISTS test1.v4; +DROP VIEW IF EXISTS test1.v3; +DROP VIEW IF EXISTS test1.v2; +DROP VIEW IF EXISTS test1.v1; +DROP VIEW IF EXISTS test1.v0; +CREATE DATABASE test3; +USE test1; +CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = myisam ; +INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); +INSERT INTO t1 VALUES (0, NULL); +INSERT INTO t1 VALUES (5, 'five'); +INSERT INTO t1 VALUES (1, 'one'); +INSERT INTO t1 VALUES (2, 'two'); +USE test2; +CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = myisam; +INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); +INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL); +INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five'); +INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one'); +INSERT INTO t1 VALUES (3.000000000000000, 'three'); +USE test3; +CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = myisam; +INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); +INSERT INTO t1 VALUES (+0.0E-35, NULL); +INSERT INTO t1 VALUES (+0.5E+1, 'five'); +INSERT INTO t1 VALUES (20.0E-1, 'two'); +INSERT INTO t1 VALUES (0.0300E2, 'three'); +USE test; +CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1; +CREATE OR REPLACE VIEW test1.v1 AS SELECT f1, f2 +FROM test2.t1 tab1 NATURAL JOIN test1.v0 tab2; +CREATE OR REPLACE VIEW test1.v2 AS SELECT f1, f2 +FROM test3.t1 tab1 NATURAL JOIN test1.v1 tab2; +CREATE OR REPLACE VIEW test1.v3 AS SELECT f1, f2 +FROM test1.t1 tab1 NATURAL JOIN test1.v2 tab2; +CREATE OR REPLACE VIEW test1.v4 AS SELECT f1, f2 +FROM test2.t1 tab1 NATURAL JOIN test1.v3 tab2; +CREATE OR REPLACE VIEW test1.v5 AS SELECT f1, f2 +FROM test3.t1 tab1 NATURAL JOIN test1.v4 tab2; +CREATE OR REPLACE VIEW test1.v6 AS SELECT f1, f2 +FROM test1.t1 tab1 NATURAL JOIN test1.v5 tab2; +CREATE OR REPLACE VIEW test1.v7 AS SELECT f1, f2 +FROM test2.t1 tab1 NATURAL JOIN test1.v6 tab2; +CREATE OR REPLACE VIEW test1.v8 AS SELECT f1, f2 +FROM test3.t1 tab1 NATURAL JOIN test1.v7 tab2; +CREATE OR REPLACE VIEW test1.v9 AS SELECT f1, f2 +FROM test1.t1 tab1 NATURAL JOIN test1.v8 tab2; +CREATE OR REPLACE VIEW test1.v10 AS SELECT f1, f2 +FROM test2.t1 tab1 NATURAL JOIN test1.v9 tab2; +CREATE OR REPLACE VIEW test1.v11 AS SELECT f1, f2 +FROM test3.t1 tab1 NATURAL JOIN test1.v10 tab2; +CREATE OR REPLACE VIEW test1.v12 AS SELECT f1, f2 +FROM test1.t1 tab1 NATURAL JOIN test1.v11 tab2; +CREATE OR REPLACE VIEW test1.v13 AS SELECT f1, f2 +FROM test2.t1 tab1 NATURAL JOIN test1.v12 tab2; +CREATE OR REPLACE VIEW test1.v14 AS SELECT f1, f2 +FROM test3.t1 tab1 NATURAL JOIN test1.v13 tab2; +CREATE OR REPLACE VIEW test1.v15 AS SELECT f1, f2 +FROM test1.t1 tab1 NATURAL JOIN test1.v14 tab2; +CREATE OR REPLACE VIEW test1.v16 AS SELECT f1, f2 +FROM test2.t1 tab1 NATURAL JOIN test1.v15 tab2; +CREATE OR REPLACE VIEW test1.v17 AS SELECT f1, f2 +FROM test3.t1 tab1 NATURAL JOIN test1.v16 tab2; +CREATE OR REPLACE VIEW test1.v18 AS SELECT f1, f2 +FROM test1.t1 tab1 NATURAL JOIN test1.v17 tab2; +CREATE OR REPLACE VIEW test1.v19 AS SELECT f1, f2 +FROM test2.t1 tab1 NATURAL JOIN test1.v18 tab2; +CREATE OR REPLACE VIEW test1.v20 AS SELECT f1, f2 +FROM test3.t1 tab1 NATURAL JOIN test1.v19 tab2; +SHOW CREATE VIEW test1.v20; +View Create View character_set_client collation_connection +v20 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v20` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v19` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci +SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v20; +f1 f2 +5 five + +The output of following EXPLAIN is deactivated, because the result +differs on some platforms +FIXME Is this a bug ? +-------------------------------------------------------------------------------- +EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v20; +CREATE VIEW test1.v21 AS SELECT f1, f2 +FROM test3.t1 tab1 NATURAL JOIN test1.v20 tab2; +SHOW CREATE VIEW test1.v21; +View Create View character_set_client collation_connection +v21 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v21` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v20` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci +SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v21; +f1 f2 +5 five + +The output of following EXPLAIN is deactivated, because the result +differs on some platforms +FIXME Is this a bug ? +-------------------------------------------------------------------------------- +EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v21; +DROP VIEW IF EXISTS test1.v21; +CREATE OR REPLACE VIEW test1.v0 AS +SELECT f1 as f2, f2 as f1 FROM test2.t1; +CREATE OR REPLACE VIEW test2.v0 AS +SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1; +SHOW CREATE VIEW test1.v20; +SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v20; +EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v20; +CREATE OR REPLACE VIEW test3.v0 AS +SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1; +SHOW CREATE VIEW test1.v20; +SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v20; +EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v20; +CREATE OR REPLACE VIEW test3.v0 AS +SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1; +SHOW CREATE VIEW test1.v20; +SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v20; +EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, +CAST(f2 AS CHAR) AS f2 FROM test1.v20; +DROP VIEW IF EXISTS test1.v20; +DROP VIEW IF EXISTS test1.v19; +DROP VIEW IF EXISTS test1.v18; +DROP VIEW IF EXISTS test1.v17; +DROP VIEW IF EXISTS test1.v16; +DROP VIEW IF EXISTS test1.v15; +DROP VIEW IF EXISTS test1.v14; +DROP VIEW IF EXISTS test1.v13; +DROP VIEW IF EXISTS test1.v12; +DROP VIEW IF EXISTS test1.v11; +DROP VIEW IF EXISTS test1.v10; +DROP VIEW IF EXISTS test1.v9; +DROP VIEW IF EXISTS test1.v8; +DROP VIEW IF EXISTS test1.v7; +DROP VIEW IF EXISTS test1.v6; +DROP VIEW IF EXISTS test1.v5; +DROP VIEW IF EXISTS test1.v4; +DROP VIEW IF EXISTS test1.v3; +DROP VIEW IF EXISTS test1.v2; +DROP VIEW IF EXISTS test1.v1; +DROP VIEW IF EXISTS test1.v0; +DROP DATABASE test3; +DROP TABLE test1.t1; +DROP TABLE test2.t1; +Use test; + +Testcase 3.3.2.1 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ; +INSERT INTO test.v1 (f59,f60) values (879,700) ; +affected rows: 1 +SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ; +f59 f60 +DELETE FROM tb2 where f59 = 879 and f60 = 700 ; +Drop view test.v1 ; + +Testcase 3.3.2.2 +-------------------------------------------------------------------------------- +Drop view if exists test.v1 ; +Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ; +INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ; +affected rows: 1 +SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ; +f59 2005 +f60 101 +f61 NULL +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ; +f59 f60 +2005 101 +DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ; +Drop view test.v1 ; + +Testcase 3.3.2.3 +-------------------------------------------------------------------------------- +Insert into tb2 (f59,f60,f61) values (780,105,106) ; +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; +UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +SELECT * FROM tb2 where f59 = 8 and f60 = 105; +f59 8 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ; +f59 f60 +8 105 +Drop view test.v1 ; + +Testcase 3.3.2.4 +-------------------------------------------------------------------------------- +Insert into tb2 (f59,f60,f61) values (781,105,106) ; +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; +UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ; +affected rows: 4 +info: Rows matched: 4 Changed: 4 Warnings: 0 +SELECT * FROM tb2 where f59 = 891 and f60 = 105; +f59 891 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 891 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 891 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +f59 891 +f60 105 +f61 0000000106 +f62 NULL +f63 NULL +f64 NULL +f65 NULL +f66 NULL +f67 NULL +f68 NULL +f69 NULL +f70 NULL +f71 NULL +f72 NULL +f73 NULL +f74 NULL +f75 NULL +f76 NULL +f77 7.7 +f78 7.7 +f79 00000000000000000007.7 +f80 00000000000000000008.8 +f81 8.8 +f82 8.8 +f83 0000000008.8 +f84 0000000008.8 +f85 8.8 +f86 8.8 +f87 8.8 +f88 8.8 +f89 0000000008.8 +f90 0000000008.8 +f91 0000000008.8 +f92 0000000008.8 +f93 8.8 +f94 8.8 +f95 8.8 +f96 8.8 +f97 0000000008.8 +f98 00000000000000000008.8 +f99 0000000008.8 +f100 00000000000000000008.8 +f101 2000-01-01 +f102 00:00:20 +f103 0002-02-02 00:00:00 +f104 2000-12-31 23:59:59 +f105 2000 +f106 2000 +f107 2000 +f108 1enum +f109 1set +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ; +f59 f60 +891 105 +891 105 +891 105 +891 105 +Drop view test.v1 ; + +Testcase 3.3.2.5 +-------------------------------------------------------------------------------- +Insert into tb2 (f59,f60,f61) values (789,105,106) ; +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ; +DELETE FROM test.v1 where f59 = 789 ; +affected rows: 1 +SELECT * FROM tb2 where f59 = 789 ; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ; +f59 f60 +Drop view test.v1 ; + +Testcase 3.3.2.6 +-------------------------------------------------------------------------------- +Insert into tb2 (f59,f60,f61) values (711,105,106) ; +Drop view if exists test.v1 ; +CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711 ; +DELETE FROM test.v1 where f59 = 711 ; +affected rows: 1 +SELECT * FROM tb2 where f59 = 711 ; +f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 +SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ; +f59 f60 +Drop view test.v1 ; + +Testcase 3.3.2.1 - 3.3.2.6 alternative implementation +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4), +f4 CHAR, PRIMARY KEY(f1)); +CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1; +INSERT INTO v1 SET f1 = 1; +SELECT * from t1; +f1 f2 f3 f4 +1 NULL NULL NULL +DELETE FROM t1; +INSERT INTO v1 SET f2 = 'ABC'; +INSERT INTO v1 SET f2 = 'ABC'; +ERROR 23000: Duplicate entry '0' for key 'PRIMARY' +SELECT * from t1; +f1 f2 f3 f4 +0 ABC NULL NULL +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1 WHERE f1 = 1; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1 WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2 WHERE f1 = 1; +SELECT * from t1; +f1 f2 f3 f4 +2 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +2 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2; +SELECT * from t1; +f1 f2 f3 f4 +2 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN'; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +2 NNN -0.0012 X +DELETE FROM t1; +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f2, f3 FROM t1; +INSERT INTO v1 SET f2 = 'ABC'; +INSERT INTO v1 SET f2 = 'ABC'; +ERROR 23000: Duplicate entry '0' for key 'PRIMARY' +SELECT * from t1; +f1 f2 f3 f4 +0 ABC NULL NULL +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1 WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN'; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1; +INSERT INTO v1 SET f1 = 1; +ERROR HY000: The target table v1 of the INSERT is not insertable-into +SELECT * from t1; +f1 f2 f3 f4 +DELETE FROM t1; +INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO'; +ERROR HY000: The target table v1 of the INSERT is not insertable-into +SELECT * from t1; +f1 f2 f3 f4 +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1 WHERE f1 = 1; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1 WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1 WHERE my_greeting = 'HELLO'; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1; +SELECT * from t1; +f1 f2 f3 f4 +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2 WHERE f1 = 1; +SELECT * from t1; +f1 f2 f3 f4 +2 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +2 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO'; +SELECT * from t1; +f1 f2 f3 f4 +2 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2; +SELECT * from t1; +f1 f2 f3 f4 +2 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO'; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f2 = 'NNN'; +SELECT * from t1; +f1 f2 f3 f4 +1 NNN -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1; +ERROR HY000: Column 'my_greeting' is not updatable +SELECT * from t1; +f1 f2 f3 f4 +1 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC'; +ERROR HY000: Column 'my_greeting' is not updatable +SELECT * from t1; +f1 f2 f3 f4 +1 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO'; +ERROR HY000: Column 'my_greeting' is not updatable +SELECT * from t1; +f1 f2 f3 f4 +1 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET my_greeting = 'Hej'; +ERROR HY000: Column 'my_greeting' is not updatable +SELECT * from t1; +f1 f2 f3 f4 +1 ABC -0.0012 X +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +2 NNN -0.0012 X +DELETE FROM t1; +DROP TABLE t1; +SET sql_mode = 'traditional'; +CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL, +f4 CHAR, PRIMARY KEY(f1)); +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1; +INSERT INTO v1 SET f1 = 1; +ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value +SELECT * from t1; +f1 f2 f3 f4 +DELETE FROM t1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +DELETE FROM v1 WHERE f1 = 1; +INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); +UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC'; +SELECT * from t1; +f1 f2 f3 f4 +1 ABC -0.0012 Y +DELETE FROM t1; +SET sql_mode = ''; + +Testcases 3.3.2.7 - 3.3.2.9, +3.3.2.10 - 3.3.2.11 omitted because of missing +features EXCEPT and INTERSECT +-------------------------------------------------------------------------------- +INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ; +INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ; +DROP TABLE IF EXISTS t1 ; +DROP VIEW IF EXISTS v1 ; +CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ; +INSERT INTO t1 VALUES (19,41,32) ; +INSERT INTO t1 VALUES (59,54,71) ; +INSERT INTO t1 VALUES (21,91,99) ; +SET @variant1 = 'UNION '; +SET @variant2 = 'UNION ALL '; +SET @variant3 = 'UNION DISTINCT '; +SET @variant4 = 'EXCEPT '; +SET @variant5 = 'INTERSECT '; +CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION DISTINCT SELECT f61 FROM t1 WHERE f59=19; +INSERT INTO v1 VALUES (3000); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61 = 100 WHERE f61 = 32; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1 ; +CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION ALL SELECT f61 FROM t1 WHERE f59=19; +INSERT INTO v1 VALUES (3000); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61 = 100 WHERE f61 = 32; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1 ; +CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION SELECT f61 FROM t1 WHERE f59=19; +INSERT INTO v1 VALUES (3000); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61 = 100 WHERE f61 = 32; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1 ; + +Testcases 3.3.2.12 - 3.3.2.20 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1, t2 ; +DROP VIEW IF EXISTS test.v1 ; +Drop view if exists v2 ; +CREATE TABLE t1 (f59 int, f60 int, f61 int) ; +INSERT INTO t1 VALUES (19,41,32) ; +INSERT INTO t1 VALUES (59,54,71) ; +INSERT INTO t1 VALUES (21,91,99) ; +CREATE TABLE t2 (f59 int, f60 int, f61 int) ; +INSERT INTO t2 VALUES (19,41,32) ; +INSERT INTO t2 VALUES (59,54,71) ; +INSERT INTO t2 VALUES (21,91,99) ; +CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5; +SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1'; +SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1'; +SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1'; +SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61'; +SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0'; +SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1'; +SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2'; +SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; +SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; +CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1; +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1); +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f61 FROM v2; +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1; +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0; +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61; +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1; +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1; +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1; +INSERT INTO v1 VALUES (1002); +ERROR HY000: The target table v1 of the INSERT is not insertable-into +UPDATE v1 SET f61=1007; +ERROR HY000: The target table v1 of the UPDATE is not updatable +DELETE FROM v1; +ERROR HY000: The target table v1 of the DELETE is not updatable +DROP VIEW v1; +Drop TABLE t1, t2 ; +Drop VIEW v2 ; + +Testcases 3.3.A1 +-------------------------------------------------------------------------------- +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP VIEW IF EXISTS v1; +DROP VIEW IF EXISTS v2; +CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5), +report char(10)) ENGINE = myisam; +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0'; +INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0'; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4 char(5) YES NULL +report char(10) YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4 char(5) YES NULL +report char(10) YES NULL +SELECT * FROM t1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +SELECT * FROM v1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5); +INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1'; +INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1'; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a'; +ERROR 42S22: Unknown column 'f4x' in 'field list' +INSERT INTO v1 SET f1 = 0, report = 'v1 1b'; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +DESCRIBE t1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4x char(5) YES NULL +report char(10) YES NULL +DESCRIBE v1; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +SELECT * FROM t1 order by f1, report; +f1 f2 f4x report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +SELECT * FROM v1 order by f1, report; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5); +ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10); +INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2'; +INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2'; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4 char(10) YES NULL +report char(10) YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4 char(10) YES NULL +report char(10) YES NULL +SELECT * FROM t1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 --> t1 2 +2 NULL <-- 10 --> v1 2 +SELECT * FROM v1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 --> t1 2 +2 NULL <-- 10 --> v1 2 +ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); +Warnings: +Warning 1265 Data truncated for column 'f4' at row +Warning 1265 Data truncated for column 'f4' at row +INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; +Warnings: +Warning 1265 Data truncated for column 'f4' at row 1 +INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3'; +Warnings: +Warning 1265 Data truncated for column 'f4' at row 1 +DESCRIBE t1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4 char(8) YES NULL +report char(10) YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4 char(8) YES NULL +report char(10) YES NULL +SELECT * FROM t1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +SELECT * FROM v1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20); +INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4'; +INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4'; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 date YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +SELECT * FROM t1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +4 NULL <------ 20 --------> t1 4 +4 NULL <------ 20 --------> v1 4 +SELECT * FROM v1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +4 NULL <------ 20 --------> t1 4 +4 NULL <------ 20 --------> v1 4 +ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30); +INSERT INTO t1 SET f1 = '<------------- 30 ----------->', +f4 = '<------ 20 -------->', report = 't1 5'; +INSERT INTO v1 SET f1 = '<------------- 30 ----------->', +f4 = '<------ 20 -------->', report = 'v1 5'; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f2 date YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f2 date YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +SELECT * FROM t1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +4 NULL <------ 20 --------> t1 4 +4 NULL <------ 20 --------> v1 4 +<------------- 30 -----------> NULL <------ 20 --------> t1 5 +<------------- 30 -----------> NULL <------ 20 --------> v1 5 +SELECT * FROM v1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +4 NULL <------ 20 --------> t1 4 +4 NULL <------ 20 --------> v1 4 +<------------- 30 -----------> NULL <------ 20 --------> t1 5 +<------------- 30 -----------> NULL <------ 20 --------> v1 5 +ALTER TABLE t1 DROP COLUMN f2; +INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6'; +INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6'; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +DESCRIBE t1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +DESCRIBE v1; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +SELECT * FROM t1 order by f1, report; +f1 f4 report +-1 ABC t1 0 +-1 ABC v1 0 +0 ABC t1 1 +2 <-- 10 - t1 2 +2 <-- 10 - v1 2 +3 <-- 10 - t1 3 +3 <-- 10 - v1 3 +4 <------ 20 --------> t1 4 +4 <------ 20 --------> v1 4 +<------------- 30 -----------> <------ 20 --------> t1 5 +<------------- 30 -----------> <------ 20 --------> v1 5 +ABC <------ 20 --------> t1 6 +SELECT * FROM v1 order by f1, report; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL; +INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04', +f4 = '<------ 20 -------->', report = 't1 7'; +INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04', +f4 = '<------ 20 -------->', report = 'v1 7'; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +f2 date YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f2 date YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +SELECT * FROM t1 order by f1, report; +f1 f4 report f2 +-1 ABC t1 0 NULL +-1 ABC v1 0 NULL +0 ABC t1 1 NULL +2 <-- 10 - t1 2 NULL +2 <-- 10 - v1 2 NULL +3 <-- 10 - t1 3 NULL +3 <-- 10 - v1 3 NULL +4 <------ 20 --------> t1 4 NULL +4 <------ 20 --------> v1 4 NULL +<------------- 30 -----------> <------ 20 --------> t1 5 NULL +<------------- 30 -----------> <------ 20 --------> v1 5 NULL +ABC <------ 20 --------> t1 6 NULL +ABC <------ 20 --------> t1 7 1500-12-04 +ABC <------ 20 --------> v1 7 1500-12-04 +SELECT * FROM v1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +4 NULL <------ 20 --------> t1 4 +4 NULL <------ 20 --------> v1 4 +<------------- 30 -----------> NULL <------ 20 --------> t1 5 +<------------- 30 -----------> NULL <------ 20 --------> v1 5 +ABC NULL <------ 20 --------> t1 6 +ABC 1500-12-04 <------ 20 --------> t1 7 +ABC 1500-12-04 <------ 20 --------> v1 7 +ALTER TABLE t1 DROP COLUMN f2; +ALTER TABLE t1 ADD COLUMN f2 FLOAT; +INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, +f4 = '<------ 20 -------->', report = 't1 8'; +INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, +f4 = '<------ 20 -------->', report = 'v1 8'; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +f2 float YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f2 float YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +SELECT * FROM t1 order by f1, report; +f1 f4 report f2 +-1 ABC t1 0 NULL +-1 ABC v1 0 NULL +0 ABC t1 1 NULL +2 <-- 10 - t1 2 NULL +2 <-- 10 - v1 2 NULL +3 <-- 10 - t1 3 NULL +3 <-- 10 - v1 3 NULL +4 <------ 20 --------> t1 4 NULL +4 <------ 20 --------> v1 4 NULL +<------------- 30 -----------> <------ 20 --------> t1 5 NULL +<------------- 30 -----------> <------ 20 --------> v1 5 NULL +ABC <------ 20 --------> t1 6 NULL +ABC <------ 20 --------> t1 7 NULL +ABC <------ 20 --------> t1 8 -0.00033 +ABC <------ 20 --------> v1 7 NULL +ABC <------ 20 --------> v1 8 -0.00033 +SELECT * FROM v1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +4 NULL <------ 20 --------> t1 4 +4 NULL <------ 20 --------> v1 4 +<------------- 30 -----------> NULL <------ 20 --------> t1 5 +<------------- 30 -----------> NULL <------ 20 --------> v1 5 +ABC NULL <------ 20 --------> t1 6 +ABC NULL <------ 20 --------> t1 7 +ABC -0.00033 <------ 20 --------> t1 8 +ABC NULL <------ 20 --------> v1 7 +ABC -0.00033 <------ 20 --------> v1 8 +ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2); +INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, +f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9'; +INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, +f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9'; +ERROR 42S22: Unknown column 'f3' in 'field list' +INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, +f4 = '<------ 20 -------->', report = 'v1 9a'; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +f2 float YES NULL +f3 decimal(7,2) YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 varchar(30) YES NULL +f2 float YES NULL +f4 varchar(20) YES NULL +report char(10) YES NULL +SELECT * FROM t1 order by f1, report; +f1 f4 report f2 f3 +-1 ABC t1 0 NULL NULL +-1 ABC v1 0 NULL NULL +0 ABC t1 1 NULL NULL +2 <-- 10 - t1 2 NULL NULL +2 <-- 10 - v1 2 NULL NULL +3 <-- 10 - t1 3 NULL NULL +3 <-- 10 - v1 3 NULL NULL +4 <------ 20 --------> t1 4 NULL NULL +4 <------ 20 --------> v1 4 NULL NULL +<------------- 30 -----------> <------ 20 --------> t1 5 NULL NULL +<------------- 30 -----------> <------ 20 --------> v1 5 NULL NULL +ABC <------ 20 --------> t1 6 NULL NULL +ABC <------ 20 --------> t1 7 NULL NULL +ABC <------ 20 --------> t1 8 -0.00033 NULL +ABC <------ 20 --------> t1 9 -0.00033 -2.20 +ABC <------ 20 --------> v1 7 NULL NULL +ABC <------ 20 --------> v1 8 -0.00033 NULL +ABC <------ 20 --------> v1 9a -0.00033 NULL +SELECT * FROM v1 order by f1, report; +f1 f2 f4 report +-1 NULL ABC t1 0 +-1 NULL ABC v1 0 +0 NULL ABC t1 1 +2 NULL <-- 10 - t1 2 +2 NULL <-- 10 - v1 2 +3 NULL <-- 10 - t1 3 +3 NULL <-- 10 - v1 3 +4 NULL <------ 20 --------> t1 4 +4 NULL <------ 20 --------> v1 4 +<------------- 30 -----------> NULL <------ 20 --------> t1 5 +<------------- 30 -----------> NULL <------ 20 --------> v1 5 +ABC NULL <------ 20 --------> t1 6 +ABC NULL <------ 20 --------> t1 7 +ABC -0.00033 <------ 20 --------> t1 8 +ABC -0.00033 <------ 20 --------> t1 9 +ABC NULL <------ 20 --------> v1 7 +ABC -0.00033 <------ 20 --------> v1 8 +ABC -0.00033 <------ 20 --------> v1 9a +DROP TABLE t1; +DROP VIEW v1; +CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = myisam; +INSERT INTO t1 SET f1 = 'ABC', f2 = 3; +CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 char(10) YES NULL +f2 bigint(20) YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 char(10) YES NULL +my_sqrt double YES NULL +SELECT * FROM t1 order by f1, f2; +f1 f2 +ABC 3 +SELECT * FROM v1 order by 2; +f1 my_sqrt +ABC 1.73205080756888 +ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30); +INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF'; +DESCRIBE t1; +Field Type Null Key Default Extra +f1 char(10) YES NULL +f2 varchar(30) YES NULL +DESCRIBE v1; +Field Type Null Key Default Extra +f1 char(10) YES NULL +my_sqrt double YES NULL +SELECT * FROM t1 order by f1, f2; +f1 f2 +ABC 3 +ABC DEF +SELECT * FROM v1 order by 2; +f1 my_sqrt +ABC 0 +ABC 1.73205080756888 +SELECT SQRT('DEF'); +SQRT('DEF') +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'DEF' +CREATE VIEW v2 AS SELECT SQRT('DEF'); +SELECT * FROM v2 order by 1; +SQRT('DEF') +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'DEF' +CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; +DESCRIBE v2; +Field Type Null Key Default Extra +f1 char(10) YES NULL +my_sqrt double YES NULL +SELECT * FROM v2 order by 2; +f1 my_sqrt +ABC 0 +ABC 1.73205080756888 +CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; +SELECT * FROM t2 order by 2; +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT * FROM v1; +SELECT * FROM t2 order by 2; +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 +DROP TABLE t2; +CREATE TABLE t2 AS SELECT * FROM v2; +SELECT * FROM t2 order by 2; +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 +DROP TABLE t1; +DROP TABLE t2; +DROP VIEW v1; +DROP VIEW v2; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP VIEW IF EXISTS v1; +DROP VIEW IF EXISTS v1_1; +DROP VIEW IF EXISTS v1_2; +DROP VIEW IF EXISTS v1_firstview; +DROP VIEW IF EXISTS v1_secondview; +DROP VIEW IF EXISTS v2; +DROP DATABASE IF EXISTS test2; +DROP DATABASE IF EXISTS test3; +DROP DATABASE test1; +DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result deleted file mode 100644 index 9b07a0ae45b..00000000000 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ /dev/null @@ -1,24605 +0,0 @@ -SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; -USE test; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set", -f110 VARBINARY(64) null, -f111 VARBINARY(27) null , -f112 VARBINARY(64) null , -f113 VARBINARY(192) null , -f114 VARBINARY(192) , -f115 VARBINARY(27) null , -f116 VARBINARY(64) null, -f117 VARBINARY(192) null -) engine = myisam; -load data infile '/std_data/funcs_1/myisam_tb2.txt' -into table tb2; -DROP DATABASE IF EXISTS test1; -CREATE DATABASE test1; -USE test1; -drop table if exists tb2 ; -create table tb2 ( -f59 numeric (0) unsigned, -f60 numeric (64) unsigned, -f61 numeric (0) zerofill, -f62 numeric (64) zerofill, -f63 numeric (0) unsigned zerofill, -f64 numeric (64) unsigned zerofill, -f65 numeric (0,0), -f66 numeric (63,30), -f67 numeric (0,0) unsigned, -f68 numeric (63,30) unsigned, -f69 numeric (0,0) zerofill, -f70 numeric (63,30) zerofill, -f71 numeric (0,0) unsigned zerofill, -f72 numeric (63,30) unsigned zerofill, -f73 real, -f74 real unsigned, -f75 real zerofill, -f76 real unsigned zerofill, -f77 double default 7.7, -f78 double unsigned default 7.7, -f79 double zerofill default 7.7, -f80 double unsigned zerofill default 8.8, -f81 float not null default 8.8, -f82 float unsigned not null default 8.8, -f83 float zerofill not null default 8.8, -f84 float unsigned zerofill not null default 8.8, -f85 float(0) not null default 8.8, -f86 float(23) not null default 8.8, -f87 float(0) unsigned not null default 8.8, -f88 float(23) unsigned not null default 8.8, -f89 float(0) zerofill not null default 8.8, -f90 float(23) zerofill not null default 8.8, -f91 float(0) unsigned zerofill not null default 8.8, -f92 float(23) unsigned zerofill not null default 8.8, -f93 float(24) not null default 8.8, -f94 float(53) not null default 8.8, -f95 float(24) unsigned not null default 8.8, -f96 float(53) unsigned not null default 8.8, -f97 float(24) zerofill not null default 8.8, -f98 float(53) zerofill not null default 8.8, -f99 float(24) unsigned zerofill not null default 8.8, -f100 float(53) unsigned zerofill not null default 8.8, -f101 date not null default '2000-01-01', -f102 time not null default 20, -f103 datetime not null default '2/2/2', -f104 timestamp not null default 20001231235959, -f105 year not null default 2000, -f106 year(3) not null default 2000, -f107 year(4) not null default 2000, -f108 enum("1enum","2enum") not null default "1enum", -f109 set("1set","2set") not null default "1set", -f110 VARBINARY(64) null, -f111 VARBINARY(27) null , -f112 VARBINARY(64) null , -f113 VARBINARY(192) null , -f114 VARBINARY(192) , -f115 VARBINARY(27) null , -f116 VARBINARY(64) null, -f117 VARBINARY(192) null -) engine = myisam; -load data infile '/std_data/funcs_1/myisam_tb2.txt' -into table tb2; -USE test; - -Attention: The nesting level @max_level in Testcase 3.3.1.A6 -(Complicated nested VIEWs) has to be limited to 20 because of -MyISAM(only) performance issues Bug#11948 --------------------------------------------------------------------------------- -SET @limit1 = 20; - -! Attention: The file with the expected results is not -| thoroughly checked. -! The server return codes are correct, but -| most result sets where the table tb2 is -! involved are not checked. --------------------------------------------------------------------------------- - -There are some statements where the ps-protocol is switched off. -Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- -insert into test.tb2 (f59,f60) values (76710,226546); -insert into test.tb2 (f59,f60) values(2760,985654); -insert into test.tb2 (f59,f60) values(569300,9114376); -insert into test.tb2 (f59,f60) values(660,876546); -insert into test.tb2 (f59,f60) values(250,87895654); -insert into test.tb2 (f59,f60) values(340,9984376); -insert into test.tb2 (f59,f60) values(3410,996546); -insert into test.tb2 (f59,f60) values(2550,775654); -insert into test.tb2 (f59,f60) values(3330,764376); -insert into test.tb2 (f59,f60) values(441,16546); -insert into test.tb2 (f59,f60) values(24,51654); -insert into test.tb2 (f59,f60) values(323,14376); -insert into test.tb2 (f59,f60) values(34,41); -insert into test.tb2 (f59,f60) values(04,74); -insert into test.tb2 (f59,f60) values(15,87); -insert into test.tb2 (f59,f60) values(22,93); -insert into test.tb2 (f59,f60) values(394,41); -insert into test.tb2 (f59,f60) values(094,74); -insert into test.tb2 (f59,f60) values(195,87); -insert into test.tb2 (f59,f60) values(292,93); -insert into test.tb2 (f59,f60) values(0987,41) ; -insert into test.tb2 (f59,f60) values(7876,74) ; -INSERT INTO tb2 (f59,f61) VALUES(321,765 ); -INSERT INTO tb2 (f59,f61) VALUES(9112,8771); -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ; -Insert into tb2 (f59,f60,f61) values (107,105,106) ; -Insert into tb2 (f59,f60,f61) values (109,108,104) ; -Insert into tb2 (f59,f60,f61) values (207,205,206) ; -Insert into tb2 (f59,f60,f61) values (209,208,204) ; -Insert into tb2 (f59,f60,f61) values (27,25,26) ; -Insert into tb2 (f59,f60,f61) values (29,28,24) ; -Insert into tb2 (f59,f60,f61) values (17,15,16) ; -Insert into tb2 (f59,f60,f61) values (19,18,14) ; -insert into tb2 (f59,f60,f61) values (107,105,106); -insert into tb2 (f59,f60,f61) values (109,108,104); -INSERT INTO tb2 (f59,f60) VALUES( 299,899 ); -INSERT INTO tb2 (f59,f60) VALUES( 242,79 ); -INSERT INTO tb2 (f59,f60) VALUES( 424,89 ); -SELECT * FROM tb2 ORDER BY f59, f60, f61; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set @@@@@@ >@>@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -4 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set @@@@@@ I@I@ @@@@@@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set @@@@ @ @ 9@.@ @@@@ @ @ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@ @@@@ @ @ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -7 7 0000000007 0000000000000000000000000000000000000000000000000000000000000007 0000000007 0000000000000000000000000000000000000000000000000000000000000007 1 6.600000000000000000000000000000 7 6.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 0000000007 000000000000000000000000000000006.600000000000000000000000000000 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.175494344e-38 1.175494358e-38 00000001.175494358e-38 00000001.175494358e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494344e-38 1.17549e-38 1.175494358e-38 01.17549e-38 00000001.175494358e-38 01.17549e-38 00000001.175494358e-38 1000-01-07 838:59:52 1970-01-08 00:00:07 1970-01-08 00:00:07 1908 1908 1908 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -8 8 0000000008 0000000000000000000000000000000000000000000000000000000000000008 0000000008 0000000000000000000000000000000000000000000000000000000000000008 2 7.700000000000000000000000000000 8 7.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 0000000008 000000000000000000000000000000007.700000000000000000000000000000 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.175494343e-38 1.175494359e-38 00000001.175494359e-38 00000001.175494359e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494343e-38 1.17549e-38 1.175494359e-38 01.17549e-38 00000001.175494359e-38 01.17549e-38 00000001.175494359e-38 1000-01-08 838:59:51 1970-01-09 00:00:08 1970-01-09 00:00:08 1909 1909 1909 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -9 9 0000000009 0000000000000000000000000000000000000000000000000000000000000009 0000000009 0000000000000000000000000000000000000000000000000000000000000009 3 8.800000000000000000000000000000 9 8.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 0000000009 000000000000000000000000000000008.800000000000000000000000000000 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.175494342e-38 1.17549436e-38 000000001.17549436e-38 000000001.17549436e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494342e-38 1.17549e-38 1.17549436e-38 01.17549e-38 000000001.17549436e-38 01.17549e-38 000000001.17549436e-38 1000-01-09 838:59:50 1970-01-10 00:00:09 1970-01-10 00:00:09 1910 1910 1910 2enum 1set @@@@@@ >@>@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -10 10 0000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000010 0000000000000000000000000000000000000000000000000000000000000010 4 9.900000000000000000000000000000 10 9.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 0000000010 000000000000000000000000000000009.900000000000000000000000000000 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.175494341e-38 1.175494361e-38 00000001.175494361e-38 00000001.175494361e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494341e-38 1.17549e-38 1.175494361e-38 01.17549e-38 00000001.175494361e-38 01.17549e-38 00000001.175494361e-38 1000-01-10 838:59:49 1970-01-11 00:00:10 1970-01-11 00:00:10 1911 1911 1911 1enum 2set @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -Use test; - -Testcase 3.3.1.1 --------------------------------------------------------------------------------- -Drop table if exists t1; -Create table t1 (f59 INT, f60 INT) ; -Insert into t1 values (100,4234); -Insert into t1 values (990,6624); -Insert into t1 values (710,765); -Insert into t1 values (300,433334); -Insert into t1 values (800,9788); -Insert into t1 values (500,9866); -Drop view if exists v1 ; -CREATE VIEW v1 AS select f59,f60,f61 -FROM test.tb2 where f59=250; -select * FROM v1 order by f60,f61 limit 0,10; -f59 f60 f61 -250 87895654 NULL -Drop view if exists v1 ; -CREATE VIEW v1 AS select f59,f60,f61 -FROM test.tb2 limit 100; -select * FROM v1 order by f59,f60,f61 limit 0,10; -f59 f60 f61 -1 1 0000000001 -2 2 0000000002 -3 3 0000000003 -4 4 0000000004 -4 74 NULL -5 5 0000000005 -6 6 0000000006 -7 7 0000000007 -8 8 0000000008 -9 9 0000000009 -CREATE or REPLACE VIEW v1 AS select f59,f60,f61 -FROM test.tb2; -select * FROM v1 order by f59,f60,f61 limit 4,3; -f59 f60 f61 -4 74 NULL -5 5 0000000005 -6 6 0000000006 -CREATE or REPLACE VIEW v1 AS select distinct f59 -FROM test.tb2; -select * FROM v1 order by f59 limit 4,3; -f59 -5 -6 -7 -ALTER VIEW v1 AS select f59 -FROM test.tb2; -select * FROM v1 order by f59 limit 6,2; -f59 -6 -7 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59 asc; -select * FROM v1 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 order by f59 desc; -select * FROM v1 limit 0,10; -f59 -569300 -76710 -9112 -7876 -3410 -3330 -2760 -2550 -987 -660 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59 asc; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS select f59 -from tb2 group by f59 desc; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 from tb2) -union (select f59 from t1); -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2) -UNION DISTINCT(select f59 FROM t1) ; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2) -UNION ALL(select f59 FROM t1) ; -select * FROM v1 order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -CREATE or REPLACE VIEW v1 AS select * -FROM test.tb2 WITH LOCAL CHECK OPTION ; -select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f110 @@@@@@ -f111 I@I@ -f112 @@@@@@ -f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f115 @@ -f116 @@@@@@ -f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f110 @@@@ @ @ -f111 9@.@ -f112 @@@@ @ @ -f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f115 @@ -f116 @@@@ @ @ -f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -CREATE or REPLACE VIEW v1 AS select * -FROM test.tb2 WITH CASCADED CHECK OPTION ; -select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f110 @@@@@@ -f111 I@I@ -f112 @@@@@@ -f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f115 @@ -f116 @@@@@@ -f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f110 @@@@ @ @ -f111 9@.@ -f112 @@@@ @ @ -f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f115 @@ -f116 @@@@ @ @ -f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 WITH CASCADED CHECK OPTION; -SELECT * FROM v1 order by f59,f60 limit 0,10; -F59 F60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -CREATE or REPLACE VIEW v1 AS select f59, f60 -from test.tb2 where f59=3330 ; -select * FROM v1 order by f60 limit 0,10; -f59 f60 -3330 764376 -DROP VIEW v1 ; -DROP TABLE t1 ; - -Testcase 3.3.1.2 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS v2 ; -CREATE TABLE t1 (f1 BIGINT) ; -SET @x=0; -CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; -ERROR HY000: View's SELECT contains a 'INTO' clause -Select @x; -@x -0 -CREATE or REPLACE VIEW v1 AS Select 1 -FROM (SELECT 1 FROM t1) my_table; -ERROR HY000: View's SELECT contains a subquery in the FROM clause -CREATE VIEW v1 AS SELECT f1 FROM t1; -CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ; -SET @a:=0 ; -SELECT @a ; -@a -0 -INSERT INTO v1 VALUES (1) ; -SELECT @a ; -@a -1 -SELECT * FROM t1; -f1 -1 -DROP TRIGGER tr1 ; -SET @a:=0 ; -CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ; -ERROR HY000: 'test.v1' is not BASE TABLE -RENAME TABLE v1 TO v2; -RENAME VIEW v2 TO v1; -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 'VIEW v2 TO v1' at line 1 -ALTER TABLE v2 RENAME AS v1; -ALTER VIEW v1 RENAME AS v2; -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 'RENAME AS v2' at line 1 -DROP TABLE IF EXISTS t1, t2 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS v2 ; -CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE ); -CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1; -ALTER TABLE t1 ADD PRIMARY KEY(f1); -ALTER TABLE v1 ADD PRIMARY KEY(f1); -ERROR HY000: 'test.v1' is not BASE TABLE -ALTER VIEW v1 ADD PRIMARY KEY(f1); -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 'ADD PRIMARY KEY(f1)' at line 1 -CREATE INDEX t1_idx ON t1(f3); -CREATE INDEX v1_idx ON v1(f3); -ERROR HY000: 'test.v1' is not BASE TABLE -DROP TABLE t1; -DROP VIEW v1; - -Testcase 3.3.1.3 + 3.1.1.4 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table; -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 'or REPLACE AS Select * from tb2 my_table' at line 1 -CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select * -from tb2 my_table limit 50; -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 'WITH CASCADED CHECK OPTION AS Select * -from tb2 my_table limit 50' at line 1 -CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select * -from tb2 my_table limit 50; -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 'WITH LOCAL CHECK OPTION AS Select * -from tb2 my_table limit 50' at line 1 -SELECT * FROM tb2 my_table CREATE VIEW As v1; -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 'CREATE VIEW As v1' at line 1 -CREATE or REPLACE VIEW v1 Select f59, f60 -from test.tb2 my_table where f59 = 250 ; -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 'Select f59, f60 -from test.tb2 my_table where f59 = 250' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -DROP VIEW v1; -REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -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 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1 -CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION; -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 'SELECT AS F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CASCADED WITH CHECK OPTION; -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 'CASCADED WITH CHECK OPTION' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED OPTION CHECK; -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 'OPTION CHECK' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CHECK OPTION WITH CASCADED; -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 'CHECK OPTION WITH CASCADED' at line 2 -CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table; -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 'WITH CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION; -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 'AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1; -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 'AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1 -REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION; -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 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1 -CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION; -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 'SELECT AS F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION' at line 1 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table LOCAL WITH CHECK OPTION; -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 'LOCAL WITH CHECK OPTION' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL OPTION CHECK; -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 'OPTION CHECK' at line 2 -CREATE OR REPLACE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table CHECK OPTION WITH LOCAL; -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 'CHECK OPTION WITH LOCAL' at line 2 -CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table; -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 'WITH CASCADED CHECK OPTION -AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION; -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 'AS SELECT F59, F60 -FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION' at line 1 -CREATE OR REPLACE AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1; -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 'AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1' at line 1 -Drop table if exists t1 ; -CREATE table t1 (f1 int ,f2 int) ; -INSERT INTO t1 values (235, 22); -INSERT INTO t1 values (554, 11); -CREATE or REPLACE view v1 as (Select from f59 tb2) -Union ALL (Select from f1 t1); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from f59 tb2) -Union ALL (Select from f1 t1)' at line 1 -CREATE or REPLACE view v1 as Select f59, f60 -from tb2 by order f59; -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 'by order f59' at line 2 -CREATE or REPLACE view v1 as Select f59, f60 -from tb2 by group f59 ; -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 'by group f59' at line 2 - -Testcase 3.3.1.5 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE VIEW v1 SELECT * FROM tb2; -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 'SELECT * FROM tb2' at line 1 -CREATE v1 AS SELECT * FROM tb2; -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 'v1 AS SELECT * FROM tb2' at line 1 -VIEW v1 AS SELECT * FROM tb2; -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 'VIEW v1 AS SELECT * FROM tb2' at line 1 -CREATE VIEW v1 AS SELECT 1; -DROP VIEW v1; -VIEW v1 AS SELECT 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 'VIEW v1 AS SELECT 1' at line 1 -CREATE v1 AS SELECT 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 'v1 AS SELECT 1' at line 1 -CREATE VIEW AS SELECT 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 'AS SELECT 1' at line 1 -CREATE VIEW v1 SELECT 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 'SELECT 1' at line 1 -CREATE VIEW v1 AS ; -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 - -Testcase 3.3.1.6 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -CREATE or REPLACE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = MERGE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1 -as SELECT * from tb2; -CREATE or REPLACE = TEMPTABLE VIEW v1 -as SELECT * from tb2; -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 '= TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM TEMPTABLE VIEW v1 -as SELECT * from tb2; -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 'TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM = VIEW v1 -as SELECT * from tb2; -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 'VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1 -as SELECT * from tb2; -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 'TEMPTABLE = ALGORITHM VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1 -as SELECT * from tb2; -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 'TEMPTABLE - ALGORITHM VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE GARBAGE = TEMPTABLE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE = TEMPTABLE VIEW v1 -as SELECT * from tb2' at line 1 -CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1 -as SELECT * from tb2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE VIEW v1 -as SELECT * from tb2' at line 1 -Drop view if exists v1 ; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH LOCAL CHECK OPTION; -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH NO CHECK OPTION; -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 'NO CHECK OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 CASCADED CHECK OPTION; -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 'CASCADED CHECK OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED OPTION; -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 'OPTION' at line 2 -CREATE or REPLACE VIEW v1 -AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 - -Testcase 3.3.1.7 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1 ; -Create view test.v1 AS Select * from test.tb2; -Alter view test.v1 AS Select F59 from test. tb2 limit 100 ; -Drop view test.v1 ; -Create view v1 AS Select * from test.tb2 limit 100 ; -Alter view v1 AS Select F59 from test.tb2 limit 100 ; -Drop view v1 ; - -Testcase 3.3.1.A0 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS V1 ; -CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = myisam; -INSERT INTO t1 VALUES(1111), (2222); -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111; -CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222; -SELECT * FROM v1; -f1 -1111 -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -DROP VIEW IF EXISTS V1 ; - -Testcase 3.3.1.8 --------------------------------------------------------------------------------- -Create view select AS Select * from test.tb2 limit 100; -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 'select AS Select * from test.tb2 limit 100' at line 1 -Create view as AS Select * from test.tb2 limit 100; -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 'as AS Select * from test.tb2 limit 100' at line 1 -Create view where AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where AS Select * from test.tb2 limit 100' at line 1 -Create view from AS Select * from test.tb2 limit 100; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from AS Select * from test.tb2 limit 100' at line 1 -Create view while AS Select * from test.tb2 limit 100; -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 'while AS Select * from test.tb2 limit 100' at line 1 -Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ; -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 '*(&*&&^ as Select * from test.tb2 limit 100' at line 1 -Drop view if exists test.procedure ; -Create view test.procedure as Select * from test.tb2 limit 100 ; -Drop view if exists test.procedure ; - -Testcase 3.3.1.9 --------------------------------------------------------------------------------- -Drop TABLE IF EXISTS t1 ; -Drop VIEW IF EXISTS v1; -Drop VIEW IF EXISTS v2; -Drop VIEW IF EXISTS v3; -CREATE TABLE t1 ( f1 char(5)); -INSERT INTO t1 SET f1 = 'abcde'; -CREATE VIEW v1 AS SELECT f1 FROM t1; -CREATE VIEW v2 AS SELECT * FROM v1; -DROP TABLE t1; -SELECT * FROM v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v1 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v1 SET f1 = "fffff"; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v2 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v2 SET f1 = "fffff"; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DROP VIEW v1; -SELECT * FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DELETE FROM v2; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -UPDATE v2 SET f1 = 'aaaaa'; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v2 SET f1 = "fffff"; -ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DROP VIEW v2; -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f1 FLOAT); -CREATE VIEW v1 AS SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -CREATE VIEW v1 AS SELECT * FROM t1; -CREATE or REPLACE VIEW v1 AS SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -DROP VIEW v1; -DROP TABLE t1; - -Testcase 3.3.1.10 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create view test.v1 AS Select * from test.tb2 ; -Create view test.v1 AS Select F59 from test.tb2 ; -ERROR 42S01: Table 'v1' already exists -Create view v1 AS Select F59 from test.tb2 ; -ERROR 42S01: Table 'v1' already exists - -Testcase 3.3.1.11 --------------------------------------------------------------------------------- -Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ; -ERROR 42S01: Table 'tb2' already exists -Create view tb2 AS Select f59,f60 from test.tb2 limit 100 ; -ERROR 42S01: Table 'tb2' already exists -Drop view if exists test.v111 ; -Create view test.v111 as select * from tb2 limit 50; -Create table test.v111(f1 int ); -ERROR 42S01: Table 'v111' already exists -Create table v111(f1 int ); -ERROR 42S01: Table 'v111' already exists -DROP VIEW test.v111; - -Testcase 3.3.1.12 --------------------------------------------------------------------------------- -USE test; -Drop database if exists test2 ; -Create database test2 ; -DROP TABLE IF EXISTS test.t0, test.t1, test.t2; -DROP VIEW IF EXISTS test.v1; -DROP VIEW IF EXISTS test.v2; -CREATE TABLE test.t1 ( f1 VARCHAR(20)); -CREATE TABLE test2.t1 ( f1 VARCHAR(20)); -CREATE TABLE test.t2 ( f1 VARCHAR(20)); -CREATE TABLE test2.v1 ( f1 VARCHAR(20)); -CREATE TABLE test.t0 ( f1 VARCHAR(20)); -CREATE TABLE test2.t0 ( f1 VARCHAR(20)); -CREATE VIEW test2.t2 AS SELECT * FROM test2.t0; -CREATE VIEW test.v1 AS SELECT * FROM test.t0; -CREATE VIEW test.v2 AS SELECT * FROM test.t0; -CREATE VIEW test2.v2 AS SELECT * FROM test2.t0; -INSERT INTO test.t1 VALUES('test.t1 - 1'); -INSERT INTO test2.t1 VALUES('test2.t1 - 1'); -INSERT INTO test.t2 VALUES('test.t2 - 1'); -INSERT INTO test2.v1 VALUES('test2.v1 - 1'); -INSERT INTO test.t0 VALUES('test.t0 - 1'); -INSERT INTO test2.t0 VALUES('test2.t0 - 1'); -USE test; -INSERT INTO t1 VALUES('test.t1 - 2'); -INSERT INTO t2 VALUES('test.t2 - 2'); -INSERT INTO t0 VALUES('test.t0 - 2'); -USE test2; -INSERT INTO t1 VALUES('test2.t1 - 2'); -INSERT INTO v1 VALUES('test2.v1 - 2'); -INSERT INTO t0 VALUES('test2.t0 - 2'); -SELECT * FROM t1; -f1 -test2.t1 - 1 -test2.t1 - 2 -SELECT * FROM t2; -f1 -test2.t0 - 1 -test2.t0 - 2 -SELECT * FROM v1; -f1 -test2.v1 - 1 -test2.v1 - 2 -SELECT * FROM v2; -f1 -test2.t0 - 1 -test2.t0 - 2 -USE test; -SELECT * FROM t1; -f1 -test.t1 - 1 -test.t1 - 2 -SELECT * FROM t2; -f1 -test.t2 - 1 -test.t2 - 2 -SELECT * FROM v1; -f1 -test.t0 - 1 -test.t0 - 2 -SELECT * FROM v2; -f1 -test.t0 - 1 -test.t0 - 2 - -Testcase 3.3.1.13 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 BIGINT); -INSERT INTO t1 VALUES(1); -CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1; -f1 -1 -CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1 -AS SELECT * FROM t1 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1; -f1 -1 -CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109`,`tb2`.`f110` AS `f110`,`tb2`.`f111` AS `f111`,`tb2`.`f112` AS `f112`,`tb2`.`f113` AS `f113`,`tb2`.`f114` AS `f114`,`tb2`.`f115` AS `f115`,`tb2`.`f116` AS `f116`,`tb2`.`f117` AS `f117` from `tb2` order by `tb2`.`f59` limit 2 latin1 latin1_swedish_ci -SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2; -SHOW CREATE VIEW test.v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` latin1 latin1_swedish_ci -SELECT * FROM test.v1 order by F59 limit 10,100; -F59 -10 -15 -17 -19 -22 -24 -27 -29 -34 -94 -107 -107 -109 -109 -195 -207 -209 -242 -250 -292 -299 -321 -323 -340 -394 -424 -441 -500 -500 -500 -660 -987 -2550 -2760 -3330 -3410 -7876 -9112 -76710 -569300 -Drop table test.t1 ; -Drop view test.v1 ; - -Testcase 3.3.1.14 --------------------------------------------------------------------------------- -CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2; -ERROR HY000: 'test.tb2' is not VIEW -CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2; -ERROR HY000: 'test.tb2' is not VIEW - -Testcase 3.3.1.15 --------------------------------------------------------------------------------- -Drop table if exists test.v1 ; -CREATE OR REPLACE view test.v1 as select * from tb2; -SELECT * FROM test.v1; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -Drop view test.v1 ; - -Testcase 3.3.1.16 + 3.3.1.17 --------------------------------------------------------------------------------- -Drop table if exists test.v1 ; -CREATE OR REPLACE VIEW v1 AS SELECT * From tb2; -SELECT * FROM tb2 WHERE 1 = 2; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -SELECT * FROM v1 WHERE 1 = 2; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -Drop view v1; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 NUMERIC(15,3)); -INSERT INTO t1 VALUES(8.8); -CREATE VIEW v1 AS SELECT * FROM t1; -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 `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -f1 -8.800 -CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1; -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 `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -f1 -8.800 -CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1; -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 `t1`.`f1` AS `my_column` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -my_column -8.800 -CREATE OR REPLACE VIEW v1(column1,column2) -AS SELECT f1 As my_column, f1 FROM t1; -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 `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -column1 column2 -8.800 8.800 -CREATE OR REPLACE VIEW test.v1(column1,column2) -AS SELECT f1 As my_column, f1 FROM test.t1; -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 `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1` latin1 latin1_swedish_ci -SELECT * FROM v1; -column1 column2 -8.800 8.800 - -Testcase 3.3.1.18 --------------------------------------------------------------------------------- -Drop view if exists v1 ; -Drop view if exists v1_1 ; -Create view v1 -as Select test.tb2.f59 as NewNameF1, test.tb2.f60 -from test.tb2 limit 0,100 ; -Create view v1_1 -as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2 -from tb2 limit 0,100 ; -SELECT NewNameF1,f60 FROM test.v1_1 ; -ERROR 42S22: Unknown column 'f60' in 'field list' -SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ; -ERROR 42S22: Unknown column 'v1_1.f60' in 'field list' -SELECT f59, f60 FROM test.v1 ; -ERROR 42S22: Unknown column 'f59' in 'field list' -Use test ; -SELECT F59 FROM v1 ; -ERROR 42S22: Unknown column 'F59' in 'field list' - -Testcase 3.3.1.19 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1, t2; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2)); -INSERT INTO t1 VALUES(7, 7.7); -CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2)); -INSERT INTO t2 VALUES(6, 6.6); -CREATE VIEW v1 AS SELECT * FROM t1; -SELECT * FROM v1; -f1 f2 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1; -SELECT * FROM v1; -f1 f2 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1; -SELECT * FROM v1; -my_f1 my_f2 -7 7.70 -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1; -SELECT * FROM v1; -my_f1 my_f2 -7 7.70 -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2; -SELECT * FROM v1; -my_f1 my_f2 -7 6.60 -SELECT f1, f2 AS f1 FROM t1; -f1 f1 -7 7.70 -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1; -ERROR 42S21: Duplicate column name 'f1' -SELECT t1.f1, t2.f1 AS f1 FROM t1, t2; -f1 f1 -7 6 -CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2; -ERROR 42S21: Duplicate column name 'f1' -CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1; -ERROR 42S21: Duplicate column name 'my_col' - -Testcase 3.3.1.20 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2)); -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT * FROM t1; -CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1; -CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT * FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1 ) AS SELECT f1, f2 FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT * FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts -CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1; -ERROR HY000: View's SELECT and view's field list have different column counts - -Testcase 3.3.1.21 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2; -SELECT * FROM test.v1 order by F59, F60 desc LIMIT 2; -F59 F60 -1 1 -2 2 -Drop view if exists test.v1 ; - -Testcase 3.3.1.22 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3; -SELECT * FROM test.v1; -product -1 -4 -CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2; -SELECT * FROM test.v1; -product -2 -CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); -SELECT * FROM test.v1; -product -root@localhost -Drop view if exists test.v1 ; - -Testcase 3.3.1.23 + 3.3.1.24 --------------------------------------------------------------------------------- -USE test; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v2; -CREATE VIEW test.v2 AS SELECT * FROM test.t1; -ERROR 42S02: Table 'test.t1' doesn't exist -CREATE VIEW v2 AS Select * from test.v1; -ERROR 42S02: Table 'test.v1' doesn't exist -DROP VIEW IF EXISTS v2; -Warnings: -Note 1051 Unknown table 'test.v2' - -Testcase 3.3.1.25 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1_temp; -DROP TABLE IF EXISTS t2_temp; -DROP VIEW IF EXISTS v1; -Create table t1_temp(f59 char(10),f60 int) ; -Create temporary table t1_temp(f59 char(10),f60 int) ; -Insert into t1_temp values('FER',90); -Insert into t1_temp values('CAR',27); -Create view v1 as select * from t1_temp ; -ERROR HY000: View's SELECT refers to a temporary table 't1_temp' -Create temporary table t2_temp(f59 char(10),f60 int) ; -Insert into t2_temp values('AAA',11); -Insert into t2_temp values('BBB',22); -Create or replace view v1 -as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ; -ERROR HY000: View's SELECT refers to a temporary table 't1_temp' -DROP temporary table t1_temp; -DROP table t1_temp; -DROP temporary table t2_temp; -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 (f1 char(10)); -CREATE TEMPORARY TABLE t2 (f2 char(10)); -INSERT INTO t1 VALUES('t1'); -INSERT INTO t1 VALUES('A'); -INSERT INTO t2 VALUES('t2'); -INSERT INTO t2 VALUES('B'); -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2, t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1, t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t2 UNION SELECT * FROM t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 UNION SELECT * FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2; -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2 -WHERE f2 = ( SELECT f1 FROM t1 ); -ERROR HY000: View's SELECT refers to a temporary table 't2' -CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1 -WHERE f1 = ( SELECT f2 FROM t2 ); -ERROR HY000: View's SELECT refers to a temporary table 't2' -DROP TABLE t1; -DROP TEMPORARY TABLE t2; - -Testcase 3.3.1.26 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS v1; -Create view test.v1 AS Select * from test.tb2; -Select * from test.v1; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -Drop view test.v1 ; - -Testcase 3.3.1.27 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS test.v1; -Drop VIEW IF EXISTS test.v1_1 ; -Create view test.v1 AS Select * from test.tb2; -Create view test.v1_1 AS Select F59 from test.v1 ; -Select * from test.v1_1 order by F59 limit 2; -F59 -1 -2 -Drop view test.v1 ; -Drop view test.v1_1 ; - -Testcase 3.3.1.28 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -create database test2 ; -Create view test2.v2 AS Select * from test.tb2 limit 50,50; -use test2 ; -Create view v1 AS Select * from test.tb2 limit 50 ; -Select * from v1 order by f59,f60,f61,f62,f63,f64,f65; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 4 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 4 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f110 @@@@@@ -f111 I@I@ -f112 @@@@@@ -f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f115 @@ -f116 @@@@@@ -f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f110 @@@@ @ @ -f111 9@.@ -f112 @@@@ @ @ -f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f115 @@ -f116 @@@@ @ @ -f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -Select * from test2.v2 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -Drop view if exists test2.v1 ; -Drop view if exists test2.v2 ; -Drop database test2 ; - -Testcase 3.3.1.29 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -Drop view if exists test.v1 ; -create database test2 ; -use test2; -Create view test.v1 AS Select * from test.tb2 limit 50 ; -Create view test2.v2 AS Select F59 from test.v1 ; -Drop view if exists test.v1 ; -Drop view if exists test2.v2 ; - -Testcase 3.3.1.31 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -CREATE TABLE test.t1 ( f59 int, f60 int ); -INSERT INTO test.t1 VALUES( 34, 654 ); -INSERT INTO test.t1 VALUES( 906, 434 ); -INSERT INTO test.t1 VALUES( 445, 765 ); -Create or replace view test.v1 -AS SELECT test.t1.F59, test.tb2.F60 -FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59 ; -Select * from test.v1; -F59 F60 -34 41 -Drop view test.v1 ; - -Testcase 3.3.1.32 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -Drop database if exists test2 ; -Drop view if exists test.v1 ; -create database test2 ; -use test2 ; -CREATE TABLE t1 ( f59 int, f60 int ); -INSERT INTO t1 VALUES( 34, 654 ); -INSERT INTO t1 VALUES( 906, 434 ); -INSERT INTO t1 VALUES( 445, 765 ); -CREATE VIEW test2.v1 -AS SELECT test.tb2.F59, test.tb2.F60 -FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59; -Select * from test2.v1; -F59 F60 -34 41 -Use test; - -Testcase 3.3.1.33 --------------------------------------------------------------------------------- -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1 -AS SELECT test.v1_firstview.f59, test.v1_firstview.f60 -FROM test.v1_firstview INNER JOIN test.v1_secondview -ON test.v1_firstview.f59 = test.v1_secondview.f59 ; -SELECT * FROM test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -Drop view if exists test.v1 ; - -Testcase 3.3.1.34 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -Drop view if exists test.v1_firstview ; -Drop view if exists test.v1_secondview ; -create database test2 ; -use test2 ; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ; -CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ; -CREATE VIEW v1 -AS SELECT test.v1_firstview.F59, test.v1_firstview.F60 -FROM test.v1_firstview INNER JOIN test.v1_secondview -ON test.v1_firstview.f59 = test.v1_secondview.f59 ; -SELECT * FROM v1 order by f59,f60 limit 0,10; -F59 F60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view v1 ; -Drop view test.v1_firstview ; -Drop view test.v1_secondview ; - -Testcase 3.3.1.35 --------------------------------------------------------------------------------- -use test; -Drop view if exists test.v1; -Drop view if exists test.v1_firstview; -CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2; -CREATE VIEW test.v1 -AS SELECT test.v1_firstview.f59, test.v1_firstview.f60 -FROM test.v1_firstview INNER JOIN test.tb2 -ON test.v1_firstview.f59 = test.tb2.f59; -SELECT * FROM test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop view test.v1 ; -Drop view test.v1_firstview; - -Testcase 3.3.1.36 --------------------------------------------------------------------------------- -Drop database if exists test2 ; -create database test2 ; -use test2 ; -CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ; -CREATE VIEW v1 -AS SELECT v1_firstview.f59, v1_firstview.f60 -FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ; -SELECT * FROM v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 4 -4 74 -4 74 -5 5 -6 6 -7 7 -Drop database test2 ; - -Testcase 3.3.1.37 --------------------------------------------------------------------------------- -use test; -Drop table if exists t1; -Drop view if exists test.v1 ; -Drop view if exists test.v1_1 ; -Drop view if exists test.v1_1 ; -Drop view if exists test.v1_main ; -Create view test.v1 as Select f59, f60 FROM test.tb2; -Select * from test.v1 order by f59,f60 limit 0,10; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -Create table t1(f59 int, f60 int); -Insert into t1 values (90,507) ; -Create view v1_1 as Select f59,f60 from t1 ; -Select * from v1_1 ; -f59 f60 -90 507 -Create view v1_main -as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1 -ON test.tb2.f59 = test.v1.f59; -Select * from v1_main order by f59 limit 0,10; -f59 -1 -2 -3 -4 -4 -4 -4 -5 -6 -7 -Drop table t1; -Drop view test.v1 ; -Drop view test.v1_1 ; -Drop view test.v1_main ; - -Testcase 3.3.1.31 - 3.3.1.37 New Implementation --------------------------------------------------------------------------------- -USE test; -DROP DATABASE IF EXISTS test2; -DROP TABLE IF EXISTS t0,t1; -DROP VIEW IF EXISTS t3,t4; -CREATE DATABASE test2; -CREATE TABLE test1.t0 (f1 VARCHAR(20)); -CREATE TABLE test1.t1 (f1 VARCHAR(20)); -CREATE TABLE test2.t0 (f1 VARCHAR(20)); -CREATE TABLE test2.t1 (f1 VARCHAR(20)); -CREATE VIEW test1.t2 AS SELECT * FROM test1.t0; -CREATE VIEW test1.t3 AS SELECT * FROM test2.t0; -CREATE VIEW test2.t2 AS SELECT * FROM test2.t0; -CREATE VIEW test2.t3 AS SELECT * FROM test1.t0; -INSERT INTO test1.t0 VALUES('test1.t0'); -INSERT INTO test1.t1 VALUES('test1.t1'); -INSERT INTO test2.t0 VALUES('test2.t0'); -INSERT INTO test2.t1 VALUES('test2.t1'); -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t3 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t3 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t2 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t2 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t0 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t3 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t2 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t0 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test2.t1 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test2.t1 test1.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test2.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test2.t1 -CREATE OR REPLACE VIEW test.v1 AS -SELECT ta.f1 AS col1, -tb.f1 AS col2 -FROM test1.t1 ta, test1.t1 tb; -SELECT * FROM test.v1; -col1 col2 -test1.t1 test1.t1 - -Testcase 3.3.1.38 --------------------------------------------------------------------------------- -Drop table if exists test1.t1 ; -Drop view if exists test.v1 ; -Drop view if exists test.v1_main; -Drop view if exists test1.v1_1 ; -Drop database if exists test3 ; -Create view test.v1 as Select f59, f60 FROM test.tb2; -Select * from test.v1 order by f59,f60 limit 20; -f59 f60 -1 1 -2 2 -3 3 -4 4 -4 74 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -15 87 -17 15 -19 18 -22 93 -24 51654 -27 25 -29 28 -34 41 -94 74 -Create table test1.t1 (f59 int,f60 int) ; -Insert into test1.t1 values (199,507) ; -Create view test1.v1_1 as Select f59,f60 from test1.t1 ; -Select * from test1.v1_1 ; -f59 f60 -199 507 -Create database test3 ; -Create table test3.t1(f59 int,f60 int) ; -Insert into test3.t1 values (1023,7670) ; -Create view test3.v1_2 as Select f59,f60 from test3.t1 ; -Select * from test3.v1_2 ; -f59 f60 -1023 7670 -use test ; -Create view v1_main -as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2, -test3.v1_2.f59 as f3 -FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2 -ON (test.v1.f59 = test1.v1_1.f59) ; -Select * from v1_main ; -f1 f2 f3 -DROP VIEW test.v1 ; -DROP VIEW test1.v1_1 ; -DROP VIEW test.v1_main ; -DROP DATABASE test3; - -Testcase 3.3.1.39 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 -AS Select f59 from (Select * FROM tb2 limit 20) tx ; -ERROR HY000: View's SELECT contains a subquery in the FROM clause -SELECT * FROM test.v1 order by f59 ; -ERROR 42S02: Table 'test.v1' doesn't exist -Drop view if exists test.v1 ; - -Testcase 3.3.1.40 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Set @var1 = 'ABC' ; -Set @var2 = 'XYZ' ; -CREATE VIEW test.v1 AS SELECT @var1, @var2 ; -ERROR HY000: View's SELECT contains a variable or parameter -CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; -ERROR HY000: View's SELECT contains a variable or parameter -Drop view if exists test.v1 ; - -Testcase 3.3.1.41 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Drop procedure if exists sp1 ; -Create procedure sp1() DETERMINISTIC -Begin -DECLARE x char; -Set x = 200 ; -Create view test.v1 as SELECT * FROM tb2 WHERE f59 = x ; -End // -ERROR HY000: View's SELECT contains a variable or parameter -Call sp1() ; -ERROR 42000: PROCEDURE test.sp1 does not exist -Drop view if exists test.v1 ; -Warnings: -Note 1051 Unknown table 'test.v1' -Drop procedure sp1 ; -ERROR 42000: PROCEDURE test.sp1 does not exist - -Testcase 3.3.1.42 --------------------------------------------------------------------------------- -Drop VIEW if exists test.v1 ; -CREATE TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2' at line 1 -CREATE OR REPLACE TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPORARY VIEW test.v1 AS -SELECT * FROM test.tb2 limit 2' at line 1 -Drop view if exists test.v1 ; -Use test; - -Testcase 3.3.1.43 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; -INSERT INTO test.v1 values(122,432); -SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20; -f59 122 -f60 432 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ; -SELECT * FROM test.tb2 where f59 = 3000 limit 0,20; -f59 3000 -f60 432 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -DELETE FROM test.v1 -where test.v1.f59 = 3000 and test.v1.f60 = 432; -SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -drop view test.v1 ; - -Testcase 3.3.1.44 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100; -INSERT INTO test.v1 values(31, 32, 33) ; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -Drop view test.v1 ; - -Testcase 3.3.1.45 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04; -UPDATE test.v1 SET f59 = 30 where F59 = 04 ; -affected rows: 2 -info: Rows matched: 2 Changed: 2 Warnings: 0 -SELECT * FROM test.v1 where f59 = 30 order by f59; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -SELECT * FROM test.tb2 where f59 = 30 ; -f59 30 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 30 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -UPDATE tb2 SET f59 = 100 where f59 = 30 ; -affected rows: 2 -info: Rows matched: 2 Changed: 2 Warnings: 0 -SELECT * FROM tb2 where f59 = 100 ; -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -SELECT * FROM test.v1 order by f59 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -drop view if exists test.v1 ; -Drop TABLE IF EXISTS test.t1 ; -Drop VIEW IF EXISTS test.v1 ; -CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1)) -ENGINE = myisam; -INSERT INTO t1 VALUES(1,'one'); -INSERT INTO t1 VALUES(2,'two'); -INSERT INTO t1 VALUES(3,'three'); -INSERT INTO t1 VALUES(5,'five'); -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4; -SELECT COUNT(*) FROM v1 WHERE f1 = 2; -COUNT(*) -1 -SELECT COUNT(*) FROM v1 WHERE f1 = 4; -COUNT(*) -0 -SELECT COUNT(*) FROM v1 WHERE f1 = 5; -COUNT(*) -0 -SELECT COUNT(*) FROM v1 WHERE f1 = 10; -COUNT(*) -0 -INSERT INTO t1 VALUES(4,'four'); -DELETE FROM v1 WHERE f1 = 3; -affected rows: 1 -DELETE FROM v1 WHERE f1 = 5; -affected rows: 0 -SELECT * FROM t1 ORDER BY f1; -f1 f2 -1 one -2 two -4 four -5 five -SELECT * FROM v1 ORDER BY f1; -f1 f2 -2 two -4 four -INSERT INTO v1 VALUES(2,'two'); -ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -INSERT INTO v1 VALUES(3,'three'); -affected rows: 1 -INSERT INTO v1 VALUES(6,'six'); -affected rows: 1 -SELECT * FROM t1 ORDER BY f1; -f1 f2 -1 one -2 two -3 three -4 four -5 five -6 six -SELECT * FROM v1 ORDER BY f1; -f1 f2 -2 two -3 three -4 four -UPDATE v1 SET f1 = 2 WHERE f1 = 3; -ERROR 23000: Duplicate entry '2' for key 'PRIMARY' -UPDATE v1 SET f2 = 'number' WHERE f1 = 3; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -UPDATE v1 SET f1 = 10 WHERE f1 = 3; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -UPDATE v1 SET f2 = 'number' WHERE f1 = 1; -affected rows: 0 - -Testcase 3.3.1.46 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60 -FROM test.tb2 where f59 = 195 WITH CHECK OPTION ; -UPDATE test.v1 SET f59 = 198 where f59=195 ; -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM test.v1 order by f59 ; -f59 f60 -195 87 -drop view if exists test.v1 ; - -Testcase 3.3.1.47 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Drop view if exists test.v2 ; -CREATE VIEW test.v1 AS SELECT f59,f60 -FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ; -CREATE VIEW test.v2 as SELECT * FROM test.v1 ; -UPDATE test.v1 SET F59 = 919 where f59 = 0987 ; -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM test.v1 order by f59 ; -f59 f60 -987 41 -UPDATE test.v2 SET F59 = 9879 where f59 = 919 ; -SELECT * FROM tb2 where f59 = 9879 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -drop view if exists v1 ; -drop view if exists v2 ; - -Testcase 3.3.1.48 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS test.t1; -DROP VIEW IF EXISTS test.v1; -CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER) -ENGINE = myisam; -INSERT INTO t1 VALUES ('A', 1); -SELECT * FROM t1 order by f1, f2; -f1 f2 -A 1 -CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2 -WITH CASCADED CHECK OPTION ; -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 1 -UPDATE v1 SET f2 = 2 WHERE f2 = 1; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -INSERT INTO v1 VALUES('B',2); -affected rows: 1 -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 2 -B 2 -UPDATE v1 SET f2 = 4; -ERROR HY000: CHECK OPTION failed 'test.v1' -INSERT INTO v1 VALUES('B',3); -ERROR HY000: CHECK OPTION failed 'test.v1' -SELECT * FROM v1 order by f1, f2; -f1 f2 -A 2 -B 2 - -Testcase 3.3.1.49 --------------------------------------------------------------------------------- -Drop table if exists test.t1 ; -Drop view if exists test.v1 ; -Drop view if exists test.v2 ; -Drop view if exists test.v3 ; -Create table test.t1 (f59 INT, f60 INT) ; -Insert into test.t1 values (100,4234); -Insert into test.t1 values (290,6624); -Insert into test.t1 values (410,765); -Insert into test.t1 values (300,433334); -Insert into test.t1 values (800,9788); -Insert into test.t1 values (501,9866); -Create view test.v1 as select f59 -FROM test.t1 where f59<500 with check option ; -Create view test.v2 as select * -from test.v1 where f59>0 with local check option ; -Create view test.v3 as select * -from test.v1 where f59>0 with cascaded check option ; -Insert into test.v2 values(23) ; -Insert into test.v3 values(24) ; -drop view if exists test.v1 ; -drop view if exists test.v2 ; -drop view if exists test.v3 ; - -Testcase 3.3.1.49A --------------------------------------------------------------------------------- -USE test; -DROP TABLE IF EXISTS test.t1 ; -DROP TABLE IF EXISTS test.t1_results ; -DROP VIEW IF EXISTS test.v1; -DROP VIEW IF EXISTS test.v2; -DROP VIEW IF EXISTS test.v3; -CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20)); -CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10), -v3_to_v1_violation VARCHAR(20), errno CHAR(10)); -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH LOCAL CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH LOCAL CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CASCADED CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH CASCADED CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CHECK OPTION ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - WITH CHECK OPTION -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2 - FROM t1 WHERE f1 BETWEEN 0 AND 10 ; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH LOCAL CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CASCADED CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CHECK OPTION ; -option_variant WITH LOCAL CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - WITH CHECK OPTION - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2 - FROM v1 WHERE f1 BETWEEN 6 AND 16 ; -option_variant WITH LOCAL CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CASCADED CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant WITH CHECK OPTION - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -8 eight -DELETE FROM t1; -DROP VIEW v3; -option_variant - - -option_variant -------------------------------------------------------------------------------- -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -SELECT * FROM v1; -f1 f2 -0 zero -7 seven -8 eight -SELECT * FROM v2; -col1 col2 -7 seven -8 eight -SELECT * FROM v3; -my_col1 my_col2 -8 eight -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -DELETE FROM v3 WHERE my_col1 = 16; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 0; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 7; -affected rows: 0 -DELETE FROM v3 WHERE my_col1 = 8; -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -DELETE FROM t1; -INSERT INTO t1 VALUES(16, 'sixteen'); -INSERT INTO t1 VALUES(0, 'zero'); -INSERT INTO t1 VALUES(7, 'seven'); -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7; -affected rows: 0 -info: Rows matched: 0 Changed: 0 Warnings: 0 -UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 whatever -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -7 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -0 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -16 eight -DELETE FROM t1; -INSERT INTO t1 VALUES(8, 'eight'); -UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM t1; -f1 f2 -10 eight -DELETE FROM t1; -INSERT INTO v3 VALUES(16, 'sixteen'); -affected rows: 1 -INSERT INTO v3 VALUES(0, 'zero'); -affected rows: 1 -INSERT INTO v3 VALUES(7, 'seven'); -affected rows: 1 -INSERT INTO v3 VALUES(8, 'eight'); -affected rows: 1 -SELECT * FROM t1; -f1 f2 -16 sixteen -0 zero -7 seven -8 eight -DELETE FROM t1; -DROP VIEW v3; -DROP VIEW v2; -DROP VIEW v1; -SELECT * FROM t1_results ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno - - - UPDATE _v2_ 0 - - - INSERT _v2_ 0 - - - INSERT _ _v1 0 - - - UPDATE _ _ 0 - - - UPDATE _ _v1 0 - - - UPDATE v3_ _ 0 - - - INSERT _ _ 0 - - - WITH CHECK OPTION UPDATE _v2_ 0 - - - WITH CHECK OPTION INSERT _ _ 0 - - - WITH CHECK OPTION UPDATE _ _v1 0 - - - WITH CHECK OPTION UPDATE _ _ 0 - - - WITH CHECK OPTION UPDATE v3_ _ 0 - - - WITH CHECK OPTION INSERT _v2_ 0 - - - WITH CHECK OPTION INSERT _ _v1 0 - - - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - UPDATE _v2_ 0 - - WITH CHECK OPTION - INSERT _v2_ 0 - - WITH CHECK OPTION - UPDATE v3_ _ 0 - - WITH CHECK OPTION - UPDATE _ _v1 0 - - WITH CHECK OPTION - UPDATE _ _ 0 - - WITH CHECK OPTION - INSERT _ _v1 0 - - WITH CHECK OPTION - INSERT _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 - - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH CHECK OPTION - - UPDATE v3_ _ 1369 -WITH CHECK OPTION - - INSERT _ _ 0 -WITH CHECK OPTION - - INSERT _v2_ 1369 -WITH CHECK OPTION - - INSERT _ _v1 1369 -WITH CHECK OPTION - - UPDATE _v2_ 1369 -WITH CHECK OPTION - - UPDATE _ _v1 1369 -WITH CHECK OPTION - - UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 1369 -WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH CASCADED CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _v2_ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _v1 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _ _ 0 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION UPDATE v3_ _ 1369 -WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION - WITH LOCAL CHECK OPTION INSERT _v2_ 0 - -Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above). -All following SELECTs must give ROW NOT FOUND --------------------------------------------------------------------------------- -SELECT * FROM t1_results -WHERE v3_to_v1_violation = ' _ _ ' AND errno <> 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE ' %' AND errno <> 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE 'WITH %' - AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %' - AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno -SELECT * FROM t1_results -WHERE errno <> 0 AND errno <> 1369 -ORDER BY v3_to_v1_options; -v3_to_v1_options statement v3_to_v1_violation errno - -End of plausibility checks --------------------------------------------------------------------------------- -DROP TABLE t1_results; - -Testcase 3.3.1.50 - 3.3.1.53 --------------------------------------------------------------------------------- -DROP VIEW IF EXISTS test.v1; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2; -SELECT * FROM test.v1 order by f59,f60,f61 ; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f110 @@@@@@ -f111 I@I@ -f112 @@@@@@ -f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f115 @@ -f116 @@@@@@ -f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f110 @@@@ @ @ -f111 9@.@ -f112 @@@@ @ @ -f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f115 @@ -f116 @@@@ @ @ -f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2; -SELECT * FROM test.v1 order by F59, F61 limit 50; -F59 F61 -1 0000000001 -2 0000000002 -3 0000000003 -5 0000000005 -6 0000000006 -7 0000000007 -8 0000000008 -9 0000000009 -10 0000000010 -15 NULL -17 0000000016 -19 0000000014 -22 NULL -24 NULL -27 0000000026 -29 0000000024 -34 NULL -94 NULL -100 NULL -100 0000000004 -107 0000000106 -107 0000000106 -109 0000000104 -109 0000000104 -195 NULL -207 0000000206 -209 0000000204 -242 NULL -250 NULL -292 NULL -299 NULL -321 0000000765 -323 NULL -340 NULL -394 NULL -424 NULL -441 NULL -500 0000000900 -500 0000000900 -500 0000000900 -660 NULL -987 NULL -2550 NULL -2760 NULL -3330 NULL -3410 NULL -7876 NULL -9112 0000008771 -76710 NULL -569300 NULL -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61; -SELECT * FROM test.v1 order by f59,f60,f61 ; -f59 1 -f60 1 -f61 0000000001 -f62 0000000000000000000000000000000000000000000000000000000000000001 -f63 0000000001 -f64 0000000000000000000000000000000000000000000000000000000000000001 -f65 -5 -f66 0.000000000000000000000000000000 -f67 1 -f68 0.000000000000000000000000000000 -f69 0000000001 -f70 000000000000000000000000000000000.000000000000000000000000000000 -f71 0000000001 -f72 000000000000000000000000000000000.000000000000000000000000000000 -f73 -1.17549435e-38 -f74 1.175494352e-38 -f75 00000001.175494352e-38 -f76 00000001.175494352e-38 -f77 -1.17549435e-38 -f78 1.175494352e-38 -f79 00000001.175494352e-38 -f80 00000001.175494352e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.17549435e-38 -f95 1.17549e-38 -f96 1.175494352e-38 -f97 01.17549e-38 -f98 00000001.175494352e-38 -f99 01.17549e-38 -f100 00000001.175494352e-38 -f101 1000-01-01 -f102 838:59:58 -f103 1970-01-02 00:00:01 -f104 1970-01-02 00:00:01 -f105 1902 -f106 1902 -f107 1902 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 2 -f60 2 -f61 0000000002 -f62 0000000000000000000000000000000000000000000000000000000000000002 -f63 0000000002 -f64 0000000000000000000000000000000000000000000000000000000000000002 -f65 -4 -f66 1.100000000000000000000000000000 -f67 2 -f68 1.100000000000000000000000000000 -f69 0000000002 -f70 000000000000000000000000000000001.100000000000000000000000000000 -f71 0000000002 -f72 000000000000000000000000000000001.100000000000000000000000000000 -f73 -1.175494349e-38 -f74 1.175494353e-38 -f75 00000001.175494353e-38 -f76 00000001.175494353e-38 -f77 -1.175494349e-38 -f78 1.175494353e-38 -f79 00000001.175494353e-38 -f80 00000001.175494353e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494349e-38 -f95 1.17549e-38 -f96 1.175494353e-38 -f97 01.17549e-38 -f98 00000001.175494353e-38 -f99 01.17549e-38 -f100 00000001.175494353e-38 -f101 1000-01-02 -f102 838:59:57 -f103 1970-01-03 00:00:02 -f104 1970-01-03 00:00:02 -f105 1903 -f106 1903 -f107 1903 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 3 -f60 3 -f61 0000000003 -f62 0000000000000000000000000000000000000000000000000000000000000003 -f63 0000000003 -f64 0000000000000000000000000000000000000000000000000000000000000003 -f65 -3 -f66 2.200000000000000000000000000000 -f67 3 -f68 2.200000000000000000000000000000 -f69 0000000003 -f70 000000000000000000000000000000002.200000000000000000000000000000 -f71 0000000003 -f72 000000000000000000000000000000002.200000000000000000000000000000 -f73 -1.175494348e-38 -f74 1.175494354e-38 -f75 00000001.175494354e-38 -f76 00000001.175494354e-38 -f77 -1.175494348e-38 -f78 1.175494354e-38 -f79 00000001.175494354e-38 -f80 00000001.175494354e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494348e-38 -f95 1.17549e-38 -f96 1.175494354e-38 -f97 01.17549e-38 -f98 00000001.175494354e-38 -f99 01.17549e-38 -f100 00000001.175494354e-38 -f101 1000-01-03 -f102 838:59:56 -f103 1970-01-04 00:00:03 -f104 1970-01-04 00:00:03 -f105 1904 -f106 1904 -f107 1904 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 5 -f60 5 -f61 0000000005 -f62 0000000000000000000000000000000000000000000000000000000000000005 -f63 0000000005 -f64 0000000000000000000000000000000000000000000000000000000000000005 -f65 -1 -f66 4.400000000000000000000000000000 -f67 5 -f68 4.400000000000000000000000000000 -f69 0000000005 -f70 000000000000000000000000000000004.400000000000000000000000000000 -f71 0000000005 -f72 000000000000000000000000000000004.400000000000000000000000000000 -f73 -1.175494346e-38 -f74 1.175494356e-38 -f75 00000001.175494356e-38 -f76 00000001.175494356e-38 -f77 -1.175494346e-38 -f78 1.175494356e-38 -f79 00000001.175494356e-38 -f80 00000001.175494356e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494346e-38 -f95 1.17549e-38 -f96 1.175494356e-38 -f97 01.17549e-38 -f98 00000001.175494356e-38 -f99 01.17549e-38 -f100 00000001.175494356e-38 -f101 1000-01-05 -f102 838:59:54 -f103 1970-01-06 00:00:05 -f104 1970-01-06 00:00:05 -f105 1906 -f106 1906 -f107 1906 -f108 2enum -f109 1set,2set -f110 @@@@@@ -f111 I@I@ -f112 @@@@@@ -f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f115 @@ -f116 @@@@@@ -f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f59 6 -f60 6 -f61 0000000006 -f62 0000000000000000000000000000000000000000000000000000000000000006 -f63 0000000006 -f64 0000000000000000000000000000000000000000000000000000000000000006 -f65 0 -f66 5.500000000000000000000000000000 -f67 6 -f68 5.500000000000000000000000000000 -f69 0000000006 -f70 000000000000000000000000000000005.500000000000000000000000000000 -f71 0000000006 -f72 000000000000000000000000000000005.500000000000000000000000000000 -f73 -1.175494345e-38 -f74 1.175494357e-38 -f75 00000001.175494357e-38 -f76 00000001.175494357e-38 -f77 -1.175494345e-38 -f78 1.175494357e-38 -f79 00000001.175494357e-38 -f80 00000001.175494357e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494345e-38 -f95 1.17549e-38 -f96 1.175494357e-38 -f97 01.17549e-38 -f98 00000001.175494357e-38 -f99 01.17549e-38 -f100 00000001.175494357e-38 -f101 1000-01-06 -f102 838:59:53 -f103 1970-01-07 00:00:06 -f104 1970-01-07 00:00:06 -f105 1907 -f106 1907 -f107 1907 -f108 1enum -f109 1set -f110 @@@@ @ @ -f111 9@.@ -f112 @@@@ @ @ -f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ -f115 @@ -f116 @@@@ @ @ -f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -f59 7 -f60 7 -f61 0000000007 -f62 0000000000000000000000000000000000000000000000000000000000000007 -f63 0000000007 -f64 0000000000000000000000000000000000000000000000000000000000000007 -f65 1 -f66 6.600000000000000000000000000000 -f67 7 -f68 6.600000000000000000000000000000 -f69 0000000007 -f70 000000000000000000000000000000006.600000000000000000000000000000 -f71 0000000007 -f72 000000000000000000000000000000006.600000000000000000000000000000 -f73 -1.175494344e-38 -f74 1.175494358e-38 -f75 00000001.175494358e-38 -f76 00000001.175494358e-38 -f77 -1.175494344e-38 -f78 1.175494358e-38 -f79 00000001.175494358e-38 -f80 00000001.175494358e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494344e-38 -f95 1.17549e-38 -f96 1.175494358e-38 -f97 01.17549e-38 -f98 00000001.175494358e-38 -f99 01.17549e-38 -f100 00000001.175494358e-38 -f101 1000-01-07 -f102 838:59:52 -f103 1970-01-08 00:00:07 -f104 1970-01-08 00:00:07 -f105 1908 -f106 1908 -f107 1908 -f108 2enum -f109 2set -f110 ��@@ -f111 $@$@ -f112 ��@@ -f113 $@$@$@$@@@@@@@@@@@ -f114 $@$@$@$@@@@@@@@@@@ -f115  -f116 ��@@ -f117 $@$@$@$@@@@@@@@@@@ -f59 8 -f60 8 -f61 0000000008 -f62 0000000000000000000000000000000000000000000000000000000000000008 -f63 0000000008 -f64 0000000000000000000000000000000000000000000000000000000000000008 -f65 2 -f66 7.700000000000000000000000000000 -f67 8 -f68 7.700000000000000000000000000000 -f69 0000000008 -f70 000000000000000000000000000000007.700000000000000000000000000000 -f71 0000000008 -f72 000000000000000000000000000000007.700000000000000000000000000000 -f73 -1.175494343e-38 -f74 1.175494359e-38 -f75 00000001.175494359e-38 -f76 00000001.175494359e-38 -f77 -1.175494343e-38 -f78 1.175494359e-38 -f79 00000001.175494359e-38 -f80 00000001.175494359e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494343e-38 -f95 1.17549e-38 -f96 1.175494359e-38 -f97 01.17549e-38 -f98 00000001.175494359e-38 -f99 01.17549e-38 -f100 00000001.175494359e-38 -f101 1000-01-08 -f102 838:59:51 -f103 1970-01-09 00:00:08 -f104 1970-01-09 00:00:08 -f105 1909 -f106 1909 -f107 1909 -f108 1enum -f109 1set,2set -f110 ��@@@@ -f111 4@4@ -f112 ��@@@@ -f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f115 �� -f116 ��@@@@ -f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ -f59 9 -f60 9 -f61 0000000009 -f62 0000000000000000000000000000000000000000000000000000000000000009 -f63 0000000009 -f64 0000000000000000000000000000000000000000000000000000000000000009 -f65 3 -f66 8.800000000000000000000000000000 -f67 9 -f68 8.800000000000000000000000000000 -f69 0000000009 -f70 000000000000000000000000000000008.800000000000000000000000000000 -f71 0000000009 -f72 000000000000000000000000000000008.800000000000000000000000000000 -f73 -1.175494342e-38 -f74 1.17549436e-38 -f75 000000001.17549436e-38 -f76 000000001.17549436e-38 -f77 -1.175494342e-38 -f78 1.17549436e-38 -f79 000000001.17549436e-38 -f80 000000001.17549436e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494342e-38 -f95 1.17549e-38 -f96 1.17549436e-38 -f97 01.17549e-38 -f98 000000001.17549436e-38 -f99 01.17549e-38 -f100 000000001.17549436e-38 -f101 1000-01-09 -f102 838:59:50 -f103 1970-01-10 00:00:09 -f104 1970-01-10 00:00:09 -f105 1910 -f106 1910 -f107 1910 -f108 2enum -f109 1set -f110 @@@@@@ -f111 >@>@ -f112 @@@@@@ -f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f115 @@ -f116 @@@@@@ -f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -f59 10 -f60 10 -f61 0000000010 -f62 0000000000000000000000000000000000000000000000000000000000000010 -f63 0000000010 -f64 0000000000000000000000000000000000000000000000000000000000000010 -f65 4 -f66 9.900000000000000000000000000000 -f67 10 -f68 9.900000000000000000000000000000 -f69 0000000010 -f70 000000000000000000000000000000009.900000000000000000000000000000 -f71 0000000010 -f72 000000000000000000000000000000009.900000000000000000000000000000 -f73 -1.175494341e-38 -f74 1.175494361e-38 -f75 00000001.175494361e-38 -f76 00000001.175494361e-38 -f77 -1.175494341e-38 -f78 1.175494361e-38 -f79 00000001.175494361e-38 -f80 00000001.175494361e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494341e-38 -f95 1.17549e-38 -f96 1.175494361e-38 -f97 01.17549e-38 -f98 00000001.175494361e-38 -f99 01.17549e-38 -f100 00000001.175494361e-38 -f101 1000-01-10 -f102 838:59:49 -f103 1970-01-11 00:00:10 -f104 1970-01-11 00:00:10 -f105 1911 -f106 1911 -f107 1911 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 15 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 17 -f60 15 -f61 0000000016 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 19 -f60 18 -f61 0000000014 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 22 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 24 -f60 51654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 27 -f60 25 -f61 0000000026 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 29 -f60 28 -f61 0000000024 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 34 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 94 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 100 -f60 4 -f61 0000000004 -f62 0000000000000000000000000000000000000000000000000000000000000004 -f63 0000000004 -f64 0000000000000000000000000000000000000000000000000000000000000004 -f65 -2 -f66 3.300000000000000000000000000000 -f67 4 -f68 3.300000000000000000000000000000 -f69 0000000004 -f70 000000000000000000000000000000003.300000000000000000000000000000 -f71 0000000004 -f72 000000000000000000000000000000003.300000000000000000000000000000 -f73 -1.175494347e-38 -f74 1.175494355e-38 -f75 00000001.175494355e-38 -f76 00000001.175494355e-38 -f77 -1.175494347e-38 -f78 1.175494355e-38 -f79 00000001.175494355e-38 -f80 00000001.175494355e-38 -f81 -1.17549e-38 -f82 1.17549e-38 -f83 01.17549e-38 -f84 01.17549e-38 -f85 -1.17549e-38 -f86 -1.17549e-38 -f87 1.17549e-38 -f88 1.17549e-38 -f89 01.17549e-38 -f90 01.17549e-38 -f91 01.17549e-38 -f92 01.17549e-38 -f93 -1.17549e-38 -f94 -1.175494347e-38 -f95 1.17549e-38 -f96 1.175494355e-38 -f97 01.17549e-38 -f98 00000001.175494355e-38 -f99 01.17549e-38 -f100 00000001.175494355e-38 -f101 1000-01-04 -f102 838:59:55 -f103 1970-01-05 00:00:04 -f104 1970-01-05 00:00:04 -f105 1905 -f106 1905 -f107 1905 -f108 1enum -f109 2set -f110 @@@@@@ -f111 D@D@ -f112 @@@@@@ -f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -f115 @*@ -f116 @@@@@@ -f117 NULL -f59 100 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 107 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 109 -f60 108 -f61 0000000104 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 195 -f60 87 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 207 -f60 205 -f61 0000000206 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 209 -f60 208 -f61 0000000204 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 250 -f60 87895654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 292 -f60 93 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 299 -f60 899 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 321 -f60 NULL -f61 0000000765 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 323 -f60 14376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 340 -f60 9984376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 394 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 424 -f60 89 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 441 -f60 16546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 500 -f60 NULL -f61 0000000900 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 660 -f60 876546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 987 -f60 41 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 2550 -f60 775654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 2760 -f60 985654 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 3330 -f60 764376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 3410 -f60 996546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 7876 -f60 74 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 9112 -f60 NULL -f61 0000008771 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 76710 -f60 226546 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 569300 -f60 9114376 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -drop view test.v1 ; -CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2; -SELECT * FROM test.v1 order by f59,f61 desc limit 20; -F59 f61 -1 0000000001 -2 0000000002 -3 0000000003 -5 0000000005 -6 0000000006 -7 0000000007 -8 0000000008 -9 0000000009 -10 0000000010 -15 NULL -17 0000000016 -19 0000000014 -22 NULL -24 NULL -27 0000000026 -29 0000000024 -34 NULL -94 NULL -100 0000000004 -100 NULL -drop view test.v1 ; - -Testcase 3.3.1.54 --------------------------------------------------------------------------------- -USE test; -drop table if exists test.t1 ; -drop table if exists test.t2 ; -drop view if exists test.v1 ; -Create table t1 (f59 int, f60 int) ; -Create table t2 (f59 int, f60 int) ; -Insert into t1 values (1,10) ; -Insert into t1 values (2,20) ; -Insert into t1 values (47,80) ; -Insert into t2 values (1,1000) ; -Insert into t2 values (2,2000) ; -Insert into t2 values (31,97) ; -Create view test.v1 as select t1.f59, t1.f60 -from t1,t2 where t1.f59=t2.f59 ; -Select * from test.v1 order by f59 limit 50 ; -f59 f60 -1 10 -2 20 -drop table test.t1 ; -drop table test.t2 ; -drop view test.v1 ; - -Testcase 3.3.1.50 - 3.3.1.54 additional implementation --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) ); -INSERT INTO t1 VALUES(1, 'one', 1.1); -INSERT INTO t1 VALUES(2, 'two', 2.2); -INSERT INTO t1 VALUES(3, 'three', 3.3); -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; -SELECT * FROM v1; -f1 f2 f3 -1 one 1.10000 -2 two 2.20000 -3 three 3.30000 -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1; -SELECT * FROM v1; -f2 -one -two -three -CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2; -SELECT * FROM v1; -f1 f2 f3 -2 two 2.20000 -CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2; -SELECT * FROM v1; -f2 -two -SET sql_mode = 'traditional,ansi'; -CREATE OR REPLACE VIEW v1 AS -SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", -3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", -'->' || CAST(f3 AS CHAR) || '<-' - AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" -FROM t1 WHERE f1 = 2; -CREATE OR REPLACE VIEW v1 AS -SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", -3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", -'->' || CAST(f3 AS CHAR) || '<-' - AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " -FROM t1 WHERE f1 = 2; -ERROR 42000: Incorrect column name 'pure column f3: ' -SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- -SET sql_mode = ''; - -Testcases 3.3.1.55 - 3.3.1.62 --------------------------------------------------------------------------------- -Drop table if exists t1, t2 ; -Drop view if exists v1 ; -Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ; -Insert into t1 values (1, 'single', 3, '1') ; -Insert into t1 values (2, 'double', 6, '2') ; -Insert into t1 values (3, 'single-f3', 4, '3') ; -Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ; -Insert into t2 values (2, 'double', 6, '2') ; -Insert into t2 values (3, 'single-f3', 6, '3') ; -Insert into t2 values (4, 'single', 4, '4') ; -create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -from t1 inner join t2 where t1.f59 = t2.f59 ; -select * from test.v1 order by t1_f59 ; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -from t1 inner join t2 where t1.f59 = t2.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Create or replace view test.v1 as -Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2 cross join t1; -Select * from v1 order by t1_f59,t2_f59; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2 cross join t1; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Create or replace view test.v1 as -Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2,t1; -Select * from v1 order by t1_f59,t2_f59; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 -FROM t2,t1; -t1_f59 t2_f59 -1 2 -1 3 -1 4 -2 2 -2 3 -2 4 -3 2 -3 3 -3 4 -Create or replace view test.v1 as -Select f59, f60, f61, a, b -FROM t2 natural join t1; -Select * from v1 order by f59; -f59 f60 f61 a b -2 double 6 2 2 -Select f59, f60, f61, a, b -FROM t2 natural join t1; -f59 f60 f61 a b -2 double 6 2 2 -Create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 left outer join t1 on t2.f59=t1.f59; -Select * from v1 order by t1_f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -NULL 4 NULL single NULL 4 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 left outer join t1 on t2.f59=t1.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -NULL 4 NULL single NULL 4 -Create or replace view test.v1 as -Select f59, f60, f61, t1.a, t2.b -FROM t2 natural left outer join t1; -Select * from v1 order by f59; -f59 f60 f61 a b -2 double 6 2 2 -3 single-f3 6 NULL 3 -4 single 4 NULL 4 -Select f59, f60, f61, t1.a, t2.b -FROM t2 natural left outer join t1; -f59 f60 f61 a b -2 double 6 2 2 -3 single-f3 6 NULL 3 -4 single 4 NULL 4 -Create or replace view test.v1 as -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 right outer join t1 on t2.f59=t1.f59; -Select * from v1 order by t1_f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -1 NULL single NULL 3 NULL -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60, -t1.f61 t1_f61, t2.f61 t2_f61 -FROM t2 right outer join t1 on t2.f59=t1.f59; -t1_f59 t2_f59 t1_f60 t2_f60 t1_f61 t2_f61 -1 NULL single NULL 3 NULL -2 2 double double 6 6 -3 3 single-f3 single-f3 4 6 -Create or replace view test.v1 as -Select f59, f60, a, b -FROM t2 natural right outer join t1; -Select * from v1 order by f59 desc; -f59 f60 a b -3 single-f3 3 NULL -2 double 2 2 -1 single 1 NULL -Select f59, f60, a, b -FROM t2 natural right outer join t1; -f59 f60 a b -1 single 1 NULL -2 double 2 2 -3 single-f3 3 NULL -drop table t1, t2; -drop view v1 ; -Use test; - -Testcase 3.3.1.A1 - 3.3.1.A3 --------------------------------------------------------------------------------- -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (101,201,301) ; -Insert into t1 values (107,501,601) ; -Insert into t1 values (901,801,401) ; -Create or replace view test.v1 as -Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -1 -2 -3 -5 -6 -7 -8 -9 -10 -15 -Drop view if exists test.v1 ; -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (201,201,201) ; -Insert into t1 values (207,201,201) ; -Insert into t1 values (201,201,201) ; -Create or replace view test.v1 -as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -207 -Drop view if exists test.v1 ; -Drop table if exists t1 ; -Drop view if exists v1; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (21,21,21) ; -Insert into t1 values (27,21,21) ; -Insert into t1 values (21,21,21) ; -Create or replace view test.v1 -as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ; -Select * from test.v1 order by f59 limit 0,10; -f59 -27 -Drop view test.v1 ; - -Testcase 3.3.1.63 --------------------------------------------------------------------------------- -Drop table if exists t1 ; -Drop view if exists test.v1 ; -Create table t1 (f59 int, f60 int, f61 int) ; -Insert into t1 values (11,21,31) ; -Insert into t1 values (17,51,61) ; -Insert into t1 values (91,81,41) ; -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union ALL (Select f59 from t1 where f59=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -17 -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union (Select f59 from t1 where f59=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 ) -Union Distinct (Select f59 from t1 where f60=17 ); -Select * from test.v1 order by f59 limit 0,10; -f59 -17 -Drop view test.v1 ; -drop table if exists t1; -drop view if exists test.v1; -create table t1 (f59 int, f60 int, f61 int); -insert into t1 values (101,201,301); -insert into t1 values (107,501,601); -insert into t1 values (901,801,401); -create or replace view test.v1 as -select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59; -select * from test.v1 order by f59 limit 0,10; -f59 -107 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union all -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -107 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -create or replace view test.v1 as -(select f59 from tb2 where f59=107 ) -union distinct -(select f59 from t1 where f59=107 ); -select * from test.v1 order by f59 limit 0,10; -f59 -107 -drop view if exists test.v1 ; -drop table t1; - -Testcase 3.3.1.64 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT F59 -FROM test.tb2 where test.tb2.F59 = 109; -SELECT * FROM test.v1 order by f59 limit 0,10; -F59 -109 -109 -ALTER VIEW test.v1 AS SELECT * -FROM test.tb2 WHERE test.tb2.f59 = 242 ; -SELECT * FROM test.v1 order by f59 limit 0,10; -f59 242 -f60 79 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -Drop view test.v1 ; - -Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS test.v1 ; -CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = myisam ; -CREATE VIEW v1 AS SELECT f1 FROM t1; -DROP VIEW v1; -DROP VIEW v1; -ERROR 42S02: Unknown table 'v1' -CREATE VIEW v1 AS SELECT f1 FROM t1; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v1; -Warnings: -Note 1051 Unknown table 'test.v1' - -Testcase 3.3.1.68 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1_base ; -DROP VIEW IF EXISTS v1_top ; -CREATE TABLE t1 ( f1 DOUBLE); -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top CASCADE ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base CASCADE ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; -CREATE VIEW v1_base AS SELECT * FROM t1; -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_top RESTRICT ; -DROP VIEW v1_top; -ERROR 42S02: Unknown table 'v1_top' -CREATE VIEW v1_top AS SELECT * FROM v1_base; -DROP VIEW v1_base RESTRICT ; -DROP VIEW v1_base; -ERROR 42S02: Unknown table 'v1_base' -DROP VIEW v1_top; - -Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = myisam; -CREATE VIEW v1 AS SELECT * FROM t1; -DROP VIEW v1 ; -SELECT * FROM v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW CREATE VIEW v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW CREATE TABLE v1 ; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW TABLE STATUS like 'v1' ; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -SHOW TABLES LIKE 'v1'; -Tables_in_test (v1) -SHOW COLUMNS FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -SHOW FIELDS FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -CHECK TABLE v1; -Table Op Msg_type Msg_text -test.v1 check Error Table 'test.v1' doesn't exist -test.v1 check status Operation failed -DESCRIBE v1; -ERROR 42S02: Table 'test.v1' doesn't exist -EXPLAIN SELECT * FROM v1; -ERROR 42S02: Table 'test.v1' doesn't exist -Use test; - -Testcase 3.3.1.A6 --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS test3; -CREATE DATABASE test3; -CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = myisam; -INSERT INTO test3.t1 SET f1 = 1.0; -CREATE VIEW test3.v0 AS SELECT * FROM test3.t1; -CREATE VIEW test3.v1 AS SELECT * FROM test3.v0; -CREATE VIEW test3.v2 AS SELECT * FROM test3.v1; -CREATE VIEW test3.v3 AS SELECT * FROM test3.v2; -CREATE VIEW test3.v4 AS SELECT * FROM test3.v3; -CREATE VIEW test3.v5 AS SELECT * FROM test3.v4; -CREATE VIEW test3.v6 AS SELECT * FROM test3.v5; -CREATE VIEW test3.v7 AS SELECT * FROM test3.v6; -CREATE VIEW test3.v8 AS SELECT * FROM test3.v7; -CREATE VIEW test3.v9 AS SELECT * FROM test3.v8; -CREATE VIEW test3.v10 AS SELECT * FROM test3.v9; -CREATE VIEW test3.v11 AS SELECT * FROM test3.v10; -CREATE VIEW test3.v12 AS SELECT * FROM test3.v11; -CREATE VIEW test3.v13 AS SELECT * FROM test3.v12; -CREATE VIEW test3.v14 AS SELECT * FROM test3.v13; -CREATE VIEW test3.v15 AS SELECT * FROM test3.v14; -CREATE VIEW test3.v16 AS SELECT * FROM test3.v15; -CREATE VIEW test3.v17 AS SELECT * FROM test3.v16; -CREATE VIEW test3.v18 AS SELECT * FROM test3.v17; -CREATE VIEW test3.v19 AS SELECT * FROM test3.v18; -CREATE VIEW test3.v20 AS SELECT * FROM test3.v19; -CREATE VIEW test3.v21 AS SELECT * FROM test3.v20; -CREATE VIEW test3.v22 AS SELECT * FROM test3.v21; -CREATE VIEW test3.v23 AS SELECT * FROM test3.v22; -CREATE VIEW test3.v24 AS SELECT * FROM test3.v23; -CREATE VIEW test3.v25 AS SELECT * FROM test3.v24; -CREATE VIEW test3.v26 AS SELECT * FROM test3.v25; -CREATE VIEW test3.v27 AS SELECT * FROM test3.v26; -CREATE VIEW test3.v28 AS SELECT * FROM test3.v27; -CREATE VIEW test3.v29 AS SELECT * FROM test3.v28; -CREATE VIEW test3.v30 AS SELECT * FROM test3.v29; -CREATE VIEW test3.v31 AS SELECT * FROM test3.v30; -CREATE VIEW test3.v32 AS SELECT * FROM test3.v31; -SHOW CREATE VIEW test3.v32; -View Create View character_set_client collation_connection -v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci -SELECT * FROM test3.v32; -f1 -1.000 -EXPLAIN SELECT * FROM test3.v32; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 -DROP VIEW test3.v0; -SHOW CREATE VIEW test3.v32; -View Create View character_set_client collation_connection -v32 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31` latin1 latin1_swedish_ci -Warnings: -Warning 1356 View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM test3.v32; -ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -EXPLAIN SELECT * FROM test3.v32; -ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them - -FIXME - Setting join_limit to 28 - hangs for higher values ----------------------------------------------------------- -SET @join_limit = 28; -SET @max_level = @join_limit - 1; -DROP DATABASE IF EXISTS test3; -DROP TABLE IF EXISTS test1.t1; -DROP TABLE IF EXISTS test2.t1; -DROP VIEW IF EXISTS test1.v27; -DROP VIEW IF EXISTS test1.v26; -DROP VIEW IF EXISTS test1.v25; -DROP VIEW IF EXISTS test1.v24; -DROP VIEW IF EXISTS test1.v23; -DROP VIEW IF EXISTS test1.v22; -DROP VIEW IF EXISTS test1.v21; -DROP VIEW IF EXISTS test1.v20; -DROP VIEW IF EXISTS test1.v19; -DROP VIEW IF EXISTS test1.v18; -DROP VIEW IF EXISTS test1.v17; -DROP VIEW IF EXISTS test1.v16; -DROP VIEW IF EXISTS test1.v15; -DROP VIEW IF EXISTS test1.v14; -DROP VIEW IF EXISTS test1.v13; -DROP VIEW IF EXISTS test1.v12; -DROP VIEW IF EXISTS test1.v11; -DROP VIEW IF EXISTS test1.v10; -DROP VIEW IF EXISTS test1.v9; -DROP VIEW IF EXISTS test1.v8; -DROP VIEW IF EXISTS test1.v7; -DROP VIEW IF EXISTS test1.v6; -DROP VIEW IF EXISTS test1.v5; -DROP VIEW IF EXISTS test1.v4; -DROP VIEW IF EXISTS test1.v3; -DROP VIEW IF EXISTS test1.v2; -DROP VIEW IF EXISTS test1.v1; -DROP VIEW IF EXISTS test1.v0; -CREATE DATABASE test3; -USE test1; -CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = myisam ; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (0, NULL); -INSERT INTO t1 VALUES (5, 'five'); -INSERT INTO t1 VALUES (1, 'one'); -INSERT INTO t1 VALUES (2, 'two'); -USE test2; -CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = myisam; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL); -INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five'); -INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one'); -INSERT INTO t1 VALUES (3.000000000000000, 'three'); -USE test3; -CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = myisam; -INSERT INTO t1 VALUES (NULL, 'numeric column is NULL'); -INSERT INTO t1 VALUES (+0.0E-35, NULL); -INSERT INTO t1 VALUES (+0.5E+1, 'five'); -INSERT INTO t1 VALUES (20.0E-1, 'two'); -INSERT INTO t1 VALUES (0.0300E2, 'three'); -USE test; -CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1; -CREATE OR REPLACE VIEW test1.v1 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v0 tab2; -CREATE OR REPLACE VIEW test1.v2 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v1 tab2; -CREATE OR REPLACE VIEW test1.v3 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v2 tab2; -CREATE OR REPLACE VIEW test1.v4 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v3 tab2; -CREATE OR REPLACE VIEW test1.v5 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v4 tab2; -CREATE OR REPLACE VIEW test1.v6 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v5 tab2; -CREATE OR REPLACE VIEW test1.v7 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v6 tab2; -CREATE OR REPLACE VIEW test1.v8 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v7 tab2; -CREATE OR REPLACE VIEW test1.v9 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v8 tab2; -CREATE OR REPLACE VIEW test1.v10 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v9 tab2; -CREATE OR REPLACE VIEW test1.v11 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v10 tab2; -CREATE OR REPLACE VIEW test1.v12 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v11 tab2; -CREATE OR REPLACE VIEW test1.v13 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v12 tab2; -CREATE OR REPLACE VIEW test1.v14 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v13 tab2; -CREATE OR REPLACE VIEW test1.v15 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v14 tab2; -CREATE OR REPLACE VIEW test1.v16 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v15 tab2; -CREATE OR REPLACE VIEW test1.v17 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v16 tab2; -CREATE OR REPLACE VIEW test1.v18 AS SELECT f1, f2 -FROM test1.t1 tab1 NATURAL JOIN test1.v17 tab2; -CREATE OR REPLACE VIEW test1.v19 AS SELECT f1, f2 -FROM test2.t1 tab1 NATURAL JOIN test1.v18 tab2; -CREATE OR REPLACE VIEW test1.v20 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v19 tab2; -SHOW CREATE VIEW test1.v20; -View Create View character_set_client collation_connection -v20 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v20` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v19` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v20; -f1 f2 -5 five - -The output of following EXPLAIN is deactivated, because the result -differs on some platforms -FIXME Is this a bug ? --------------------------------------------------------------------------------- -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v20; -CREATE VIEW test1.v21 AS SELECT f1, f2 -FROM test3.t1 tab1 NATURAL JOIN test1.v20 tab2; -SHOW CREATE VIEW test1.v21; -View Create View character_set_client collation_connection -v21 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v21` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v20` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v21; -f1 f2 -5 five - -The output of following EXPLAIN is deactivated, because the result -differs on some platforms -FIXME Is this a bug ? --------------------------------------------------------------------------------- -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v21; -DROP VIEW IF EXISTS test1.v21; -CREATE OR REPLACE VIEW test1.v0 AS -SELECT f1 as f2, f2 as f1 FROM test2.t1; -CREATE OR REPLACE VIEW test2.v0 AS -SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1; -SHOW CREATE VIEW test1.v20; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v20; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v20; -CREATE OR REPLACE VIEW test3.v0 AS -SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1; -SHOW CREATE VIEW test1.v20; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v20; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v20; -CREATE OR REPLACE VIEW test3.v0 AS -SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1; -SHOW CREATE VIEW test1.v20; -SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v20; -EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, -CAST(f2 AS CHAR) AS f2 FROM test1.v20; -DROP VIEW IF EXISTS test1.v20; -DROP VIEW IF EXISTS test1.v19; -DROP VIEW IF EXISTS test1.v18; -DROP VIEW IF EXISTS test1.v17; -DROP VIEW IF EXISTS test1.v16; -DROP VIEW IF EXISTS test1.v15; -DROP VIEW IF EXISTS test1.v14; -DROP VIEW IF EXISTS test1.v13; -DROP VIEW IF EXISTS test1.v12; -DROP VIEW IF EXISTS test1.v11; -DROP VIEW IF EXISTS test1.v10; -DROP VIEW IF EXISTS test1.v9; -DROP VIEW IF EXISTS test1.v8; -DROP VIEW IF EXISTS test1.v7; -DROP VIEW IF EXISTS test1.v6; -DROP VIEW IF EXISTS test1.v5; -DROP VIEW IF EXISTS test1.v4; -DROP VIEW IF EXISTS test1.v3; -DROP VIEW IF EXISTS test1.v2; -DROP VIEW IF EXISTS test1.v1; -DROP VIEW IF EXISTS test1.v0; -DROP DATABASE test3; -DROP TABLE test1.t1; -DROP TABLE test2.t1; -Use test; - -Testcase 3.3.2.1 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ; -INSERT INTO test.v1 (f59,f60) values (879,700) ; -affected rows: 1 -SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ; -f59 f60 -DELETE FROM tb2 where f59 = 879 and f60 = 700 ; -Drop view test.v1 ; - -Testcase 3.3.2.2 --------------------------------------------------------------------------------- -Drop view if exists test.v1 ; -Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ; -f59 2005 -f60 101 -f61 NULL -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ; -f59 f60 -2005 101 -DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ; -Drop view test.v1 ; - -Testcase 3.3.2.3 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (780,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -SELECT * FROM tb2 where f59 = 8 and f60 = 105; -f59 8 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ; -f59 f60 -8 105 -Drop view test.v1 ; - -Testcase 3.3.2.4 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (781,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; -UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ; -affected rows: 4 -info: Rows matched: 4 Changed: 4 Warnings: 0 -SELECT * FROM tb2 where f59 = 891 and f60 = 105; -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -f59 891 -f60 105 -f61 0000000106 -f62 NULL -f63 NULL -f64 NULL -f65 NULL -f66 NULL -f67 NULL -f68 NULL -f69 NULL -f70 NULL -f71 NULL -f72 NULL -f73 NULL -f74 NULL -f75 NULL -f76 NULL -f77 7.7 -f78 7.7 -f79 00000000000000000007.7 -f80 00000000000000000008.8 -f81 8.8 -f82 8.8 -f83 0000000008.8 -f84 0000000008.8 -f85 8.8 -f86 8.8 -f87 8.8 -f88 8.8 -f89 0000000008.8 -f90 0000000008.8 -f91 0000000008.8 -f92 0000000008.8 -f93 8.8 -f94 8.8 -f95 8.8 -f96 8.8 -f97 0000000008.8 -f98 00000000000000000008.8 -f99 0000000008.8 -f100 00000000000000000008.8 -f101 2000-01-01 -f102 00:00:20 -f103 0002-02-02 00:00:00 -f104 2000-12-31 23:59:59 -f105 2000 -f106 2000 -f107 2000 -f108 1enum -f109 1set -f110 NULL -f111 NULL -f112 NULL -f113 NULL -f114 NULL -f115 NULL -f116 NULL -f117 NULL -SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ; -f59 f60 -891 105 -891 105 -891 105 -891 105 -Drop view test.v1 ; - -Testcase 3.3.2.5 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (789,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ; -DELETE FROM test.v1 where f59 = 789 ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 789 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ; -f59 f60 -Drop view test.v1 ; - -Testcase 3.3.2.6 --------------------------------------------------------------------------------- -Insert into tb2 (f59,f60,f61) values (711,105,106) ; -Drop view if exists test.v1 ; -CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711 ; -DELETE FROM test.v1 where f59 = 711 ; -affected rows: 1 -SELECT * FROM tb2 where f59 = 711 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ; -f59 f60 -Drop view test.v1 ; - -Testcase 3.3.2.1 - 3.3.2.6 alternative implementation --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; -CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4), -f4 CHAR, PRIMARY KEY(f1)); -CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1; -INSERT INTO v1 SET f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NULL NULL NULL -DELETE FROM t1; -INSERT INTO v1 SET f2 = 'ABC'; -INSERT INTO v1 SET f2 = 'ABC'; -ERROR 23000: Duplicate entry '0' for key 'PRIMARY' -SELECT * from t1; -f1 f2 f3 f4 -0 ABC NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 NNN -0.0012 X -DELETE FROM t1; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f2, f3 FROM t1; -INSERT INTO v1 SET f2 = 'ABC'; -INSERT INTO v1 SET f2 = 'ABC'; -ERROR 23000: Duplicate entry '0' for key 'PRIMARY' -SELECT * from t1; -f1 f2 f3 f4 -0 ABC NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1; -INSERT INTO v1 SET f1 = 1; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO'; -ERROR HY000: The target table v1 of the INSERT is not insertable-into -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1; -SELECT * from t1; -f1 f2 f3 f4 -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2; -SELECT * from t1; -f1 f2 f3 f4 -2 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f2 = 'NNN'; -SELECT * from t1; -f1 f2 f3 f4 -1 NNN -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET my_greeting = 'Hej'; -ERROR HY000: Column 'my_greeting' is not updatable -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 X -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -2 NNN -0.0012 X -DELETE FROM t1; -DROP TABLE t1; -SET sql_mode = 'traditional'; -CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL, -f4 CHAR, PRIMARY KEY(f1)); -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1; -INSERT INTO v1 SET f1 = 1; -ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value -SELECT * from t1; -f1 f2 f3 f4 -DELETE FROM t1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -DELETE FROM v1 WHERE f1 = 1; -INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); -UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC'; -SELECT * from t1; -f1 f2 f3 f4 -1 ABC -0.0012 Y -DELETE FROM t1; -SET sql_mode = ''; - -Testcases 3.3.2.7 - 3.3.2.9, -3.3.2.10 - 3.3.2.11 omitted because of missing -features EXCEPT and INTERSECT --------------------------------------------------------------------------------- -INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ; -INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ; -DROP TABLE IF EXISTS t1 ; -DROP VIEW IF EXISTS v1 ; -CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ; -INSERT INTO t1 VALUES (19,41,32) ; -INSERT INTO t1 VALUES (59,54,71) ; -INSERT INTO t1 VALUES (21,91,99) ; -SET @variant1 = 'UNION '; -SET @variant2 = 'UNION ALL '; -SET @variant3 = 'UNION DISTINCT '; -SET @variant4 = 'EXCEPT '; -SET @variant5 = 'INTERSECT '; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION DISTINCT SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION ALL SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; -CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION SELECT f61 FROM t1 WHERE f59=19; -INSERT INTO v1 VALUES (3000); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61 = 100 WHERE f61 = 32; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1 ; - -Testcases 3.3.2.12 - 3.3.2.20 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1, t2 ; -DROP VIEW IF EXISTS test.v1 ; -Drop view if exists v2 ; -CREATE TABLE t1 (f59 int, f60 int, f61 int) ; -INSERT INTO t1 VALUES (19,41,32) ; -INSERT INTO t1 VALUES (59,54,71) ; -INSERT INTO t1 VALUES (21,91,99) ; -CREATE TABLE t2 (f59 int, f60 int, f61 int) ; -INSERT INTO t2 VALUES (19,41,32) ; -INSERT INTO t2 VALUES (59,54,71) ; -INSERT INTO t2 VALUES (21,91,99) ; -CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5; -SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1'; -SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1'; -SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1'; -SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61'; -SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0'; -SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1'; -SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2'; -SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; -SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; -CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1); -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM v2; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1; -INSERT INTO v1 VALUES (1002); -ERROR HY000: The target table v1 of the INSERT is not insertable-into -UPDATE v1 SET f61=1007; -ERROR HY000: The target table v1 of the UPDATE is not updatable -DELETE FROM v1; -ERROR HY000: The target table v1 of the DELETE is not updatable -DROP VIEW v1; -Drop TABLE t1, t2 ; -Drop VIEW v2 ; - -Testcases 3.3.A1 --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v2; -CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5), -report char(10)) ENGINE = myisam; -CREATE VIEW v1 AS SELECT * FROM t1; -INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0'; -INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(5) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(5) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5); -INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1'; -INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a'; -ERROR 42S22: Unknown column 'f4x' in 'field list' -INSERT INTO v1 SET f1 = 0, report = 'v1 1b'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4x char(5) YES NULL -report char(10) YES NULL -DESCRIBE v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM t1 order by f1, report; -f1 f2 f4x report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -SELECT * FROM v1 order by f1, report; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5); -ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10); -INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2'; -INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(10) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(10) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 --> t1 2 -2 NULL <-- 10 --> v1 2 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 --> t1 2 -2 NULL <-- 10 --> v1 2 -ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); -Warnings: -Warning 1265 Data truncated for column 'f4' at row -Warning 1265 Data truncated for column 'f4' at row -INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; -Warnings: -Warning 1265 Data truncated for column 'f4' at row 1 -INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3'; -Warnings: -Warning 1265 Data truncated for column 'f4' at row 1 -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(8) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 char(8) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20); -INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4'; -INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30); -INSERT INTO t1 SET f1 = '<------------- 30 ----------->', -f4 = '<------ 20 -------->', report = 't1 5'; -INSERT INTO v1 SET f1 = '<------------- 30 ----------->', -f4 = '<------ 20 -------->', report = 'v1 5'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ALTER TABLE t1 DROP COLUMN f2; -INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6'; -INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6'; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -DESCRIBE v1; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -SELECT * FROM t1 order by f1, report; -f1 f4 report --1 ABC t1 0 --1 ABC v1 0 -0 ABC t1 1 -2 <-- 10 - t1 2 -2 <-- 10 - v1 2 -3 <-- 10 - t1 3 -3 <-- 10 - v1 3 -4 <------ 20 --------> t1 4 -4 <------ 20 --------> v1 4 -<------------- 30 -----------> <------ 20 --------> t1 5 -<------------- 30 -----------> <------ 20 --------> v1 5 -ABC <------ 20 --------> t1 6 -SELECT * FROM v1 order by f1, report; -ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL; -INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04', -f4 = '<------ 20 -------->', report = 't1 7'; -INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04', -f4 = '<------ 20 -------->', report = 'v1 7'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 date YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 date YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 --1 ABC t1 0 NULL --1 ABC v1 0 NULL -0 ABC t1 1 NULL -2 <-- 10 - t1 2 NULL -2 <-- 10 - v1 2 NULL -3 <-- 10 - t1 3 NULL -3 <-- 10 - v1 3 NULL -4 <------ 20 --------> t1 4 NULL -4 <------ 20 --------> v1 4 NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL -ABC <------ 20 --------> t1 6 NULL -ABC <------ 20 --------> t1 7 1500-12-04 -ABC <------ 20 --------> v1 7 1500-12-04 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC 1500-12-04 <------ 20 --------> t1 7 -ABC 1500-12-04 <------ 20 --------> v1 7 -ALTER TABLE t1 DROP COLUMN f2; -ALTER TABLE t1 ADD COLUMN f2 FLOAT; -INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 't1 8'; -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 'v1 8'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 float YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 float YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 --1 ABC t1 0 NULL --1 ABC v1 0 NULL -0 ABC t1 1 NULL -2 <-- 10 - t1 2 NULL -2 <-- 10 - v1 2 NULL -3 <-- 10 - t1 3 NULL -3 <-- 10 - v1 3 NULL -4 <------ 20 --------> t1 4 NULL -4 <------ 20 --------> v1 4 NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL -ABC <------ 20 --------> t1 6 NULL -ABC <------ 20 --------> t1 7 NULL -ABC <------ 20 --------> t1 8 -0.00033 -ABC <------ 20 --------> v1 7 NULL -ABC <------ 20 --------> v1 8 -0.00033 -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC NULL <------ 20 --------> t1 7 -ABC -0.00033 <------ 20 --------> t1 8 -ABC NULL <------ 20 --------> v1 7 -ABC -0.00033 <------ 20 --------> v1 8 -ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2); -INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, -f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9'; -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9'; -ERROR 42S22: Unknown column 'f3' in 'field list' -INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, -f4 = '<------ 20 -------->', report = 'v1 9a'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -f2 float YES NULL -f3 decimal(7,2) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 varchar(30) YES NULL -f2 float YES NULL -f4 varchar(20) YES NULL -report char(10) YES NULL -SELECT * FROM t1 order by f1, report; -f1 f4 report f2 f3 --1 ABC t1 0 NULL NULL --1 ABC v1 0 NULL NULL -0 ABC t1 1 NULL NULL -2 <-- 10 - t1 2 NULL NULL -2 <-- 10 - v1 2 NULL NULL -3 <-- 10 - t1 3 NULL NULL -3 <-- 10 - v1 3 NULL NULL -4 <------ 20 --------> t1 4 NULL NULL -4 <------ 20 --------> v1 4 NULL NULL -<------------- 30 -----------> <------ 20 --------> t1 5 NULL NULL -<------------- 30 -----------> <------ 20 --------> v1 5 NULL NULL -ABC <------ 20 --------> t1 6 NULL NULL -ABC <------ 20 --------> t1 7 NULL NULL -ABC <------ 20 --------> t1 8 -0.00033 NULL -ABC <------ 20 --------> t1 9 -0.00033 -2.20 -ABC <------ 20 --------> v1 7 NULL NULL -ABC <------ 20 --------> v1 8 -0.00033 NULL -ABC <------ 20 --------> v1 9a -0.00033 NULL -SELECT * FROM v1 order by f1, report; -f1 f2 f4 report --1 NULL ABC t1 0 --1 NULL ABC v1 0 -0 NULL ABC t1 1 -2 NULL <-- 10 - t1 2 -2 NULL <-- 10 - v1 2 -3 NULL <-- 10 - t1 3 -3 NULL <-- 10 - v1 3 -4 NULL <------ 20 --------> t1 4 -4 NULL <------ 20 --------> v1 4 -<------------- 30 -----------> NULL <------ 20 --------> t1 5 -<------------- 30 -----------> NULL <------ 20 --------> v1 5 -ABC NULL <------ 20 --------> t1 6 -ABC NULL <------ 20 --------> t1 7 -ABC -0.00033 <------ 20 --------> t1 8 -ABC -0.00033 <------ 20 --------> t1 9 -ABC NULL <------ 20 --------> v1 7 -ABC -0.00033 <------ 20 --------> v1 8 -ABC -0.00033 <------ 20 --------> v1 9a -DROP TABLE t1; -DROP VIEW v1; -CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = myisam; -INSERT INTO t1 SET f1 = 'ABC', f2 = 3; -CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -f2 bigint(20) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM t1 order by f1, f2; -f1 f2 -ABC 3 -SELECT * FROM v1 order by 2; -f1 my_sqrt -ABC 1.73205080756888 -ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30); -INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF'; -DESCRIBE t1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -f2 varchar(30) YES NULL -DESCRIBE v1; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM t1 order by f1, f2; -f1 f2 -ABC 3 -ABC DEF -SELECT * FROM v1 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 -SELECT SQRT('DEF'); -SQRT('DEF') -0 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -CREATE VIEW v2 AS SELECT SQRT('DEF'); -SELECT * FROM v2 order by 1; -SQRT('DEF') -0 -Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'DEF' -CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -DESCRIBE v2; -Field Type Null Key Default Extra -f1 char(10) YES NULL -my_sqrt double YES NULL -SELECT * FROM v2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 -CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.73205080756888 -DROP TABLE t2; -CREATE TABLE t2 AS SELECT * FROM v1; -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.73205080756888 -DROP TABLE t2; -CREATE TABLE t2 AS SELECT * FROM v2; -SELECT * FROM t2 order by 2; -f1 ABC -my_sqrt 0 -f1 ABC -my_sqrt 1.73205080756888 -DROP TABLE t1; -DROP TABLE t2; -DROP VIEW v1; -DROP VIEW v2; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v1_1; -DROP VIEW IF EXISTS v1_2; -DROP VIEW IF EXISTS v1_firstview; -DROP VIEW IF EXISTS v1_secondview; -DROP VIEW IF EXISTS v2; -DROP DATABASE IF EXISTS test2; -DROP DATABASE IF EXISTS test3; -DROP DATABASE test1; -DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/t/myisam_views-big.test b/mysql-test/suite/funcs_1/t/myisam_views-big.test new file mode 100644 index 00000000000..21613e78b24 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/myisam_views-big.test @@ -0,0 +1,34 @@ +#### suite/funcs_1/t/myisam_views.test + +--source include/no_valgrind_without_big.inc +# because of a pair of slow Solaris Sparc machines in pb2, +# this test is marked as big: +--source include/big_test.inc + +# MyISAM tables should be used +# +# Set $engine_type +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +let $engine_type= myisam; + +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb2.inc +--disable_warnings +DROP DATABASE IF EXISTS test1; +--enable_warnings +CREATE DATABASE test1; +USE test1; +--source suite/funcs_1/include/myisam_tb2.inc +USE test; + +let $message= Attention: The nesting level @max_level in Testcase 3.3.1.A6 + (Complicated nested VIEWs) has to be limited to 20 because of + MyISAM(only) performance issues Bug#11948; +--source include/show_msg80.inc +SET @limit1 = 20; +--source suite/funcs_1/views/views_master.inc + +DROP DATABASE test1; +DROP TABLE test.tb2; + diff --git a/mysql-test/suite/funcs_1/t/myisam_views.test b/mysql-test/suite/funcs_1/t/myisam_views.test deleted file mode 100644 index fe72843cfaf..00000000000 --- a/mysql-test/suite/funcs_1/t/myisam_views.test +++ /dev/null @@ -1,31 +0,0 @@ -#### suite/funcs_1/t/myisam_views.test - ---source include/no_valgrind_without_big.inc - -# MyISAM tables should be used -# -# Set $engine_type -SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; -let $engine_type= myisam; - -# Create some objects needed in many testcases -USE test; ---source suite/funcs_1/include/myisam_tb2.inc ---disable_warnings -DROP DATABASE IF EXISTS test1; ---enable_warnings -CREATE DATABASE test1; -USE test1; ---source suite/funcs_1/include/myisam_tb2.inc -USE test; - -let $message= Attention: The nesting level @max_level in Testcase 3.3.1.A6 - (Complicated nested VIEWs) has to be limited to 20 because of - MyISAM(only) performance issues Bug#11948; ---source include/show_msg80.inc -SET @limit1 = 20; ---source suite/funcs_1/views/views_master.inc - -DROP DATABASE test1; -DROP TABLE test.tb2; - -- cgit v1.2.1 From 92fc42638661bf574009c4a3cd6a812d948db8e9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Jan 2011 15:33:39 +0100 Subject: Speed up `mtr --parallel=` by scheduling some slow tests earlier. The patch also fixes a race in rpl_stop_slave.test. On machines with lots of CPU and memory, something like `mtr --parallel=10` can speed up the test suite enormously. However, we have a few test cases that run for long (several minutes), and if we are unlucky and happen to schedule those towards the end of the test suite, we end up with most workers idle while waiting for the last slow test to end, significantly delaying the finish of the entire suite. Improve this by marking the offending tests as taking "long", and trying to schedule those tests early. This reduces the time towards the end of the test suite run where some workers are waiting with nothing to do for the remaining workers each to finish their last test. Also, the rpl_stop_slave test had a race which could cause it to take a 300 seconds debug_sync timeout; this is fixed. Testing on a 4-core 8GB machine, this patch speeds up the test suite with around 30% for --parallel=10 (debug build), allowing to run the entire suite in 5 minutes. --- mysql-test/suite/federated/federated_debug.test | 1 + mysql-test/suite/maria/t/maria-recovery-rtree-ft.test | 1 + mysql-test/suite/parts/t/partition_alter2_1_myisam.test | 2 ++ mysql-test/suite/parts/t/partition_alter2_2_myisam.test | 2 ++ mysql-test/suite/parts/t/partition_basic_innodb.test | 2 ++ mysql-test/suite/parts/t/partition_decimal_myisam.test | 2 ++ mysql-test/suite/parts/t/partition_float_myisam.test | 2 ++ mysql-test/suite/parts/t/partition_int_myisam.test | 2 ++ mysql-test/suite/rpl/r/rpl_stop_slave.result | 4 ++++ mysql-test/suite/rpl/t/rpl_deadlock_innodb.test | 1 + mysql-test/suite/rpl/t/rpl_row_sp003.test | 1 + 11 files changed, 20 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/federated/federated_debug.test b/mysql-test/suite/federated/federated_debug.test index 4152d2975b3..d63c1007088 100644 --- a/mysql-test/suite/federated/federated_debug.test +++ b/mysql-test/suite/federated/federated_debug.test @@ -1,4 +1,5 @@ --source include/have_debug.inc +--source include/long_test.inc --source federated.inc --echo # diff --git a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test b/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test index 3ede5002b72..ac71be376f1 100644 --- a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test +++ b/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test @@ -6,6 +6,7 @@ # Binary must be compiled with debug for crash to occur --source include/have_debug.inc --source include/have_maria.inc +--source include/long_test.inc set global maria_log_file_size=4294967295; let $MARIA_LOG=.; diff --git a/mysql-test/suite/parts/t/partition_alter2_1_myisam.test b/mysql-test/suite/parts/t/partition_alter2_1_myisam.test index 1c89a82b960..11ec9b51f7c 100644 --- a/mysql-test/suite/parts/t/partition_alter2_1_myisam.test +++ b/mysql-test/suite/parts/t/partition_alter2_1_myisam.test @@ -22,6 +22,8 @@ # any of the variables. # +--source include/long_test.inc + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_alter2_2_myisam.test b/mysql-test/suite/parts/t/partition_alter2_2_myisam.test index c9b22ed8595..8fbb943a48d 100644 --- a/mysql-test/suite/parts/t/partition_alter2_2_myisam.test +++ b/mysql-test/suite/parts/t/partition_alter2_2_myisam.test @@ -22,6 +22,8 @@ # any of the variables. # +--source include/long_test.inc + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_basic_innodb.test b/mysql-test/suite/parts/t/partition_basic_innodb.test index 2fa94cbde21..8240257f087 100644 --- a/mysql-test/suite/parts/t/partition_basic_innodb.test +++ b/mysql-test/suite/parts/t/partition_basic_innodb.test @@ -22,6 +22,8 @@ # any of the variables. # +--source include/long_test.inc + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_decimal_myisam.test b/mysql-test/suite/parts/t/partition_decimal_myisam.test index 49fc64cbd37..9808dc878f8 100644 --- a/mysql-test/suite/parts/t/partition_decimal_myisam.test +++ b/mysql-test/suite/parts/t/partition_decimal_myisam.test @@ -22,6 +22,8 @@ # any of the variables. # +--source include/long_test.inc + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_float_myisam.test b/mysql-test/suite/parts/t/partition_float_myisam.test index 51e0f1f5a21..f15e6ad3636 100644 --- a/mysql-test/suite/parts/t/partition_float_myisam.test +++ b/mysql-test/suite/parts/t/partition_float_myisam.test @@ -22,6 +22,8 @@ # any of the variables. # +--source include/long_test.inc + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_int_myisam.test b/mysql-test/suite/parts/t/partition_int_myisam.test index b0ede4995e8..5f29b575244 100644 --- a/mysql-test/suite/parts/t/partition_int_myisam.test +++ b/mysql-test/suite/parts/t/partition_int_myisam.test @@ -22,6 +22,8 @@ # any of the variables. # +--source include/long_test.inc + #------------------------------------------------------------------------------# # General not engine specific settings and requirements diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index 49146417ab7..4e16e8264f6 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -38,6 +38,7 @@ STOP SLAVE SQL_THREAD; [ On Slave1 ] # To resume slave SQL thread SET DEBUG_SYNC= 'now SIGNAL signal.continue'; +SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] @@ -63,6 +64,7 @@ STOP SLAVE SQL_THREAD; [ On Slave1 ] # To resume slave SQL thread SET DEBUG_SYNC= 'now SIGNAL signal.continue'; +SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] @@ -89,6 +91,7 @@ STOP SLAVE SQL_THREAD; [ On Slave1 ] # To resume slave SQL thread SET DEBUG_SYNC= 'now SIGNAL signal.continue'; +SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] @@ -115,6 +118,7 @@ STOP SLAVE SQL_THREAD; [ On Slave1 ] # To resume slave SQL thread SET DEBUG_SYNC= 'now SIGNAL signal.continue'; +SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; SET DEBUG_SYNC= 'RESET'; [ On Slave ] diff --git a/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test b/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test index ee907f81b22..169ccbf7f18 100644 --- a/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_deadlock_innodb.test @@ -7,5 +7,6 @@ ######################################################## -- source include/not_ndb_default.inc -- source include/have_innodb.inc +-- source include/long_test.inc let $engine_type=innodb; -- source extra/rpl_tests/rpl_deadlock.test diff --git a/mysql-test/suite/rpl/t/rpl_row_sp003.test b/mysql-test/suite/rpl/t/rpl_row_sp003.test index ab49174ddfa..8ed47232ba9 100644 --- a/mysql-test/suite/rpl/t/rpl_row_sp003.test +++ b/mysql-test/suite/rpl/t/rpl_row_sp003.test @@ -10,6 +10,7 @@ -- source include/have_binlog_format_row.inc # Slow test, don't run during staging part -- source include/not_staging.inc +--source include/long_test.inc -- source include/master-slave.inc let $engine_type=INNODB; -- cgit v1.2.1 From c6ffb4b798b88e52b4bb794a53c89e466d4552b0 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Wed, 5 Jan 2011 12:16:07 +0530 Subject: Modifications in mysql-5.1 engines test suite. --- mysql-test/suite/engines/funcs/r/rpl_000015.result | 143 +++++++++++++++- .../suite/engines/funcs/r/rpl_REDIRECT.result | 3 +- .../suite/engines/funcs/r/rpl_change_master.result | 6 + .../engines/funcs/r/rpl_empty_master_crash.result | 2 + .../suite/engines/funcs/r/rpl_flushlog_loop.result | 41 ++++- .../suite/engines/funcs/r/rpl_loaddata_s.result | 2 +- .../suite/engines/funcs/r/rpl_log_pos.result | 28 ++- .../suite/engines/funcs/r/rpl_rbr_to_sbr.result | 51 ++++-- .../suite/engines/funcs/r/rpl_row_drop.result | 9 +- .../engines/funcs/r/rpl_row_inexist_tbl.result | 40 ++++- .../suite/engines/funcs/r/rpl_row_until.result | 188 +++++++++++++++++++-- .../suite/engines/funcs/r/rpl_server_id1.result | 4 +- .../suite/engines/funcs/r/rpl_server_id2.result | 3 + .../suite/engines/funcs/r/rpl_slave_status.result | 39 +++++ mysql-test/suite/engines/funcs/r/rpl_sp.result | 2 +- .../funcs/r/rpl_switch_stm_row_mixed.result | 4 +- mysql-test/suite/engines/funcs/t/disabled.def | 89 ++++++++++ mysql-test/suite/engines/funcs/t/rpl_000015.test | 26 +-- mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test | 12 +- .../suite/engines/funcs/t/rpl_change_master.test | 25 +-- .../engines/funcs/t/rpl_empty_master_crash.test | 3 + .../suite/engines/funcs/t/rpl_flushlog_loop.test | 7 +- .../suite/engines/funcs/t/rpl_loaddata_s.test | 4 +- mysql-test/suite/engines/funcs/t/rpl_log_pos.test | 45 +++-- .../suite/engines/funcs/t/rpl_rbr_to_sbr.test | 16 +- mysql-test/suite/engines/funcs/t/rpl_row_drop.test | 5 +- .../suite/engines/funcs/t/rpl_row_inexist_tbl.test | 10 +- .../suite/engines/funcs/t/rpl_row_until.test | 49 +++--- .../suite/engines/funcs/t/rpl_server_id1.test | 9 +- .../suite/engines/funcs/t/rpl_server_id2.test | 3 + .../suite/engines/funcs/t/rpl_slave_status.test | 12 +- .../engines/funcs/t/rpl_switch_stm_row_mixed.test | 8 +- mysql-test/suite/engines/iuds/t/insert_year.test | 2 + 33 files changed, 731 insertions(+), 159 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/engines/funcs/r/rpl_000015.result b/mysql-test/suite/engines/funcs/r/rpl_000015.result index 8cd48141127..eee3b505ad6 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_000015.result +++ b/mysql-test/suite/engines/funcs/r/rpl_000015.result @@ -10,25 +10,166 @@ File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 106 stop slave; reset slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry # 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 change master to master_host='127.0.0.1'; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry # 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 change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=MASTER_PORT; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry # 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 start slave; +show slave status; +Slave_IO_State Waiting for master to send event +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 106 +Relay_Log_File slave-relay-bin.000002 +Relay_Log_Pos 252 Relay_Master_Log_File master-bin.000001 -Checking that both slave threads are running. +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 106 +Relay_Log_Space 407 +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 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/engines/funcs/r/rpl_REDIRECT.result b/mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result index b6cb2c0e7de..7a901b65810 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result +++ b/mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result @@ -4,7 +4,8 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -SHOW SLAVE STATUS;; +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 SHOW SLAVE HOSTS; Server_id Host Port Rpl_recovery_rank Master_id 2 127.0.0.1 SLAVE_PORT 0 1 diff --git a/mysql-test/suite/engines/funcs/r/rpl_change_master.result b/mysql-test/suite/engines/funcs/r/rpl_change_master.result index 2258a35a869..62c5ffdd4f8 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_change_master.result +++ b/mysql-test/suite/engines/funcs/r/rpl_change_master.result @@ -11,7 +11,13 @@ stop slave sql_thread; insert into t1 values(1); insert into t1 values(2); stop slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No 0 0 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_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No 0 0 start slave; select * from t1; n diff --git a/mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result b/mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result index f71411c68dd..b5e14d3adac 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result +++ b/mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result @@ -4,6 +4,8 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error load table t1 from master; ERROR 08S01: Error connecting to master: Master is not configured load table t1 from master; diff --git a/mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result b/mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result index ef4d7797dbf..c894ad0135b 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result +++ b/mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result @@ -17,6 +17,43 @@ let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes% --source include/wait_slave_status.inc flush logs; -Relay_Log_File mysqld-relay-bin.000003 -Checking that both slave threads are running. +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port SLAVE_PORT +Connect_Retry 60 +Master_Log_File slave-bin.000001 +Read_Master_Log_Pos 106 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File slave-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 106 +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 STOP SLAVE; diff --git a/mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result b/mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result index 779a3af9631..d858ced1352 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result +++ b/mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result @@ -10,6 +10,6 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; select count(*) from test.t1; count(*) 2 -show binlog events from ; +show binlog events from 106; Log_name Pos Event_type Server_id End_log_pos Info drop table test.t1; diff --git a/mysql-test/suite/engines/funcs/r/rpl_log_pos.result b/mysql-test/suite/engines/funcs/r/rpl_log_pos.result index 1b2ded26f66..f26f4350cf1 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_log_pos.result +++ b/mysql-test/suite/engines/funcs/r/rpl_log_pos.result @@ -4,23 +4,39 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 +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 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No 0 0 stop slave; -change master to master_log_pos=MASTER_LOG_POS; +change master to master_log_pos=106; start slave; stop slave; -change master to master_log_pos=MASTER_LOG_POS; +change master to master_log_pos=106; +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 106 # # master-bin.000001 No No 0 0 106 # None 0 No # No 0 0 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 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No 0 0 stop slave; -# impossible position leads to an error -change master to master_log_pos=MASTER_LOG_POS; +change master to master_log_pos=177; start slave; -Last_IO_Error = Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position' +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 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No # No 1236 Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position' 0 +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 create table if not exists t1 (n int); drop table if exists t1; create table t1 (n int); insert into t1 values (1),(2),(3); stop slave; -change master to master_log_pos=MASTER_LOG_POS; +change master to master_log_pos=206; start slave; select * from t1 ORDER BY n; n diff --git a/mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result b/mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result index ced1693bdc8..b4b04d35208 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result @@ -14,16 +14,47 @@ MIXED MIXED CREATE TABLE t1 (a INT, b LONG); INSERT INTO t1 VALUES (1,1), (2,2); INSERT INTO t1 VALUES (3,UUID()), (4,UUID()); -show binlog events from ; +SHOW BINLOG EVENTS; **** On Slave **** -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, b LONG) -slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -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 -show binlog events from ; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error +SHOW BINLOG EVENTS; DROP TABLE IF EXISTS t1; SET GLOBAL BINLOG_FORMAT=@saved_binlog_format; diff --git a/mysql-test/suite/engines/funcs/r/rpl_row_drop.result b/mysql-test/suite/engines/funcs/r/rpl_row_drop.result index 048e07271b3..89654ebf165 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_row_drop.result +++ b/mysql-test/suite/engines/funcs/r/rpl_row_drop.result @@ -41,11 +41,12 @@ t1 t2 **** On Master **** DROP TABLE t1,t2; -show binlog events from ; +SHOW BINLOG EVENTS; 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`; CREATE TABLE t2 (a int) -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a int) +master-bin.000001 192 Query 1 278 use `test`; CREATE TABLE t2 (a int) +master-bin.000001 278 Query 1 382 use `test`; DROP TABLE `t1` /* generated by server */ SHOW TABLES; Tables_in_test t2 diff --git a/mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result b/mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result index cd7528280d0..ad192b530a7 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result +++ b/mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result @@ -17,5 +17,43 @@ a 0 drop table t1; insert into t1 values (1); -Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table test.t2 +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1146 +Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables +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 0 +Last_IO_Error +Last_SQL_Errno 1146 +Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables drop table t1, t2; diff --git a/mysql-test/suite/engines/funcs/r/rpl_row_until.result b/mysql-test/suite/engines/funcs/r/rpl_row_until.result index 72dd1a6a7c3..5091a9f6468 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_row_until.result +++ b/mysql-test/suite/engines/funcs/r/rpl_row_until.result @@ -12,39 +12,193 @@ create table t2(n int not null auto_increment primary key); insert into t2 values (1),(2); insert into t2 values (3),(4); drop table t2; -start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS; +start slave until master_log_file='master-bin.000001', master_log_pos=311; select * from t1; n 1 2 3 4 -start slave until master_log_file='master-no-such-bin.000001', master_log_pos=MASTER_LOG_POS; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 311 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error +start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; -n -1 -2 -3 -4 -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS; +n 1 +n 2 +n 3 +n 4 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-no-such-bin.000001 +Until_Log_Pos 291 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; select * from t2; -n -1 -2 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition Relay +Until_Log_File slave-relay-bin.000004 +Until_Log_Pos 728 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error start slave; stop slave; -start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS; -start slave until master_log_file='master-bin', master_log_pos=MASTER_LOG_POS; +start slave until master_log_file='master-bin.000001', master_log_pos=740; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 740 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error +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=MASTER_LOG_POS, relay_log_pos=RELAY_LOG_POS; +start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001'; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until relay_log_file='slave-relay-bin.000002'; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=MASTER_LOG_POS; +start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS; +start slave until master_log_file='master-bin.000001', master_log_pos=740; Warnings: -Note 1254 Slave is already running +Level Note +Code 1254 +Message Slave is already running diff --git a/mysql-test/suite/engines/funcs/r/rpl_server_id1.result b/mysql-test/suite/engines/funcs/r/rpl_server_id1.result index 1e7108d7961..47c2a522094 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_server_id1.result +++ b/mysql-test/suite/engines/funcs/r/rpl_server_id1.result @@ -8,8 +8,10 @@ create table t1 (n int); reset master; stop slave; change master to master_port=SLAVE_PORT; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL No 0 0 start slave; -Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). insert into t1 values (1); show status like "slave_running"; Variable_name Value diff --git a/mysql-test/suite/engines/funcs/r/rpl_server_id2.result b/mysql-test/suite/engines/funcs/r/rpl_server_id2.result index 066b563c4e8..d50814022d8 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_server_id2.result +++ b/mysql-test/suite/engines/funcs/r/rpl_server_id2.result @@ -8,6 +8,9 @@ create table t1 (n int); reset master; stop slave; change master to master_port=SLAVE_PORT; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL No 0 0 start slave; insert into t1 values (1); select * from t1; diff --git a/mysql-test/suite/engines/funcs/r/rpl_slave_status.result b/mysql-test/suite/engines/funcs/r/rpl_slave_status.result index c4dc7686045..dfc82f61e68 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_slave_status.result +++ b/mysql-test/suite/engines/funcs/r/rpl_slave_status.result @@ -18,5 +18,44 @@ drop user rpl@127.0.0.1; flush privileges; stop slave; start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User rpl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running No +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master NULL +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 0 +Last_SQL_Error drop table t1; drop table t1; diff --git a/mysql-test/suite/engines/funcs/r/rpl_sp.result b/mysql-test/suite/engines/funcs/r/rpl_sp.result index c7b869c32e3..efbfde15020 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_sp.result +++ b/mysql-test/suite/engines/funcs/r/rpl_sp.result @@ -176,7 +176,7 @@ end| ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) set global log_bin_trust_routine_creators=1; Warnings: -Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.6. Please use '@@log_bin_trust_function_creators' instead +Warning 1287 '@@log_bin_trust_routine_creators' is deprecated and will be removed in a future release. Please use '@@log_bin_trust_function_creators' instead set global log_bin_trust_function_creators=0; set global log_bin_trust_function_creators=1; set global log_bin_trust_function_creators=1; diff --git a/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result index 61d77c0dc2a..466302000af 100644 --- a/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result +++ b/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result @@ -376,7 +376,7 @@ CREATE TABLE t12 (data LONG); LOCK TABLES t12 WRITE; INSERT INTO t12 VALUES(UUID()); UNLOCK TABLES; -show binlog events from ; -show binlog events from ; +show binlog events; +show binlog events; drop database mysqltest1; set global binlog_format= @saved_binlog_format; diff --git a/mysql-test/suite/engines/funcs/t/disabled.def b/mysql-test/suite/engines/funcs/t/disabled.def index 2aca7006b4e..5b6e3f6a281 100644 --- a/mysql-test/suite/engines/funcs/t/disabled.def +++ b/mysql-test/suite/engines/funcs/t/disabled.def @@ -5,3 +5,92 @@ crash_manycolumns_string : Bug#50495 'Row size too large' for plugin, but works ix_unique_lob : Bug#52283 Innodb reports extra warnings when SELECT/WHERE is performed using invalid value ix_unique_string_length : Bug#52283 Innodb reports extra warnings when SELECT/WHERE is performed using invalid value +rpl_create_database : Result Difference Due to Change in .inc file +rpl_loaddata_m : Result Difference Due to Change in .inc file +rpl_sp_effects : Result Difference Due to Change in .inc file +rpl_variables : Result Difference Due to Change in .inc file +rpl_loaddata_s : Result Difference Due to Change in .inc file +rpl_server_id2 : Result Difference Due to Change in .inc file +rpl000010 : Result Difference Due to Change in .inc file +rpl_init_slave : Result Difference Due to Change in .inc file +rpl_dual_pos_advance : Result Difference Due to Change in .inc file +rpl_empty_master_crash : Result Difference Due to Change in .inc file +rpl000011 : Result Difference Due to Change in .inc file +rpl000013 : Result Difference Due to Change in .inc file +rpl_000015 : Result Difference Due to Change in .inc file +rpl_LD_INFILE : Result Difference Due to Change in .inc file +rpl_REDIRECT : Result Difference Due to Change in .inc file +rpl_alter : Result Difference Due to Change in .inc file +rpl_alter_db : Result Difference Due to Change in .inc file +rpl_bit : Result Difference Due to Change in .inc file +rpl_bit_npk : Result Difference Due to Change in .inc file +rpl_change_master : Result Difference Due to Change in .inc file +rpl_do_grant : Result Difference Due to Change in .inc file +rpl_drop : Result Difference Due to Change in .inc file +rpl_drop_db : Result Difference Due to Change in .inc file +rpl_flushlog_loop : Result Difference Due to Change in .inc file +rpl_get_lock : Result Difference Due to Change in .inc file +rpl_insert : Result Difference Due to Change in .inc file +rpl_insert_select : Result Difference Due to Change in .inc file +rpl_loaddata2 : Result Difference Due to Change in .inc file +rpl_loaddatalocal : Result Difference Due to Change in .inc file +rpl_loadfile : Result Difference Due to Change in .inc file +rpl_log_pos : Result Difference Due to Change in .inc file +rpl_many_optimize : Result Difference Due to Change in .inc file +rpl_master_pos_wait : Result Difference Due to Change in .inc file +rpl_misc_functions : Result Difference Due to Change in .inc file +rpl_ps : Result Difference Due to Change in .inc file +rpl_rbr_to_sbr : Result Difference Due to Change in .inc file +rpl_row_max_relay_size : Result Difference Due to Change in .inc file +rpl_server_id1 : Result Difference Due to Change in .inc file +rpl_session_var : Result Difference Due to Change in .inc file +rpl_sf : Result Difference Due to Change in .inc file +rpl_slave_status : Result Difference Due to Change in .inc file +rpl_sp004 : Result Difference Due to Change in .inc file +rpl_start_stop_slave : Result Difference Due to Change in .inc file +rpl_stm_max_relay_size : Result Difference Due to Change in .inc file +rpl_stm_mystery22 : Result Difference Due to Change in .inc file +rpl_stm_no_op : Result Difference Due to Change in .inc file +rpl_stm_reset_slave : Result Difference Due to Change in .inc file +rpl_temp_table : Result Difference Due to Change in .inc file +rpl_temporary : Result Difference Due to Change in .inc file +rpl_trigger : Result Difference Due to Change in .inc file +rpl_trunc_temp : Result Difference Due to Change in .inc file +rpl_user_variables : Result Difference Due to Change in .inc file +rpl_relayspace : Result Difference Due to Change in .inc file +rpl_multi_delete2 : Result Difference Due to Change in .inc file +rpl_view : Result Difference Due to Change in .inc file +rpl_ignore_table_update : Result Difference Due to Change in .inc file +rpl_err_ignoredtable : Result Difference Due to Change in .inc file +rpl_multi_update4 : Result Difference Due to Change in .inc file +rpl_multi_delete : Result Difference Due to Change in .inc file +rpl_ignore_grant : Result Difference Due to Change in .inc file +rpl_ignore_revoke : Result Difference Due to Change in .inc file +rpl_free_items : Result Difference Due to Change in .inc file +rpl_replicate_ignore_db : Result Difference Due to Change in .inc file +rpl000017 : Result Difference Due to Change in .inc file +rpl_skip_error : Result Difference Due to Change in .inc file +rpl_sp : Result Difference Due to Change in .inc file + +rpl_row_until : Test Present in rpl suite as well . Test Fails with table t2 not found. +rpl_loaddata_s : Test Present in rpl suite as well . Test Fails due to bin log truncation. +rpl_log_pos : Test Present in rpl suite as well . Test Fails due to bin log truncation. +rpl_row_NOW : Result Difference Due to Change in .inc file +rpl_row_USER : Result Difference Due to Change in .inc file +rpl_row_drop : Result Difference Due to Change in .inc file +rpl_row_func001 : Result Difference Due to Change in .inc file +rpl_row_reset_slave : Result Difference Due to Change in .inc file +rpl_row_sp001 : Result Difference Due to Change in .inc file +rpl_row_sp005 : Result Difference Due to Change in .inc file +rpl_row_sp008 : Result Difference Due to Change in .inc file +rpl_row_sp009 : Result Difference Due to Change in .inc file +rpl_row_sp010 : Result Difference Due to Change in .inc file +rpl_row_sp011 : Result Difference Due to Change in .inc file +rpl_row_sp012 : Result Difference Due to Change in .inc file +rpl_row_stop_middle : Result Difference Due to Change in .inc file +rpl_row_trig001 : Result Difference Due to Change in .inc file +rpl_row_trig002 : Result Difference Due to Change in .inc file +rpl_row_trig003 : Result Difference Due to Change in .inc file +rpl_row_view01 : Result Difference Due to Change in .inc file +rpl_switch_stm_row_mixed : Result Difference Due to Change in .inc file +rpl_row_inexist_tbl : Result Difference Due to Change in .inc file diff --git a/mysql-test/suite/engines/funcs/t/rpl_000015.test b/mysql-test/suite/engines/funcs/t/rpl_000015.test index 6c18e66a3a6..817ed6f407c 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_000015.test +++ b/mysql-test/suite/engines/funcs/t/rpl_000015.test @@ -11,25 +11,31 @@ save_master_pos; connection slave; stop slave; reset slave; -let $status_items= Master_Log_File, Read_Master_Log_Pos, Relay_Master_Log_File, Exec_Master_Log_Pos; -source include/show_slave_status.inc; +--vertical_results +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 5 # 8 # 9 # 23 # 33 # +show slave status; change master to master_host='127.0.0.1'; # The following needs to be cleaned up when change master is fixed -source include/show_slave_status.inc; - +--vertical_results +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 5 # 8 # 9 # 23 # 33 # +show slave status; --replace_result $MASTER_MYPORT MASTER_PORT eval change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=$MASTER_MYPORT; -source include/show_slave_status.inc; - +--vertical_results +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 5 # 8 # 9 # 23 # 33 # +show slave status; start slave; sync_with_master; -let $status_items= Master_Log_File, Relay_Master_Log_File; -source include/show_slave_status.inc; -source include/check_slave_is_running.inc; - --vertical_results +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 5 # 8 # 9 # 23 # 33 # +--replace_column 33 # +show slave status; connection master; --disable_warnings drop table if exists t1; diff --git a/mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test b/mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test index 7644b18ee7e..078d1048794 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test +++ b/mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test @@ -7,11 +7,15 @@ source include/master-slave.inc; --disable_ps_protocol #first, make sure the slave has had enough time to register -sync_slave_with_master; +save_master_pos; +connection slave; +sync_with_master; #discover slaves connection master; ---query_vertical SHOW SLAVE STATUS; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +SHOW SLAVE STATUS; --replace_result $SLAVE_MYPORT SLAVE_PORT SHOW SLAVE HOSTS; rpl_probe; @@ -21,7 +25,9 @@ enable_rpl_parse; create table t1 ( n int); insert into t1 values (1),(2),(3),(4); disable_rpl_parse; -sync_slave_with_master; +save_master_pos; +connection slave; +sync_with_master; insert into t1 values(5); connection master; enable_rpl_parse; diff --git a/mysql-test/suite/engines/funcs/t/rpl_change_master.test b/mysql-test/suite/engines/funcs/t/rpl_change_master.test index ce8c921c2ad..c031464c95e 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_change_master.test +++ b/mysql-test/suite/engines/funcs/t/rpl_change_master.test @@ -18,26 +18,13 @@ save_master_pos; connection slave; --real_sleep 3 # wait for I/O thread to have read updates stop slave; -source include/wait_for_slave_to_stop.inc; - -let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); -let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); -if (`SELECT $read_pos = $exec_pos`) -{ - source include/show_rpl_debug_info.inc; - echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos'; - die Failed because Read_Master_Log_Pos is equal to Exec_Master_Log_Pos; -} +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 8 # 9 # 23 # 33 # +show slave status; change master to master_user='root'; -let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); -let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); -if (`SELECT $read_pos <> $exec_pos`) -{ - source include/show_rpl_debug_info.inc; - echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos'; - die Failed because Read_Master_Log_Pos is not equal to Exec_Master_Log_Pos; -} - +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 8 # 9 # 23 # 33 # +show slave status; start slave; sync_with_master; select * from t1; diff --git a/mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test b/mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test index 863b450a6d9..707d1eca8c2 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test +++ b/mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test @@ -1,5 +1,8 @@ source include/master-slave.inc; +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +show slave status; + # # Load table should not succeed on the master as this is not a slave # diff --git a/mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test b/mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test index 0b71817226a..2e481f5e5e7 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test @@ -41,7 +41,8 @@ sleep 5; # # Show status of slave # ---let status_items= Relay_Log_File ---source include/show_slave_status.inc ---source include/check_slave_is_running.inc +--replace_result $SLAVE_MYPORT SLAVE_PORT +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +--vertical_results +SHOW SLAVE STATUS; STOP SLAVE; diff --git a/mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test b/mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test index 2dd2218eb5c..791fe84420f 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test +++ b/mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test @@ -20,7 +20,9 @@ save_master_pos; connection slave; sync_with_master; select count(*) from test.t1; # check that LOAD was replicated -source include/show_binlog_events.inc; +--replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ +show binlog events from 106; # should be nothing # Cleanup connection master; diff --git a/mysql-test/suite/engines/funcs/t/rpl_log_pos.test b/mysql-test/suite/engines/funcs/t/rpl_log_pos.test index e07f0d5f2a7..13083e47bcf 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_log_pos.test +++ b/mysql-test/suite/engines/funcs/t/rpl_log_pos.test @@ -11,41 +11,36 @@ # Passes with rbr no problem, removed statement include [jbm] source include/master-slave.inc; -let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1); +--replace_column 3 +show master status; sync_slave_with_master; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # +show slave status; stop slave; - ---replace_result $master_log_pos MASTER_LOG_POS -eval change master to master_log_pos=$master_log_pos; +change master to master_log_pos=106; start slave; sleep 5; stop slave; - ---replace_result $master_log_pos MASTER_LOG_POS -eval change master to master_log_pos=$master_log_pos; ---let $slave_param= Read_Master_Log_Pos ---let $slave_param_value= $master_log_pos ---source include/wait_for_slave_param.inc - +change master to master_log_pos=106; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # +show slave status; start slave; sleep 5; ---let $slave_param= Read_Master_Log_Pos ---let $slave_param_value= $master_log_pos ---source include/wait_for_slave_param.inc ---source include/check_slave_no_error.inc - +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # +show slave status; stop slave; ---echo # impossible position leads to an error ---replace_result 177 MASTER_LOG_POS change master to master_log_pos=177; start slave; sleep 2; -let $slave_io_errno= 1236; -let $show_slave_io_error= 1; -source include/wait_for_slave_io_error.inc; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # +show slave status; connection master; - -let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1); +--replace_column 3 +show master status; create table if not exists t1 (n int); drop table if exists t1; create table t1 (n int); @@ -53,9 +48,7 @@ insert into t1 values (1),(2),(3); save_master_pos; connection slave; stop slave; - ---replace_result $master_log_pos MASTER_LOG_POS -eval change master to master_log_pos=$master_log_pos; +change master to master_log_pos=206; start slave; sync_with_master; select * from t1 ORDER BY n; diff --git a/mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test b/mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test index c9d27d1ea6a..d466382dc92 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test +++ b/mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test @@ -15,17 +15,25 @@ SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT; CREATE TABLE t1 (a INT, b LONG); INSERT INTO t1 VALUES (1,1), (2,2); INSERT INTO t1 VALUES (3,UUID()), (4,UUID()); +let $VERSION=`select version()`; +--replace_result $VERSION VERSION +--replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ # Different number of binlog events are generated by different engines --disable_result_log -source include/show_binlog_events.inc; +SHOW BINLOG EVENTS; --enable_result_log sync_slave_with_master; --echo **** On Slave **** -source include/show_binlog_events.inc; - +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS +--replace_result $VERSION VERSION +--replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ # Different number of binlog events are generated by different engines --disable_result_log -source include/show_binlog_events.inc; +SHOW BINLOG EVENTS; --enable_result_log --exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql --exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql diff --git a/mysql-test/suite/engines/funcs/t/rpl_row_drop.test b/mysql-test/suite/engines/funcs/t/rpl_row_drop.test index d18ebc2846b..20c217a7c3a 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_row_drop.test +++ b/mysql-test/suite/engines/funcs/t/rpl_row_drop.test @@ -30,7 +30,10 @@ connection master; --echo **** On Master **** # Should drop the non-temporary table t1 and the temporary table t2 DROP TABLE t1,t2; -source include/show_binlog_events.inc; +let $VERSION=`select version()`; +--replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS; SHOW TABLES; sync_slave_with_master; --echo **** On Slave **** diff --git a/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test b/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test index dca2894c9da..736071a8ece 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test +++ b/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test @@ -22,11 +22,13 @@ connection master; insert into t1 values (1); connection slave; -# slave should have stopped because can't find table t1 +# slave should have stopped because can't find table t1 +wait_for_slave_to_stop; # see if we have a good error message: ---let $slave_sql_errno= 1146 ---let $show_slave_sql_error= 1 ---source include/wait_for_slave_sql_error.inc +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # +--vertical_results +show slave status; # cleanup connection master; diff --git a/mysql-test/suite/engines/funcs/t/rpl_row_until.test b/mysql-test/suite/engines/funcs/t/rpl_row_until.test index b60734317c6..ccd9ce11637 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_row_until.test +++ b/mysql-test/suite/engines/funcs/t/rpl_row_until.test @@ -18,50 +18,44 @@ connection master; # create some events on master create table t1(n int not null auto_increment primary key); insert into t1 values (1),(2),(3),(4); -let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1); drop table t1; - create table t2(n int not null auto_increment primary key); insert into t2 values (1),(2); -let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1); insert into t2 values (3),(4); drop table t2; # try to replicate all queries until drop of t1 connection slave; ---replace_result $master_log_pos_1 MASTER_LOG_POS -eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_1; +start slave until master_log_file='master-bin.000001', master_log_pos=311; sleep 2; wait_for_slave_to_stop; # here table should be still not deleted select * from t1; ---let $slave_param= Exec_Master_Log_Pos ---let $slave_param_value= $master_log_pos_1 ---source include/check_slave_param.inc +--vertical_results +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 # +show slave status; # this should fail right after start ---replace_result 291 MASTER_LOG_POS start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; # again this table should be still not deleted select * from t1; sleep 2; wait_for_slave_to_stop; ---let $slave_param= Exec_Master_Log_Pos ---let $slave_param_value= $master_log_pos_1 ---source include/check_slave_param.inc +--vertical_results +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 # +show slave status; # try replicate all up to and not including the second insert to t2; -let $master_log_pos= $master_log_pos_2; -let $relay_log_file= slave-relay-bin.000004; ---source include/get_relay_log_pos.inc ---replace_result $relay_log_pos RELAY_LOG_POS -eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos; +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; sleep 2; wait_for_slave_to_stop; select * from t2; ---let $slave_param= Exec_Master_Log_Pos ---let $slave_param_value= $master_log_pos ---source include/check_slave_param.inc +--vertical_results +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 # +show slave status; # clean up start slave; @@ -71,32 +65,27 @@ connection slave; sync_with_master; stop slave; ---let $exec_log_pos_1= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1) # this should stop immediately as we are already there ---replace_result $master_log_pos_2 MASTER_LOG_POS -eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_2; +start slave until master_log_file='master-bin.000001', master_log_pos=740; sleep 2; wait_for_slave_to_stop; # here the sql slave thread should be stopped ---let $slave_param= Exec_Master_Log_Pos ---let $slave_param_value= $exec_log_pos_1 ---source include/check_slave_param.inc +--vertical_results +--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 +--replace_column 1 # 7 # 9 # 22 # 23 # 33 # +show slave status; #testing various error conditions ---replace_result 561 MASTER_LOG_POS --error 1277 start slave until master_log_file='master-bin', master_log_pos=561; ---replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS --error 1277 start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; --error 1277 start slave until master_log_file='master-bin.000001'; --error 1277 start slave until relay_log_file='slave-relay-bin.000002'; ---replace_result 561 MASTER_LOG_POS --error 1277 start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; # Warning should be given for second command start slave sql_thread; ---replace_result 740 MASTER_LOG_POS start slave until master_log_file='master-bin.000001', master_log_pos=740; diff --git a/mysql-test/suite/engines/funcs/t/rpl_server_id1.test b/mysql-test/suite/engines/funcs/t/rpl_server_id1.test index 014f38d3544..71310750b60 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_server_id1.test +++ b/mysql-test/suite/engines/funcs/t/rpl_server_id1.test @@ -12,13 +12,10 @@ reset master; stop slave; --replace_result $SLAVE_MYPORT SLAVE_PORT eval change master to master_port=$SLAVE_MYPORT; -source include/check_slave_no_error.inc; - +--replace_result $SLAVE_MYPORT SLAVE_PORT +--replace_column 16 # 18 # +show slave status; start slave; -let $slave_io_errno= 1593; -let $show_slave_io_error= 1; -source include/wait_for_slave_io_error.inc; - insert into t1 values (1); # can't MASTER_POS_WAIT(), it does not work in this weird setup # (when slave is its own master without --replicate-same-server-id) diff --git a/mysql-test/suite/engines/funcs/t/rpl_server_id2.test b/mysql-test/suite/engines/funcs/t/rpl_server_id2.test index 5b8683ecfb1..0f2eb560d18 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_server_id2.test +++ b/mysql-test/suite/engines/funcs/t/rpl_server_id2.test @@ -9,6 +9,9 @@ reset master; stop slave; --replace_result $SLAVE_MYPORT SLAVE_PORT eval change master to master_port=$SLAVE_MYPORT; +--replace_result $SLAVE_MYPORT SLAVE_PORT +--replace_column 18 # +show slave status; start slave; insert into t1 values (1); save_master_pos; diff --git a/mysql-test/suite/engines/funcs/t/rpl_slave_status.test b/mysql-test/suite/engines/funcs/t/rpl_slave_status.test index cc3fbf6abee..b3d6e49e215 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_slave_status.test +++ b/mysql-test/suite/engines/funcs/t/rpl_slave_status.test @@ -22,7 +22,9 @@ drop table if exists t1; --enable_warnings create table t1 (n int); insert into t1 values (1); -sync_slave_with_master; +save_master_pos; +connection slave; +sync_with_master; select * from t1; # 3. Delete new replication user @@ -38,8 +40,12 @@ stop slave; start slave; # 5. Make sure Slave_IO_Running = No -let $slave_io_errno= 1045; -source include/wait_for_slave_io_error.inc; +--replace_result $MASTER_MYPORT MASTER_MYPORT +# Column 1 is replaced, since the output can be either +# "Connecting to master" or "Waiting for master update" +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 # +--vertical_results +show slave status; # Cleanup (Note that slave IO thread is not running) connection slave; diff --git a/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test index eb2e2a828f3..d89765fb28d 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test +++ b/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test @@ -501,7 +501,9 @@ INSERT INTO t12 VALUES(UUID()); UNLOCK TABLES; --disable_result_log -source include/show_binlog_events.inc; +--replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ +show binlog events; --enable_result_log sync_slave_with_master; @@ -518,7 +520,9 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_ connection master; --disable_result_log -source include/show_binlog_events.inc; +--replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ +show binlog events; --enable_result_log # Now test that mysqlbinlog works fine on a binlog generated by the diff --git a/mysql-test/suite/engines/iuds/t/insert_year.test b/mysql-test/suite/engines/iuds/t/insert_year.test index 60a4029df18..392b4544376 100644 --- a/mysql-test/suite/engines/iuds/t/insert_year.test +++ b/mysql-test/suite/engines/iuds/t/insert_year.test @@ -226,6 +226,7 @@ SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c2 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t2; + --sorted_result SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t2; --sorted_result @@ -300,6 +301,7 @@ SELECT * FROM t2 WHERE c2 IS NOT NULL ORDER BY c1,c2 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t2; + --sorted_result SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t2; --sorted_result -- cgit v1.2.1 From cfc1e3375877ca55634ad435ba984686952c977d Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 5 Jan 2011 14:58:05 +0200 Subject: Bug #59178: disable the test case --- mysql-test/suite/rpl/t/disabled.def | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 5b150288935..b5956a78371 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -12,3 +12,4 @@ rpl_row_create_table : Bug#51574 Feb 27 2010 andrei failed different way than earlier with bug#45576 rpl_log_pos : BUG#55675 Sep 10 2010 27 2010 alfranio rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle +rpl_get_master_version_and_clock : Bug#59178 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock -- cgit v1.2.1 From ab32ce9aa7fb09b2fb578e5bb44f004092bf1d89 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 5 Jan 2011 15:09:06 +0200 Subject: ALTER TABLE IGNORE didn't ignore duplicates for unique add index for InnoDB --- mysql-test/suite/innodb/r/innodb_mysql.result | 7 +++++++ mysql-test/suite/innodb/t/innodb_mysql.test | 9 +++++++++ 2 files changed, 16 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 86a51b337ff..08fb0bdfe2e 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -2617,6 +2617,13 @@ rows 3 Extra Using index DROP TABLE t1; # +# ALTER TABLE IGNORE didn't ignore duplicates for unique add index +# +create table t1 (a int primary key, b int) engine = innodb; +insert into t1 values (1,1),(2,1); +alter ignore table t1 add unique `main` (b); +drop table t1; +# End of 5.1 tests # # Test for bug #39932 "create table fails if column for FK is in different diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index 991440e54dd..177dabdc3e1 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -840,6 +840,15 @@ CREATE INDEX b ON t1(a,b,c,d); DROP TABLE t1; +--echo # +--echo # ALTER TABLE IGNORE didn't ignore duplicates for unique add index +--echo # + +create table t1 (a int primary key, b int) engine = innodb; +insert into t1 values (1,1),(2,1); +alter ignore table t1 add unique `main` (b); +drop table t1; + --echo # -- cgit v1.2.1 From 505c663a1e19af4c8ee726b305691414ab5fc999 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Mon, 10 Jan 2011 23:22:40 +0200 Subject: - Fixed that Aria works with HANDLER commands - Added test case for Aria - Tested HANDLER with HEAP (changes to HEAP code will be pushed in 5.3) - Moved all HANDLER test to suite/handler. mysql-test/Makefile.am: Added suite/handler mysql-test/mysql-test-run.pl: Added suite/handler mysql-test/r/lock_multi.result: Remove test that is already in handler test suite mysql-test/suite/handler/aria.result: Test for HANDLER with Aria storage engine mysql-test/suite/handler/aria.test: Test for HANDLER with Aria storage engine mysql-test/suite/handler/handler.inc: Extended the general handler test Moved interface testing to 'interface.test' mysql-test/suite/handler/init.inc: Common init for handler tests. mysql-test/suite/handler/innodb.result: New results mysql-test/suite/handler/innodb.test: Update to use new include files mysql-test/suite/handler/interface.result: Test of HANDLER interface (not storage engine dependent parts) mysql-test/suite/handler/interface.test: Test of HANDLER interface (not storage engine dependent parts) mysql-test/suite/handler/myisam.result: New results mysql-test/suite/handler/myisam.test: Update to use new include files mysql-test/t/lock_multi.test: Remove test that is already in handler test suite mysys/tree.c: Added missing handling of read previous (showed up in HEAP testing) sql/handler.cc: Don't marka 'HA_ERR_RECORD_CHANGED' as fatal (can be used with HANDLER READ, especially with MEMORY ENGINE) sql/handler.h: Added prototype for can_continue_handler_scan() sql/sql_handler.cc: Re-initialize search if we switch from key to table search. Check if handler can continue searching between calls (via can_continue_handler_scan()) Don't write common not fatal errors to log storage/maria/ma_extra.c: Don't set index 0 as default. This forces call to ma_check_index() to set up index variables. storage/maria/ma_ft_boolean_search.c: Ensure that info->last_key.keyinfo is set storage/maria/ma_open.c: Don't set index 0 as default. This forces call to ma_check_index() to set up index variables. storage/maria/ma_rkey.c: Trivial optimization storage/maria/ma_rnext.c: Added missing code from mi_rnext.c to ensure that handler next/prev works. storage/maria/ma_rsame.c: Simple optimizations storage/maria/ma_search.c: Initialize info->last_key once and for all when we change keys. storage/maria/ma_unique.c: Ensure that info->last_key.keyinfo is up to date. --- mysql-test/suite/handler/aria.result | 671 ++++++++++++++++++++++++++++++ mysql-test/suite/handler/aria.test | 82 ++++ mysql-test/suite/handler/handler.inc | 465 +++++++++++++++++++++ mysql-test/suite/handler/init.inc | 33 ++ mysql-test/suite/handler/innodb.result | 562 +++++++++++++++++++++++++ mysql-test/suite/handler/innodb.test | 17 + mysql-test/suite/handler/interface.result | 259 ++++++++++++ mysql-test/suite/handler/interface.test | 307 ++++++++++++++ mysql-test/suite/handler/myisam.result | 671 ++++++++++++++++++++++++++++++ mysql-test/suite/handler/myisam.test | 82 ++++ 10 files changed, 3149 insertions(+) create mode 100644 mysql-test/suite/handler/aria.result create mode 100644 mysql-test/suite/handler/aria.test create mode 100644 mysql-test/suite/handler/handler.inc create mode 100644 mysql-test/suite/handler/init.inc create mode 100644 mysql-test/suite/handler/innodb.result create mode 100644 mysql-test/suite/handler/innodb.test create mode 100644 mysql-test/suite/handler/interface.result create mode 100644 mysql-test/suite/handler/interface.test create mode 100644 mysql-test/suite/handler/myisam.result create mode 100644 mysql-test/suite/handler/myisam.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/handler/aria.result b/mysql-test/suite/handler/aria.result new file mode 100644 index 00000000000..a912a2559e3 --- /dev/null +++ b/mysql-test/suite/handler/aria.result @@ -0,0 +1,671 @@ +SET SESSION STORAGE_ENGINE = Aria; +drop table if exists t1,t3,t4,t5; +create table t1 (a int, b char(10), key a (a), key b (a,b)); +insert into t1 values +(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"), +(14,"aaa"),(16,"ccc"),(16,"xxx"), +(20,"ggg"),(21,"hhh"),(22,"iii"); +handler t1 open as t2; +handler t2 read a first; +a b +14 aaa +handler t2 read a next; +a b +16 ccc +handler t2 read a next; +a b +16 xxx +handler t2 read a prev; +a b +16 ccc +handler t2 read a last; +a b +22 iii +handler t2 read a prev; +a b +21 hhh +handler t2 read a prev; +a b +20 ggg +handler t2 read a first; +a b +14 aaa +handler t2 read a prev; +a b +handler t2 read a last; +a b +22 iii +handler t2 read a prev; +a b +21 hhh +handler t2 read a next; +a b +22 iii +handler t2 read a next; +a b +handler t2 read a=(15); +a b +handler t2 read a=(16); +a b +16 ccc +handler t2 read a=(19,"fff"); +ERROR 42000: Too many key parts specified; max 1 parts allowed +handler t2 read b=(19,"fff"); +a b +19 fff +handler t2 read b=(19,"yyy"); +a b +19 yyy +handler t2 read b=(19); +a b +19 fff +handler t1 read a last; +ERROR 42S02: Unknown table 't1' in HANDLER +handler t2 read a=(11); +a b +handler t2 read a>=(11); +a b +14 aaa +handler t2 read a=(18); +a b +18 eee +handler t2 read a>=(18); +a b +18 eee +handler t2 read a>(18); +a b +19 fff +handler t2 read a<=(18); +a b +18 eee +handler t2 read a<(18); +a b +17 ddd +handler t2 read a=(15); +a b +handler t2 read a>=(15); +a b +16 ccc +handler t2 read a>(15); +a b +16 ccc +handler t2 read a<=(15); +a b +14 aaa +handler t2 read a<(15); +a b +14 aaa +handler t2 read a=(54); +a b +handler t2 read a>=(54); +a b +handler t2 read a>(54); +a b +handler t2 read a<=(54); +a b +22 iii +handler t2 read a<(54); +a b +22 iii +handler t2 read a=(1); +a b +handler t2 read a>=(1); +a b +14 aaa +handler t2 read a>(1); +a b +14 aaa +handler t2 read a<=(1); +a b +handler t2 read a<(1); +a b +handler t2 read a first limit 5; +a b +14 aaa +16 ccc +16 xxx +17 ddd +18 eee +handler t2 read a next limit 3; +a b +19 fff +19 yyy +20 ggg +handler t2 read a prev limit 10; +a b +19 yyy +19 fff +18 eee +17 ddd +16 xxx +16 ccc +14 aaa +handler t2 read a>=(16) limit 4; +a b +16 ccc +16 xxx +17 ddd +18 eee +handler t2 read a>=(16) limit 2,2; +a b +17 ddd +18 eee +handler t2 read a last limit 3; +a b +22 iii +21 hhh +20 ggg +handler t2 read a=(19); +a b +19 fff +handler t2 read a=(19) where b="yyy"; +a b +19 yyy +handler t2 read first; +a b +17 ddd +handler t2 read next; +a b +18 eee +handler t2 read next; +a b +19 fff +handler t2 close; +handler t1 open; +handler t1 read a next; +a b +14 aaa +handler t1 read a next; +a b +16 ccc +handler t1 close; +handler t1 open; +handler t1 read a prev; +a b +22 iii +handler t1 read a prev; +a b +21 hhh +handler t1 close; +handler t1 open as t2; +handler t2 read first; +a b +17 ddd +alter table t1 engine = Aria; +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +handler t1 open as t2; +drop table t1; +create table t1 (a int not null); +insert into t1 values (17); +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +handler t1 open as t2; +alter table t1 engine=CSV; +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +drop table t1; +create table t1 (a int); +insert into t1 values (1),(2),(3),(4),(5),(6); +delete from t1 limit 2; +handler t1 open; +handler t1 read first; +a +3 +handler t1 read first limit 1,1; +a +4 +handler t1 read first limit 2,2; +a +5 +6 +delete from t1 limit 3; +handler t1 read first; +a +6 +drop table t1; +create table t1(a int, index (a)); +insert into t1 values (1), (2), (3); +handler t1 open; +handler t1 read a=(W); +ERROR 42S22: Unknown column 'W' in 'field list' +handler t1 read a=(a); +ERROR HY000: Incorrect arguments to HANDLER ... READ +drop table t1; +create table t1 (a char(5)); +insert into t1 values ("Ok"); +handler t1 open as t; +handler t read first; +a +Ok +use mysql; +handler t read first; +a +Ok +handler t close; +handler test.t1 open as t; +handler t read first; +a +Ok +handler t close; +use test; +drop table t1; +create table t1 ( a int, b int, INDEX a (a) ); +insert into t1 values (1,2), (2,1); +handler t1 open; +handler t1 read a=(1) where b=2; +a b +1 2 +handler t1 read a=(1) where b=3; +a b +handler t1 read a=(1) where b=1; +a b +handler t1 close; +drop table t1; +create table t1 (c1 char(20)); +insert into t1 values ("t1"); +handler t1 open as h1; +handler h1 read first limit 9; +c1 +t1 +create table t2 (c1 char(20)); +insert into t2 values ("t2"); +handler t2 open as h2; +handler h2 read first limit 9; +c1 +t2 +create table t3 (c1 char(20)); +insert into t3 values ("t3"); +handler t3 open as h3; +handler h3 read first limit 9; +c1 +t3 +create table t4 (c1 char(20)); +insert into t4 values ("t4"); +handler t4 open as h4; +handler h4 read first limit 9; +c1 +t4 +create table t5 (c1 char(20)); +insert into t5 values ("t5"); +handler t5 open as h5; +handler h5 read first limit 9; +c1 +t5 +alter table t1 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +c1 +t3 +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +c1 +t5 +alter table t5 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +c1 +t3 +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +ERROR 42S02: Unknown table 'h5' in HANDLER +alter table t3 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +ERROR 42S02: Unknown table 'h3' in HANDLER +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +ERROR 42S02: Unknown table 'h5' in HANDLER +handler h2 close; +handler h4 close; +handler t1 open as h1_1; +handler t1 open as h1_2; +handler t1 open as h1_3; +handler h1_1 read first limit 9; +c1 +t1 +handler h1_2 read first limit 9; +c1 +t1 +handler h1_3 read first limit 9; +c1 +t1 +alter table t1 engine=Aria; +handler h1_1 read first limit 9; +ERROR 42S02: Unknown table 'h1_1' in HANDLER +handler h1_2 read first limit 9; +ERROR 42S02: Unknown table 'h1_2' in HANDLER +handler h1_3 read first limit 9; +ERROR 42S02: Unknown table 'h1_3' in HANDLER +drop table t1; +drop table t2; +drop table t3; +drop table t4; +drop table t5; +create table t1 (c1 int); +insert into t1 values (1); +handler t1 open; +handler t1 read first; +c1 +1 +send the below to another connection, do not wait for the result +optimize table t1; +proceed with the normal connection +handler t1 read next; +c1 +1 +handler t1 close; +read the result from the other connection +Table Op Msg_type Msg_text +test.t1 optimize status OK +proceed with the normal connection +drop table t1; +CREATE TABLE t1 ( no1 smallint(5) NOT NULL default '0', no2 int(10) NOT NULL default '0', PRIMARY KEY (no1,no2)); +INSERT INTO t1 VALUES (1,274),(1,275),(2,6),(2,8),(4,1),(4,2); +HANDLER t1 OPEN; +HANDLER t1 READ `primary` = (1, 1000); +no1 no2 +HANDLER t1 READ `primary` PREV; +no1 no2 +1 275 +HANDLER t1 READ `primary` = (1, 1000); +no1 no2 +HANDLER t1 READ `primary` NEXT; +no1 no2 +2 6 +DROP TABLE t1; +create table t1 (c1 int); +insert into t1 values (14397); +flush tables with read lock; +drop table t1; +ERROR HY000: Can't execute the query because you have a conflicting read lock +send the below to another connection, do not wait for the result +drop table t1; +proceed with the normal connection +select * from t1; +c1 +14397 +unlock tables; +read the result from the other connection +proceed with the normal connection +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (a int not null) ENGINE=CSV; +--> client 2 +handler t1 open; +ERROR HY000: Table storage engine for 't1' doesn't have this option +--> client 1 +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +handler t1_alias read a next; +ERROR 42000: Key 'a' doesn't exist in table 't1_alias' +handler t1_alias READ a next where inexistent > 0; +ERROR 42S22: Unknown column 'inexistent' in 'field list' +handler t1_alias read a next; +ERROR 42000: Key 'a' doesn't exist in table 't1_alias' +handler t1_alias READ a next where inexistent > 0; +ERROR 42S22: Unknown column 'inexistent' in 'field list' +handler t1_alias close; +drop table t1; +create temporary table t1 (a int, b char(1), key a (a), key b(a,b)); +insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"), +(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j"),(9,'k'); +select a,b from t1; +a b +0 a +1 b +2 c +3 d +4 e +5 f +6 g +7 h +8 i +9 j +9 k +handler t1 open as a1; +handler a1 read a=(1); +a b +1 b +handler a1 read a next; +a b +2 c +handler a1 read a next; +a b +3 d +select a,b from t1; +ERROR HY000: Can't reopen table: 'a1' +handler a1 read a prev; +a b +2 c +handler a1 read a prev; +a b +1 b +handler a1 read a=(6) where b="g"; +a b +6 g +handler a1 close; +select a,b from t1; +a b +0 a +1 b +2 c +3 d +4 e +5 f +6 g +7 h +8 i +9 j +9 k +handler t1 open as a2; +handler a2 read a=(9); +a b +9 j +handler a2 read a next; +a b +9 k +handler a2 read a prev limit 2; +a b +9 j +8 i +handler a2 read a last; +a b +9 k +handler a2 read a prev; +a b +9 j +handler a2 close; +drop table t1; +create table t1 (a int); +create temporary table t2 (a int, key (a)); +handler t1 open as a1; +handler t2 open as a2; +handler a2 read a first; +a +drop table t1, t2; +handler a2 read a next; +ERROR 42S02: Unknown table 'a2' in HANDLER +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +create table t1 (a int, key (a)); +create table t2 like t1; +handler t1 open as a1; +handler t2 open as a2; +handler a1 read a first; +a +handler a2 read a first; +a +alter table t1 add b int; +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +handler a2 close; +drop table t1, t2; +create table t1 (a int, key (a)); +handler t1 open as a1; +handler a1 read a first; +a +rename table t1 to t2; +handler a1 read a first; +ERROR 42S02: Unknown table 'a1' in HANDLER +drop table t2; +create table t1 (a int, key (a)); +create table t2 like t1; +handler t1 open as a1; +handler t2 open as a2; +handler a1 read a first; +a +handler a2 read a first; +a +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status Table is already up to date +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +handler a2 close; +drop table t1, t2; +# +# BUG#51877 - HANDLER interface causes invalid memory read +# +CREATE TABLE t1(a INT, KEY (a)); +HANDLER t1 OPEN; +HANDLER t1 READ a FIRST; +a +INSERT INTO t1 VALUES(1); +HANDLER t1 READ a NEXT; +a +1 +HANDLER t1 CLOSE; +DROP TABLE t1; +# +# BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash +# +CREATE TABLE t1 AS SELECT 1 AS f1; +HANDLER t1 OPEN; +TRUNCATE t1; +HANDLER t1 READ FIRST; +ERROR 42S02: Unknown table 't1' in HANDLER +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 AS SELECT 1 AS f1; +HANDLER t1 OPEN; +TRUNCATE t1; +HANDLER t1 READ FIRST; +ERROR 42S02: Unknown table 't1' in HANDLER +DROP TABLE t1; +# +# Bug #54007: assert in ha_myisam::index_next , HANDLER +# +CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a), KEY b(b), KEY ab(a, b)); +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a b +HANDLER t1 READ `PRIMARY` NEXT; +a b +HANDLER t1 READ ab NEXT; +a b +HANDLER t1 READ b NEXT; +a b +HANDLER t1 READ NEXT; +a b +HANDLER t1 CLOSE; +INSERT INTO t1 VALUES (2, 20), (1, 10), (4, 40), (3, 30); +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a b +2 20 +HANDLER t1 READ NEXT; +a b +1 10 +HANDLER t1 READ `PRIMARY` NEXT; +a b +1 10 +HANDLER t1 READ `PRIMARY` NEXT; +a b +2 20 +HANDLER t1 READ ab NEXT; +a b +1 10 +HANDLER t1 READ ab NEXT; +a b +2 20 +HANDLER t1 READ b NEXT; +a b +1 10 +HANDLER t1 READ b NEXT; +a b +2 20 +HANDLER t1 READ b NEXT; +a b +3 30 +HANDLER t1 READ b NEXT; +a b +4 40 +HANDLER t1 READ b NEXT; +a b +HANDLER t1 READ NEXT; +a b +2 20 +HANDLER t1 READ NEXT; +a b +1 10 +HANDLER t1 READ NEXT; +a b +4 40 +HANDLER t1 CLOSE; +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a b +2 20 +HANDLER t1 READ `PRIMARY` PREV; +a b +4 40 +HANDLER t1 READ `PRIMARY` PREV; +a b +3 30 +HANDLER t1 READ b PREV; +a b +4 40 +HANDLER t1 READ b PREV; +a b +3 30 +HANDLER t1 CLOSE; +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a b +2 20 +HANDLER t1 READ `PRIMARY` PREV LIMIT 3; +a b +4 40 +3 30 +2 20 +HANDLER t1 READ b NEXT LIMIT 5; +a b +1 10 +2 20 +3 30 +4 40 +HANDLER t1 CLOSE; +DROP TABLE t1; +End of 5.1 tests diff --git a/mysql-test/suite/handler/aria.test b/mysql-test/suite/handler/aria.test new file mode 100644 index 00000000000..1913d2b791c --- /dev/null +++ b/mysql-test/suite/handler/aria.test @@ -0,0 +1,82 @@ +# t/handler_innodb.test +# +# test of HANDLER ... +# +# Last update: +# 2006-07-31 ML test refactored (MySQL 5.1) +# code of t/handler.test and t/innodb_handler.test united +# main testing code put into handler.inc +# rename t/innodb_handler.test to t/handler_innodb.test +# + +--source include/have_maria.inc +let $engine_type= Aria; + +--source init.inc +--source handler.inc + +--echo # +--echo # BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash +--echo # +CREATE TABLE t1 AS SELECT 1 AS f1; +HANDLER t1 OPEN; +TRUNCATE t1; +--error ER_UNKNOWN_TABLE +HANDLER t1 READ FIRST; +DROP TABLE t1; + +CREATE TEMPORARY TABLE t1 AS SELECT 1 AS f1; +HANDLER t1 OPEN; +TRUNCATE t1; +--error ER_UNKNOWN_TABLE +HANDLER t1 READ FIRST; +DROP TABLE t1; + +--echo # +--echo # Bug #54007: assert in ha_myisam::index_next , HANDLER +--echo # +CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a), KEY b(b), KEY ab(a, b)); + +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +HANDLER t1 READ `PRIMARY` NEXT; +HANDLER t1 READ ab NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ NEXT; +HANDLER t1 CLOSE; + +INSERT INTO t1 VALUES (2, 20), (1, 10), (4, 40), (3, 30); +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +HANDLER t1 READ NEXT; +HANDLER t1 READ `PRIMARY` NEXT; +HANDLER t1 READ `PRIMARY` NEXT; +HANDLER t1 READ ab NEXT; +HANDLER t1 READ ab NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ NEXT; +HANDLER t1 READ NEXT; +HANDLER t1 READ NEXT; +HANDLER t1 CLOSE; + +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +HANDLER t1 READ `PRIMARY` PREV; +HANDLER t1 READ `PRIMARY` PREV; +HANDLER t1 READ b PREV; +HANDLER t1 READ b PREV; +HANDLER t1 CLOSE; + +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +HANDLER t1 READ `PRIMARY` PREV LIMIT 3; +HANDLER t1 READ b NEXT LIMIT 5; +HANDLER t1 CLOSE; + +DROP TABLE t1; + +--echo End of 5.1 tests diff --git a/mysql-test/suite/handler/handler.inc b/mysql-test/suite/handler/handler.inc new file mode 100644 index 00000000000..48ed2ce0b8a --- /dev/null +++ b/mysql-test/suite/handler/handler.inc @@ -0,0 +1,465 @@ +# handler.inc +# +# See init.inc for setup of variables for this script +# +# The variables +# $engine_type -- storage engine to be tested +# $other_engine_type -- storage engine <> $engine_type +# $other_handler_engine_type -- storage engine <> $engine_type, if possible +# 1. $other_handler_engine_type must support handler +# 2. $other_handler_engine_type must point to an all +# time available storage engine +# 2006-08 MySQL 5.1 MyISAM and MEMORY only +# +# test of HANDLER ... +# +# Last update: +# 2006-07-31 ML test refactored (MySQL 5.1) +# code of t/handler.test and t/innodb_handler.test united +# main testing code put into handler.inc +# + +# +# Start testing the table created in init.inc +# +handler t1 open as t2; +handler t2 read a first; +handler t2 read a next; +handler t2 read a next; +handler t2 read a prev; +handler t2 read a last; +handler t2 read a prev; +handler t2 read a prev; + +handler t2 read a first; +handler t2 read a prev; + +handler t2 read a last; +handler t2 read a prev; +handler t2 read a next; +handler t2 read a next; + +handler t2 read a=(15); +handler t2 read a=(16); + +--error 1070 +handler t2 read a=(19,"fff"); + +handler t2 read b=(19,"fff"); +handler t2 read b=(19,"yyy"); +handler t2 read b=(19); + +--error 1109 +handler t1 read a last; + +handler t2 read a=(11); +handler t2 read a>=(11); + +# Search on something we ca nfind +handler t2 read a=(18); +handler t2 read a>=(18); +handler t2 read a>(18); +handler t2 read a<=(18); +handler t2 read a<(18); + +# Search on something we can't find +handler t2 read a=(15); +handler t2 read a>=(15); +handler t2 read a>(15); +handler t2 read a<=(15); +handler t2 read a<(15); + +# Search from upper end +handler t2 read a=(54); +handler t2 read a>=(54); +handler t2 read a>(54); +handler t2 read a<=(54); +handler t2 read a<(54); + +# Search from lower end +handler t2 read a=(1); +handler t2 read a>=(1); +handler t2 read a>(1); +handler t2 read a<=(1); +handler t2 read a<(1); + +handler t2 read a first limit 5; +handler t2 read a next limit 3; +handler t2 read a prev limit 10; + +handler t2 read a>=(16) limit 4; +handler t2 read a>=(16) limit 2,2; +handler t2 read a last limit 3; + +handler t2 read a=(19); +handler t2 read a=(19) where b="yyy"; + +handler t2 read first; +handler t2 read next; +handler t2 read next; +handler t2 close; + +handler t1 open; +handler t1 read a next; # this used to crash as a bug#5373 +handler t1 read a next; +handler t1 close; + +handler t1 open; +handler t1 read a prev; # this used to crash as a bug#5373 +handler t1 read a prev; +handler t1 close; + +handler t1 open as t2; +handler t2 read first; +eval alter table t1 engine = $engine_type; +--error 1109 +handler t2 read first; + +# +# DROP TABLE / ALTER TABLE +# +handler t1 open as t2; +drop table t1; +create table t1 (a int not null); +insert into t1 values (17); +--error 1109 +handler t2 read first; +handler t1 open as t2; +eval alter table t1 engine=$other_engine_type; +--error 1109 +handler t2 read first; +drop table t1; + +# +# Test case for the bug #787 +# +create table t1 (a int); +insert into t1 values (1),(2),(3),(4),(5),(6); +delete from t1 limit 2; +handler t1 open; +handler t1 read first; +handler t1 read first limit 1,1; +handler t1 read first limit 2,2; +delete from t1 limit 3; +handler t1 read first; +drop table t1; + +# +# Test for #751 +# +eval create table t1(a int, index $key_type (a)); +insert into t1 values (1), (2), (3); +handler t1 open; +--error 1054 +handler t1 read a=(W); +--error 1210 +handler t1 read a=(a); +drop table t1; +# +# BUG#2304 +# +create table t1 (a char(5)); +insert into t1 values ("Ok"); +handler t1 open as t; +handler t read first; +use mysql; +handler t read first; +handler t close; +handler test.t1 open as t; +handler t read first; +handler t close; +use test; +drop table t1; + +# +# BUG#3649 +# +eval create table t1 ( a int, b int, INDEX a $key_type (a) ); +insert into t1 values (1,2), (2,1); +handler t1 open; +handler t1 read a=(1) where b=2; +handler t1 read a=(1) where b=3; +handler t1 read a=(1) where b=1; +handler t1 close; +drop table t1; + +# +# Test if fix for BUG#4286 correctly closes handler tables. +# +create table t1 (c1 char(20)); +insert into t1 values ("t1"); +handler t1 open as h1; +handler h1 read first limit 9; +create table t2 (c1 char(20)); +insert into t2 values ("t2"); +handler t2 open as h2; +handler h2 read first limit 9; +create table t3 (c1 char(20)); +insert into t3 values ("t3"); +handler t3 open as h3; +handler h3 read first limit 9; +create table t4 (c1 char(20)); +insert into t4 values ("t4"); +handler t4 open as h4; +handler h4 read first limit 9; +create table t5 (c1 char(20)); +insert into t5 values ("t5"); +handler t5 open as h5; +handler h5 read first limit 9; +# close first +eval alter table t1 engine=$other_handler_engine_type; +--error 1109 +handler h1 read first limit 9; +handler h2 read first limit 9; +handler h3 read first limit 9; +handler h4 read first limit 9; +handler h5 read first limit 9; +# close last +eval alter table t5 engine=$other_handler_engine_type; +--error 1109 +handler h1 read first limit 9; +handler h2 read first limit 9; +handler h3 read first limit 9; +handler h4 read first limit 9; +--error 1109 +handler h5 read first limit 9; +# close middle +eval alter table t3 engine=$other_handler_engine_type; +--error 1109 +handler h1 read first limit 9; +handler h2 read first limit 9; +--error 1109 +handler h3 read first limit 9; +handler h4 read first limit 9; +--error 1109 +handler h5 read first limit 9; +handler h2 close; +handler h4 close; +# close all depending handler tables +handler t1 open as h1_1; +handler t1 open as h1_2; +handler t1 open as h1_3; +handler h1_1 read first limit 9; +handler h1_2 read first limit 9; +handler h1_3 read first limit 9; +eval alter table t1 engine=$engine_type; +--error 1109 +handler h1_1 read first limit 9; +--error 1109 +handler h1_2 read first limit 9; +--error 1109 +handler h1_3 read first limit 9; +drop table t1; +drop table t2; +drop table t3; +drop table t4; +drop table t5; + +# +# Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash +# +create table t1 (c1 int); +insert into t1 values (1); +# client 1 +handler t1 open; +handler t1 read first; +# client 2 +connect (con2,localhost,root,,); +connection con2; +--exec echo send the below to another connection, do not wait for the result +send optimize table t1; +--sleep 1 +# client 1 +--exec echo proceed with the normal connection +connection default; +handler t1 read next; +handler t1 close; +# client 2 +--exec echo read the result from the other connection +connection con2; +reap; +# client 1 +--exec echo proceed with the normal connection +connection default; +drop table t1; + +eval CREATE TABLE t1 ( no1 smallint(5) NOT NULL default '0', no2 int(10) NOT NULL default '0', PRIMARY KEY $key_type (no1,no2)); +INSERT INTO t1 VALUES (1,274),(1,275),(2,6),(2,8),(4,1),(4,2); +HANDLER t1 OPEN; +HANDLER t1 READ `primary` = (1, 1000); +HANDLER t1 READ `primary` PREV; +HANDLER t1 READ `primary` = (1, 1000); +HANDLER t1 READ `primary` NEXT; +DROP TABLE t1; + +# End of 4.1 tests + +# +# Addendum to Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash +# Show that DROP TABLE can no longer deadlock against +# FLUSH TABLES WITH READ LOCK. This is a 5.0 issue. +# +create table t1 (c1 int); +insert into t1 values (14397); +flush tables with read lock; +# The thread with the global read lock cannot drop the table itself: +--error 1223 +drop table t1; +# +# client 2 +# We need a second connection to try the drop. +# The drop waits for the global read lock to go away. +# Without the addendum fix it locked LOCK_open before entering the wait loop. +connection con2; +--exec echo send the below to another connection, do not wait for the result +send drop table t1; +--sleep 1 +# +# client 1 +# Now we need something that wants LOCK_open. A simple table access which +# opens the table does the trick. +--exec echo proceed with the normal connection +connection default; +# This would hang on LOCK_open without the 5.0 addendum fix. +select * from t1; +# Release the read lock. This should make the DROP go through. +unlock tables; +# +# client 2 +# Read the result of the drop command. +connection con2; +--exec echo read the result from the other connection +reap; +# +# client 1 +# Now back to normal operation. The table should not exist any more. +--exec echo proceed with the normal connection +connection default; +--error 1146 +select * from t1; +# Just to be sure and not confuse the next test case writer. +drop table if exists t1; + +# +# Bug#25856 - HANDLER table OPEN in one connection lock DROP TABLE in another one +# +eval create table t1 (a int not null) ENGINE=$other_engine_type; +--echo --> client 2 +connection con2; +--error 1031 +handler t1 open; +--echo --> client 1 +connection default; +drop table t1; +disconnect con2; + +# +# Bug#30632 HANDLER read failure causes hang +# +create table t1 (a int); +handler t1 open as t1_alias; +--error 1176 +handler t1_alias read a next; +--error 1054 +handler t1_alias READ a next where inexistent > 0; +--error 1176 +handler t1_alias read a next; +--error 1054 +handler t1_alias READ a next where inexistent > 0; +handler t1_alias close; +drop table t1; + +# +# Bug#30882 Dropping a temporary table inside a stored function may cause a server crash +# +# Test HANDLER statements in conjunction with temporary tables. While the temporary table +# is open by a HANDLER, no other statement can access it. +# + +eval create temporary table t1 (a int, b char(1), key a $key_type (a), key b(a,b)); +insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"), + (5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j"),(9,'k'); +select a,b from t1; +handler t1 open as a1; +handler a1 read a=(1); +handler a1 read a next; +handler a1 read a next; +--error ER_CANT_REOPEN_TABLE +select a,b from t1; +handler a1 read a prev; +handler a1 read a prev; +handler a1 read a=(6) where b="g"; +handler a1 close; +select a,b from t1; +handler t1 open as a2; +handler a2 read a=(9); +handler a2 read a next; +handler a2 read a prev limit 2; +--error 0,1031 +handler a2 read a last; +handler a2 read a prev; +handler a2 close; +drop table t1; + +# Test that temporary tables associated with handlers are properly dropped. + +create table t1 (a int); +eval create temporary table t2 (a int, key $key_type (a)); +handler t1 open as a1; +handler t2 open as a2; +handler a2 read a first; +drop table t1, t2; +--error ER_UNKNOWN_TABLE +handler a2 read a next; +--error ER_UNKNOWN_TABLE +handler a1 close; + +# Alter table drop handlers + +eval create table t1 (a int, key $key_type (a)); +create table t2 like t1; +handler t1 open as a1; +handler t2 open as a2; +handler a1 read a first; +handler a2 read a first; +alter table t1 add b int; +--error ER_UNKNOWN_TABLE +handler a1 close; +handler a2 close; +drop table t1, t2; + +# Rename table drop handlers + +eval create table t1 (a int, key $key_type (a)); +handler t1 open as a1; +handler a1 read a first; +rename table t1 to t2; +--error ER_UNKNOWN_TABLE +handler a1 read a first; +drop table t2; + +# Optimize table drop handlers + +eval create table t1 (a int, key $key_type (a)); +create table t2 like t1; +handler t1 open as a1; +handler t2 open as a2; +handler a1 read a first; +handler a2 read a first; +optimize table t1; +--error ER_UNKNOWN_TABLE +handler a1 close; +handler a2 close; +drop table t1, t2; + +--echo # +--echo # BUG#51877 - HANDLER interface causes invalid memory read +--echo # +eval CREATE TABLE t1(a INT, KEY $key_type (a)); +HANDLER t1 OPEN; +HANDLER t1 READ a FIRST; +INSERT INTO t1 VALUES(1); +--error 0,ER_CHECKREAD +HANDLER t1 READ a NEXT; +HANDLER t1 CLOSE; +DROP TABLE t1; diff --git a/mysql-test/suite/handler/init.inc b/mysql-test/suite/handler/init.inc new file mode 100644 index 00000000000..32c6010f95b --- /dev/null +++ b/mysql-test/suite/handler/init.inc @@ -0,0 +1,33 @@ +# Setup things for handler.inc +# +# Input variables +# $engine_type -- storage engine to be tested +# $key_type -- set if you want a non standard key type +# +# This scripts sets up default values for: +# $other_engine_type -- storage engine <> $engine_type +# $other_handler_engine_type -- storage engine <> $engine_type, if possible +# 1. $other_handler_engine_type must support handler +# 2. $other_handler_engine_type must point to an all +# time available storage engine +# have to be set before sourcing this script. +# +# Handler tests don't work with embedded server +# +-- source include/not_embedded.inc + +eval SET SESSION STORAGE_ENGINE = $engine_type; +let $other_engine_type= CSV; +let $other_handler_engine_type= MyISAM; + +--disable_warnings +drop table if exists t1,t3,t4,t5; +--enable_warnings + +# Create default test table + +eval create table t1 (a int, b char(10), key a $key_type (a), key b $key_type (a,b)); +insert into t1 values +(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"), +(14,"aaa"),(16,"ccc"),(16,"xxx"), +(20,"ggg"),(21,"hhh"),(22,"iii"); diff --git a/mysql-test/suite/handler/innodb.result b/mysql-test/suite/handler/innodb.result new file mode 100644 index 00000000000..83ce270612d --- /dev/null +++ b/mysql-test/suite/handler/innodb.result @@ -0,0 +1,562 @@ +SET SESSION STORAGE_ENGINE = InnoDB; +drop table if exists t1,t3,t4,t5; +create table t1 (a int, b char(10), key a (a), key b (a,b)); +insert into t1 values +(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"), +(14,"aaa"),(16,"ccc"),(16,"xxx"), +(20,"ggg"),(21,"hhh"),(22,"iii"); +handler t1 open as t2; +handler t2 read a first; +a b +14 aaa +handler t2 read a next; +a b +16 ccc +handler t2 read a next; +a b +16 xxx +handler t2 read a prev; +a b +16 ccc +handler t2 read a last; +a b +22 iii +handler t2 read a prev; +a b +21 hhh +handler t2 read a prev; +a b +20 ggg +handler t2 read a first; +a b +14 aaa +handler t2 read a prev; +a b +handler t2 read a last; +a b +22 iii +handler t2 read a prev; +a b +21 hhh +handler t2 read a next; +a b +22 iii +handler t2 read a next; +a b +handler t2 read a=(15); +a b +handler t2 read a=(16); +a b +16 ccc +handler t2 read a=(19,"fff"); +ERROR 42000: Too many key parts specified; max 1 parts allowed +handler t2 read b=(19,"fff"); +a b +19 fff +handler t2 read b=(19,"yyy"); +a b +19 yyy +handler t2 read b=(19); +a b +19 fff +handler t1 read a last; +ERROR 42S02: Unknown table 't1' in HANDLER +handler t2 read a=(11); +a b +handler t2 read a>=(11); +a b +14 aaa +handler t2 read a=(18); +a b +18 eee +handler t2 read a>=(18); +a b +18 eee +handler t2 read a>(18); +a b +19 fff +handler t2 read a<=(18); +a b +18 eee +handler t2 read a<(18); +a b +17 ddd +handler t2 read a=(15); +a b +handler t2 read a>=(15); +a b +16 ccc +handler t2 read a>(15); +a b +16 ccc +handler t2 read a<=(15); +a b +14 aaa +handler t2 read a<(15); +a b +14 aaa +handler t2 read a=(54); +a b +handler t2 read a>=(54); +a b +handler t2 read a>(54); +a b +handler t2 read a<=(54); +a b +22 iii +handler t2 read a<(54); +a b +22 iii +handler t2 read a=(1); +a b +handler t2 read a>=(1); +a b +14 aaa +handler t2 read a>(1); +a b +14 aaa +handler t2 read a<=(1); +a b +handler t2 read a<(1); +a b +handler t2 read a first limit 5; +a b +14 aaa +16 ccc +16 xxx +17 ddd +18 eee +handler t2 read a next limit 3; +a b +19 fff +19 yyy +20 ggg +handler t2 read a prev limit 10; +a b +19 yyy +19 fff +18 eee +17 ddd +16 xxx +16 ccc +14 aaa +handler t2 read a>=(16) limit 4; +a b +16 ccc +16 xxx +17 ddd +18 eee +handler t2 read a>=(16) limit 2,2; +a b +17 ddd +18 eee +handler t2 read a last limit 3; +a b +22 iii +21 hhh +20 ggg +handler t2 read a=(19); +a b +19 fff +handler t2 read a=(19) where b="yyy"; +a b +19 yyy +handler t2 read first; +a b +17 ddd +handler t2 read next; +a b +18 eee +handler t2 read next; +a b +19 fff +handler t2 close; +handler t1 open; +handler t1 read a next; +a b +14 aaa +handler t1 read a next; +a b +16 ccc +handler t1 close; +handler t1 open; +handler t1 read a prev; +a b +22 iii +handler t1 read a prev; +a b +21 hhh +handler t1 close; +handler t1 open as t2; +handler t2 read first; +a b +17 ddd +alter table t1 engine = InnoDB; +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +handler t1 open as t2; +drop table t1; +create table t1 (a int not null); +insert into t1 values (17); +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +handler t1 open as t2; +alter table t1 engine=CSV; +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +drop table t1; +create table t1 (a int); +insert into t1 values (1),(2),(3),(4),(5),(6); +delete from t1 limit 2; +handler t1 open; +handler t1 read first; +a +3 +handler t1 read first limit 1,1; +a +4 +handler t1 read first limit 2,2; +a +5 +6 +delete from t1 limit 3; +handler t1 read first; +a +6 +drop table t1; +create table t1(a int, index (a)); +insert into t1 values (1), (2), (3); +handler t1 open; +handler t1 read a=(W); +ERROR 42S22: Unknown column 'W' in 'field list' +handler t1 read a=(a); +ERROR HY000: Incorrect arguments to HANDLER ... READ +drop table t1; +create table t1 (a char(5)); +insert into t1 values ("Ok"); +handler t1 open as t; +handler t read first; +a +Ok +use mysql; +handler t read first; +a +Ok +handler t close; +handler test.t1 open as t; +handler t read first; +a +Ok +handler t close; +use test; +drop table t1; +create table t1 ( a int, b int, INDEX a (a) ); +insert into t1 values (1,2), (2,1); +handler t1 open; +handler t1 read a=(1) where b=2; +a b +1 2 +handler t1 read a=(1) where b=3; +a b +handler t1 read a=(1) where b=1; +a b +handler t1 close; +drop table t1; +create table t1 (c1 char(20)); +insert into t1 values ("t1"); +handler t1 open as h1; +handler h1 read first limit 9; +c1 +t1 +create table t2 (c1 char(20)); +insert into t2 values ("t2"); +handler t2 open as h2; +handler h2 read first limit 9; +c1 +t2 +create table t3 (c1 char(20)); +insert into t3 values ("t3"); +handler t3 open as h3; +handler h3 read first limit 9; +c1 +t3 +create table t4 (c1 char(20)); +insert into t4 values ("t4"); +handler t4 open as h4; +handler h4 read first limit 9; +c1 +t4 +create table t5 (c1 char(20)); +insert into t5 values ("t5"); +handler t5 open as h5; +handler h5 read first limit 9; +c1 +t5 +alter table t1 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +c1 +t3 +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +c1 +t5 +alter table t5 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +c1 +t3 +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +ERROR 42S02: Unknown table 'h5' in HANDLER +alter table t3 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +ERROR 42S02: Unknown table 'h3' in HANDLER +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +ERROR 42S02: Unknown table 'h5' in HANDLER +handler h2 close; +handler h4 close; +handler t1 open as h1_1; +handler t1 open as h1_2; +handler t1 open as h1_3; +handler h1_1 read first limit 9; +c1 +t1 +handler h1_2 read first limit 9; +c1 +t1 +handler h1_3 read first limit 9; +c1 +t1 +alter table t1 engine=InnoDB; +handler h1_1 read first limit 9; +ERROR 42S02: Unknown table 'h1_1' in HANDLER +handler h1_2 read first limit 9; +ERROR 42S02: Unknown table 'h1_2' in HANDLER +handler h1_3 read first limit 9; +ERROR 42S02: Unknown table 'h1_3' in HANDLER +drop table t1; +drop table t2; +drop table t3; +drop table t4; +drop table t5; +create table t1 (c1 int); +insert into t1 values (1); +handler t1 open; +handler t1 read first; +c1 +1 +send the below to another connection, do not wait for the result +optimize table t1; +proceed with the normal connection +handler t1 read next; +c1 +1 +handler t1 close; +read the result from the other connection +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +proceed with the normal connection +drop table t1; +CREATE TABLE t1 ( no1 smallint(5) NOT NULL default '0', no2 int(10) NOT NULL default '0', PRIMARY KEY (no1,no2)); +INSERT INTO t1 VALUES (1,274),(1,275),(2,6),(2,8),(4,1),(4,2); +HANDLER t1 OPEN; +HANDLER t1 READ `primary` = (1, 1000); +no1 no2 +HANDLER t1 READ `primary` PREV; +no1 no2 +1 275 +HANDLER t1 READ `primary` = (1, 1000); +no1 no2 +HANDLER t1 READ `primary` NEXT; +no1 no2 +2 8 +DROP TABLE t1; +create table t1 (c1 int); +insert into t1 values (14397); +flush tables with read lock; +drop table t1; +ERROR HY000: Can't execute the query because you have a conflicting read lock +send the below to another connection, do not wait for the result +drop table t1; +proceed with the normal connection +select * from t1; +c1 +14397 +unlock tables; +read the result from the other connection +proceed with the normal connection +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (a int not null) ENGINE=CSV; +--> client 2 +handler t1 open; +ERROR HY000: Table storage engine for 't1' doesn't have this option +--> client 1 +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +handler t1_alias read a next; +ERROR 42000: Key 'a' doesn't exist in table 't1_alias' +handler t1_alias READ a next where inexistent > 0; +ERROR 42S22: Unknown column 'inexistent' in 'field list' +handler t1_alias read a next; +ERROR 42000: Key 'a' doesn't exist in table 't1_alias' +handler t1_alias READ a next where inexistent > 0; +ERROR 42S22: Unknown column 'inexistent' in 'field list' +handler t1_alias close; +drop table t1; +create temporary table t1 (a int, b char(1), key a (a), key b(a,b)); +insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"), +(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j"),(9,'k'); +select a,b from t1; +a b +0 a +1 b +2 c +3 d +4 e +5 f +6 g +7 h +8 i +9 j +9 k +handler t1 open as a1; +handler a1 read a=(1); +a b +1 b +handler a1 read a next; +a b +2 c +handler a1 read a next; +a b +3 d +select a,b from t1; +ERROR HY000: Can't reopen table: 'a1' +handler a1 read a prev; +a b +2 c +handler a1 read a prev; +a b +1 b +handler a1 read a=(6) where b="g"; +a b +6 g +handler a1 close; +select a,b from t1; +a b +0 a +1 b +2 c +3 d +4 e +5 f +6 g +7 h +8 i +9 j +9 k +handler t1 open as a2; +handler a2 read a=(9); +a b +9 j +handler a2 read a next; +a b +9 k +handler a2 read a prev limit 2; +a b +9 j +8 i +handler a2 read a last; +a b +9 k +handler a2 read a prev; +a b +9 j +handler a2 close; +drop table t1; +create table t1 (a int); +create temporary table t2 (a int, key (a)); +handler t1 open as a1; +handler t2 open as a2; +handler a2 read a first; +a +drop table t1, t2; +handler a2 read a next; +ERROR 42S02: Unknown table 'a2' in HANDLER +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +create table t1 (a int, key (a)); +create table t2 like t1; +handler t1 open as a1; +handler t2 open as a2; +handler a1 read a first; +a +handler a2 read a first; +a +alter table t1 add b int; +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +handler a2 close; +drop table t1, t2; +create table t1 (a int, key (a)); +handler t1 open as a1; +handler a1 read a first; +a +rename table t1 to t2; +handler a1 read a first; +ERROR 42S02: Unknown table 'a1' in HANDLER +drop table t2; +create table t1 (a int, key (a)); +create table t2 like t1; +handler t1 open as a1; +handler t2 open as a2; +handler a1 read a first; +a +handler a2 read a first; +a +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +handler a2 close; +drop table t1, t2; +# +# BUG#51877 - HANDLER interface causes invalid memory read +# +CREATE TABLE t1(a INT, KEY (a)); +HANDLER t1 OPEN; +HANDLER t1 READ a FIRST; +a +INSERT INTO t1 VALUES(1); +HANDLER t1 READ a NEXT; +a +HANDLER t1 CLOSE; +DROP TABLE t1; diff --git a/mysql-test/suite/handler/innodb.test b/mysql-test/suite/handler/innodb.test new file mode 100644 index 00000000000..f4e4bf7cc3f --- /dev/null +++ b/mysql-test/suite/handler/innodb.test @@ -0,0 +1,17 @@ +# t/handler_innodb.test +# +# test of HANDLER ... +# +# Last update: +# 2006-07-31 ML test refactored (MySQL 5.1) +# code of t/handler.test and t/innodb_handler.test united +# main testing code put into handler.inc +# rename t/innodb_handler.test to t/handler_innodb.test +# + +--source include/have_innodb.inc + +let $engine_type= InnoDB; + +--source init.inc +--source handler.inc diff --git a/mysql-test/suite/handler/interface.result b/mysql-test/suite/handler/interface.result new file mode 100644 index 00000000000..0b5a4447739 --- /dev/null +++ b/mysql-test/suite/handler/interface.result @@ -0,0 +1,259 @@ +drop table if exists t1,t3,t4,t5; +drop database if exists test_test; +SET SESSION STORAGE_ENGINE = MyISAM; +drop table if exists t1,t3,t4,t5; +create table t1 (a int, b char(10), key a (a), key b (a,b)); +insert into t1 values +(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"), +(14,"aaa"),(16,"ccc"),(16,"xxx"), +(20,"ggg"),(21,"hhh"),(22,"iii"); +handler t1 open; +handler t1 read a=(SELECT 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 'SELECT 1)' at line 1 +handler t1 read a=(1) FIRST; +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 'FIRST' at line 1 +handler t1 read a=(1) NEXT; +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 'NEXT' at line 1 +handler t1 read last; +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 +handler t1 close; +drop table t1; +CREATE TABLE t1(a INT, PRIMARY KEY(a)); +insert into t1 values(1),(2); +handler t1 open; +handler t1 read primary=(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 'primary=(1)' at line 1 +handler t1 read `primary`=(1); +a +1 +handler t1 close; +drop table t1; +create database test_test; +use test_test; +create table t1(table_id char(20), primary key (table_id)); +insert into t1 values ('test_test.t1'); +insert into t1 values (''); +handler t1 open; +handler t1 read first limit 9; +table_id +test_test.t1 + +create table t2(table_id char(20), primary key (table_id)); +insert into t2 values ('test_test.t2'); +insert into t2 values (''); +handler t2 open; +handler t2 read first limit 9; +table_id +test_test.t2 + +use test; +create table t1(table_id char(20), primary key (table_id)); +insert into t1 values ('test.t1'); +insert into t1 values (''); +handler t1 open; +ERROR 42000: Not unique table/alias: 't1' +use test; +handler test.t1 read first limit 9; +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 'read first limit 9' at line 1 +handler test_test.t1 read first limit 9; +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 'read first limit 9' at line 1 +handler t1 read first limit 9; +table_id +test_test.t1 + +handler test_test.t2 read first limit 9; +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 'read first limit 9' at line 1 +handler t2 read first limit 9; +table_id +test_test.t2 + +handler test_test.t1 close; +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 'close' at line 1 +handler t1 close; +drop table test_test.t1; +handler test_test.t2 close; +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 'close' at line 1 +handler t2 close; +drop table test_test.t2; +drop database test_test; +use test; +handler test.t1 close; +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 'close' at line 1 +handler t1 close; +ERROR 42S02: Unknown table 't1' in HANDLER +drop table test.t1; +create database test_test; +use test_test; +create table t1 (c1 char(20)); +insert into t1 values ('test_test.t1'); +create table t3 (c1 char(20)); +insert into t3 values ('test_test.t3'); +handler t1 open; +handler t1 read first limit 9; +c1 +test_test.t1 +handler t1 open h1; +handler h1 read first limit 9; +c1 +test_test.t1 +use test; +create table t1 (c1 char(20)); +create table t2 (c1 char(20)); +create table t3 (c1 char(20)); +insert into t1 values ('t1'); +insert into t2 values ('t2'); +insert into t3 values ('t3'); +handler t1 open; +ERROR 42000: Not unique table/alias: 't1' +handler t2 open t1; +ERROR 42000: Not unique table/alias: 't1' +handler t3 open t1; +ERROR 42000: Not unique table/alias: 't1' +handler t1 read first limit 9; +c1 +test_test.t1 +handler test.t1 close; +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 'close' at line 1 +handler test.t1 open h1; +ERROR 42000: Not unique table/alias: 'h1' +handler test_test.t1 open h1; +ERROR 42000: Not unique table/alias: 'h1' +handler test_test.t3 open h3; +handler test.t1 open h2; +handler t1 read first limit 9; +c1 +test_test.t1 +handler h1 read first limit 9; +c1 +test_test.t1 +handler h2 read first limit 9; +c1 +t1 +handler h3 read first limit 9; +c1 +test_test.t3 +handler h2 read first limit 9; +c1 +t1 +handler test.h1 close; +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 'close' at line 1 +handler t1 close; +handler h1 close; +handler h2 close; +handler t1 read first limit 9; +ERROR 42S02: Unknown table 't1' in HANDLER +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +ERROR 42S02: Unknown table 'h2' in HANDLER +handler h3 read first limit 9; +c1 +test_test.t3 +handler h3 read first limit 9; +c1 +test_test.t3 +use test_test; +handler h3 read first limit 9; +c1 +test_test.t3 +handler test.h3 read first limit 9; +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 'read first limit 9' at line 1 +handler h3 close; +use test; +drop table t3; +drop table t2; +drop table t1; +drop database test_test; +create table t1 (c1 int); +create table t2 (c1 int); +insert into t1 values (1); +insert into t2 values (2); +connection: default +handler t1 open; +handler t1 read first; +c1 +1 +connection: flush +flush tables;; +connection: default +handler t2 open; +handler t2 read first; +c1 +2 +handler t1 read next; +c1 +1 +handler t1 close; +handler t2 close; +drop table t1,t2; +create table t1 (a int); +handler t1 open as t1_alias; +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +flush tables; +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +handler t1_alias close; +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +handler t1_alias read first; +a +drop table t1; +handler t1_alias read next; +ERROR 42S02: Unknown table 't1_alias' in HANDLER +create table t1 (c1 int); +connection: default +handler t1 open; +handler t1 read first; +c1 +connection: flush +rename table t1 to t2;; +connection: default +handler t2 open; +handler t2 read first; +c1 +handler t1 read next; +ERROR 42S02: Table 'test.t1' doesn't exist +handler t1 close; +handler t2 close; +drop table t2; +create table t1 (a int, b char(1), key a (a), key b (a,b)); +insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"), +(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j"); +handler t1 open; +handler t1 read a first; +a b +0 a +handler t1 read a next; +a b +1 b +flush tables; +handler t1 read a next; +a b +0 a +handler t1 read a next; +a b +1 b +flush tables with read lock; +handler t1 read a next; +a b +0 a +unlock tables; +drop table t1; +handler t1 read a next; +ERROR 42S02: Unknown table 't1' in HANDLER +drop table if exists t1; +create table t1 (a int not null); +insert into t1 values (1); +handler t1 open; +alter table t1 engine=csv; +handler t1 read a next; +ERROR HY000: Table storage engine for 't1' doesn't have this option +handler t1 close; +drop table t1; +USE information_schema; +HANDLER COLUMNS OPEN; +ERROR HY000: Incorrect usage of HANDLER OPEN and information_schema diff --git a/mysql-test/suite/handler/interface.test b/mysql-test/suite/handler/interface.test new file mode 100644 index 00000000000..809f0228f98 --- /dev/null +++ b/mysql-test/suite/handler/interface.test @@ -0,0 +1,307 @@ +# +# Tests of handler interface that are system independent +# +# Handler tests don't work yet with embedded server +# +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1,t3,t4,t5; +drop database if exists test_test; +--enable_warnings + +# Run tests with myisam (any engine should be ok) + +let $engine_type= MyISAM; + +--source init.inc + +# +# Do some syntax checking +# + +handler t1 open; +--error ER_PARSE_ERROR +handler t1 read a=(SELECT 1); +--error ER_PARSE_ERROR +handler t1 read a=(1) FIRST; +--error ER_PARSE_ERROR +handler t1 read a=(1) NEXT; +--error ER_PARSE_ERROR +handler t1 read last; +handler t1 close; +drop table t1; + +CREATE TABLE t1(a INT, PRIMARY KEY(a)); +insert into t1 values(1),(2); +handler t1 open; +--error ER_PARSE_ERROR +handler t1 read primary=(1); +handler t1 read `primary`=(1); +handler t1 close; +drop table t1; + +# +# Check if two database names beginning the same are seen as different. +# +# This database begins like the usual 'test' database. +# +create database test_test; +use test_test; +eval create table t1(table_id char(20), primary key $key_type (table_id)); +insert into t1 values ('test_test.t1'); +insert into t1 values (''); +handler t1 open; +handler t1 read first limit 9; +eval create table t2(table_id char(20), primary key $key_type (table_id)); +insert into t2 values ('test_test.t2'); +insert into t2 values (''); +handler t2 open; +handler t2 read first limit 9; +# +# This is the usual 'test' database. +# +use test; +eval create table t1(table_id char(20), primary key $key_type (table_id)); +insert into t1 values ('test.t1'); +insert into t1 values (''); +--error 1066 +handler t1 open; +# +# Check accessibility of all the tables. +# +use test; +--error 1064 +handler test.t1 read first limit 9; +--error 1064 +handler test_test.t1 read first limit 9; +handler t1 read first limit 9; +--error 1064 +handler test_test.t2 read first limit 9; +handler t2 read first limit 9; + +# +# Cleanup. +# + +--error 1064 +handler test_test.t1 close; +handler t1 close; +drop table test_test.t1; +--error 1064 +handler test_test.t2 close; +handler t2 close; +drop table test_test.t2; +drop database test_test; + +# +use test; +--error 1064 +handler test.t1 close; +--error 1109 +handler t1 close; +drop table test.t1; + +# +# BUG#4335 one name can be handler open'ed many times +# + +create database test_test; +use test_test; +create table t1 (c1 char(20)); +insert into t1 values ('test_test.t1'); +create table t3 (c1 char(20)); +insert into t3 values ('test_test.t3'); +handler t1 open; +handler t1 read first limit 9; +handler t1 open h1; +handler h1 read first limit 9; +use test; +create table t1 (c1 char(20)); +create table t2 (c1 char(20)); +create table t3 (c1 char(20)); +insert into t1 values ('t1'); +insert into t2 values ('t2'); +insert into t3 values ('t3'); +--error 1066 +handler t1 open; +--error 1066 +handler t2 open t1; +--error 1066 +handler t3 open t1; +handler t1 read first limit 9; +--error 1064 +handler test.t1 close; +--error 1066 +handler test.t1 open h1; +--error 1066 +handler test_test.t1 open h1; +handler test_test.t3 open h3; +handler test.t1 open h2; +handler t1 read first limit 9; +handler h1 read first limit 9; +handler h2 read first limit 9; +handler h3 read first limit 9; +handler h2 read first limit 9; +--error 1064 +handler test.h1 close; +handler t1 close; +handler h1 close; +handler h2 close; +--error 1109 +handler t1 read first limit 9; +--error 1109 +handler h1 read first limit 9; +--error 1109 +handler h2 read first limit 9; +handler h3 read first limit 9; +handler h3 read first limit 9; +use test_test; +handler h3 read first limit 9; +--error 1064 +handler test.h3 read first limit 9; +handler h3 close; +use test; +drop table t3; +drop table t2; +drop table t1; +drop database test_test; + +# +# Bug#21587 FLUSH TABLES causes server crash when used with HANDLER statements +# + +create table t1 (c1 int); +create table t2 (c1 int); +insert into t1 values (1); +insert into t2 values (2); +--echo connection: default +handler t1 open; +handler t1 read first; +connect (flush,localhost,root,,); +connection flush; +--echo connection: flush +--send flush tables; +connection default; +--echo connection: default +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Flushing tables"; +--source include/wait_condition.inc +handler t2 open; +handler t2 read first; +handler t1 read next; +handler t1 close; +handler t2 close; +connection flush; +reap; +connection default; +drop table t1,t2; +disconnect flush; + +# +# Bug#31397 Inconsistent drop table behavior of handler tables. +# + +create table t1 (a int); +handler t1 open as t1_alias; +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +flush tables; +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +handler t1_alias close; +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +handler t1_alias read first; +drop table t1; +--error ER_UNKNOWN_TABLE +handler t1_alias read next; + +# +# Bug#31409 RENAME TABLE causes server crash or deadlock when used with +# HANDLER statements +# + +create table t1 (c1 int); +--echo connection: default +handler t1 open; +handler t1 read first; +connect (flush,localhost,root,,); +connection flush; +--echo connection: flush +--send rename table t1 to t2; +connection default; +--echo connection: default +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table" and info = "rename table t1 to t2"; +--source include/wait_condition.inc +handler t2 open; +handler t2 read first; +--error ER_NO_SUCH_TABLE +handler t1 read next; +handler t1 close; +handler t2 close; +connection flush; +reap; +connection default; +drop table t2; +disconnect flush; + +# Flush tables causes handlers reopen + +eval create table t1 (a int, b char(1), key a $key_type (a), key b $key_type (a,b)); +insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"), + (5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j"); +handler t1 open; +handler t1 read a first; +handler t1 read a next; +flush tables; +handler t1 read a next; +handler t1 read a next; +flush tables with read lock; +handler t1 read a next; +unlock tables; +drop table t1; +--error ER_UNKNOWN_TABLE +handler t1 read a next; + +# +# Bug#41110: crash with handler command when used concurrently with alter table +# Bug#41112: crash in mysql_ha_close_table/get_lock_data with alter table +# + +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (a int not null); +insert into t1 values (1); +handler t1 open; +connect(con1,localhost,root,,); +send alter table t1 engine=csv; +connection default; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "rename result table" and info = "alter table t1 engine=csv"; +--source include/wait_condition.inc +--error ER_ILLEGAL_HA +handler t1 read a next; +handler t1 close; +connection con1; +--reap +drop table t1; +disconnect con1; +--source include/wait_until_disconnected.inc +connection default; + +# +# Bug#44151 using handler commands on information_schema tables crashes server +# + +USE information_schema; +--error ER_WRONG_USAGE +HANDLER COLUMNS OPEN; diff --git a/mysql-test/suite/handler/myisam.result b/mysql-test/suite/handler/myisam.result new file mode 100644 index 00000000000..bd356d6e81d --- /dev/null +++ b/mysql-test/suite/handler/myisam.result @@ -0,0 +1,671 @@ +SET SESSION STORAGE_ENGINE = MyISAM; +drop table if exists t1,t3,t4,t5; +create table t1 (a int, b char(10), key a (a), key b (a,b)); +insert into t1 values +(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"), +(14,"aaa"),(16,"ccc"),(16,"xxx"), +(20,"ggg"),(21,"hhh"),(22,"iii"); +handler t1 open as t2; +handler t2 read a first; +a b +14 aaa +handler t2 read a next; +a b +16 ccc +handler t2 read a next; +a b +16 xxx +handler t2 read a prev; +a b +16 ccc +handler t2 read a last; +a b +22 iii +handler t2 read a prev; +a b +21 hhh +handler t2 read a prev; +a b +20 ggg +handler t2 read a first; +a b +14 aaa +handler t2 read a prev; +a b +handler t2 read a last; +a b +22 iii +handler t2 read a prev; +a b +21 hhh +handler t2 read a next; +a b +22 iii +handler t2 read a next; +a b +handler t2 read a=(15); +a b +handler t2 read a=(16); +a b +16 ccc +handler t2 read a=(19,"fff"); +ERROR 42000: Too many key parts specified; max 1 parts allowed +handler t2 read b=(19,"fff"); +a b +19 fff +handler t2 read b=(19,"yyy"); +a b +19 yyy +handler t2 read b=(19); +a b +19 fff +handler t1 read a last; +ERROR 42S02: Unknown table 't1' in HANDLER +handler t2 read a=(11); +a b +handler t2 read a>=(11); +a b +14 aaa +handler t2 read a=(18); +a b +18 eee +handler t2 read a>=(18); +a b +18 eee +handler t2 read a>(18); +a b +19 fff +handler t2 read a<=(18); +a b +18 eee +handler t2 read a<(18); +a b +17 ddd +handler t2 read a=(15); +a b +handler t2 read a>=(15); +a b +16 ccc +handler t2 read a>(15); +a b +16 ccc +handler t2 read a<=(15); +a b +14 aaa +handler t2 read a<(15); +a b +14 aaa +handler t2 read a=(54); +a b +handler t2 read a>=(54); +a b +handler t2 read a>(54); +a b +handler t2 read a<=(54); +a b +22 iii +handler t2 read a<(54); +a b +22 iii +handler t2 read a=(1); +a b +handler t2 read a>=(1); +a b +14 aaa +handler t2 read a>(1); +a b +14 aaa +handler t2 read a<=(1); +a b +handler t2 read a<(1); +a b +handler t2 read a first limit 5; +a b +14 aaa +16 ccc +16 xxx +17 ddd +18 eee +handler t2 read a next limit 3; +a b +19 fff +19 yyy +20 ggg +handler t2 read a prev limit 10; +a b +19 yyy +19 fff +18 eee +17 ddd +16 xxx +16 ccc +14 aaa +handler t2 read a>=(16) limit 4; +a b +16 ccc +16 xxx +17 ddd +18 eee +handler t2 read a>=(16) limit 2,2; +a b +17 ddd +18 eee +handler t2 read a last limit 3; +a b +22 iii +21 hhh +20 ggg +handler t2 read a=(19); +a b +19 fff +handler t2 read a=(19) where b="yyy"; +a b +19 yyy +handler t2 read first; +a b +17 ddd +handler t2 read next; +a b +18 eee +handler t2 read next; +a b +19 fff +handler t2 close; +handler t1 open; +handler t1 read a next; +a b +14 aaa +handler t1 read a next; +a b +16 ccc +handler t1 close; +handler t1 open; +handler t1 read a prev; +a b +22 iii +handler t1 read a prev; +a b +21 hhh +handler t1 close; +handler t1 open as t2; +handler t2 read first; +a b +17 ddd +alter table t1 engine = MyISAM; +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +handler t1 open as t2; +drop table t1; +create table t1 (a int not null); +insert into t1 values (17); +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +handler t1 open as t2; +alter table t1 engine=CSV; +handler t2 read first; +ERROR 42S02: Unknown table 't2' in HANDLER +drop table t1; +create table t1 (a int); +insert into t1 values (1),(2),(3),(4),(5),(6); +delete from t1 limit 2; +handler t1 open; +handler t1 read first; +a +3 +handler t1 read first limit 1,1; +a +4 +handler t1 read first limit 2,2; +a +5 +6 +delete from t1 limit 3; +handler t1 read first; +a +6 +drop table t1; +create table t1(a int, index (a)); +insert into t1 values (1), (2), (3); +handler t1 open; +handler t1 read a=(W); +ERROR 42S22: Unknown column 'W' in 'field list' +handler t1 read a=(a); +ERROR HY000: Incorrect arguments to HANDLER ... READ +drop table t1; +create table t1 (a char(5)); +insert into t1 values ("Ok"); +handler t1 open as t; +handler t read first; +a +Ok +use mysql; +handler t read first; +a +Ok +handler t close; +handler test.t1 open as t; +handler t read first; +a +Ok +handler t close; +use test; +drop table t1; +create table t1 ( a int, b int, INDEX a (a) ); +insert into t1 values (1,2), (2,1); +handler t1 open; +handler t1 read a=(1) where b=2; +a b +1 2 +handler t1 read a=(1) where b=3; +a b +handler t1 read a=(1) where b=1; +a b +handler t1 close; +drop table t1; +create table t1 (c1 char(20)); +insert into t1 values ("t1"); +handler t1 open as h1; +handler h1 read first limit 9; +c1 +t1 +create table t2 (c1 char(20)); +insert into t2 values ("t2"); +handler t2 open as h2; +handler h2 read first limit 9; +c1 +t2 +create table t3 (c1 char(20)); +insert into t3 values ("t3"); +handler t3 open as h3; +handler h3 read first limit 9; +c1 +t3 +create table t4 (c1 char(20)); +insert into t4 values ("t4"); +handler t4 open as h4; +handler h4 read first limit 9; +c1 +t4 +create table t5 (c1 char(20)); +insert into t5 values ("t5"); +handler t5 open as h5; +handler h5 read first limit 9; +c1 +t5 +alter table t1 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +c1 +t3 +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +c1 +t5 +alter table t5 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +c1 +t3 +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +ERROR 42S02: Unknown table 'h5' in HANDLER +alter table t3 engine=MyISAM; +handler h1 read first limit 9; +ERROR 42S02: Unknown table 'h1' in HANDLER +handler h2 read first limit 9; +c1 +t2 +handler h3 read first limit 9; +ERROR 42S02: Unknown table 'h3' in HANDLER +handler h4 read first limit 9; +c1 +t4 +handler h5 read first limit 9; +ERROR 42S02: Unknown table 'h5' in HANDLER +handler h2 close; +handler h4 close; +handler t1 open as h1_1; +handler t1 open as h1_2; +handler t1 open as h1_3; +handler h1_1 read first limit 9; +c1 +t1 +handler h1_2 read first limit 9; +c1 +t1 +handler h1_3 read first limit 9; +c1 +t1 +alter table t1 engine=MyISAM; +handler h1_1 read first limit 9; +ERROR 42S02: Unknown table 'h1_1' in HANDLER +handler h1_2 read first limit 9; +ERROR 42S02: Unknown table 'h1_2' in HANDLER +handler h1_3 read first limit 9; +ERROR 42S02: Unknown table 'h1_3' in HANDLER +drop table t1; +drop table t2; +drop table t3; +drop table t4; +drop table t5; +create table t1 (c1 int); +insert into t1 values (1); +handler t1 open; +handler t1 read first; +c1 +1 +send the below to another connection, do not wait for the result +optimize table t1; +proceed with the normal connection +handler t1 read next; +c1 +1 +handler t1 close; +read the result from the other connection +Table Op Msg_type Msg_text +test.t1 optimize status OK +proceed with the normal connection +drop table t1; +CREATE TABLE t1 ( no1 smallint(5) NOT NULL default '0', no2 int(10) NOT NULL default '0', PRIMARY KEY (no1,no2)); +INSERT INTO t1 VALUES (1,274),(1,275),(2,6),(2,8),(4,1),(4,2); +HANDLER t1 OPEN; +HANDLER t1 READ `primary` = (1, 1000); +no1 no2 +HANDLER t1 READ `primary` PREV; +no1 no2 +1 275 +HANDLER t1 READ `primary` = (1, 1000); +no1 no2 +HANDLER t1 READ `primary` NEXT; +no1 no2 +2 6 +DROP TABLE t1; +create table t1 (c1 int); +insert into t1 values (14397); +flush tables with read lock; +drop table t1; +ERROR HY000: Can't execute the query because you have a conflicting read lock +send the below to another connection, do not wait for the result +drop table t1; +proceed with the normal connection +select * from t1; +c1 +14397 +unlock tables; +read the result from the other connection +proceed with the normal connection +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (a int not null) ENGINE=CSV; +--> client 2 +handler t1 open; +ERROR HY000: Table storage engine for 't1' doesn't have this option +--> client 1 +drop table t1; +create table t1 (a int); +handler t1 open as t1_alias; +handler t1_alias read a next; +ERROR 42000: Key 'a' doesn't exist in table 't1_alias' +handler t1_alias READ a next where inexistent > 0; +ERROR 42S22: Unknown column 'inexistent' in 'field list' +handler t1_alias read a next; +ERROR 42000: Key 'a' doesn't exist in table 't1_alias' +handler t1_alias READ a next where inexistent > 0; +ERROR 42S22: Unknown column 'inexistent' in 'field list' +handler t1_alias close; +drop table t1; +create temporary table t1 (a int, b char(1), key a (a), key b(a,b)); +insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"), +(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j"),(9,'k'); +select a,b from t1; +a b +0 a +1 b +2 c +3 d +4 e +5 f +6 g +7 h +8 i +9 j +9 k +handler t1 open as a1; +handler a1 read a=(1); +a b +1 b +handler a1 read a next; +a b +2 c +handler a1 read a next; +a b +3 d +select a,b from t1; +ERROR HY000: Can't reopen table: 'a1' +handler a1 read a prev; +a b +2 c +handler a1 read a prev; +a b +1 b +handler a1 read a=(6) where b="g"; +a b +6 g +handler a1 close; +select a,b from t1; +a b +0 a +1 b +2 c +3 d +4 e +5 f +6 g +7 h +8 i +9 j +9 k +handler t1 open as a2; +handler a2 read a=(9); +a b +9 j +handler a2 read a next; +a b +9 k +handler a2 read a prev limit 2; +a b +9 j +8 i +handler a2 read a last; +a b +9 k +handler a2 read a prev; +a b +9 j +handler a2 close; +drop table t1; +create table t1 (a int); +create temporary table t2 (a int, key (a)); +handler t1 open as a1; +handler t2 open as a2; +handler a2 read a first; +a +drop table t1, t2; +handler a2 read a next; +ERROR 42S02: Unknown table 'a2' in HANDLER +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +create table t1 (a int, key (a)); +create table t2 like t1; +handler t1 open as a1; +handler t2 open as a2; +handler a1 read a first; +a +handler a2 read a first; +a +alter table t1 add b int; +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +handler a2 close; +drop table t1, t2; +create table t1 (a int, key (a)); +handler t1 open as a1; +handler a1 read a first; +a +rename table t1 to t2; +handler a1 read a first; +ERROR 42S02: Unknown table 'a1' in HANDLER +drop table t2; +create table t1 (a int, key (a)); +create table t2 like t1; +handler t1 open as a1; +handler t2 open as a2; +handler a1 read a first; +a +handler a2 read a first; +a +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status Table is already up to date +handler a1 close; +ERROR 42S02: Unknown table 'a1' in HANDLER +handler a2 close; +drop table t1, t2; +# +# BUG#51877 - HANDLER interface causes invalid memory read +# +CREATE TABLE t1(a INT, KEY (a)); +HANDLER t1 OPEN; +HANDLER t1 READ a FIRST; +a +INSERT INTO t1 VALUES(1); +HANDLER t1 READ a NEXT; +a +1 +HANDLER t1 CLOSE; +DROP TABLE t1; +# +# BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash +# +CREATE TABLE t1 AS SELECT 1 AS f1; +HANDLER t1 OPEN; +TRUNCATE t1; +HANDLER t1 READ FIRST; +ERROR 42S02: Unknown table 't1' in HANDLER +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 AS SELECT 1 AS f1; +HANDLER t1 OPEN; +TRUNCATE t1; +HANDLER t1 READ FIRST; +ERROR 42S02: Unknown table 't1' in HANDLER +DROP TABLE t1; +# +# Bug #54007: assert in ha_myisam::index_next , HANDLER +# +CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a), KEY b(b), KEY ab(a, b)); +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a b +HANDLER t1 READ `PRIMARY` NEXT; +a b +HANDLER t1 READ ab NEXT; +a b +HANDLER t1 READ b NEXT; +a b +HANDLER t1 READ NEXT; +a b +HANDLER t1 CLOSE; +INSERT INTO t1 VALUES (2, 20), (1, 10), (4, 40), (3, 30); +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a b +2 20 +HANDLER t1 READ NEXT; +a b +1 10 +HANDLER t1 READ `PRIMARY` NEXT; +a b +1 10 +HANDLER t1 READ `PRIMARY` NEXT; +a b +2 20 +HANDLER t1 READ ab NEXT; +a b +1 10 +HANDLER t1 READ ab NEXT; +a b +2 20 +HANDLER t1 READ b NEXT; +a b +1 10 +HANDLER t1 READ b NEXT; +a b +2 20 +HANDLER t1 READ b NEXT; +a b +3 30 +HANDLER t1 READ b NEXT; +a b +4 40 +HANDLER t1 READ b NEXT; +a b +HANDLER t1 READ NEXT; +a b +2 20 +HANDLER t1 READ NEXT; +a b +1 10 +HANDLER t1 READ NEXT; +a b +4 40 +HANDLER t1 CLOSE; +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a b +2 20 +HANDLER t1 READ `PRIMARY` PREV; +a b +4 40 +HANDLER t1 READ `PRIMARY` PREV; +a b +3 30 +HANDLER t1 READ b PREV; +a b +4 40 +HANDLER t1 READ b PREV; +a b +3 30 +HANDLER t1 CLOSE; +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +a b +2 20 +HANDLER t1 READ `PRIMARY` PREV LIMIT 3; +a b +4 40 +3 30 +2 20 +HANDLER t1 READ b NEXT LIMIT 5; +a b +1 10 +2 20 +3 30 +4 40 +HANDLER t1 CLOSE; +DROP TABLE t1; +End of 5.1 tests diff --git a/mysql-test/suite/handler/myisam.test b/mysql-test/suite/handler/myisam.test new file mode 100644 index 00000000000..c6acf1e822c --- /dev/null +++ b/mysql-test/suite/handler/myisam.test @@ -0,0 +1,82 @@ +# t/handler_myisam.test +# +# test of HANDLER ... +# +# Last update: +# 2006-07-31 ML test refactored (MySQL 5.1) +# code of t/handler.test and t/innodb_handler.test united +# main testing code put into handler.inc +# rename t/handler.test to t/handler_myisam.test +# + +let $engine_type= MyISAM; + +--source init.inc +--source handler.inc + +--echo # +--echo # BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash +--echo # +CREATE TABLE t1 AS SELECT 1 AS f1; +HANDLER t1 OPEN; +TRUNCATE t1; +--error ER_UNKNOWN_TABLE +HANDLER t1 READ FIRST; +DROP TABLE t1; + +CREATE TEMPORARY TABLE t1 AS SELECT 1 AS f1; +HANDLER t1 OPEN; +TRUNCATE t1; +--error ER_UNKNOWN_TABLE +HANDLER t1 READ FIRST; +DROP TABLE t1; + +--echo # +--echo # Bug #54007: assert in ha_myisam::index_next , HANDLER +--echo # +CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a), KEY b(b), KEY ab(a, b)); + +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +HANDLER t1 READ `PRIMARY` NEXT; +HANDLER t1 READ ab NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ NEXT; +HANDLER t1 CLOSE; + +INSERT INTO t1 VALUES (2, 20), (1, 10), (4, 40), (3, 30); +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +HANDLER t1 READ NEXT; +HANDLER t1 READ `PRIMARY` NEXT; +HANDLER t1 READ `PRIMARY` NEXT; +HANDLER t1 READ ab NEXT; +HANDLER t1 READ ab NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ b NEXT; +HANDLER t1 READ NEXT; +HANDLER t1 READ NEXT; +HANDLER t1 READ NEXT; +HANDLER t1 CLOSE; + +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +HANDLER t1 READ `PRIMARY` PREV; +HANDLER t1 READ `PRIMARY` PREV; +HANDLER t1 READ b PREV; +HANDLER t1 READ b PREV; +HANDLER t1 CLOSE; + +HANDLER t1 OPEN; +HANDLER t1 READ FIRST; +HANDLER t1 READ `PRIMARY` PREV LIMIT 3; +HANDLER t1 READ b NEXT LIMIT 5; +HANDLER t1 CLOSE; + +DROP TABLE t1; + + +--echo End of 5.1 tests -- cgit v1.2.1 From 108e9ee84ead6a8665c7faca7c63aa168414a8d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Jan 2011 13:28:36 +0100 Subject: MBug#702303: Spurious `use` statements in output from mysqlbinlog --rewrite-db="a->b" --- mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result | 2 -- 1 file changed, 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result index 5a6fbc953b4..5e48f13932d 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result @@ -159,7 +159,6 @@ SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; # at # -use new_test1/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; BEGIN @@ -354,7 +353,6 @@ SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; # at # -use new_test1/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; BEGIN -- cgit v1.2.1 From 213321206efb1ed9b13cae8ffa2d03eababe1c2d Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 12 Jan 2011 15:41:39 +0200 Subject: Fix for LP#697610 ha_index_prev(uchar*): Assertion `inited==INDEX' failed with HANDLER + InnoDB in maria-5.3 mysql-test/suite/handler/innodb.result: Added test case mysql-test/suite/handler/innodb.test: Added test case sql/handler.h: Move setting/resetting of active_index to ha_index_init()/ha_index_end() to simplify handler functions index_init()/index_end() Fixed that get_index() returns MAX_KEY if index is not inited (this fixed LP#697610) storage/federated/ha_federated.cc: Settting of active_index is not needed anymore storage/maria/ma_pagecache.c: Added error message if we have too little memory for Maria page cache --- mysql-test/suite/handler/innodb.result | 10 ++++++++++ mysql-test/suite/handler/innodb.test | 11 +++++++++++ 2 files changed, 21 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/handler/innodb.result b/mysql-test/suite/handler/innodb.result index 83ce270612d..2cdaa0c4664 100644 --- a/mysql-test/suite/handler/innodb.result +++ b/mysql-test/suite/handler/innodb.result @@ -560,3 +560,13 @@ HANDLER t1 READ a NEXT; a HANDLER t1 CLOSE; DROP TABLE t1; +CREATE TABLE t1 (f1 integer, f2 integer, primary key (f1), key (f2)) engine=innodb; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +HANDLER t1 OPEN; +HANDLER t1 READ FIRST WHERE f2 <= 1; +f1 f2 +1 1 +HANDLER t1 READ `PRIMARY` PREV; +f1 f2 +3 3 +DROP TABLE t1; diff --git a/mysql-test/suite/handler/innodb.test b/mysql-test/suite/handler/innodb.test index f4e4bf7cc3f..6527c4bb8bb 100644 --- a/mysql-test/suite/handler/innodb.test +++ b/mysql-test/suite/handler/innodb.test @@ -15,3 +15,14 @@ let $engine_type= InnoDB; --source init.inc --source handler.inc + +# +# LP#697610 ha_index_prev(uchar*): Assertion `inited==INDEX' +# + +CREATE TABLE t1 (f1 integer, f2 integer, primary key (f1), key (f2)) engine=innodb; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +HANDLER t1 OPEN; +HANDLER t1 READ FIRST WHERE f2 <= 1; +HANDLER t1 READ `PRIMARY` PREV; +DROP TABLE t1; -- cgit v1.2.1 From 7057545699a2a614fb444bd3e6ad7d3f1ff31d56 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 20 Jan 2011 19:08:12 +0200 Subject: Fixed some mysql-test-run failures and compile warnings/errors Added logging of all possible fatal table errors if --log-warnings set to > 1 mysql-test/extra/rpl_tests/rpl_EE_err.test: Safety fix mysql-test/extra/rpl_tests/rpl_row_basic.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/r/archive.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/r/csv.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/maria/r/maria-autozerofill.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/maria/t/maria-autozerofill.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/maria/t/maria-recover.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/parts/t/partition_recover_myisam.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/r/rpl_bug38694.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/r/rpl_idempotency.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/r/rpl_ignore_table.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/r/rpl_row_conflicts.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/r/rpl_temporary_errors.result: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/t/rpl_bug38694.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/t/rpl_idempotency.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/t/rpl_ignore_table.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/t/rpl_row_conflicts.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/suite/rpl/t/rpl_temporary_errors.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/t/archive.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) mysql-test/t/csv.test: Added suppression of possible error message (so that one can run test with --log-warnings=2) sql/handler.cc: If running with --assert-of-crashed-table or --log-warnings > 1 then print engine error to log sql/sql_select.cc: Disable not initialized warning from gcc strings/Makefile.am: Fixed compiler error on Solaris 10 (duplicate strmov() function) --- mysql-test/suite/maria/r/maria-autozerofill.result | 1 + mysql-test/suite/maria/t/maria-autozerofill.test | 2 ++ mysql-test/suite/maria/t/maria-recover.test | 2 ++ mysql-test/suite/parts/t/partition_recover_myisam.test | 1 + mysql-test/suite/rpl/r/rpl_bug38694.result | 1 + mysql-test/suite/rpl/r/rpl_idempotency.result | 1 + mysql-test/suite/rpl/r/rpl_ignore_table.result | 3 +++ mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result | 5 +++++ mysql-test/suite/rpl/r/rpl_row_conflicts.result | 1 + mysql-test/suite/rpl/r/rpl_temporary_errors.result | 1 + mysql-test/suite/rpl/t/rpl_bug38694.test | 2 ++ mysql-test/suite/rpl/t/rpl_idempotency.test | 1 + mysql-test/suite/rpl/t/rpl_ignore_table.test | 4 ++++ mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test | 5 ++++- mysql-test/suite/rpl/t/rpl_row_conflicts.test | 1 + mysql-test/suite/rpl/t/rpl_temporary_errors.test | 1 + 16 files changed, 31 insertions(+), 1 deletion(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/maria/r/maria-autozerofill.result b/mysql-test/suite/maria/r/maria-autozerofill.result index 0b069cd7a52..e31cf9fa19b 100644 --- a/mysql-test/suite/maria/r/maria-autozerofill.result +++ b/mysql-test/suite/maria/r/maria-autozerofill.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); drop database if exists mysqltest; create database mysqltest; use mysqltest; diff --git a/mysql-test/suite/maria/t/maria-autozerofill.test b/mysql-test/suite/maria/t/maria-autozerofill.test index 45eb39fbc21..b46b458d89e 100644 --- a/mysql-test/suite/maria/t/maria-autozerofill.test +++ b/mysql-test/suite/maria/t/maria-autozerofill.test @@ -5,6 +5,8 @@ --source include/not_embedded.inc --source include/have_maria.inc +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); + let $MARIA_LOG=.; --disable_warnings diff --git a/mysql-test/suite/maria/t/maria-recover.test b/mysql-test/suite/maria/t/maria-recover.test index e9ae0933d4c..38aff27bd8d 100644 --- a/mysql-test/suite/maria/t/maria-recover.test +++ b/mysql-test/suite/maria/t/maria-recover.test @@ -8,6 +8,8 @@ call mtr.add_suppression("Checking table: '\\..mysqltest.t_corrupted2'"); call mtr.add_suppression("Recovering table: '\\..mysqltest.t_corrupted2'"); call mtr.add_suppression("Table '\\..mysqltest.t_corrupted2' is marked as crashed and should be repaired"); +call mtr.add_suppression("Table 't_corrupted2' is marked as crashed and should be repaired"); + --enable_query_log # Note: we're setting an environment variable (not prefixing it by $), diff --git a/mysql-test/suite/parts/t/partition_recover_myisam.test b/mysql-test/suite/parts/t/partition_recover_myisam.test index c96cd938f8b..f73457fc526 100644 --- a/mysql-test/suite/parts/t/partition_recover_myisam.test +++ b/mysql-test/suite/parts/t/partition_recover_myisam.test @@ -3,6 +3,7 @@ --disable_query_log call mtr.add_suppression("..test.t1_will_crash"); call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc"); +call mtr.add_suppression("Table 't1_will_crash' is marked as crashed and should be repaired"); --enable_query_log --source include/have_partition.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug38694.result b/mysql-test/suite/rpl/r/rpl_bug38694.result index 711c4a91c03..b062af95b7c 100644 --- a/mysql-test/suite/rpl/r/rpl_bug38694.result +++ b/mysql-test/suite/rpl/r/rpl_bug38694.result @@ -4,3 +4,4 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +call mtr.add_suppression("Aborted connection"); diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result index bfdcbc6fa23..9478aa327f4 100644 --- a/mysql-test/suite/rpl/r/rpl_idempotency.result +++ b/mysql-test/suite/rpl/r/rpl_idempotency.result @@ -5,6 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); +call mtr.add_suppression("Can't find record in 't.'"); call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); SET @old_slave_exec_mode= @@global.slave_exec_mode; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index e77be425270..cec0c59a8cc 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -4,6 +4,9 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +call mtr.add_suppression("Can't find record in 't.'"); +call mtr.add_suppression("Can't find record in 'user'"); +call mtr.add_suppression("Can't find record in 'tables_priv'"); **** Test case for BUG#16487 **** **** Master **** CREATE TABLE test.t4 (a int); 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 458ae53e79c..a355a07c52f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +call mtr.add_suppression("Can't find record in 't.'"); CREATE DATABASE test_ignore; **** On Master **** SHOW DATABASES; @@ -27,6 +28,10 @@ t2 INSERT INTO t2 VALUES (3,3), (4,4); show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (mtr.test_suppressions) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) diff --git a/mysql-test/suite/rpl/r/rpl_row_conflicts.result b/mysql-test/suite/rpl/r/rpl_row_conflicts.result index 0f15bfc7156..3233a0fbb00 100644 --- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result +++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result @@ -5,6 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*"); +call mtr.add_suppression("Can't find record in 't.'"); [on slave] SET @old_slave_exec_mode= @@global.slave_exec_mode; ######## Run with slave_exec_mode=STRICT ######## diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result index 023f9a850ab..e17ce4f1716 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result +++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result @@ -5,6 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; call mtr.add_suppression("Deadlock found"); +call mtr.add_suppression("Can't find record in 't.'"); **** On Master **** SET SESSION BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT PRIMARY KEY, b INT); diff --git a/mysql-test/suite/rpl/t/rpl_bug38694.test b/mysql-test/suite/rpl/t/rpl_bug38694.test index 41b11d271b9..32128a44121 100644 --- a/mysql-test/suite/rpl/t/rpl_bug38694.test +++ b/mysql-test/suite/rpl/t/rpl_bug38694.test @@ -7,4 +7,6 @@ source include/master-slave.inc; +call mtr.add_suppression("Aborted connection"); + # End of tests diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test index c96b88a1b1a..ac0749bbec8 100644 --- a/mysql-test/suite/rpl/t/rpl_idempotency.test +++ b/mysql-test/suite/rpl/t/rpl_idempotency.test @@ -9,6 +9,7 @@ source include/have_innodb.inc; # Add suppression for expected warning(s) in slaves error log call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); +call mtr.add_suppression("Can't find record in 't.'"); call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test index 15c4b193669..d3a087e0e79 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test @@ -2,6 +2,10 @@ source include/master-slave.inc; let collation=utf8_unicode_ci; --source include/have_collation.inc +call mtr.add_suppression("Can't find record in 't.'"); +call mtr.add_suppression("Can't find record in 'user'"); +call mtr.add_suppression("Can't find record in 'tables_priv'"); + # # BUG#16487 # diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test index 2bf5a01a71f..e063a52b44e 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test @@ -4,10 +4,13 @@ let $SERVER_VERSION=`select version()`; #This test case is not written for NDB, the result files #will not match when NDB is the default engine --- source include/not_ndb_default.inc +--source include/not_ndb_default.inc --source include/master-slave.inc +# Add suppression for expected warning(s) in slaves error log +call mtr.add_suppression("Can't find record in 't.'"); + # Bug#15942 (RBR ignores --binlog_ignore_db and tries to map to table # on slave for writes) diff --git a/mysql-test/suite/rpl/t/rpl_row_conflicts.test b/mysql-test/suite/rpl/t/rpl_row_conflicts.test index 59757e2e802..e9c62c1f77c 100644 --- a/mysql-test/suite/rpl/t/rpl_row_conflicts.test +++ b/mysql-test/suite/rpl/t/rpl_row_conflicts.test @@ -9,6 +9,7 @@ source include/master-slave.inc; connection slave; call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*"); +call mtr.add_suppression("Can't find record in 't.'"); --echo [on slave] connection slave; diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors.test b/mysql-test/suite/rpl/t/rpl_temporary_errors.test index 6b1ba558d2d..0a36f31201e 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test +++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test @@ -2,6 +2,7 @@ source include/master-slave.inc; source include/have_innodb.inc; call mtr.add_suppression("Deadlock found"); +call mtr.add_suppression("Can't find record in 't.'"); --echo **** On Master **** connection master; -- cgit v1.2.1 From 69fe020f01a7eefa9f737291f0da2be56f42a6a0 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 26 Jan 2011 15:17:46 +0200 Subject: Fixed bugs found by buildbot: - Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables. - Fixed compiler warnings - Added a name for each thr_lock to get better error messages (This is needed to find out why 'archive.test' sometimes fails) BUILD/SETUP.sh: Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables. BUILD/build_mccge.sh: Use -Wno-uninitialized if -DFORCE_INIT_OF_VARS is not used, to avoid warnings about not initialized variables. client/mysqltest.cc: Fixed bug in remove_files_wildcards (the orignal code never removed anything) extra/libevent/devpoll.c: Fixed compiler warning include/thr_lock.h: Added a name for each thr_lock to get better error messages. mysql-test/suite/maria/t/maria3.test: Speed up test. mysys/thr_lock.c: Added a name for each thr_lock to get better error messages. Added a second 'check_locks' to find if something goes wrong in 'wake_up_waiters'. sql/lock.cc: Added a name for each thr_lock to get better error messages. storage/xtradb/fil/fil0fil.c: Fixed compiler warning --- mysql-test/suite/maria/t/maria3.test | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/maria/t/maria3.test b/mysql-test/suite/maria/t/maria3.test index f2ae5d73fb2..a6dd0ca6639 100644 --- a/mysql-test/suite/maria/t/maria3.test +++ b/mysql-test/suite/maria/t/maria3.test @@ -172,11 +172,13 @@ create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar let $1=1000; --disable_query_log --disable_warnings +lock tables t1 write; while ($1) { insert into t1 () values(); dec $1; } +unlock tables; --enable_query_log update t1 set b=repeat('a',100) where a between 1 and 100; check table t1; -- cgit v1.2.1 From 6db663d6141a6e0d3425f0e7e184c8b7922ba7c3 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 10 Feb 2011 20:33:51 +0200 Subject: Fixes for Aria storage engine: - Fixed bug lp:624099 ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed on UNLOCK TABLES - Fixed bug that caused table to be marked as not closed (crashed) during recovery testing. - Use maria_delete_table_files() instead of maria_delete_table() to delete tempoary tables (faster and safer) - Added checks to ensure that bitmap and internal mutex are always taken in right order. - For transactional tables, only mark the table as changed before page for table is to be written to disk (and thus the log is flushed). This speeds up things a bit and fixes a problem where open_count was incremented on disk but there was no log entry to fix it during recovery -> table was crashed. - Fixed a bug in repair() where table was not automaticly repaired. - Ensure that state->global_changed, share->changed and share->state.open_count are set and reset properly. - Added option --ignore-control-file to maria_chk to be able to run maria_chk even if the control file is locked. mysql-test/suite/maria/r/maria-recover.result: Test result changed as we now force checkpoint before copying table, which results in pagecache getting flushed and we have more rows to recover. mysql-test/suite/maria/r/maria.result: Added new tests mysql-test/suite/maria/t/maria-recover.test: Force checkpoint before copying table. This is needed as now the open-count is increased first when first page is flushed. mysql-test/suite/maria/t/maria.test: Added tests to verify fix for lp:624099 storage/maria/ha_maria.cc: Use table->in_use instead of current_thd (trivial optimization) Use maria_delete_table_files() instead of maria_delete_table() to delete tempoary tables (faster and safer) More DBUG_ASSERT() Reset locked tables count after locked tables have been moved to new transaction. This fixed lp:624099 storage/maria/ma_bitmap.c: Temporarly unlock bitmap mutex when calling _ma_mark_file_changed() and pagecache_delete_pages() to ensure right mutex lock order. Call _ma_bitmap_unpin_all() when bitmap->non_flusable is set to 0. This fixed a case when bitmap was not proparly unpinned. More comments Added DBUG_ASSERT() for detecting wrong share->bitmap usage storage/maria/ma_blockrec.c: More DBUG_ASSERT() Moved code around in _ma_apply_redo_insert_row_head_or_tail() to make things safer on error conditions. storage/maria/ma_check.c: Changed parameter for _ma_set_uuid() Corrected test for detecting if we lost many rows. This fixed some cases where auto-recovery failed. share->changed need to be set if state.open_count is changed. Removed setting of share->changed= 0 as called function sets it. storage/maria/ma_close.c: - Added code to properly decrement open_count and have it written by _ma_state_info_write() for transactional tables. (This is more correct and also saves us one extra write by _ma_decrement_open_count() at close. - Added DBUG_ASSERT() to detect if open_count is wrong at maria_close(). storage/maria/ma_delete.c: Updated argument to _ma_mark_file_changed() storage/maria/ma_delete_all.c: Updated argument to _ma_mark_file_changed() For transactional tables, call _ma_mark_file_changed() after log entry has been written (to allow recover to fix open_count) Reset more needed variables in _ma_reset_status() storage/maria/ma_delete_table.c: Moved deletion of Aria files to maria_delete_table_files(). Remove RAID usage (old not working code) storage/maria/ma_extra.c: Set share->changed=1 when state needs to be updated on disk. Don't reset share->changed after call to _ma_state_info_write() as this calls sets share->changed. Set share->state.open_count to 1 to force table to be auto repaired if drop fails. Set share->global_changed before call to _ma_flush_table_files() to ensure that we don't try to mark the table changed during flush. Added DBUG_ENTER storage/maria/ma_locking.c: Split _ma_mark_file_changed() into two functions to delay marking transactional tables as changed on disk until first disk write. Added argument to _ma_decrement_open_count() to tell if we should call ma_lock_database() or not. Don't decrement open count for transactional tables during _ma_decrement_open_count(). This will be done during close. Changed parameter for _ma_set_uuid() storage/maria/ma_open.c: Set share->open_count_not_zero_on_open if state.open_count is not zero. This is needed for DBUG_ASSERT() in maria_close() that is there to enforce that open_count is always 0 at close. This test doesn't however work for tables that had open_count != 0 already on disk (ie, crashed tables). Enforce right mutex order for share->intern_lock and share->bitmap.bitmap_lock Don't set share->changed to 0 if share->state.open_count != 0, as state needs to be be written at close storage/maria/ma_pagecache.c: Moved a bit of code in find_block() to avoid one if. More DBUG_ASSERT() (I left a comment in the code for Sanja to look at; The code probably works but we need to check if it's optimal) storage/maria/ma_pagecrc.c: For transactional tables, just before first write to disk, but after log is flushed, mark the file changed. This fixes some cases where recovery() did not detect that table was marked as changed and could thus not recover the marker. storage/maria/ma_recovery.c: Set share->changed when share->global_changed is set. storage/maria/ma_update.c: Updated parameter for _ma_mark_file_changed() storage/maria/ma_write.c: Updated parameter for _ma_mark_file_changed() storage/maria/maria_chk.c: Added option --ignore-control-file to be able to run maria_chk even if the control file is locked. storage/maria/maria_def.h: Updated function prototypes. Added open_count_not_zero_on_open to MARIA_SHARE. storage/myisam/ha_myisam.cc: current_thd -> table->in_use --- mysql-test/suite/maria/r/maria-recover.result | 4 ++++ mysql-test/suite/maria/r/maria.result | 26 ++++++++++++++++++++++++++ mysql-test/suite/maria/t/maria-recover.test | 8 +++++++- mysql-test/suite/maria/t/maria.test | 27 +++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/maria/r/maria-recover.result b/mysql-test/suite/maria/r/maria-recover.result index e9bfc019c81..41155d683e4 100644 --- a/mysql-test/suite/maria/r/maria-recover.result +++ b/mysql-test/suite/maria/r/maria-recover.result @@ -20,9 +20,11 @@ create table t1 (a varchar(1000), index(a)) engine=maria; insert into t1 values("ThursdayMorningsMarket"); flush table t1; insert into t1 select concat(a,'b') from t1 limit 1; +set global maria_checkpoint_interval=1000; select * from t_corrupted2; a ThursdayMorningsMarket +ThursdayMorningsMarketb Warnings: Error 145 t_corrupted2' is marked as crashed and should be repaired Error 1194 t_corrupted2' is marked as crashed and should be repaired @@ -31,5 +33,7 @@ Error 1034 Wrong base information on indexpage at page: 1 select * from t_corrupted2; a ThursdayMorningsMarket +ThursdayMorningsMarketb drop database mysqltest; set global maria_recover=backup; +set global maria_checkpoint_interval=30; diff --git a/mysql-test/suite/maria/r/maria.result b/mysql-test/suite/maria/r/maria.result index 9f34f60ca24..5d1e8f98c38 100644 --- a/mysql-test/suite/maria/r/maria.result +++ b/mysql-test/suite/maria/r/maria.result @@ -2640,3 +2640,29 @@ repair table t1 extended; Table Op Msg_type Msg_text test.t1 repair status OK drop table t1; +create table t1 (a int, b int, key (a), key(b)); +alter table t1 disable keys; +insert into t1 values(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1); +alter table t1 enable keys; +select count(*) from t1; +count(*) +13 +drop table t1; +create table t1 (a int not null, b int, primary key (a), key(b)); +alter table t1 disable keys; +insert into t1 values(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1); +alter table t1 enable keys; +select count(*) from t1; +count(*) +13 +drop table t1; +create table t1 (a int not null, b int, primary key (a), key(b)); +lock tables t1 write; +alter table t1 disable keys; +insert into t1 values(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1); +alter table t1 enable keys; +unlock tables; +select count(*) from t1; +count(*) +13 +drop table t1; diff --git a/mysql-test/suite/maria/t/maria-recover.test b/mysql-test/suite/maria/t/maria-recover.test index 38aff27bd8d..4db02fcbb45 100644 --- a/mysql-test/suite/maria/t/maria-recover.test +++ b/mysql-test/suite/maria/t/maria-recover.test @@ -10,6 +10,8 @@ call mtr.add_suppression("Recovering table: '\\..mysqltest.t_corrupted2'"); call mtr.add_suppression("Table '\\..mysqltest.t_corrupted2' is marked as crashed and should be repaired"); call mtr.add_suppression("Table 't_corrupted2' is marked as crashed and should be repaired"); +let $def_checkinterval=`select @@global.maria_checkpoint_interval`; + --enable_query_log # Note: we're setting an environment variable (not prefixing it by $), @@ -36,6 +38,10 @@ insert into t1 values("ThursdayMorningsMarket"); flush table t1; # put index page on disk insert into t1 select concat(a,'b') from t1 limit 1; +# force a checkpoint to get the open count > 0 +set global maria_checkpoint_interval=1000; +# Wait for checkpoint to happen +--sleep 1 # now t1 has its open_count>0 and so will t2_corrupted. # It is not named t2 because the corruption messages which will be put # in the error log need to be detected in mtr_process.pl, and we want @@ -59,7 +65,6 @@ perl; syswrite (FILE, $whatever) or die; close FILE; EOF - replace_regex /Table.*t_corrupted2/t_corrupted2/ ; --enable_prepare_warnings select * from t_corrupted2; # should show corruption and repair messages @@ -68,3 +73,4 @@ select * from t_corrupted2; # should show just rows drop database mysqltest; set global maria_recover=backup; +eval set global maria_checkpoint_interval=$def_checkinterval; diff --git a/mysql-test/suite/maria/t/maria.test b/mysql-test/suite/maria/t/maria.test index fe2bd43988e..8a370fbd25a 100644 --- a/mysql-test/suite/maria/t/maria.test +++ b/mysql-test/suite/maria/t/maria.test @@ -1928,6 +1928,33 @@ check table t1; repair table t1 extended; drop table t1; +# +# Test problem with disable/enable keys +# + +create table t1 (a int, b int, key (a), key(b)); +alter table t1 disable keys; +insert into t1 values(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1); +alter table t1 enable keys; +select count(*) from t1; +drop table t1; + +create table t1 (a int not null, b int, primary key (a), key(b)); +alter table t1 disable keys; +insert into t1 values(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1); +alter table t1 enable keys; +select count(*) from t1; +drop table t1; + +create table t1 (a int not null, b int, primary key (a), key(b)); +lock tables t1 write; +alter table t1 disable keys; +insert into t1 values(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1); +alter table t1 enable keys; +unlock tables; +select count(*) from t1; +drop table t1; + # # End of test # -- cgit v1.2.1 From f2ca9c87845655083f186fb0d102699d78c6b22a Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 10 Feb 2011 22:40:59 +0200 Subject: Applied patch for lp:585688 "maridb crashes in federatedx code" from lp:~atcurtis/maria/federatedx: - Fixed Partition engine to store CONNECTION string for partitions. Removed HA_NO_PARTITION flag from FederatedX. Added test 'federated_partition' to suite. - lp:#585688 - maridb crashes in federatedx code FederatedX handler instances, created on one thread and used on another thread (via table cache) when "show table status" is executed crashed because txn member was not initialized for current thread. Added test 'federated_bug_585688' to suite. Author for the patch is Antony Curtis mysql-test/suite/federated/federated_bug_585688.result: Test for lp:585688 mysql-test/suite/federated/federated_bug_585688.test: Test for lp:585688 mysql-test/suite/federated/federated_partition-slave.opt: Test for partition support in federatedx mysql-test/suite/federated/federated_partition.result: Test for partition support in federatedx mysql-test/suite/federated/federated_partition.test: Test for partition support in federatedx mysql-test/t/partition_federated.test: Updated error message sql/ha_partition.cc: Added support for connection strings to partitions for federatedx sql/ha_partition.h: Added support for connection strings to partitions for federatedx sql/partition_element.h: Added support for connection strings to partitions for federatedx sql/sql_yacc.yy: Added support for connection strings to partitions for federatedx storage/federatedx/ha_federatedx.cc: Added support for partitions. FederatedX handler instances, created on one thread and used on another thread (via table cache) when "show table status" is executed crashed because txn member was not initialized for current thread. --- .../suite/federated/federated_bug_585688.result | 26 +++++++++++ .../suite/federated/federated_bug_585688.test | 53 ++++++++++++++++++++++ .../suite/federated/federated_partition-slave.opt | 1 + .../suite/federated/federated_partition.result | 34 ++++++++++++++ .../suite/federated/federated_partition.test | 49 ++++++++++++++++++++ 5 files changed, 163 insertions(+) create mode 100644 mysql-test/suite/federated/federated_bug_585688.result create mode 100644 mysql-test/suite/federated/federated_bug_585688.test create mode 100644 mysql-test/suite/federated/federated_partition-slave.opt create mode 100644 mysql-test/suite/federated/federated_partition.result create mode 100644 mysql-test/suite/federated/federated_partition.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/federated/federated_bug_585688.result b/mysql-test/suite/federated/federated_bug_585688.result new file mode 100644 index 00000000000..d846e3a26cf --- /dev/null +++ b/mysql-test/suite/federated/federated_bug_585688.result @@ -0,0 +1,26 @@ +CREATE DATABASE federated; +CREATE DATABASE federated; +# +# Bug #585688: maridb crashes in federatedx code +# +CREATE TABLE federated.t1(a TEXT); +INSERT INTO federated.t1 VALUES('abc'), ('gh'), ('f'), ('ijk'), ('de'); +flush tables; +CREATE TABLE federated.t1(a TEXT) ENGINE=FEDERATED +CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +flush tables; +describe federated.t1; +Field Type Null Key Default Extra +a text YES NULL +show table status from federated; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 FEDERATED 10 Dynamic 5 20 X X X X X X X X latin1_swedish_ci NULL +show table status from federated; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 FEDERATED 10 Dynamic 5 20 X X X X X X X X latin1_swedish_ci NULL +DROP TABLE federated.t1; +DROP TABLE federated.t1; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; diff --git a/mysql-test/suite/federated/federated_bug_585688.test b/mysql-test/suite/federated/federated_bug_585688.test new file mode 100644 index 00000000000..6566125c419 --- /dev/null +++ b/mysql-test/suite/federated/federated_bug_585688.test @@ -0,0 +1,53 @@ +source federated.inc; + +--echo # +--echo # Bug #585688: maridb crashes in federatedx code +--echo # +connection slave; +CREATE TABLE federated.t1(a TEXT); +INSERT INTO federated.t1 VALUES('abc'), ('gh'), ('f'), ('ijk'), ('de'); + +connect (conn_1,127.0.0.1,root,,,$MASTER_MYPORT); + +connection master; +flush tables; + +connection conn_1; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval CREATE TABLE federated.t1(a TEXT) ENGINE=FEDERATED + CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; +disconnect conn_1; + +connection master; +flush tables; + +connect (conn_2,127.0.0.1,root,,,$MASTER_MYPORT); +connect (conn_3,127.0.0.1,root,,,$MASTER_MYPORT); + +connection conn_2; +describe federated.t1; + +connection conn_3; +--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X +show table status from federated; + +disconnect conn_2; +connect (conn_4,127.0.0.1,root,,,$MASTER_MYPORT); + +connection conn_4; +--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X +show table status from federated; + +disconnect conn_3; +disconnect conn_4; + +connection master; +DROP TABLE federated.t1; + +connection slave; +DROP TABLE federated.t1; + +connection default; + +source federated_cleanup.inc; + diff --git a/mysql-test/suite/federated/federated_partition-slave.opt b/mysql-test/suite/federated/federated_partition-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/federated/federated_partition-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/federated/federated_partition.result b/mysql-test/suite/federated/federated_partition.result new file mode 100644 index 00000000000..ebcafca4563 --- /dev/null +++ b/mysql-test/suite/federated/federated_partition.result @@ -0,0 +1,34 @@ +CREATE DATABASE federated; +CREATE DATABASE federated; +drop table if exists t1; +create table federated.t1_1 (s1 int primary key) engine=myisam; +create table federated.t1_2 (s1 int primary key) engine=innodb; +create table t1 (s1 int primary key) engine=federated +partition by list (s1) +(partition p1 values in (1,3) +connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1', +partition p2 values in (2,4) +connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2'); +insert into t1 values (1), (2), (3), (4); +select * from t1; +s1 +1 +3 +2 +4 +select * from federated.t1_1; +s1 +1 +3 +select * from federated.t1_2; +s1 +2 +4 +drop table t1; +drop table federated.t1_1; +drop table federated.t1_2; +End of 5.1 tests +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; diff --git a/mysql-test/suite/federated/federated_partition.test b/mysql-test/suite/federated/federated_partition.test new file mode 100644 index 00000000000..223dab6af16 --- /dev/null +++ b/mysql-test/suite/federated/federated_partition.test @@ -0,0 +1,49 @@ +# +# Tests for partitioned FEDERATED +# +source include/have_partition.inc; +source include/have_innodb.inc; +source federated.inc; + +disable_warnings; +drop table if exists t1; +enable_warnings; + +# +# Federated + partition +# +# Create 2 tables on the Slave, we can use different storage engines. +# Then create a Federated table on the Master, using different connect +# string to specify the two different target partitions we want to use. +# + +connection slave; +create table federated.t1_1 (s1 int primary key) engine=myisam; +create table federated.t1_2 (s1 int primary key) engine=innodb; + +connection master; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval create table t1 (s1 int primary key) engine=federated + partition by list (s1) + (partition p1 values in (1,3) + connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_1', + partition p2 values in (2,4) + connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_2'); + +insert into t1 values (1), (2), (3), (4); +select * from t1; + +connection slave; +select * from federated.t1_1; +select * from federated.t1_2; + +connection master; +drop table t1; + +connection slave; +drop table federated.t1_1; +drop table federated.t1_2; + +--echo End of 5.1 tests + +source federated_cleanup.inc; -- cgit v1.2.1 From 55c55d85bd8fab635d038d77550f93fc996d47eb Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 11 Feb 2011 04:28:22 +0200 Subject: Fixed bug in federatedx patch that caused partition tests to fail. Fixed that connection string is returned for partitioned federated tables. mysql-test/r/partition_federated.result: Fixed error message mysql-test/suite/federated/federated_partition.result: Added test to show that connection string is returned in 'show create'. sql/ha_partition.cc: Fixed a set of bugs introduced by the last federated patch: - We can't allocate m_ordered_rec_buffer in memroot as it has to survive call to clear_handler_file() sql/partition_element.h: Ensure that connect_string is properly initialized. (This caused crashed in partition tests) sql/sql_partition.cc: Print CONNECTION option for federated partitioned tables --- mysql-test/suite/federated/federated_partition.result | 9 +++++++++ mysql-test/suite/federated/federated_partition.test | 3 +++ 2 files changed, 12 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/federated/federated_partition.result b/mysql-test/suite/federated/federated_partition.result index ebcafca4563..26a6443ffad 100644 --- a/mysql-test/suite/federated/federated_partition.result +++ b/mysql-test/suite/federated/federated_partition.result @@ -9,6 +9,15 @@ partition by list (s1) connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1', partition p2 values in (2,4) connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2'); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `s1` int(11) NOT NULL, + PRIMARY KEY (`s1`) +) ENGINE=FEDERATED DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY LIST (s1) +(PARTITION p1 VALUES IN (1,3) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_1' ENGINE = FEDERATED, + PARTITION p2 VALUES IN (2,4) CONNECTION = 'mysql://root@127.0.0.1:SLAVE_PORT/federated/t1_2' ENGINE = FEDERATED) */ insert into t1 values (1), (2), (3), (4); select * from t1; s1 diff --git a/mysql-test/suite/federated/federated_partition.test b/mysql-test/suite/federated/federated_partition.test index 223dab6af16..6f093bfb63d 100644 --- a/mysql-test/suite/federated/federated_partition.test +++ b/mysql-test/suite/federated/federated_partition.test @@ -30,6 +30,9 @@ eval create table t1 (s1 int primary key) engine=federated partition p2 values in (2,4) connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1_2'); +--replace_result $SLAVE_MYPORT SLAVE_PORT +show create table t1; + insert into t1 values (1), (2), (3), (4); select * from t1; -- cgit v1.2.1 From 1392eba62a80ee303e13fd84b2fb78ce0dcffb34 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Tue, 22 Feb 2011 19:24:24 +0200 Subject: Merged InnoDB plugin from MySQL 5.1.54 -> MySQL 5.1.55 into xtradb mysql-test/r/innodb-zip.result: File has been moved to suite/innodb_plugin mysql-test/t/innodb-zip.test: File has been moved to suite/innodb_plugin --- .../innodb_plugin/r/innodb-create-options.result | 78 +++++++++++----------- .../parts/r/partition_auto_increment_innodb.result | 4 +- 2 files changed, 41 insertions(+), 41 deletions(-) mode change 100755 => 100644 mysql-test/suite/innodb_plugin/r/innodb-create-options.result (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb_plugin/r/innodb-create-options.result b/mysql-test/suite/innodb_plugin/r/innodb-create-options.result old mode 100755 new mode 100644 index aec9d731ce6..94c84fcf60f --- a/mysql-test/suite/innodb_plugin/r/innodb-create-options.result +++ b/mysql-test/suite/innodb_plugin/r/innodb-create-options.result @@ -80,26 +80,26 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +t1 Compressed row_format=COMPRESSED key_block_size=8 ALTER TABLE t1 ADD COLUMN f1 INT; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +t1 Compressed row_format=COMPRESSED key_block_size=8 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 +t1 Compressed key_block_size=16 ALTER TABLE t1 ADD COLUMN f1 INT; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 +t1 Compressed key_block_size=16 # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ); @@ -132,13 +132,13 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 +t1 Compressed key_block_size=16 ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +t1 Compressed row_format=COMPRESSED key_block_size=1 # Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; @@ -186,7 +186,7 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16 +t1 Compressed row_format=COMPRESSED key_block_size=16 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; @@ -194,7 +194,7 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=1 +t1 Compressed key_block_size=1 # Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE # ALTER with each ROW_FORMAT DROP TABLE IF EXISTS t1; @@ -234,7 +234,7 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +t1 Compressed row_format=COMPRESSED key_block_size=2 ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; SHOW WARNINGS; Level Code Message @@ -495,7 +495,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 +t1 Compact row_format=COMPACT key_block_size=1 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; Warnings: @@ -505,7 +505,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=2 +t1 Redundant row_format=REDUNDANT key_block_size=2 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; Warnings: @@ -515,33 +515,33 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=4 +t1 Dynamic row_format=DYNAMIC key_block_size=4 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +t1 Compressed row_format=COMPRESSED key_block_size=8 ALTER TABLE t1 ADD COLUMN f1 INT; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +t1 Compressed row_format=COMPRESSED key_block_size=8 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 +t1 Compressed key_block_size=16 ALTER TABLE t1 ADD COLUMN f1 INT; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 +t1 Compressed key_block_size=16 # Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ); @@ -555,7 +555,7 @@ Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=FIXED KEY_BLOCK_SIZE=1 +t1 Compact row_format=FIXED key_block_size=1 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ); ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; @@ -566,7 +566,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=2 +t1 Compact row_format=COMPACT key_block_size=2 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ); ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; @@ -577,7 +577,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=4 +t1 Dynamic row_format=DYNAMIC key_block_size=4 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ); ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; @@ -588,7 +588,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=8 +t1 Redundant row_format=REDUNDANT key_block_size=8 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ); ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; @@ -596,13 +596,13 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 +t1 Compressed key_block_size=16 ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +t1 Compressed row_format=COMPRESSED key_block_size=1 # Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; @@ -617,7 +617,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=2 +t1 Compact row_format=COMPACT key_block_size=2 ALTER TABLE t1 ROW_FORMAT=REDUNDANT; Warnings: Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. @@ -626,7 +626,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=2 +t1 Redundant row_format=REDUNDANT key_block_size=2 ALTER TABLE t1 ROW_FORMAT=DYNAMIC; Warnings: Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. @@ -635,19 +635,19 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=2 +t1 Dynamic row_format=DYNAMIC key_block_size=2 ALTER TABLE t1 ROW_FORMAT=COMPRESSED; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +t1 Compressed row_format=COMPRESSED key_block_size=2 ALTER TABLE t1 KEY_BLOCK_SIZE=4; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4 +t1 Compressed row_format=COMPRESSED key_block_size=4 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8; @@ -655,7 +655,7 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=8 +t1 Compressed key_block_size=8 # Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE # ALTER with each ROW_FORMAT DROP TABLE IF EXISTS t1; @@ -684,7 +684,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=16 +t1 Compact row_format=COMPACT key_block_size=16 ALTER TABLE t1 ROW_FORMAT=REDUNDANT; Warnings: Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. @@ -693,7 +693,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=16 +t1 Redundant row_format=REDUNDANT key_block_size=16 ALTER TABLE t1 ROW_FORMAT=DYNAMIC; Warnings: Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. @@ -702,13 +702,13 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=16 +t1 Dynamic row_format=DYNAMIC key_block_size=16 ALTER TABLE t1 ROW_FORMAT=COMPRESSED; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16 +t1 Compressed row_format=COMPRESSED key_block_size=16 ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; SHOW WARNINGS; Level Code Message @@ -731,7 +731,7 @@ Level Code Message Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact KEY_BLOCK_SIZE=15 +t1 Compact key_block_size=15 # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. @@ -741,7 +741,7 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +t1 Compressed row_format=COMPRESSED key_block_size=1 SET GLOBAL innodb_file_format=Antelope; ALTER TABLE t1 ADD COLUMN f1 INT; Warnings: @@ -757,14 +757,14 @@ Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelop Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPRESSED KEY_BLOCK_SIZE=1 +t1 Compact row_format=COMPRESSED key_block_size=1 SET GLOBAL innodb_file_format=Barracuda; ALTER TABLE t1 ADD COLUMN f2 INT; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +t1 Compressed row_format=COMPRESSED key_block_size=1 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; SHOW WARNINGS; @@ -800,7 +800,7 @@ SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +t1 Compressed row_format=COMPRESSED key_block_size=2 SET GLOBAL innodb_file_per_table=OFF; ALTER TABLE t1 ADD COLUMN f1 INT; Warnings: @@ -816,14 +816,14 @@ Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPRESSED KEY_BLOCK_SIZE=2 +t1 Compact row_format=COMPRESSED key_block_size=2 SET GLOBAL innodb_file_per_table=ON; ALTER TABLE t1 ADD COLUMN f2 INT; SHOW WARNINGS; Level Code Message SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +t1 Compressed row_format=COMPRESSED key_block_size=2 DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; SHOW WARNINGS; diff --git a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result index 5fd576322d5..34e47f58272 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result @@ -134,7 +134,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`c1`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (a INT NULL AUTO_INCREMENT, @@ -440,7 +440,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`c1`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) PARTITIONS 2 */ DROP TABLE t1; -- cgit v1.2.1 From e079f3c84a24e67f2da3ae0b0c338d5b79dc9516 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 23 Feb 2011 02:00:30 +0200 Subject: Fixed test failure that ended with "There is no group named 'mysqld.10' that can be used to resolve 'port' for test" mysql-test/lib/My/ConfigFactory.pm: Added test name to error output mysql-test/mysql-test-run.pl: Added testname as part of ConfigFactory for better error message mysql-test/suite/rpl/t/rpl_test_framework.cnf: Added space after # to ensure that ConfigFactory treat comments as comments --- mysql-test/suite/rpl/t/rpl_test_framework.cnf | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/t/rpl_test_framework.cnf b/mysql-test/suite/rpl/t/rpl_test_framework.cnf index 8934d1c9ae1..8a34e5b060d 100644 --- a/mysql-test/suite/rpl/t/rpl_test_framework.cnf +++ b/mysql-test/suite/rpl/t/rpl_test_framework.cnf @@ -17,18 +17,18 @@ log-slave-updates log-slave-updates [mysqld.9] log-slave-updates -#[mysqld.10] -#log-slave-updates -#[mysqld.11] -#log-slave-updates -#[mysqld.12] -#log-slave-updates -#[mysqld.13] -#log-slave-updates -#[mysqld.14] -#log-slave-updates -#[mysqld.15] -#log-slave-updates +# [mysqld.10] +# log-slave-updates +# [mysqld.11] +# log-slave-updates +# [mysqld.12] +# log-slave-updates +# [mysqld.13] +# log-slave-updates +# [mysqld.14] +# log-slave-updates +# [mysqld.15] +# log-slave-updates [ENV] SERVER_MYPORT_3= @mysqld.3.port @@ -38,9 +38,9 @@ SERVER_MYPORT_6= @mysqld.6.port SERVER_MYPORT_7= @mysqld.7.port SERVER_MYPORT_8= @mysqld.8.port SERVER_MYPORT_9= @mysqld.9.port -#SERVER_MYPORT_10= @mysqld.10.port -#SERVER_MYPORT_11= @mysqld.11.port -#SERVER_MYPORT_12= @mysqld.12.port -#SERVER_MYPORT_13= @mysqld.13.port -#SERVER_MYPORT_14= @mysqld.14.port -#SERVER_MYPORT_15= @mysqld.15.port +# SERVER_MYPORT_10= @mysqld.10.port +# SERVER_MYPORT_11= @mysqld.11.port +# SERVER_MYPORT_12= @mysqld.12.port +# SERVER_MYPORT_13= @mysqld.13.port +# SERVER_MYPORT_14= @mysqld.14.port +# SERVER_MYPORT_15= @mysqld.15.port -- cgit v1.2.1 From 1c23091c4ecc23100a6fe42288819cf4d5dc0b5b Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 23 Feb 2011 11:22:56 +0200 Subject: Fixed build failures - Removed references to deleted files - If we link staticly, check for static zlib - This should fix the problem with 'no -lz found' link error - Fixed build failure on window (Patch from Wlad) - Fixed build problem with federatedx when using -Werror BUILD/Makefile.am: Remove removed file config/ac-macros/zlib.m4: If we compile with --all-static, test that we have a static libz libmysqld/CMakeLists.txt: Fix for build error on windows mysql-test/suite/pbxt/r/key_cache.result: Updated result mysql-test/suite/pbxt/t/key_cache.test: Fixed not updated test case sql/CMakeLists.txt: Fix for build error on windows storage/federatedx/Makefile.am: Don't use CFLAGS to compile C++ programs storage/pbxt/src/lock_xt.cc: Fixed compiler warning about using uninitialized b2 storage/xtradb/buf/buf0buf.c: Fixed wrong printf storage/xtradb/srv/srv0srv.c: Fixed assignment of different width and test with different sign/unsigned --- mysql-test/suite/pbxt/r/key_cache.result | 3 +-- mysql-test/suite/pbxt/t/key_cache.test | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/pbxt/r/key_cache.result b/mysql-test/suite/pbxt/r/key_cache.result index 5ff41bd29d7..1ea3b2a714a 100644 --- a/mysql-test/suite/pbxt/r/key_cache.result +++ b/mysql-test/suite/pbxt/r/key_cache.result @@ -315,8 +315,7 @@ test.t1 check status OK DROP TABLE t1,t2; set global key_cache_block_size= @my_key_cache_block_size; set @@global.key_buffer_size=0; -Warnings: -Warning 1438 Cannot drop default keycache +ERROR HY000: Cannot drop default keycache select @@global.key_buffer_size; @@global.key_buffer_size 1048576 diff --git a/mysql-test/suite/pbxt/t/key_cache.test b/mysql-test/suite/pbxt/t/key_cache.test index 10dbdda6068..99d785db014 100644 --- a/mysql-test/suite/pbxt/t/key_cache.test +++ b/mysql-test/suite/pbxt/t/key_cache.test @@ -220,6 +220,7 @@ set global key_cache_block_size= @my_key_cache_block_size; # Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO # (One cannot drop the default key cache.) # +--error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE set @@global.key_buffer_size=0; select @@global.key_buffer_size; -- cgit v1.2.1 From 07b5d554ee62543cea0dc5bb36883446b9dcaa4a Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 25 Feb 2011 14:55:40 +0200 Subject: - maria/ma_test_all.sh can now be run with --tmpdir=/dev/shm for faster testing - Fixed mysql-test-run failures on window - Fixed compiler warnings from my last push (sorry about that) - Fixed that maria_chk --repair --extended works again - Fixed compiler warnings about using not unitialized data mysql-test/mysql-test-run.pl: Better output mysql-test/suite/parts/inc/partition_check_drop.inc: Use remove_files_wildcard instead of rm mysys/safemalloc.c: Fixed argument to printf storage/maria/ma_cache.c: Don't give errors when running maria_chk storage/maria/ma_dynrec.c: Don't give errors when running maria_chk storage/maria/ma_rt_test.c: Added option --datadir for where to put logs and test data storage/maria/ma_test1.c: Added option --datadir for where to put logs and test data storage/maria/ma_test2.c: Added option --datadir for where to put logs and test data storage/maria/maria_chk.c: If --datadir is used but --logdir is not, set --logdir from --datadir (this reflects how --help said how things should work) storage/maria/maria_read_log.c: Changed short option for 'maria-log-dir-path' from -l to -h to be same as mysqld, maria_chk, ma_test1 etc.. storage/maria/unittest/ma_test_all-t: Allow one to specify --tmpdir for where to store logs and data storage/xtradb/buf/buf0buf.c: Fixed compiler warnings about using not unitialized data storage/xtradb/row/row0upd.c: Fixed compiler warnings about using not unitialized data storage/xtradb/srv/srv0srv.c: Fixed compiler warnings about using not unitialized data --- mysql-test/suite/parts/inc/partition_check_drop.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/parts/inc/partition_check_drop.inc b/mysql-test/suite/parts/inc/partition_check_drop.inc index daaa5e541c7..cd4a4cfe2f5 100644 --- a/mysql-test/suite/parts/inc/partition_check_drop.inc +++ b/mysql-test/suite/parts/inc/partition_check_drop.inc @@ -66,10 +66,10 @@ if ($found_garbage) } # Do a manual cleanup, because the following tests should not suffer from # remaining files - --exec rm -f $MYSQLD_DATADIR/test/t1* || true + --remove_files_wildcard $MYSQLD_DATADIR/test t1* if ($with_directories) { - --exec rm -f $MYSQLTEST_VARDIR/tmp/t1* || true + --remove_files_wildcard $MYSQLD_DATADIR/test/tmp t1* } } --enable_query_log -- cgit v1.2.1 From 8b6eb98f782897e3d9d134bd2e6b589e6afe1fc7 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sat, 26 Feb 2011 18:46:16 +0100 Subject: Build fixes: - Fix signed/unsigned warning (error -Werror) in readline - change regex_replace pattern to account for forward or backward slashes in partition_recover_myisam ( fixes Windows/embedded) --- mysql-test/suite/parts/r/partition_recover_myisam.result | 4 ++-- mysql-test/suite/parts/t/partition_recover_myisam.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/parts/r/partition_recover_myisam.result b/mysql-test/suite/parts/r/partition_recover_myisam.result index df737ec2853..ccbc9a6c9ef 100644 --- a/mysql-test/suite/parts/r/partition_recover_myisam.result +++ b/mysql-test/suite/parts/r/partition_recover_myisam.result @@ -17,7 +17,7 @@ a 10 11 Warnings: -Error 145 Table './test/t1_will_crash' is marked as crashed and should be repaired +Error 145 Table 't1_will_crash' is marked as crashed and should be repaired Error 1194 Table 't1_will_crash' is marked as crashed and should be repaired Error 1034 1 client is using or hasn't closed the table properly Error 1034 Size of indexfile is: 1024 Should be: 2048 @@ -47,7 +47,7 @@ a 10 11 Warnings: -Error 145 Table './test/t1_will_crash#P#p1' is marked as crashed and should be repaired +Error 145 Table 't1_will_crash#P#p1' is marked as crashed and should be repaired Error 1194 Table 't1_will_crash' is marked as crashed and should be repaired Error 1034 1 client is using or hasn't closed the table properly Error 1034 Size of indexfile is: 1024 Should be: 2048 diff --git a/mysql-test/suite/parts/t/partition_recover_myisam.test b/mysql-test/suite/parts/t/partition_recover_myisam.test index f73457fc526..b001306b580 100644 --- a/mysql-test/suite/parts/t/partition_recover_myisam.test +++ b/mysql-test/suite/parts/t/partition_recover_myisam.test @@ -24,7 +24,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; --remove_file $MYSQLD_DATADIR/test/t1_will_crash.MYI --copy_file std_data/corrupt_t1.MYI $MYSQLD_DATADIR/test/t1_will_crash.MYI # Embedded server doesn't chdir to data directory ---replace_regex /Table '.*\/data\/test\/t1_will_crash/Table '.\/test\/t1_will_crash/ +--replace_regex /Table '.*t1_will_crash/Table 't1_will_crash/ --enable_prepare_warnings SELECT * FROM t1_will_crash; --disable_prepare_warnings @@ -41,7 +41,7 @@ FLUSH TABLES; --remove_file $MYSQLD_DATADIR/test/t1_will_crash#P#p1.MYI --copy_file std_data/corrupt_t1#P#p1.MYI $MYSQLD_DATADIR/test/t1_will_crash#P#p1.MYI # Embedded server doesn't chdir to data directory ---replace_regex /Table '.*\/data\/test\/t1_will_crash/Table '.\/test\/t1_will_crash/ +--replace_regex /Table '.*t1_will_crash/Table 't1_will_crash/ --enable_prepare_warnings SELECT * FROM t1_will_crash; --disable_prepare_warnings -- cgit v1.2.1 From 5df39c48f86639c76f14ae54baf805d2324afd37 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Mon, 28 Feb 2011 19:47:19 +0200 Subject: Increase version number Taged a couple of tests with --big-test configure.in: Upgrade version number mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test: Removed duplicate big_test tag mysql-test/suite/parts/t/partition_alter1_2_innodb.test: Removed duplicate big_test tag mysql-test/suite/parts/t/partition_decimal_innodb.test: Added big_test tag as this takes forever with valgrind mysql-test/suite/parts/t/partition_decimal_myisam.test: Removed duplicate big_test tag --- mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test | 3 --- mysql-test/suite/parts/t/partition_alter1_2_innodb.test | 2 -- mysql-test/suite/parts/t/partition_decimal_innodb.test | 1 + mysql-test/suite/parts/t/partition_decimal_myisam.test | 3 +-- 4 files changed, 2 insertions(+), 7 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test b/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test index 5a6488dfba0..240bfb4de1d 100644 --- a/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test +++ b/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test @@ -51,9 +51,6 @@ let $more_pk_ui_tests= 0; # The server must support partitioning. --source include/have_partition.inc -# This test takes long time, so only run it with the --big mtr-flag. ---source include/big_test.inc - #------------------------------------------------------------------------------# # Engine specific settings and requirements diff --git a/mysql-test/suite/parts/t/partition_alter1_2_innodb.test b/mysql-test/suite/parts/t/partition_alter1_2_innodb.test index 4a57bdd007d..71f9d33c72b 100644 --- a/mysql-test/suite/parts/t/partition_alter1_2_innodb.test +++ b/mysql-test/suite/parts/t/partition_alter1_2_innodb.test @@ -28,8 +28,6 @@ #------------------------------------------------------------------------------# # General not engine specific settings and requirements ---source include/big_test.inc - ##### Options, for debugging support ##### let $debug= 0; let $with_partitioning= 1; diff --git a/mysql-test/suite/parts/t/partition_decimal_innodb.test b/mysql-test/suite/parts/t/partition_decimal_innodb.test index 6d0aa156abe..5be42fb8fc3 100644 --- a/mysql-test/suite/parts/t/partition_decimal_innodb.test +++ b/mysql-test/suite/parts/t/partition_decimal_innodb.test @@ -28,6 +28,7 @@ ##### Options, for debugging support ##### let $debug= 0; +--source include/big_test.inc # The server must support partitioning. --source include/have_partition.inc diff --git a/mysql-test/suite/parts/t/partition_decimal_myisam.test b/mysql-test/suite/parts/t/partition_decimal_myisam.test index 9808dc878f8..2715f2b9afb 100644 --- a/mysql-test/suite/parts/t/partition_decimal_myisam.test +++ b/mysql-test/suite/parts/t/partition_decimal_myisam.test @@ -22,14 +22,13 @@ # any of the variables. # ---source include/long_test.inc - #------------------------------------------------------------------------------# # General not engine specific settings and requirements ##### Options, for debugging support ##### let $debug= 0; +--source include/big_test.inc # The server must support partitioning. --source include/have_partition.inc -- cgit v1.2.1 From 8fa14ba6e6c6e7360d0799d703a5af26e2c2c61f Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Mon, 28 Feb 2011 23:24:19 +0200 Subject: Get rid of compiler warnings mysql-test/suite/parts/t/partition_alter4_innodb.test: Removed duplicated big_test marker sql-common/my_time.c: Get rid of compiler warning about uninitialized members --- mysql-test/suite/parts/t/partition_alter4_innodb.test | 2 -- 1 file changed, 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/parts/t/partition_alter4_innodb.test b/mysql-test/suite/parts/t/partition_alter4_innodb.test index 624c1a0d6b8..cf4bd610ff1 100644 --- a/mysql-test/suite/parts/t/partition_alter4_innodb.test +++ b/mysql-test/suite/parts/t/partition_alter4_innodb.test @@ -22,8 +22,6 @@ # any of the variables. # ---source include/big_test.inc - #------------------------------------------------------------------------------# # General not engine specific settings and requirements -- cgit v1.2.1 From 7a79fe52fe6081432a4b44483b55ccbf77c4489a Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Tue, 1 Mar 2011 00:35:05 +0200 Subject: Fixes to mysql-test-run and tests - Added ORDER BY to get consistent results to federated_server - Sort slow tests first mysql-test/lib/My/ConfigFactory.pm: Remove usage of port as the test suite is not using that anymore and it causes some probelms in buildbot mysql-test/lib/mtr_cases.pm: Sort slow tests first If a test is marked as 'big_test' also mark it as 'long_test' mysql-test/suite/federated/federated_server.result: Added ORDER BY to get consistent results mysql-test/suite/federated/federated_server.test: Added ORDER BY to get consistent results --- mysql-test/suite/federated/federated_server.result | 4 ++-- mysql-test/suite/federated/federated_server.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/federated/federated_server.result b/mysql-test/suite/federated/federated_server.result index 05782c6ef81..2c1dd96d612 100644 --- a/mysql-test/suite/federated/federated_server.result +++ b/mysql-test/suite/federated/federated_server.result @@ -54,7 +54,7 @@ PASSWORD '', PORT SLAVE_PORT, SOCKET '', OWNER 'root'); -select * from mysql.servers; +select * from mysql.servers order by db; Server_name Host Db Username Password Port Socket Wrapper Owner server_one 127.0.0.1 first_db root SLAVE_PORT mysql root server_two 127.0.0.1 second_db root SLAVE_PORT mysql root @@ -154,7 +154,7 @@ id name drop table federated.t1; drop server 'server_one'; drop server 'server_two'; -select * from mysql.servers; +select * from mysql.servers order by db; Server_name Host Db Username Password Port Socket Wrapper Owner drop table first_db.t1; drop table second_db.t1; diff --git a/mysql-test/suite/federated/federated_server.test b/mysql-test/suite/federated/federated_server.test index d03c2d26014..ba1df04b62f 100644 --- a/mysql-test/suite/federated/federated_server.test +++ b/mysql-test/suite/federated/federated_server.test @@ -66,7 +66,7 @@ eval create server 'server_two' foreign data wrapper 'mysql' options OWNER 'root'); --replace_result $SLAVE_MYPORT SLAVE_PORT -eval select * from mysql.servers; +eval select * from mysql.servers order by db; DROP TABLE IF EXISTS federated.old; --replace_result $SLAVE_MYPORT SLAVE_PORT @@ -151,7 +151,7 @@ drop table federated.t1; drop server 'server_one'; drop server 'server_two'; -select * from mysql.servers; +select * from mysql.servers order by db; connection slave; drop table first_db.t1; -- cgit v1.2.1 From 9f2194090c7436ed0fea6220c4c4c8727dc41771 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Tue, 1 Mar 2011 13:37:29 +0200 Subject: Fixed wrong filenames in maria unittest that caused unittest to fail mysql-test/suite/sphinx/suite.pm: Update test to support 1.10-beta storage/maria/unittest/ma_test_all-t: Fixed old filenames --- mysql-test/suite/sphinx/suite.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/sphinx/suite.pm b/mysql-test/suite/sphinx/suite.pm index 199e59e26d7..0dd1da9fa5a 100644 --- a/mysql-test/suite/sphinx/suite.pm +++ b/mysql-test/suite/sphinx/suite.pm @@ -29,8 +29,18 @@ return "No SphinxSE" unless $ENV{HA_SPHINX_SO} or { local $_ = `"$exe_sphinx_searchd" --help`; + print "tool: $exe_sphinx_searchd\n"; my $ver = sprintf "%04d.%04d.%04d", (/([0-9]+)\.([0-9]+)\.([0-9]+)/); - return "Sphinx 0.9.9 or later is needed" unless $ver ge '0000.0009.0009'; + print $ver; + if ($ver eq "0000.0000.0000") + { + $ver = sprintf "%04d.%04d", (/([0-9]+)\.([0-9]+)-(alpha|beta|gamma|RC)/); + return "Sphinx 0.9.9 or later is needed" unless $ver ge '0001.0010'; + } + else + { + return "Sphinx 0.9.9 or later is needed" unless $ver ge '0000.0009.0009'; + } } ############# action methods ###################### -- cgit v1.2.1 From 1dfb1e7c787dd263858e782246c3db1765aa947a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 1 Mar 2011 18:31:33 +0100 Subject: use mtr_verbose() for debug output in suite.pm files --- mysql-test/suite/sphinx/suite.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/sphinx/suite.pm b/mysql-test/suite/sphinx/suite.pm index 0dd1da9fa5a..e708b12faea 100644 --- a/mysql-test/suite/sphinx/suite.pm +++ b/mysql-test/suite/sphinx/suite.pm @@ -29,9 +29,8 @@ return "No SphinxSE" unless $ENV{HA_SPHINX_SO} or { local $_ = `"$exe_sphinx_searchd" --help`; - print "tool: $exe_sphinx_searchd\n"; + mtr_verbose("tool: $exe_sphinx_searchd\n$_"); my $ver = sprintf "%04d.%04d.%04d", (/([0-9]+)\.([0-9]+)\.([0-9]+)/); - print $ver; if ($ver eq "0000.0000.0000") { $ver = sprintf "%04d.%04d", (/([0-9]+)\.([0-9]+)-(alpha|beta|gamma|RC)/); -- cgit v1.2.1