Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
This commit is contained in:
commit
02753ead71
@ -40,7 +40,6 @@ extern int h_errno;
|
|||||||
#define in_addr_t u_long
|
#define in_addr_t u_long
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static my_bool silent;
|
static my_bool silent;
|
||||||
|
|
||||||
static struct my_option my_long_options[] =
|
static struct my_option my_long_options[] =
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
The second is to be freeed only on thread end. mysql_ha_open should
|
The second is to be freeed only on thread end. mysql_ha_open should
|
||||||
then do { handler_items=concat(handler_items, free_list); free_list=0; }
|
then do { handler_items=concat(handler_items, free_list); free_list=0; }
|
||||||
|
|
||||||
But !!! do_cammand calls free_root at the end of every query and frees up
|
But !!! do_command calls free_root at the end of every query and frees up
|
||||||
all the sql_alloc'ed memory. It's harder to work around...
|
all the sql_alloc'ed memory. It's harder to work around...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -73,7 +73,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
|
|||||||
if (*ptr)
|
if (*ptr)
|
||||||
{
|
{
|
||||||
VOID(pthread_mutex_lock(&LOCK_open));
|
VOID(pthread_mutex_lock(&LOCK_open));
|
||||||
close_thread_table(thd, ptr);
|
if (close_thread_table(thd, ptr))
|
||||||
|
{
|
||||||
|
/* Tell threads waiting for refresh that something has happened */
|
||||||
|
VOID(pthread_cond_broadcast(&COND_refresh));
|
||||||
|
}
|
||||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -90,8 +94,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
|
|||||||
int mysql_ha_closeall(THD *thd, TABLE_LIST *tables)
|
int mysql_ha_closeall(THD *thd, TABLE_LIST *tables)
|
||||||
{
|
{
|
||||||
TABLE **ptr=find_table_ptr_by_name(thd, tables->db, tables->real_name, 0);
|
TABLE **ptr=find_table_ptr_by_name(thd, tables->db, tables->real_name, 0);
|
||||||
if (*ptr)
|
if (*ptr && close_thread_table(thd, ptr))
|
||||||
close_thread_table(thd, ptr);
|
{
|
||||||
|
/* Tell threads waiting for refresh that something has happened */
|
||||||
|
VOID(pthread_cond_broadcast(&COND_refresh));
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user