| 1 |
--source include/not_group_replication_plugin.inc |
| 2 |
--source include/force_myisam_default.inc |
| 3 |
--source include/have_myisam.inc |
| 4 |
--source include/master-slave.inc |
| 5 |
|
| 6 |
--echo # |
| 7 |
--echo # Bug#50124 Rpl failure on DROP table with concurrent txn/non-txn |
| 8 |
--echo # DML flow and SAVEPOINT |
| 9 |
--echo # |
| 10 |
|
| 11 |
--echo # Connection master |
| 12 |
connection master; |
| 13 |
|
| 14 |
--disable_warnings |
| 15 |
DROP TABLE IF EXISTS tt, nt; |
| 16 |
--enable_warnings |
| 17 |
|
| 18 |
CREATE TABLE tt (i INT) ENGINE = InnoDB; |
| 19 |
CREATE TABLE nt (i INT) ENGINE = MyISAM; |
| 20 |
FLUSH LOGS; |
| 21 |
START TRANSACTION; |
| 22 |
INSERT INTO nt VALUES (1); |
| 23 |
SAVEPOINT insert_statement; |
| 24 |
INSERT INTO tt VALUES (1); |
| 25 |
|
| 26 |
--echo # Connection master1 |
| 27 |
connection master1; |
| 28 |
--echo # Sending: |
| 29 |
--send DROP TABLE tt |
| 30 |
|
| 31 |
--echo # Connection master |
| 32 |
connection master; |
| 33 |
let $wait_condition= |
| 34 |
SELECT COUNT(*) = 1 FROM information_schema.processlist |
| 35 |
WHERE state = "Waiting for table metadata lock" AND info = "DROP TABLE tt"; |
| 36 |
--source include/wait_condition_or_abort.inc |
| 37 |
ROLLBACK TO SAVEPOINT insert_statement; |
| 38 |
COMMIT; |
| 39 |
|
| 40 |
--echo # Connection master1 |
| 41 |
connection master1; |
| 42 |
--echo # Reaping: DROP TABLE tt |
| 43 |
--reap |
| 44 |
FLUSH LOGS; |
| 45 |
|
| 46 |
--echo # Connection master |
| 47 |
connection master; |
| 48 |
DROP TABLE nt; |
| 49 |
|
| 50 |
--source include/rpl_end.inc |