diff options
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/alter_table.test | 39 | ||||
-rw-r--r-- | mysql-test/t/backup.test | 16 |
2 files changed, 23 insertions, 32 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index f6af92e0044..168d011a2ac 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -488,32 +488,26 @@ DROP TABLE t1; # # Bug#18775 - Temporary table from alter table visible to other threads # -# Use a special database to avoid name clashes with user tables. +# Check if special characters work and duplicates are detected. --disable_warnings -DROP DATABASE IF EXISTS mysqltest; +DROP TABLE IF EXISTS `t+1`, `t+2`; --enable_warnings -CREATE DATABASE mysqltest; -use mysqltest; -# -# Check if non-ASCII alphabetic characters work and duplicates are detected. ---disable_warnings -DROP TABLE IF EXISTS `t1_nägel`, `t1_blüten`; ---enable_warnings -CREATE TABLE `t1_nägel` (c1 INT); -ALTER TABLE `t1_nägel` RENAME `t1_blüten`; -CREATE TABLE `t1_nägel` (c1 INT); +CREATE TABLE `t+1` (c1 INT); +ALTER TABLE `t+1` RENAME `t+2`; +CREATE TABLE `t+1` (c1 INT); --error ER_TABLE_EXISTS_ERROR -ALTER TABLE `t1_nägel` RENAME `t1_blüten`; -DROP TABLE `t1_nägel`, `t1_blüten`; +ALTER TABLE `t+1` RENAME `t+2`; +DROP TABLE `t+1`, `t+2`; # # Same for temporary tables though these names do not become file names. -CREATE TEMPORARY TABLE `tt1_nägel` (c1 INT); -ALTER TABLE `tt1_nägel` RENAME `tt1_blüten`; -CREATE TEMPORARY TABLE `tt1_nägel` (c1 INT); +CREATE TEMPORARY TABLE `tt+1` (c1 INT); +ALTER TABLE `tt+1` RENAME `tt+2`; +CREATE TEMPORARY TABLE `tt+1` (c1 INT); --error ER_TABLE_EXISTS_ERROR -ALTER TABLE `tt1_nägel` RENAME `tt1_blüten`; -SHOW CREATE TABLE `tt1_blüten`; -DROP TABLE `tt1_nägel`, `tt1_blüten`; +ALTER TABLE `tt+1` RENAME `tt+2`; +SHOW CREATE TABLE `tt+1`; +SHOW CREATE TABLE `tt+2`; +DROP TABLE `tt+1`, `tt+2`; # # Check if special characters as in tmp_file_prefix work. CREATE TABLE `#sql1` (c1 INT); @@ -538,10 +532,7 @@ ALTER TABLE `@0023sql2` RENAME `#sql2`; SHOW TABLES; INSERT INTO `#sql2` VALUES (1); INSERT INTO `@0023sql1` VALUES (2); +SHOW CREATE TABLE `#sql2`; SHOW CREATE TABLE `@0023sql1`; DROP TABLE `#sql2`, `@0023sql1`; -# -# Cleanup -use test; -DROP DATABASE mysqltest; diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test index fa6bbc21813..61bde0cecb0 100644 --- a/mysql-test/t/backup.test +++ b/mysql-test/t/backup.test @@ -65,15 +65,15 @@ drop table t5; # # Backup did not encode table names. --disable_warnings -DROP TABLE IF EXISTS `t-blüten`; +DROP TABLE IF EXISTS `t+1`; --enable_warnings -CREATE TABLE `t-blüten` (c1 INT); -INSERT INTO `t-blüten` VALUES (1), (2), (3); -BACKUP TABLE `t-blüten` TO '../tmp'; -DROP TABLE `t-blüten`; +CREATE TABLE `t+1` (c1 INT); +INSERT INTO `t+1` VALUES (1), (2), (3); +BACKUP TABLE `t+1` TO '../tmp'; +DROP TABLE `t+1`; # # Same for restore. -RESTORE TABLE `t-blüten` FROM '../tmp'; -SELECT * FROM `t-blüten`; -DROP TABLE `t-blüten`; +RESTORE TABLE `t+1` FROM '../tmp'; +SELECT * FROM `t+1`; +DROP TABLE `t+1`; |