summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition.test
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.gmz>2007-06-04 18:56:29 +0300
committerunknown <gkodinov/kgeorge@macbook.gmz>2007-06-04 18:56:29 +0300
commitfce63f8f3f773f8013787f216a20ee67fc3e8f3e (patch)
tree00fdd7e24fdb43ecbf220bfec2b742ae6d90c4d1 /mysql-test/t/partition.test
parent272a54568ece68e08fac672759f27ca741715e79 (diff)
downloadmariadb-git-fce63f8f3f773f8013787f216a20ee67fc3e8f3e.tar.gz
Bug #28488: Incorrect information in file: './test/t1_test#.frm'
While executing ALTER TABLE ... PARTITION the server uses a temporary "shadow" table to create the updated table. This shadow table then gets renamed as the original table. The shadow table was not prefixed with the special prefix that marks temporary tables so it was picked up by SHOW TABLE STATUS. Fixed by isolating the code to create the shadow table name in a separate function and prefixing the shadow table name with the special prefix to exclude it from the list of user tables. See bug 18775 and WL1324 for details. mysql-test/r/partition.result: Bug #28488: test case mysql-test/t/partition.test: Bug #28488: test case sql/mysql_priv.h: Bug #28488: prefix shadow file with the temp prefix sql/sql_partition.cc: Bug #28488: prefix shadow file with the temp prefix sql/sql_table.cc: Bug #28488: prefix shadow file with the temp prefix
Diffstat (limited to 'mysql-test/t/partition.test')
-rw-r--r--mysql-test/t/partition.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 68c13c0792a..186cf1d3e8a 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -1448,4 +1448,21 @@ drop table t1;
create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808));
drop table t1;
+#
+# Bug #28488: Incorrect information in file: './test/t1_test#.frm'
+#
+
+CREATE TABLE t1(a INT NOT NULL, b TINYBLOB, KEY(a))
+ PARTITION BY RANGE(a) ( PARTITION p0 VALUES LESS THAN (32));
+INSERT INTO t1 VALUES (1, REPEAT('a', 10));
+INSERT INTO t1 SELECT a + 1, b FROM t1;
+INSERT INTO t1 SELECT a + 2, b FROM t1;
+INSERT INTO t1 SELECT a + 4, b FROM t1;
+INSERT INTO t1 SELECT a + 8, b FROM t1;
+
+ALTER TABLE t1 ADD PARTITION (PARTITION p1 VALUES LESS THAN (64));
+ALTER TABLE t1 DROP PARTITION p1;
+
+DROP TABLE t1;
+
--echo End of 5.1 tests