diff options
author | unknown <konstantin@mysql.com> | 2004-02-06 14:28:57 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2004-02-06 14:28:57 +0300 |
commit | b5819094a70fa1c4f9c231424af6792da0b7b801 (patch) | |
tree | 02ab95be219033200e8a697bc32e7e67f7377ae3 /mysql-test/t/alter_table.test | |
parent | cbda6835edefb245f883e015b4b3e6761db6171a (diff) | |
download | mariadb-git-b5819094a70fa1c4f9c231424af6792da0b7b801.tar.gz |
Fix for bug #2628 "ALTER TABLE destroys table and reports success"
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
mysql-test/r/alter_table.result:
Fix for bug #2628: test result fixed
mysql-test/t/alter_table.test:
Fix for bug #2628: test case added
sql/sql_table.cc:
Fix for bug #2628:
We need to take into account database name when checking if source and
destination table names are equal.
Note, that after merge to 4.0 we also need to check for
lower_case_table_names.
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r-- | mysql-test/t/alter_table.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index dbfbd4267d8..cfb4f958372 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -82,3 +82,20 @@ alter table t1 drop i,add i int unsigned not null auto_increment, drop primary k select * from t1; drop table t1; +# +# Bug #2628: 'alter table t1 rename mysqltest.t1' silently drops mysqltest.t1 +# if it exists +# +create table t1 (name char(15)); +insert into t1 (name) values ("current"); +create database mysqltest; +create table mysqltest.t1 (name char(15)); +insert into mysqltest.t1 (name) values ("mysqltest"); +select * from t1; +select * from mysqltest.t1; +--error 1050 +alter table t1 rename mysqltest.t1; +select * from t1; +select * from mysqltest.t1; +drop table t1; +drop database mysqltest; |