diff options
author | unknown <ingo@mysql.com> | 2005-08-30 08:18:27 +0200 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2005-08-30 08:18:27 +0200 |
commit | e3ba68f3ce72411ff0589cc0f963ae5a92b444cb (patch) | |
tree | 351190084ee0c918a069194b1f92d20675e554cf /mysql-test/t/alter_table.test | |
parent | 69f7e35cd83111cf438e70975c0dae131d56f810 (diff) | |
parent | a10739e5969de807490a455b04a0aa0c9f89f90e (diff) | |
download | mariadb-git-e3ba68f3ce72411ff0589cc0f963ae5a92b444cb.tar.gz |
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-5000
mysql-test/r/alter_table.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
sql/sql_table.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r-- | mysql-test/t/alter_table.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 003662fc956..5695822be6b 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -369,4 +369,35 @@ create table t1 ( a timestamp ); alter table t1 add unique ( a(1) ); drop table t1; +# +# Bug#11493 - Alter table rename to default database does not work without +# db name qualifying +# +create database mysqltest1; +create table t1 (c1 int); +# Move table to other database. +alter table t1 rename mysqltest1.t1; +# Assure that it has moved. +--error 1051 +drop table t1; +# Move table back. +alter table mysqltest1.t1 rename t1; +# Assure that it is back. +drop table t1; +# Now test for correct message if no database is selected. +# Create t1 in 'test'. +create table t1 (c1 int); +# Change to other db. +use mysqltest1; +# Drop the current db. This de-selects any db. +drop database mysqltest1; +# Now test for correct message. +--error 1046 +alter table test.t1 rename t1; +# Check that explicit qualifying works even with no selected db. +alter table test.t1 rename test.t1; +# Go back to standard 'test' db. +use test; +drop table t1; + # End of 4.1 tests |