diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-02-05 20:04:38 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-02-05 20:04:38 +0300 |
commit | dad4caa9de242ff3a8e45db05f34da46e22cad05 (patch) | |
tree | dd9f028d4666228a8ea8b33876cc8173f68f175e /mysql-test | |
parent | f1d4c59da22e0f45a040b4c6f1d8574c413f4bf9 (diff) | |
download | mariadb-git-dad4caa9de242ff3a8e45db05f34da46e22cad05.tar.gz |
next-mr -> next-4284 merge.
After merge fixes.
Adjust replication test cases.
mysql-test/suite/rpl/r/rpl_mixed_row_innodb.result:
Update results with a new test.
mysql-test/suite/rpl/r/rpl_stm_loadfile.result:
Add a warning, which I believe is an expected one.
mysql-test/suite/rpl/t/rpl_killed_ddl.test:
Sort results to avoid test failurs under load.
mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result:
Update results (next-4284 merge).
mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test:
Adjust test output to the new table opening scheme: decide_logging_format() is now called in CREATE/DROP trigger.
Diffstat (limited to 'mysql-test')
5 files changed, 55 insertions, 6 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_row_innodb.result b/mysql-test/suite/rpl/r/rpl_mixed_row_innodb.result index a4894631087..68b981ad70f 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_row_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_row_innodb.result @@ -82,3 +82,48 @@ FLUSH LOGS; FLUSH LOGS; DROP DATABASE mysqltest1; End of 5.1 tests +# +# Bug#39675 rename tables on innodb tables with pending +# transactions causes slave data issue. +# +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +CREATE TABLE t1 ( +id INT PRIMARY KEY auto_increment, +b INT DEFAULT NULL +) ENGINE=InnoDB; +CREATE TABLE t2 ( +id INT PRIMARY KEY auto_increment, +b INT DEFAULT NULL +) ENGINE=InnoDB; +INSERT INTO t1 (b) VALUES (1),(2),(3); +BEGIN; +INSERT INTO t1(b) VALUES (4); +-------- switch to master1 -------- +RENAME TABLE t1 TO t3, t2 TO t1;; +-------- switch to master -------- +COMMIT; +-------- switch to master1 -------- +-------- switch to master -------- +SELECT * FROM t1; +id b +SELECT * FROM t3; +id b +1 1 +2 2 +3 3 +4 4 +-------- switch to slave -------- +SELECT * FROM t1; +id b +SELECT * FROM t3; +id b +1 1 +2 2 +3 3 +4 4 +-------- switch to master -------- +DROP TABLE t1; +DROP TABLE t3; +End of 6.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_stm_loadfile.result b/mysql-test/suite/rpl/r/rpl_stm_loadfile.result index 1dd0805f4d3..3551e38d5ef 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_loadfile.result +++ b/mysql-test/suite/rpl/r/rpl_stm_loadfile.result @@ -17,6 +17,8 @@ INSERT INTO test.t1 VALUES(2,'test'); UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=2; end| CALL test.p1(); +Warnings: +Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Statement uses a system function whose value may differ on slave. SELECT * FROM test.t1 ORDER BY blob_column; a blob_column 1 abase diff --git a/mysql-test/suite/rpl/t/rpl_killed_ddl.test b/mysql-test/suite/rpl/t/rpl_killed_ddl.test index 0f2fe5b60fb..22bf194cc08 100644 --- a/mysql-test/suite/rpl/t/rpl_killed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_killed_ddl.test @@ -139,7 +139,8 @@ disable_warnings; ######## DATABASE ######## -let $diff_statement= SHOW DATABASES LIKE 'd%'; +let $diff_statement= SELECT schema_name FROM information_schema.schemata + WHERE schema_name LIKE 'd%' ORDER BY schema_name; send CREATE DATABASE d2; source include/kill_query_and_diff_master_slave.inc; @@ -159,7 +160,8 @@ 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%'; + FROM information_schema.events where event_name like 'e%' + ORDER BY event_name; send CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result index 35f54455179..ecf2159e5db 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result @@ -43,11 +43,11 @@ SELECT * FROM t /* Should be empty */; a * Modify both row-only and stmt-only table CREATE TRIGGER trig_2 AFTER INSERT ON t_stmt FOR EACH ROW BEGIN INSERT INTO t_row VALUES(1); END; +ERROR HY000: Cannot execute statement: binlogging impossible since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-logging. INSERT INTO t_stmt VALUES (1); -ERROR HY000: Cannot execute statement: binlogging impossible since both row-incapable engines and statement-incapable engines are involved. +ERROR HY000: Cannot execute statement: binlogging impossible since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-logging. SELECT * FROM t_stmt /* should be empty */; a -DROP TRIGGER trig_2; * Stmt-only table and binlog_format=row INSERT INTO t_stmt VALUES (1); ERROR HY000: Cannot execute statement: binlogging impossible since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-logging. diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test index 5bf3d39750b..ddad6519b5f 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test @@ -97,11 +97,11 @@ SELECT * FROM t_self_logging /* Should be empty */; SELECT * FROM t /* Should be empty */; --echo * Modify both row-only and stmt-only table +--error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE --eval CREATE TRIGGER trig_2 AFTER INSERT ON t_stmt FOR EACH ROW BEGIN INSERT INTO t_row VALUES(1); END ---error ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE +--error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE INSERT INTO t_stmt VALUES (1); SELECT * FROM t_stmt /* should be empty */; -DROP TRIGGER trig_2; --echo * Stmt-only table and binlog_format=row --error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE |