mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2 mysql-test/r/func_gconcat.result: Auto merged mysql-test/t/func_gconcat.test: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_yacc.yy: Auto merged
This commit is contained in:
@ -1088,6 +1088,11 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
/* find a unused table in the open table cache */
|
||||
if (refresh)
|
||||
*refresh=0;
|
||||
|
||||
/* an open table operation needs a lot of the stack space */
|
||||
if (check_stack_overrun(thd, 8 * STACK_MIN_SIZE, (char *)&alias))
|
||||
return 0;
|
||||
|
||||
if (thd->killed)
|
||||
DBUG_RETURN(0);
|
||||
key_length= (uint) (strmov(strmov(key, table_list->db)+1,
|
||||
@ -1200,17 +1205,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));
|
||||
|
Reference in New Issue
Block a user