mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
next-mr -> next-4284 merge.
After merge fixes. Adjust replication test cases.
This commit is contained in:
parent
ce0f429918
commit
4e95b60b27
5 changed files with 55 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue