1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
two KILL commands implementation (version 2)


include/mysqld_error.h:
  Error message about query interruption added
myisam/mi_check.c:
  killed_ptr now retutns only value - not pointer
myisam/myisamchk.c:
  killed_ptr returns value now
myisam/myisamdef.h:
  killed_ptr returns value now
myisam/sort.c:
  killed_ptr returns value now
sql/filesort.cc:
  THD::killed now has enum type
sql/ha_berkeley.cc:
  THD::killed has enum type
sql/ha_myisam.cc:
  killed_ptr returns value now
sql/lock.cc:
  two different errors possible here now
sql/log_event.cc:
  two ways of killing possible here now
sql/mysqld.cc:
  THD::killed has enum type now
sql/records.cc:
  two errors are possible here now
sql/share/czech/errmsg.txt:
  new error message
sql/share/danish/errmsg.txt:
  new error message
sql/share/dutch/errmsg.txt:
  new error message
sql/share/english/errmsg.txt:
  new error message
sql/share/estonian/errmsg.txt:
  new error message
sql/share/french/errmsg.txt:
  new error message
sql/share/german/errmsg.txt:
  new error message
sql/share/greek/errmsg.txt:
  new error message
sql/share/hungarian/errmsg.txt:
  new error message
sql/share/italian/errmsg.txt:
  new error message
sql/share/japanese/errmsg.txt:
  new error message
sql/share/korean/errmsg.txt:
  new error message
sql/share/norwegian-ny/errmsg.txt:
  new error message
sql/share/norwegian/errmsg.txt:
  new error message
sql/share/polish/errmsg.txt:
  new error message
sql/share/portuguese/errmsg.txt:
  new error message
sql/share/romanian/errmsg.txt:
  new error message
sql/share/russian/errmsg.txt:
  new error message
sql/share/serbian/errmsg.txt:
  new error message
sql/share/slovak/errmsg.txt:
  new error message
sql/share/spanish/errmsg.txt:
  new error message
sql/share/swedish/errmsg.txt:
  new error message
sql/share/ukrainian/errmsg.txt:
  new error message
sql/slave.cc:
  two errors are possible here now
sql/sql_base.cc:
  THD::killed has enum type now
sql/sql_cache.cc:
  THD::killed has enum type now
sql/sql_class.cc:
  THD::awake implementation changed to handle KILL_QUERY
sql/sql_class.h:
  class THD changed to handle KILL_QUERY
sql/sql_delete.cc:
  two errors are possible here now
sql/sql_insert.cc:
  THD::killed has enum type now
sql/sql_load.cc:
  two errors are possible here now
sql/sql_parse.cc:
  kill_one_thread function changed to handle KILL_QUERY
sql/sql_prepare.cc:
  two errors are possible here now
sql/sql_repl.cc:
  the parameter to awake is of THD::killed_state type now
sql/sql_repl.h:
  awake parameter changed
sql/sql_select.cc:
  two errors are possible here now
sql/sql_show.cc:
  notification adopted to changes in class THD
sql/sql_table.cc:
  two errors are possible here now
sql/sql_update.cc:
  two errors are possible here now
This commit is contained in:
unknown
2003-03-31 13:39:46 +05:00
parent 02a37fb8a7
commit 3814f2a8ed
51 changed files with 93 additions and 74 deletions

View File

@@ -935,7 +935,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);
@@ -974,7 +974,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);
@@ -1027,7 +1027,7 @@ extern "C" pthread_handler_decl(handle_delayed_insert,arg)
for (;;)
{
if (thd->killed)
if (thd->killed == THD::KILL_CONNECTION)
{
uint lock_count;
/*
@@ -1075,7 +1075,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;
}
}
@@ -1094,7 +1094,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);
}
@@ -1102,7 +1102,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;
@@ -1129,7 +1129,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);
@@ -1198,7 +1198,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
}