diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2008-03-12 12:40:12 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2008-03-12 12:40:12 -0400 |
commit | b5978a9424c6213a8282713feb3734c2f92968c8 (patch) | |
tree | d15b0cd2f289b1d23496c2ae018b858b23abb8a2 /mysql-test/t/drop.test | |
parent | b2a68038cecdd9881ef420fcbe984acfaa934b7a (diff) | |
download | mariadb-git-b5978a9424c6213a8282713feb3734c2f92968c8.tar.gz |
Bug#26703: DROP DATABASE fails if database contains a #mysql50# \
table with backticks
(Thanks to Lu Jingdong, though I did not take his patch directly, as
it contained a significant flaw.)
It wasn't a backtick/parsing problem. We merely didn't anticipate
and allocate enough space to handle the optional "#mysql50#" table-
name prefix.
Now, allocate that extra space in case we need it when we look up
a legacy table to get its file's name.
mysql-test/r/drop.result:
Verify that databases with old-style files can be removed.
mysql-test/t/drop.test:
Verify that databases with old-style files can be removed.
sql/sql_db.cc:
Extend the size of the memory that holds the table's name, so that
the legacy "mysql50" prefix fits.
Diffstat (limited to 'mysql-test/t/drop.test')
-rw-r--r-- | mysql-test/t/drop.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index a79044436eb..ad26287a666 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -134,4 +134,19 @@ drop table mysql_test.`#sql-347f_8`; copy_file $MYSQLTEST_VARDIR/master-data/mysql_test/t1.frm $MYSQLTEST_VARDIR/master-data/mysql_test/#sql-347f_6.frm; drop database mysql_test; +# +# Bug#26703: DROP DATABASE fails if database contains a #mysql50# table with backticks +# +create database mysqltestbug26703; +use mysqltestbug26703; +create table `#mysql50#abc``def` ( id int ); +--error ER_WRONG_TABLE_NAME +create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +--error ER_WRONG_TABLE_NAME +create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +use test; +drop database mysqltestbug26703; + --echo End of 5.1 tests |