Commit 768db64b authored by unknown's avatar unknown

Addendum to bug 29325:

test if TRUNCATE TABLE works with keep_files_on_create
parent 77a1bc5e
...@@ -1515,8 +1515,13 @@ USE db1; ...@@ -1515,8 +1515,13 @@ USE db1;
SET SESSION keep_files_on_create = TRUE; SET SESSION keep_files_on_create = TRUE;
CREATE TABLE t1 (a INT) ENGINE MYISAM; CREATE TABLE t1 (a INT) ENGINE MYISAM;
ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) 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; SET SESSION keep_files_on_create = DEFAULT;
DROP TABLE db2.t1; DROP TABLE db2.t1, db1.t3;
DROP DATABASE db1; DROP DATABASE db1;
DROP DATABASE db2; DROP DATABASE db2;
USE test; USE test;
......
...@@ -1142,9 +1142,15 @@ SET SESSION keep_files_on_create = TRUE; ...@@ -1142,9 +1142,15 @@ SET SESSION keep_files_on_create = TRUE;
--disable_abort_on_error --disable_abort_on_error
CREATE TABLE t1 (a INT) ENGINE MYISAM; CREATE TABLE t1 (a INT) ENGINE MYISAM;
--enable_abort_on_error --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; SET SESSION keep_files_on_create = DEFAULT;
DROP TABLE db2.t1; DROP TABLE db2.t1, db1.t3;
DROP DATABASE db1; DROP DATABASE db1;
DROP DATABASE db2; DROP DATABASE db2;
USE test; USE test;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment