summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <dlenev@mysql.com>2005-04-03 10:36:18 +0400
committerunknown <dlenev@mysql.com>2005-04-03 10:36:18 +0400
commitda70ad5499e593bfd367113a3caaf58d0f7a5193 (patch)
tree184cd404bfe7f2755c03e529337679847bd6fa21
parentcdad0890fe17e93c8fa60cf2c34c4036808f96c3 (diff)
parent98e615ba35952f3999f26aaa567b4744a71fbfdc (diff)
downloadmariadb-git-da70ad5499e593bfd367113a3caaf58d0f7a5193.tar.gz
Merge of patch for bug #3891 into 5.0 tree.
BitKeeper/deleted/.del-errmsg.txt~ef53c33ac0ff8a84: Auto merged BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e: Auto merged mysql-test/r/drop.result: Auto merged BitKeeper/deleted/.del-errmsg.txt~8ed1999cbd481dc4: Auto merged mysql-test/r/type_timestamp.result: Auto merged mysql-test/t/drop.test: Auto merged mysql-test/t/type_timestamp.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/sql_table.cc: Manual merge.
-rw-r--r--mysql-test/r/drop.result14
-rw-r--r--mysql-test/t/drop.test22
-rw-r--r--sql/sql_table.cc3
3 files changed, 38 insertions, 1 deletions
diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result
index 901871f437e..b91cc89cfea 100644
--- a/mysql-test/r/drop.result
+++ b/mysql-test/r/drop.result
@@ -24,6 +24,20 @@ n
drop database if exists mysqltest;
affected rows: 1
create database mysqltest;
+use mysqltest;
+drop table table1, table2, table3, table4, table5, table6,
+table7, table8, table9, table10, table11, table12, table13,
+table14, table15, table16, table17, table18, table19, table20,
+table21, table22, table23, table24, table25, table26, table27,
+table28;
+ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table14,table15,table16,table17,table18,table19,table20,table21,table22,table23,table'
+drop table table1, table2, table3, table4, table5, table6,
+table7, table8, table9, table10, table11, table12, table13,
+table14, table15, table16, table17, table18, table19, table20,
+table21, table22, table23, table24, table25, table26, table27,
+table28, table29, table30;
+ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table14,table15,table16,table17,table18,table19,table20,table21,table22,table23,table'
+use test;
drop database mysqltest;
flush tables with read lock;
create database mysqltest;
diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test
index 6f0e5b3f14c..5e123ca0de8 100644
--- a/mysql-test/t/drop.test
+++ b/mysql-test/t/drop.test
@@ -30,6 +30,28 @@ select * from mysqltest.mysqltest;
drop database if exists mysqltest;
--disable_info
create database mysqltest;
+
+#
+# drop many tables - bug#3891
+# we'll do it in mysqltest db, to be able to use longer table names
+# (tableN instead on tN)
+#
+use mysqltest;
+--error 1051
+drop table table1, table2, table3, table4, table5, table6,
+table7, table8, table9, table10, table11, table12, table13,
+table14, table15, table16, table17, table18, table19, table20,
+table21, table22, table23, table24, table25, table26, table27,
+table28;
+
+--error 1051
+drop table table1, table2, table3, table4, table5, table6,
+table7, table8, table9, table10, table11, table12, table13,
+table14, table15, table16, table17, table18, table19, table20,
+table21, table22, table23, table24, table25, table26, table27,
+table28, table29, table30;
+
+use test;
drop database mysqltest;
# test drop/create database and FLUSH TABLES WITH READ LOCK
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index b125eeaf03a..e2dcd71afb4 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -273,7 +273,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
if (wrong_tables.length())
{
if (!foreign_key_error)
- my_error(ER_BAD_TABLE_ERROR, MYF(0), wrong_tables.c_ptr());
+ my_printf_error(ER_BAD_TABLE_ERROR, ER(ER_BAD_TABLE_ERROR), MYF(0),
+ wrong_tables.c_ptr());
else
my_message(ER_ROW_IS_REFERENCED, ER(ER_ROW_IS_REFERENCED), MYF(0));
error= 1;