|
1 |
| -# Testcase for BUG#4551 |
| 1 | +# This does not work for RBR yet. |
| 2 | +--source include/have_innodb.inc |
| 3 | +--source include/have_binlog_format_mixed_or_statement.inc |
| 4 | + |
| 5 | +CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
| 6 | + |
| 7 | +--echo # |
| 8 | +--echo # Testcase for BUG#4551 |
| 9 | +--echo # |
| 10 | + |
2 | 11 | # The bug was that when the table was TEMPORARY, it was not deleted if
|
3 | 12 | # the CREATE SELECT failed (the code intended too, but it actually
|
4 | 13 | # didn't). And as the CREATE TEMPORARY TABLE was not written to the
|
5 | 14 | # binlog if it was a transactional table, it resulted in an
|
6 | 15 | # inconsistency between binlog and the internal list of temp tables.
|
7 | 16 |
|
8 |
| -# This does not work for RBR yet. |
9 |
| ---source include/have_binlog_format_mixed_or_statement.inc |
10 |
| - |
11 |
| ---disable_query_log |
12 |
| -CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
13 |
| ---enable_query_log |
14 |
| - |
15 |
| --- source include/have_innodb.inc |
16 |
| ---disable_warnings |
17 |
| -drop table if exists t1, t2; |
18 |
| ---enable_warnings |
19 | 17 | CREATE TABLE t1 ( a int );
|
20 | 18 | INSERT INTO t1 VALUES (1),(2),(1);
|
21 | 19 | --error ER_DUP_ENTRY
|
22 | 20 | CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
|
23 |
| ---error 1146 |
| 21 | +--error ER_NO_SUCH_TABLE |
24 | 22 | select * from t2;
|
25 | 23 | --error ER_DUP_ENTRY
|
26 | 24 | CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
|
27 |
| ---error 1146 |
| 25 | +--error ER_NO_SUCH_TABLE |
28 | 26 | select * from t2;
|
29 | 27 | --error ER_DUP_ENTRY
|
30 | 28 | CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
|
31 |
| ---error 1146 |
| 29 | +--error ER_NO_SUCH_TABLE |
32 | 30 | select * from t2;
|
33 | 31 | --error ER_DUP_ENTRY
|
34 | 32 | CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
|
35 |
| ---error 1146 |
| 33 | +--error ER_NO_SUCH_TABLE |
36 | 34 | select * from t2;
|
37 | 35 | drop table t1;
|
38 | 36 |
|
39 |
| -# End of 4.1 tests |
| 37 | +--echo # |
| 38 | +--echo # End of 4.1 tests |
| 39 | +--echo # |
0 commit comments