1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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

into genie.(none):/home/hf/work/mysql-5.0.kil
This commit is contained in:
hf@genie.(none)
2003-03-31 13:42:37 +05:00
55 changed files with 110 additions and 69 deletions

View File

@ -951,7 +951,7 @@ void kill_delayed_threads(void)
{
/* Ensure that the thread doesn't kill itself while we are looking at it */
pthread_mutex_lock(&tmp->mutex);
tmp->thd.killed=1;
tmp->thd.killed= THD::KILL_CONNECTION;
if (tmp->thd.mysys_var)
{
pthread_mutex_lock(&tmp->thd.mysys_var->mutex);
@ -990,7 +990,7 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
thd->thread_id=thread_id++;
thd->end_time();
threads.append(thd);
thd->killed=abort_loop;
thd->killed=abort_loop ? THD::KILL_CONNECTION : THD::NOT_KILLED;
pthread_mutex_unlock(&LOCK_thread_count);
pthread_mutex_lock(&di->mutex);
@ -1043,7 +1043,7 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
for (;;)
{
if (thd->killed)
if (thd->killed == THD::KILL_CONNECTION)
{
uint lock_count;
/*
@ -1091,7 +1091,7 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
break;
if (error == ETIME || error == ETIMEDOUT)
{
thd->killed=1;
thd->killed= THD::KILL_CONNECTION;
break;
}
}
@ -1110,7 +1110,7 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
/* request for new delayed insert */
if (!(thd->lock=mysql_lock_tables(thd,&di->table,1)))
{
di->dead=thd->killed=1; // Fatal error
di->dead=thd->killed= THD::KILL_CONNECTION; // Fatal error
}
pthread_cond_broadcast(&di->cond_client);
}
@ -1118,7 +1118,7 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
{
if (di->handle_inserts())
{
di->dead=thd->killed=1; // Some fatal error
di->dead=thd->killed=THD::KILL_CONNECTION; // Some fatal error
}
}
di->status=0;
@ -1145,7 +1145,7 @@ end:
close_thread_tables(thd); // Free the table
di->table=0;
di->dead=thd->killed=1; // If error
di->dead=thd->killed= THD::KILL_CONNECTION; // If error
pthread_cond_broadcast(&di->cond_client); // Safety
pthread_mutex_unlock(&di->mutex);
@ -1214,7 +1214,7 @@ bool delayed_insert::handle_inserts(void)
max_rows=delayed_insert_limit;
if (thd.killed || table->version != refresh_version)
{
thd.killed=1;
thd.killed= THD::KILL_CONNECTION;
max_rows= ~0; // Do as much as possible
}