create_select_tmp.test
来自「这是linux下运行的mysql软件包,可用于linux 下安装 php + m」· TEST 代码 · 共 33 行
TEST
33 行
# Testcase for BUG#4551# The bug was that when the table was TEMPORARY, it was not deleted if# the CREATE SELECT failed (the code intended too, but it actually# didn't). And as the CREATE TEMPORARY TABLE was not written to the# binlog if it was a transactional table, it resulted in an# inconsistency between binlog and the internal list of temp tables.-- source include/have_innodb.inc--disable_warningsdrop table if exists t1, t2;--enable_warningsCREATE TABLE t1 ( a int );INSERT INTO t1 VALUES (1),(2),(1);--error 1062CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;--error 1146select * from t2;--error 1062CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;--error 1146select * from t2;--error 1062CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;--error 1146select * from t2;--error 1062CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;--error 1146select * from t2;drop table t1;# End of 4.1 tests
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?