1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0

into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0
This commit is contained in:
gluh@gluh.mysql.r18.ru
2005-01-25 11:42:50 +03:00
49 changed files with 261 additions and 189 deletions

View File

@ -261,13 +261,19 @@ void free_io_cache(TABLE *table)
DBUG_VOID_RETURN;
}
/* Close all tables which aren't in use by any thread */
/*
Close all tables which aren't in use by any thread
THD can be NULL, but then if_wait_for_refresh must be FALSE
and tables must be NULL.
*/
bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
TABLE_LIST *tables)
{
bool result=0;
DBUG_ENTER("close_cached_tables");
DBUG_ASSERT(thd || (!if_wait_for_refresh && !tables));
VOID(pthread_mutex_lock(&LOCK_open));
if (!tables)
@ -343,7 +349,6 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
VOID(pthread_mutex_unlock(&LOCK_open));
if (if_wait_for_refresh)
{
THD *thd=current_thd;
pthread_mutex_lock(&thd->mysys_var->mutex);
thd->mysys_var->current_mutex= 0;
thd->mysys_var->current_cond= 0;
@ -2409,11 +2414,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
strxnmov(buff,sizeof(buff)-1,db,".",table_name,NullS);
table_name=buff;
}
if (report_error == REPORT_ALL_ERRORS ||
report_error == REPORT_EXCEPT_NON_UNIQUE)
my_error(ER_UNKNOWN_TABLE, MYF(0), table_name, thd->where);
else
return (Field*) not_found_field;
my_error(ER_UNKNOWN_TABLE, MYF(0), table_name, thd->where);
}
else
if (report_error == REPORT_ALL_ERRORS ||