Commit 0d9c9f49 authored by Alice Sherepa's avatar Alice Sherepa

reenable rpl_spec_variables.test

parent 7d528881
...@@ -49,14 +49,14 @@ connection master; ...@@ -49,14 +49,14 @@ connection master;
--echo *** Single statement on transactional table *** --echo *** Single statement on transactional table ***
--disable_query_log --disable_query_log
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE --error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE, 1534
eval INSERT INTO t1 (a, data) VALUES (1, eval INSERT INTO t1 (a, data) VALUES (1,
CONCAT($data, $data, $data, $data, $data)); CONCAT($data, $data, $data, $data, $data));
--enable_query_log --enable_query_log
--echo *** Single statement on non-transactional table *** --echo *** Single statement on non-transactional table ***
--disable_query_log --disable_query_log
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE --error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE, 1534
eval INSERT INTO t2 (a, data) VALUES (2, eval INSERT INTO t2 (a, data) VALUES (2,
CONCAT($data, $data, $data, $data, $data, $data)); CONCAT($data, $data, $data, $data, $data, $data));
--enable_query_log --enable_query_log
......
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
# #
############################################################################## ##############################################################################
rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux #rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings
#rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table
rpl_row_binlog_max_cache_size : MDEV-11092 rpl_row_binlog_max_cache_size : MDEV-11092
rpl_row_index_choice : MDEV-11666 rpl_row_index_choice : MDEV-11666
...@@ -2,14 +2,17 @@ include/master-slave.inc ...@@ -2,14 +2,17 @@ include/master-slave.inc
[connection master] [connection master]
* auto_increment_increment, auto_increment_offset * * auto_increment_increment, auto_increment_offset *
connection master;
SET @@global.auto_increment_increment=2; SET @@global.auto_increment_increment=2;
SET @@session.auto_increment_increment=2; SET @@session.auto_increment_increment=2;
SET @@global.auto_increment_offset=10; SET @@global.auto_increment_offset=10;
SET @@session.auto_increment_offset=10; SET @@session.auto_increment_offset=10;
connection slave;
SET @@global.auto_increment_increment=3; SET @@global.auto_increment_increment=3;
SET @@session.auto_increment_increment=3; SET @@session.auto_increment_increment=3;
SET @@global.auto_increment_offset=20; SET @@global.auto_increment_offset=20;
SET @@session.auto_increment_offset=20; SET @@session.auto_increment_offset=20;
connection master;
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM;
INSERT INTO t1 (b) VALUES ('master'); INSERT INTO t1 (b) VALUES ('master');
INSERT INTO t1 (b) VALUES ('master'); INSERT INTO t1 (b) VALUES ('master');
...@@ -17,6 +20,7 @@ SELECT * FROM t1 ORDER BY a; ...@@ -17,6 +20,7 @@ SELECT * FROM t1 ORDER BY a;
a b a b
2 master 2 master
4 master 4 master
connection slave;
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM;
INSERT INTO t1 (b) VALUES ('slave'); INSERT INTO t1 (b) VALUES ('slave');
INSERT INTO t1 (b) VALUES ('slave'); INSERT INTO t1 (b) VALUES ('slave');
...@@ -32,102 +36,123 @@ SELECT * FROM t2 ORDER BY a; ...@@ -32,102 +36,123 @@ SELECT * FROM t2 ORDER BY a;
a b a b
1 slave 1 slave
4 slave 4 slave
connection master;
DROP TABLE IF EXISTS t1,t2; DROP TABLE IF EXISTS t1,t2;
SET @@global.auto_increment_increment=1; SET @@global.auto_increment_increment=1;
SET @@session.auto_increment_increment=1; SET @@session.auto_increment_increment=1;
SET @@global.auto_increment_offset=1; SET @@global.auto_increment_offset=1;
SET @@session.auto_increment_offset=1; SET @@session.auto_increment_offset=1;
connection slave;
SET @@global.auto_increment_increment=1; SET @@global.auto_increment_increment=1;
SET @@session.auto_increment_increment=1; SET @@session.auto_increment_increment=1;
SET @@global.auto_increment_offset=1; SET @@global.auto_increment_offset=1;
SET @@session.auto_increment_offset=1; SET @@session.auto_increment_offset=1;
connection slave;
SET auto_increment_increment=1; SET auto_increment_increment=1;
SET auto_increment_offset=1; SET auto_increment_offset=1;
* character_set_database, collation_server * * character_set_database, collation_server *
connection master;
SET @restore_master_character_set_database=@@global.character_set_database; SET @restore_master_character_set_database=@@global.character_set_database;
SET @restore_master_collation_server=@@global.collation_server; SET @restore_master_collation_server=@@global.collation_server;
SET @@global.character_set_database=latin1; SET @@global.character_set_database=latin1;
SET @@session.character_set_database=latin1; SET @@session.character_set_database=latin1;
SET @@global.collation_server=latin1_german1_ci; SET @@global.collation_server=latin1_german1_ci;
SET @@session.collation_server=latin1_german1_ci; SET @@session.collation_server=latin1_german1_ci;
connection slave;
SET @restore_slave_character_set_database=@@global.character_set_database; SET @restore_slave_character_set_database=@@global.character_set_database;
SET @restore_slave_collation_server=@@global.collation_server; SET @restore_slave_collation_server=@@global.collation_server;
SET @@global.character_set_database=utf8; SET @@global.character_set_database=utf8;
SET @@session.character_set_database=utf8; SET @@session.character_set_database=utf8;
SET @@global.collation_server=utf8_bin; SET @@global.collation_server=utf8_bin;
SET @@session.collation_server=utf8_bin; SET @@session.collation_server=utf8_bin;
connection master;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` varchar(10) COLLATE latin1_german1_ci DEFAULT NULL, `b` varchar(10) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1
connection slave;
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` varchar(10) COLLATE latin1_german1_ci DEFAULT NULL, `b` varchar(10) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` varchar(10) COLLATE utf8_bin DEFAULT NULL, `b` varchar(10) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SET @@global.collation_server=latin1_swedish_ci; SET @@global.collation_server=latin1_swedish_ci;
SET @@session.collation_server=latin1_swedish_ci; SET @@session.collation_server=latin1_swedish_ci;
connection master;
SET @@global.collation_server=latin1_swedish_ci; SET @@global.collation_server=latin1_swedish_ci;
SET @@session.collation_server=latin1_swedish_ci; SET @@session.collation_server=latin1_swedish_ci;
DROP TABLE IF EXISTS t1,t2; DROP TABLE IF EXISTS t1,t2;
* default_week_format * * default_week_format *
connection master;
SET @@global.default_week_format=0; SET @@global.default_week_format=0;
SET @@session.default_week_format=0; SET @@session.default_week_format=0;
connection slave;
SET @@global.default_week_format=1; SET @@global.default_week_format=1;
SET @@session.default_week_format=1; SET @@session.default_week_format=1;
connection master;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c INT) ENGINE=MyISAM; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1, 'master ', WEEK('2008-01-07')); INSERT INTO t1 VALUES (1, 'master ', WEEK('2008-01-07'));
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
a b c a b c
1 master 1 1 master 1
connection slave;
INSERT INTO t1 VALUES (2, 'slave ', WEEK('2008-01-07')); INSERT INTO t1 VALUES (2, 'slave ', WEEK('2008-01-07'));
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
a b c a b c
1 master 1 1 master 1
2 slave 2 2 slave 2
connection master;
DROP TABLE t1; DROP TABLE t1;
connection slave;
SET @@global.default_week_format=0; SET @@global.default_week_format=0;
SET @@session.default_week_format=0; SET @@session.default_week_format=0;
* local_infile * * local_infile *
connection slave;
SET @@global.local_infile=0; SET @@global.local_infile=0;
connection master;
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(20), c CHAR(254)) ENGINE=MyISAM; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(20), c CHAR(254)) ENGINE=MyISAM;
LOAD DATA LOCAL INFILE 'FILE' INTO TABLE t1 (b); LOAD DATA LOCAL INFILE 'FILE' INTO TABLE t1 (b);
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
70 70
connection slave;
LOAD DATA LOCAL INFILE 'FILE2' INTO TABLE t1 (b); LOAD DATA LOCAL INFILE 'FILE2' INTO TABLE t1 (b);
ERROR 42000: The used command is not allowed with this MySQL version ERROR 42000: The used command is not allowed with this MariaDB version
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
70 70
SET @@global.local_infile=1; SET @@global.local_infile=1;
connection master;
DROP TABLE t1; DROP TABLE t1;
* max_heap_table_size * * max_heap_table_size *
connection slave;
SET @restore_slave_max_heap_table_size=@@global.max_heap_table_size; SET @restore_slave_max_heap_table_size=@@global.max_heap_table_size;
SET @@global.max_heap_table_size=16384; SET @@global.max_heap_table_size=16384;
SET @@session.max_heap_table_size=16384; SET @@session.max_heap_table_size=16384;
connection master;
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), c CHAR(254)) ENGINE=MEMORY; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), c CHAR(254)) ENGINE=MEMORY;
SELECT COUNT(*)=2000 FROM t1; SELECT COUNT(*)=2000 FROM t1;
COUNT(*)=2000 COUNT(*)=2000
1 1
connection slave;
SELECT COUNT(*)=2000 FROM t1 WHERE b='master' GROUP BY b ORDER BY b; SELECT COUNT(*)=2000 FROM t1 WHERE b='master' GROUP BY b ORDER BY b;
COUNT(*)=2000 COUNT(*)=2000
1 1
...@@ -137,18 +162,24 @@ COUNT(*)<2000 AND COUNT(*)>0 ...@@ -137,18 +162,24 @@ COUNT(*)<2000 AND COUNT(*)>0
SELECT COUNT(*)<2000 AND COUNT(*)>0 FROM t2 WHERE b='slave' GROUP BY b ORDER BY b; SELECT COUNT(*)<2000 AND COUNT(*)>0 FROM t2 WHERE b='slave' GROUP BY b ORDER BY b;
COUNT(*)<2000 AND COUNT(*)>0 COUNT(*)<2000 AND COUNT(*)>0
1 1
connection master;
DROP TABLE IF EXISTS t1,t2; DROP TABLE IF EXISTS t1,t2;
* storage_engine * * storage_engine *
connection master;
SET @restore_master_storage_engine=@@global.storage_engine; SET @restore_master_storage_engine=@@global.storage_engine;
SET @@global.storage_engine=InnoDB; SET @@global.storage_engine=InnoDB;
SET @@session.storage_engine=InnoDB; SET @@session.storage_engine=InnoDB;
connection slave;
SET @restore_slave_storage_engine=@@global.storage_engine; SET @restore_slave_storage_engine=@@global.storage_engine;
SET @@global.storage_engine=Memory; SET @@global.storage_engine=Memory;
SET @@session.storage_engine=Memory; SET @@session.storage_engine=Memory;
connection master;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)); CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10));
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB; CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB;
connection slave;
CREATE TABLE t3 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)); CREATE TABLE t3 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10));
connection master;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -163,6 +194,7 @@ t2 CREATE TABLE `t2` ( ...@@ -163,6 +194,7 @@ t2 CREATE TABLE `t2` (
`b` varchar(10) DEFAULT NULL, `b` varchar(10) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection slave;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -186,37 +218,49 @@ t3 CREATE TABLE `t3` ( ...@@ -186,37 +218,49 @@ t3 CREATE TABLE `t3` (
) ENGINE=MEMORY DEFAULT CHARSET=latin1 ) ENGINE=MEMORY DEFAULT CHARSET=latin1
SET @@global.storage_engine=InnoDB; SET @@global.storage_engine=InnoDB;
SET @@session.storage_engine=InnoDB; SET @@session.storage_engine=InnoDB;
connection master;
DROP TABLE IF EXISTS t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3;
* sql_mode * * sql_mode *
connection master;
SET @old_sql_mode_master= @@global.sql_mode;
SET @@global.sql_mode=ANSI; SET @@global.sql_mode=ANSI;
SET @@session.sql_mode=ANSI; SET @@session.sql_mode=ANSI;
connection slave;
SET @old_sql_mode_slave= @@global.sql_mode;
SET @@global.sql_mode=TRADITIONAL; SET @@global.sql_mode=TRADITIONAL;
SET @@session.sql_mode=TRADITIONAL; SET @@session.sql_mode=TRADITIONAL;
connection master;
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c DATE); CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c DATE);
INSERT INTO t1 VALUES (1, 'master', '0000-00-00'); INSERT INTO t1 VALUES (1, 'master', '0000-00-00');
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
a b c a b c
1 master 0000-00-00 1 master 0000-00-00
connection slave;
INSERT INTO t1 VALUES (1, 'slave', '0000-00-00'); INSERT INTO t1 VALUES (1, 'slave', '0000-00-00');
ERROR 22007: Incorrect date value: '0000-00-00' for column 'c' at row 1 ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`c` at row 1
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
a b c a b c
1 master 0000-00-00 1 master 0000-00-00
SET @@global.sql_mode=''; SET @@global.sql_mode='';
SET @@session.sql_mode=''; SET @@session.sql_mode='';
connection master;
SET @@global.sql_mode=''; SET @@global.sql_mode='';
SET @@session.sql_mode=''; SET @@session.sql_mode='';
DROP TABLE t1; DROP TABLE t1;
*** clean up *** *** clean up ***
connection master;
SET @@global.character_set_database=@restore_master_character_set_database; SET @@global.character_set_database=@restore_master_character_set_database;
SET @@global.collation_server=@restore_master_collation_server; SET @@global.collation_server=@restore_master_collation_server;
SET @@global.storage_engine=@restore_master_storage_engine; SET @@global.storage_engine=@restore_master_storage_engine;
SET @@global.sql_mode=@old_sql_mode_master;
connection slave;
SET @@global.character_set_database=@restore_slave_character_set_database; SET @@global.character_set_database=@restore_slave_character_set_database;
SET @@global.collation_server=@restore_slave_collation_server; SET @@global.collation_server=@restore_slave_collation_server;
SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size; SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size;
SET @@global.storage_engine=@restore_slave_storage_engine; SET @@global.storage_engine=@restore_slave_storage_engine;
SET @@global.sql_mode=@old_sql_mode_slave;
call mtr.add_suppression("The table 't[12]' is full"); call mtr.add_suppression("The table 't[12]' is full");
include/rpl_end.inc include/rpl_end.inc
...@@ -260,10 +260,12 @@ DROP TABLE IF EXISTS t1,t2,t3; ...@@ -260,10 +260,12 @@ DROP TABLE IF EXISTS t1,t2,t3;
--echo * sql_mode * --echo * sql_mode *
--connection master --connection master
SET @old_sql_mode_master= @@global.sql_mode;
SET @@global.sql_mode=ANSI; SET @@global.sql_mode=ANSI;
SET @@session.sql_mode=ANSI; SET @@session.sql_mode=ANSI;
--connection slave --connection slave
SET @old_sql_mode_slave= @@global.sql_mode;
SET @@global.sql_mode=TRADITIONAL; SET @@global.sql_mode=TRADITIONAL;
SET @@session.sql_mode=TRADITIONAL; SET @@session.sql_mode=TRADITIONAL;
...@@ -292,14 +294,16 @@ DROP TABLE t1; ...@@ -292,14 +294,16 @@ DROP TABLE t1;
SET @@global.character_set_database=@restore_master_character_set_database; SET @@global.character_set_database=@restore_master_character_set_database;
SET @@global.collation_server=@restore_master_collation_server; SET @@global.collation_server=@restore_master_collation_server;
SET @@global.storage_engine=@restore_master_storage_engine; SET @@global.storage_engine=@restore_master_storage_engine;
SET @@global.sql_mode=@old_sql_mode_master;
--sync_slave_with_master --sync_slave_with_master
SET @@global.character_set_database=@restore_slave_character_set_database; SET @@global.character_set_database=@restore_slave_character_set_database;
SET @@global.collation_server=@restore_slave_collation_server; SET @@global.collation_server=@restore_slave_collation_server;
SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size; SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size;
SET @@global.storage_engine=@restore_slave_storage_engine; SET @@global.storage_engine=@restore_slave_storage_engine;
SET @@global.sql_mode=@old_sql_mode_slave;
# Put at the end since the test otherwise emptied the table. # Put at the end since the test otherwise emptied the table.
remove_file $MYSQLTEST_VARDIR/tmp/words.dat;
remove_file $MYSQLTEST_VARDIR/tmp/words2.dat;
--echo --echo
call mtr.add_suppression("The table 't[12]' is full"); call mtr.add_suppression("The table 't[12]' is full");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment