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.
This commit is contained in:
parent
f1d4c59da2
commit
dad4caa9de
@ -82,3 +82,48 @@ FLUSH LOGS;
|
|||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
DROP DATABASE mysqltest1;
|
DROP DATABASE mysqltest1;
|
||||||
End of 5.1 tests
|
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
|
||||||
|
@ -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;
|
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=2;
|
||||||
end|
|
end|
|
||||||
CALL test.p1();
|
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;
|
SELECT * FROM test.t1 ORDER BY blob_column;
|
||||||
a blob_column
|
a blob_column
|
||||||
1 abase
|
1 abase
|
||||||
|
@ -139,7 +139,8 @@ disable_warnings;
|
|||||||
|
|
||||||
######## DATABASE ########
|
######## 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;
|
send CREATE DATABASE d2;
|
||||||
source include/kill_query_and_diff_master_slave.inc;
|
source include/kill_query_and_diff_master_slave.inc;
|
||||||
@ -159,7 +160,8 @@ source include/kill_query_and_diff_master_slave.inc;
|
|||||||
######## EVENT ########
|
######## EVENT ########
|
||||||
|
|
||||||
let $diff_statement= SELECT event_name, event_body, execute_at
|
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
|
send CREATE EVENT e2
|
||||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY
|
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY
|
||||||
|
@ -43,11 +43,11 @@ SELECT * FROM t /* Should be empty */;
|
|||||||
a
|
a
|
||||||
* Modify both row-only and stmt-only table
|
* 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;
|
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);
|
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 */;
|
SELECT * FROM t_stmt /* should be empty */;
|
||||||
a
|
a
|
||||||
DROP TRIGGER trig_2;
|
|
||||||
* Stmt-only table and binlog_format=row
|
* Stmt-only table and binlog_format=row
|
||||||
INSERT INTO t_stmt VALUES (1);
|
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.
|
ERROR HY000: Cannot execute statement: binlogging impossible since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-logging.
|
||||||
|
@ -97,11 +97,11 @@ SELECT * FROM t_self_logging /* Should be empty */;
|
|||||||
SELECT * FROM t /* Should be empty */;
|
SELECT * FROM t /* Should be empty */;
|
||||||
|
|
||||||
--echo * Modify both row-only and stmt-only table
|
--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
|
--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);
|
INSERT INTO t_stmt VALUES (1);
|
||||||
SELECT * FROM t_stmt /* should be empty */;
|
SELECT * FROM t_stmt /* should be empty */;
|
||||||
DROP TRIGGER trig_2;
|
|
||||||
|
|
||||||
--echo * Stmt-only table and binlog_format=row
|
--echo * Stmt-only table and binlog_format=row
|
||||||
--error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE
|
--error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user