1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge with 4.0.18

This commit is contained in:
monty@mysql.com
2004-02-11 00:06:46 +01:00
229 changed files with 7032 additions and 3765 deletions

View File

@ -287,14 +287,13 @@ static TABLE **find_table_ptr_by_name(THD *thd, const char *db,
int dblen;
TABLE **ptr;
if (!db || ! *db)
db= thd->db ? thd->db : "";
dblen=strlen(db)+1;
DBUG_ASSERT(db);
dblen= *db ? strlen(db)+1 : 0;
ptr= &(thd->handler_tables);
for (TABLE *table= *ptr; table ; table= *ptr)
{
if (!memcmp(table->table_cache_key, db, dblen) &&
if ((!dblen || !memcmp(table->table_cache_key, db, dblen)) &&
!my_strcasecmp(system_charset_info,
(is_alias ? table->table_name : table->real_name),
table_name))