diff options
author | unknown <bell@sanja.is.com.ua> | 2005-11-21 21:14:36 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-11-21 21:14:36 +0200 |
commit | 789340bc5fc3b996f79593442e116554d52f84f2 (patch) | |
tree | 29ec2b5a3cabdc58b1956fedcb24d69db9a01dca /sql | |
parent | ac5159a86a4d38fc43ca43f5ec804e3f19574f15 (diff) | |
parent | ae4d7b0f6b1d7d40280760e4288abc3064002869 (diff) | |
download | mariadb-git-789340bc5fc3b996f79593442e116554d52f84f2.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0
sql/sql_base.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_base.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 771a70ffebb..cfd06008690 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1200,17 +1200,16 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, (void) unpack_filename(path, path); if (mysql_frm_type(thd, path, ¬_used) == FRMTYPE_VIEW) { - TABLE tab;// will not be used (because it's VIEW) but have to be passed + /* + Will not be used (because it's VIEW) but has to be passed. + Also we will not free it (because it is a stack variable). + */ + TABLE tab; table= &tab; VOID(pthread_mutex_lock(&LOCK_open)); - if (open_unireg_entry(thd, table, table_list->db, - table_list->table_name, - alias, table_list, mem_root)) - { - table->next=table->prev=table; - free_cache_entry(table); - } - else + if (!open_unireg_entry(thd, table, table_list->db, + table_list->table_name, + alias, table_list, mem_root)) { DBUG_ASSERT(table_list->view != 0); VOID(pthread_mutex_unlock(&LOCK_open)); |