diff options
author | unknown <ingo/istruewing@chilla.local> | 2006-08-02 18:10:51 +0200 |
---|---|---|
committer | unknown <ingo/istruewing@chilla.local> | 2006-08-02 18:10:51 +0200 |
commit | 312034fa4491708f19aff9efd527c50519cc0078 (patch) | |
tree | 376ef2cb6c75057dd05993c3db0e65e82dd33e4d /sql/sql_base.cc | |
parent | 3232bd58e861d873ae1cfe9f4ceefe6529ff90a3 (diff) | |
parent | ef976d20c95cb547dcb6123f0072d06bea61f177 (diff) | |
download | mariadb-git-312034fa4491708f19aff9efd527c50519cc0078.tar.gz |
Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into chilla.local:/home/mydev/mysql-5.1-bug18775
sql/ha_myisam.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql/sql_db.cc:
Bug#18775 - Temporary table from alter table visible to other threads
Manual merge
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 28393e4b964..f3238f1519d 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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; |