diff options
author | monty@hundin.mysql.fi <> | 2001-12-20 06:14:11 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-12-20 06:14:11 +0200 |
commit | 0eb46e425619c44ccb286a40e0d7fda0498192cd (patch) | |
tree | 6238391b82cf68076a5dea6dd2e3c8c5c27473cd /sql | |
parent | b1291364cbf3cd93ba1ad3b8397e30ee85321d93 (diff) | |
download | mariadb-git-0eb46e425619c44ccb286a40e0d7fda0498192cd.tar.gz |
Fix insert delated + query cache.
Fix pthread_mutex_trylock on HPUX (needed for query cache).
Diffstat (limited to 'sql')
-rw-r--r-- | sql/repl_failsafe.cc | 10 | ||||
-rw-r--r-- | sql/sql_insert.cc | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 6b15bd92ac6..edb5c28ed99 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -191,10 +191,12 @@ void init_slave_list() void end_slave_list() { - pthread_mutex_lock(&LOCK_slave_list); - hash_free(&slave_list); - pthread_mutex_unlock(&LOCK_slave_list); - pthread_mutex_destroy(&LOCK_slave_list); + /* No protection by a mutex needed as we are only called at shutdown */ + if (hash_inited(&slave_list)) + { + hash_free(&slave_list); + pthread_mutex_destroy(&LOCK_slave_list); + } } static int find_target_pos(LEX_MASTER_INFO* mi, IO_CACHE* log, char* errmsg) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 526bd86bb58..06a1818b50d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1227,6 +1227,7 @@ bool delayed_insert::handle_inserts(void) sql_print_error("%s",thd.net.last_error); goto err; } + query_cache.invalidate(table); if (thr_reschedule_write_lock(*thd.lock->locks)) { /* This should never happen */ @@ -1251,6 +1252,7 @@ bool delayed_insert::handle_inserts(void) sql_print_error("%s",thd.net.last_error); goto err; } + query_cache.invalidate(table); pthread_mutex_lock(&mutex); DBUG_RETURN(0); |