diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2010-02-14 12:24:16 +0100 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2010-02-14 12:24:16 +0100 |
commit | 862b77b96663c60af5866d704cbccf107eff5226 (patch) | |
tree | 1f164173fcf8f55967b7af067e3e3bbc7a3e31d9 /mysql-test/suite | |
parent | e6c93a4ef1d0f02f5074ba408a2f50102ad95c57 (diff) | |
parent | 1b9f84bf01ad421df06e0d229c0b2de4ea8983cd (diff) | |
download | mariadb-git-862b77b96663c60af5866d704cbccf107eff5226.tar.gz |
merge from trunk
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/ndb/r/ndb_dd_ddl.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/ndb/t/ndb_dd_ddl.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/parts/r/partition_innodb_status_file.result | 14 | ||||
-rw-r--r-- | mysql-test/suite/parts/t/partition_innodb_status_file-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/suite/parts/t/partition_innodb_status_file.test | 20 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_do_grant.result | 10 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_semi_sync.result | 31 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/disabled.def | 1 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_cross_version-master.opt | 2 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_do_grant.test | 18 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_heartbeat_basic.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_semi_sync.test | 33 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test | 1 |
13 files changed, 119 insertions, 17 deletions
diff --git a/mysql-test/suite/ndb/r/ndb_dd_ddl.result b/mysql-test/suite/ndb/r/ndb_dd_ddl.result index 9714a89c2ab..35516efb48c 100644 --- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result +++ b/mysql-test/suite/ndb/r/ndb_dd_ddl.result @@ -308,6 +308,7 @@ ENGINE = NDB; DROP USER mysqltest_u1@localhost; DROP USER mysqltest_u2@localhost; +DROP DATABASE mysqltest2; # ----------------------------------------------------------------- # End 6.0 test diff --git a/mysql-test/suite/ndb/t/ndb_dd_ddl.test b/mysql-test/suite/ndb/t/ndb_dd_ddl.test index e8db0730687..679c07ff0e3 100644 --- a/mysql-test/suite/ndb/t/ndb_dd_ddl.test +++ b/mysql-test/suite/ndb/t/ndb_dd_ddl.test @@ -463,6 +463,8 @@ ENGINE = NDB; DROP USER mysqltest_u1@localhost; DROP USER mysqltest_u2@localhost; +DROP DATABASE mysqltest2; + --echo --echo # ----------------------------------------------------------------- --echo # End 6.0 test diff --git a/mysql-test/suite/parts/r/partition_innodb_status_file.result b/mysql-test/suite/parts/r/partition_innodb_status_file.result new file mode 100644 index 00000000000..29b5a3b3766 --- /dev/null +++ b/mysql-test/suite/parts/r/partition_innodb_status_file.result @@ -0,0 +1,14 @@ +CREATE TABLE t1 (a INT) ENGINE = InnoDB PARTITION BY HASH(a); +INSERT INTO t1 VALUES (0), (1), (2); +START TRANSACTION; +UPDATE t1 SET a = 5 WHERE a = 1; +# Connection con1 +# InnoDB lock timeout and monitor thread runs every 15 seconds +SET innodb_lock_wait_timeout = 20; +START TRANSACTION; +UPDATE t1 SET a = 3 WHERE a = 1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +COMMIT; +# Connection default +COMMIT; +DROP TABLE t1; diff --git a/mysql-test/suite/parts/t/partition_innodb_status_file-master.opt b/mysql-test/suite/parts/t/partition_innodb_status_file-master.opt new file mode 100644 index 00000000000..779962e8fca --- /dev/null +++ b/mysql-test/suite/parts/t/partition_innodb_status_file-master.opt @@ -0,0 +1 @@ +--innodb-status-file=1 diff --git a/mysql-test/suite/parts/t/partition_innodb_status_file.test b/mysql-test/suite/parts/t/partition_innodb_status_file.test new file mode 100644 index 00000000000..f066ce5d485 --- /dev/null +++ b/mysql-test/suite/parts/t/partition_innodb_status_file.test @@ -0,0 +1,20 @@ +--source include/have_innodb.inc +--source include/have_partition.inc + +CREATE TABLE t1 (a INT) ENGINE = InnoDB PARTITION BY HASH(a); +INSERT INTO t1 VALUES (0), (1), (2); +START TRANSACTION; +UPDATE t1 SET a = 5 WHERE a = 1; +connect (con1, localhost, root,,); +--echo # Connection con1 +--echo # InnoDB lock timeout and monitor thread runs every 15 seconds +SET innodb_lock_wait_timeout = 20; +START TRANSACTION; +--error ER_LOCK_WAIT_TIMEOUT +UPDATE t1 SET a = 3 WHERE a = 1; +COMMIT; +disconnect con1; +connection default; +--echo # Connection default +COMMIT; +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 65c60acc651..9eecc1bab3f 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -89,6 +89,7 @@ show grants for rpl_do_grant2@localhost; ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' show grants for rpl_do_grant2@localhost; ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' +call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); DROP DATABASE IF EXISTS bug42217_db; CREATE DATABASE bug42217_db; GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost' @@ -166,9 +167,12 @@ DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; DROP USER 'create_rout_db'@'localhost'; -call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); -USE mtr; -call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; ######## BUG#49119 ####### ### i) test case from the 'how to repeat section' stop slave; diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync.result index 1e220b28d78..74eb14d33e0 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync.result @@ -120,8 +120,27 @@ min(a) select max(a) from t1; max(a) 300 + +# BUG#50157 +# semi-sync replication crashes when replicating a transaction which +# include 'CREATE TEMPORARY TABLE `MyISAM_t` SELECT * FROM `Innodb_t` ; +[ on master ] +SET SESSION AUTOCOMMIT= 0; +CREATE TABLE t2(c1 INT) ENGINE=innodb; +BEGIN; + +# Even though it is in a transaction, this statement is binlogged into binlog +# file immediately. +CREATE TEMPORARY TABLE t3 SELECT c1 FROM t2 where 1=1; + +# These statements will not be binlogged until the transaction is committed +INSERT INTO t2 VALUES(11); +INSERT INTO t2 VALUES(22); +COMMIT; +DROP TABLE t2, t3; +SET SESSION AUTOCOMMIT= 1; # -# Test semi-sync master will switch OFF after one transacton +# Test semi-sync master will switch OFF after one transaction # timeout waiting for slave reply. # include/stop_slave.inc @@ -135,7 +154,7 @@ Variable_name Value Rpl_semi_sync_master_no_tx 0 show status like 'Rpl_semi_sync_master_yes_tx'; Variable_name Value -Rpl_semi_sync_master_yes_tx 301 +Rpl_semi_sync_master_yes_tx 304 show status like 'Rpl_semi_sync_master_clients'; Variable_name Value Rpl_semi_sync_master_clients 1 @@ -150,7 +169,7 @@ Variable_name Value Rpl_semi_sync_master_no_tx 1 show status like 'Rpl_semi_sync_master_yes_tx'; Variable_name Value -Rpl_semi_sync_master_yes_tx 301 +Rpl_semi_sync_master_yes_tx 304 insert into t1 values (100); [ master status should be OFF ] show status like 'Rpl_semi_sync_master_status'; @@ -161,7 +180,7 @@ Variable_name Value Rpl_semi_sync_master_no_tx 302 show status like 'Rpl_semi_sync_master_yes_tx'; Variable_name Value -Rpl_semi_sync_master_yes_tx 301 +Rpl_semi_sync_master_yes_tx 304 # # Test semi-sync status on master will be ON again when slave catches up # @@ -194,7 +213,7 @@ Variable_name Value Rpl_semi_sync_master_no_tx 302 show status like 'Rpl_semi_sync_master_yes_tx'; Variable_name Value -Rpl_semi_sync_master_yes_tx 301 +Rpl_semi_sync_master_yes_tx 304 show status like 'Rpl_semi_sync_master_clients'; Variable_name Value Rpl_semi_sync_master_clients 1 @@ -213,7 +232,7 @@ Variable_name Value Rpl_semi_sync_master_no_tx 302 SHOW STATUS LIKE 'Rpl_semi_sync_master_yes_tx'; Variable_name Value -Rpl_semi_sync_master_yes_tx 302 +Rpl_semi_sync_master_yes_tx 305 FLUSH NO_WRITE_TO_BINLOG STATUS; [ Semi-sync master status variables after FLUSH STATUS ] SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx'; diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 446c233c8a9..a0c57b205ec 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -12,5 +12,4 @@ rpl_get_master_version_and_clock: # Bug#46931 2009-10-17 joro rpl.rpl_get_master_version_and_clock fails rpl_row_create_table : Bug#45576 2009-12-01 joro rpl_row_create_table fails on PB2 -rpl_cross_version : BUG#43913 2009-10-22 luis rpl_cross_version fails with symptom in described in bug report rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux 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..815a8f81d32 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 @@ ---replicate-same-server-id --relay-log=slave-relay-bin --secure-file-priv=$MYSQL_TMP_DIR +--replicate-same-server-id --relay-log=slave-relay-bin diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index d6a06f43d18..df61b6847c9 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -120,6 +120,9 @@ show grants for rpl_do_grant2@localhost; # BUG42217 mysql.procs_priv does not get replicated ##################################################### connection master; +call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); +sync_slave_with_master; +connection master; --disable_warnings DROP DATABASE IF EXISTS bug42217_db; @@ -209,12 +212,19 @@ USE bug42217_db; DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; +-- sync_slave_with_master +-- 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) DROP USER 'create_rout_db'@'localhost'; -call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); -connection slave; -USE mtr; -call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); +# finish entire clean up (remove binlogs) +# so that we leave a pristine environment for the +# following tests +-- source include/master-slave-reset.inc # BUG#49119: Master crashes when executing 'REVOKE ... ON # {PROCEDURE|FUNCTION} FROM ...' diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test index 739cbe155ca..f87b32993f2 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test @@ -382,7 +382,7 @@ let $slave_param_comparison= =; let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); # Flush logs every 0.1 second during 5 sec --disable_query_log -let $i=50; +let $i=100; while ($i) { FLUSH LOGS; dec $i; diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync.test b/mysql-test/suite/rpl/t/rpl_semi_sync.test index 4900acc1e91..b04541aba21 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync.test +++ b/mysql-test/suite/rpl/t/rpl_semi_sync.test @@ -11,6 +11,7 @@ disable_query_log; connection master; call mtr.add_suppression("Timeout waiting for reply of binlog"); call mtr.add_suppression("Read semi-sync reply"); +call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT."); connection slave; call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Semi-sync slave .* reply"); @@ -193,8 +194,38 @@ select count(distinct a) from t1; select min(a) from t1; select max(a) from t1; +--echo +--echo # BUG#50157 +--echo # semi-sync replication crashes when replicating a transaction which +--echo # include 'CREATE TEMPORARY TABLE `MyISAM_t` SELECT * FROM `Innodb_t` ; + +connection master; +echo [ on master ]; +SET SESSION AUTOCOMMIT= 0; +CREATE TABLE t2(c1 INT) ENGINE=innodb; +sync_slave_with_master; + +connection master; +BEGIN; +--echo +--echo # Even though it is in a transaction, this statement is binlogged into binlog +--echo # file immediately. +--disable_warnings +CREATE TEMPORARY TABLE t3 SELECT c1 FROM t2 where 1=1; +--enable_warnings +--echo +--echo # These statements will not be binlogged until the transaction is committed +INSERT INTO t2 VALUES(11); +INSERT INTO t2 VALUES(22); +COMMIT; + +DROP TABLE t2, t3; +SET SESSION AUTOCOMMIT= 1; +sync_slave_with_master; + + --echo # ---echo # Test semi-sync master will switch OFF after one transacton +--echo # Test semi-sync master will switch OFF after one transaction --echo # timeout waiting for slave reply. --echo # connection slave; 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 56924a2efe9..b3efb578b68 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 @@ -10,4 +10,5 @@ source include/have_binlog_format_row.inc; LET $ENGINE_TYPE= MyISAM; source extra/rpl_tests/rpl_tmp_table_and_DDL.test; +sync_slave_with_master; |