Below is the list of changes that have just been committed into a local
5.0 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1989 05/08/17 17:51:10 andrey@lmy004. +3 -0
fix for bug #12591 (SHOW TABLES FROM dbname produces wrong error message)
sql/sql_show.cc
1.268 05/08/17 17:51:04 andrey@lmy004. +7 -1
don't let my_dir() emit a message bug catch the errno (my_errno - a thread specific
variable) and check it for ENOENT - not existing.
For other errors emulate the message used to be emitted by my_dir()
mysql-test/t/show_check.test
1.53 05/08/17 17:51:04 andrey@lmy004. +5 -0
test for bug #12591
mysql-test/r/show_check.result
1.73 05/08/17 17:51:04 andrey@lmy004. +2 -0
results for test for bug #12591
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: andrey
# Host: lmy004.
# Root: /work/mysql-5.0-bug12591
--- 1.267/sql/sql_show.cc 2005-08-16 11:18:29 +02:00
+++ 1.268/sql/sql_show.cc 2005-08-17 17:51:04 +02:00
@@ -264,8 +264,14 @@
bzero((char*) &table_list,sizeof(table_list));
- if (!(dirp = my_dir(path,MYF(MY_WME | (dir ? MY_WANT_STAT : 0)))))
+ if (!(dirp = my_dir(path,MYF(dir ? MY_WANT_STAT : 0))))
+ {
+ if (my_errno == ENOENT)
+ my_error(ER_BAD_DB_ERROR, MYF(ME_BELL+ME_WAITTANG), db);
+ else
+ my_error(ER_CANT_READ_DIR, MYF(ME_BELL+ME_WAITTANG), path, my_errno);
DBUG_RETURN(-1);
+ }
for (i=0 ; i < (uint) dirp->number_off_files ; i++)
{
--- 1.72/mysql-test/r/show_check.result 2005-08-16 11:18:28 +02:00
+++ 1.73/mysql-test/r/show_check.result 2005-08-17 17:51:04 +02:00
@@ -555,3 +555,5 @@
DROP TABLE txt1;
DROP TABLE tyt2;
DROP TABLE urkunde;
+SHOW TABLES FROM non_existing_database;
+ERROR 42000: Unknown database 'non_existing_database'
--- 1.52/mysql-test/t/show_check.test 2005-08-16 11:18:28 +02:00
+++ 1.53/mysql-test/t/show_check.test 2005-08-17 17:51:04 +02:00
@@ -405,3 +405,8 @@
DROP TABLE txt1;
DROP TABLE tyt2;
DROP TABLE urkunde;
+#
+# BUG #12591 (SHOW TABLES FROM dbname produces wrong error message)
+#
+--error 1049
+SHOW TABLES FROM non_existing_database;
| Thread |
|---|
| • bk commit into 5.0 tree (andrey:1.1989) BUG#12591 | ahristov | 17 Aug |