mirror of
https://github.com/MariaDB/server.git
synced 2025-07-14 13:41:20 +03:00
Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into chilla.local:/home/mydev/mysql-5.1-bug18775
This commit is contained in:
@ -254,7 +254,7 @@ uint cached_table_definitions(void)
|
||||
Get TABLE_SHARE for a table.
|
||||
|
||||
get_table_share()
|
||||
thd Table share
|
||||
thd Thread handle
|
||||
table_list Table that should be opened
|
||||
key Table cache key
|
||||
key_length Length of key
|
||||
@ -1500,15 +1500,18 @@ TABLE *find_temporary_table(THD *thd, TABLE_LIST *table_list)
|
||||
char key[MAX_DBKEY_LENGTH];
|
||||
uint key_length;
|
||||
TABLE *table;
|
||||
DBUG_ENTER("find_temporary_table");
|
||||
DBUG_PRINT("enter", ("table: '%s'.'%s'",
|
||||
table_list->db, table_list->table_name));
|
||||
|
||||
key_length= create_table_def_key(thd, key, table_list, 1);
|
||||
for (table=thd->temporary_tables ; table ; table= table->next)
|
||||
{
|
||||
if (table->s->table_cache_key.length == key_length &&
|
||||
!memcmp(table->s->table_cache_key.str, key, key_length))
|
||||
return table;
|
||||
DBUG_RETURN(table);
|
||||
}
|
||||
return 0; // Not a temporary table
|
||||
DBUG_RETURN(0); // Not a temporary table
|
||||
}
|
||||
|
||||
|
||||
@ -1949,7 +1952,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
char path[FN_REFLEN];
|
||||
enum legacy_db_type not_used;
|
||||
build_table_filename(path, sizeof(path) - 1,
|
||||
table_list->db, table_list->table_name, reg_ext);
|
||||
table_list->db, table_list->table_name, reg_ext, 0);
|
||||
if (mysql_frm_type(thd, path, ¬_used) == FRMTYPE_VIEW)
|
||||
{
|
||||
/*
|
||||
@ -3509,6 +3512,8 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
|
||||
uint key_length;
|
||||
TABLE_LIST table_list;
|
||||
DBUG_ENTER("open_temporary_table");
|
||||
DBUG_PRINT("enter", ("table: '%s'.'%s' path: '%s'",
|
||||
db, table_name, path));
|
||||
|
||||
table_list.db= (char*) db;
|
||||
table_list.table_name= (char*) table_name;
|
||||
|
Reference in New Issue
Block a user