mariadb/mysql-test/suite/tokudb.alter_table/t/frm_discover_partition.test
Rich Prohaska fa56230e72 refs #5371 add tests for frm discover on partitioned tables
git-svn-id: file:///svn/mysql/tests/mysql-test@47682 c7de825b-a66e-492c-adef-691d508d4ae1
2012-09-11 19:39:48 +00:00

29 lines
695 B
Text

# test that tokudb discover on partitioned tokudb tables works when there is an frm mismatch
--source include/have_partition.inc
--disable_warnings
DROP TABLE IF EXISTS foo, bar;
--enable_warnings
SET SESSION DEFAULT_STORAGE_ENGINE='TokuDB';
let $MYSQLD_DATADIR= `SELECT @@datadir`;
CREATE TABLE foo (id INT PRIMARY KEY) PARTITION BY HASH(id) PARTITIONS 2;
SHOW CREATE TABLE foo;
CREATE TABLE bar LIKE foo;
SHOW CREATE TABLE bar;
ALTER TABLE foo ADD COLUMN a INT;
SHOW CREATE TABLE foo;
FLUSH TABLES;
remove_file $MYSQLD_DATADIR/test/foo.frm;
copy_file $MYSQLD_DATADIR/test/bar.frm $MYSQLD_DATADIR/test/foo.frm;
# frm discovery happens here
SHOW CREATE TABLE foo;
DROP TABLE foo, bar;