Skip to content

Commit 1a94d2f

Browse files
committed
cleanup: main.create_select test
1 parent 9b7886b commit 1a94d2f

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

mysql-test/r/create_select_tmp.result renamed to mysql-test/r/create_select.result

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
drop table if exists t1, t2;
1+
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
2+
#
3+
# Testcase for BUG#4551
4+
#
25
CREATE TABLE t1 ( a int );
36
INSERT INTO t1 VALUES (1),(2),(1);
47
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
@@ -18,3 +21,6 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
1821
select * from t2;
1922
ERROR 42S02: Table 'test.t2' doesn't exist
2023
drop table t1;
24+
#
25+
# End of 4.1 tests
26+
#
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
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+
211
# The bug was that when the table was TEMPORARY, it was not deleted if
312
# the CREATE SELECT failed (the code intended too, but it actually
413
# didn't). And as the CREATE TEMPORARY TABLE was not written to the
514
# binlog if it was a transactional table, it resulted in an
615
# inconsistency between binlog and the internal list of temp tables.
716

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
1917
CREATE TABLE t1 ( a int );
2018
INSERT INTO t1 VALUES (1),(2),(1);
2119
--error ER_DUP_ENTRY
2220
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
23-
--error 1146
21+
--error ER_NO_SUCH_TABLE
2422
select * from t2;
2523
--error ER_DUP_ENTRY
2624
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
27-
--error 1146
25+
--error ER_NO_SUCH_TABLE
2826
select * from t2;
2927
--error ER_DUP_ENTRY
3028
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
31-
--error 1146
29+
--error ER_NO_SUCH_TABLE
3230
select * from t2;
3331
--error ER_DUP_ENTRY
3432
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
35-
--error 1146
33+
--error ER_NO_SUCH_TABLE
3634
select * from t2;
3735
drop table t1;
3836

39-
# End of 4.1 tests
37+
--echo #
38+
--echo # End of 4.1 tests
39+
--echo #

0 commit comments

Comments
 (0)