Addendum to bug 29325:

test if TRUNCATE TABLE works with keep_files_on_create
This commit is contained in:
unknown 2007-07-11 18:02:47 +03:00
parent 3881f2a24d
commit 2f0e00175b
2 changed files with 13 additions and 2 deletions

View file

@ -1515,8 +1515,13 @@ USE db1;
SET SESSION keep_files_on_create = TRUE;
CREATE TABLE t1 (a INT) ENGINE MYISAM;
ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17)
CREATE TABLE t3 (a INT) Engine=MyISAM;
INSERT INTO t3 VALUES (1),(2),(3);
TRUNCATE TABLE t3;
SELECT * from t3;
a
SET SESSION keep_files_on_create = DEFAULT;
DROP TABLE db2.t1;
DROP TABLE db2.t1, db1.t3;
DROP DATABASE db1;
DROP DATABASE db2;
USE test;

View file

@ -1142,9 +1142,15 @@ SET SESSION keep_files_on_create = TRUE;
--disable_abort_on_error
CREATE TABLE t1 (a INT) ENGINE MYISAM;
--enable_abort_on_error
CREATE TABLE t3 (a INT) Engine=MyISAM;
INSERT INTO t3 VALUES (1),(2),(3);
TRUNCATE TABLE t3;
SELECT * from t3;
SET SESSION keep_files_on_create = DEFAULT;
DROP TABLE db2.t1;
DROP TABLE db2.t1, db1.t3;
DROP DATABASE db1;
DROP DATABASE db2;
USE test;