diff options
author | unknown <mskold@mysql.com> | 2006-05-05 17:18:47 +0200 |
---|---|---|
committer | unknown <mskold@mysql.com> | 2006-05-05 17:18:47 +0200 |
commit | b1e20006b686180f8b6cbe2234dd6ab2a7c4f9ef (patch) | |
tree | 027ce32b2e9090c7ed5589b95c5cea1ce00e429a /mysql-test/t | |
parent | 38b1f7c7c3790a6ee59dd213eab16fe9c6fd97f4 (diff) | |
download | mariadb-git-b1e20006b686180f8b6cbe2234dd6ab2a7c4f9ef.tar.gz |
Bug#16997 Table rename that changes database does not rename indexes, recreate indexes in new database
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ndb_rename.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/ndb_rename.test b/mysql-test/t/ndb_rename.test new file mode 100644 index 00000000000..99c344bc29e --- /dev/null +++ b/mysql-test/t/ndb_rename.test @@ -0,0 +1,32 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +drop database if exists mysqltest; +--enable_warnings + +# +# Table rename tests +# + +# +# Create a normal table with primary key +# +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL, + attr2 INT, + attr3 VARCHAR(10), + INDEX i1(attr1) +) ENGINE=ndbcluster; + +alter table t1 rename t2; + +create database ndbtest; +alter table t2 rename ndbtest.t2; + +drop table ndbtest.t2; +drop database ndbtest; + +# End of 4.1 tests |