summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-02-16 10:03:25 +0200
committermonty@mysql.com <>2004-02-16 10:03:25 +0200
commitf43093ec0e1ca391f0cdde589418d19c4b82241a (patch)
tree44dc172194086edaeef7da9c9ed059171579a886 /sql/sql_handler.cc
parentce145789092b294a562f565671478ae2bf51d14a (diff)
downloadmariadb-git-f43093ec0e1ca391f0cdde589418d19c4b82241a.tar.gz
After merge fixes
Added more DBUG statements Ensure that we are comparing end space with BINARY strings Use 'any_db' instead of '' to mean any database. (For HANDLER command) Only strip ' ' when comparing CHAR, not other space-like characters (like \t)
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 6db97ab3c41..d0f241b3291 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -288,12 +288,12 @@ static TABLE **find_table_ptr_by_name(THD *thd, const char *db,
TABLE **ptr;
DBUG_ASSERT(db);
- dblen= *db ? strlen(db)+1 : 0;
+ dblen= strlen(db);
ptr= &(thd->handler_tables);
for (TABLE *table= *ptr; table ; table= *ptr)
{
- if ((!dblen || !memcmp(table->table_cache_key, db, dblen)) &&
+ if ((db == any_db || !memcmp(table->table_cache_key, db, dblen)) &&
!my_strcasecmp(system_charset_info,
(is_alias ? table->table_name : table->real_name),
table_name))