diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-05-14 18:45:33 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-05-14 18:45:33 +0200 |
commit | 97da8630839771047d0f567693d83542b88fac71 (patch) | |
tree | 5e63273eba842155ea357f0767e8dd22b9d67bc2 | |
parent | 5933619ceb8883ebc36e71d11824acfd272913bc (diff) | |
parent | 5f267b47de4aee6c078c21368bfbf359fb5e3ab7 (diff) | |
download | mariadb-git-97da8630839771047d0f567693d83542b88fac71.tar.gz |
merge
-rw-r--r-- | sql/sql_cache.cc | 12 | ||||
-rw-r--r-- | storage/archive/ha_archive.cc | 1 | ||||
-rw-r--r-- | storage/pbxt/src/cache_xt.cc | 5 | ||||
-rw-r--r-- | storage/pbxt/src/heap_xt.cc | 1 | ||||
-rw-r--r-- | storage/pbxt/src/lock_xt.cc | 5 | ||||
-rw-r--r-- | storage/pbxt/src/lock_xt.h | 1 | ||||
-rw-r--r-- | storage/pbxt/src/xaction_xt.cc | 1 | ||||
-rw-r--r-- | vio/viosocket.c | 7 |
8 files changed, 31 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 81cc87723c5..f358d5537d2 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -2253,6 +2253,18 @@ void Query_cache::free_cache() { DBUG_ENTER("Query_cache::free_cache"); + /* Destroy locks */ + Query_cache_block *block= queries_blocks; + if (block) + { + do + { + Query_cache_query *query= block->query(); + my_rwlock_destroy(&query->lock); + block= block->next; + } while (block != queries_blocks); + } + my_free((uchar*) cache, MYF(MY_ALLOW_ZERO_PTR)); make_disabled(); hash_free(&queries); diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index a7fda9a471a..d70de0dd13c 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -357,6 +357,7 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, int *rc) { *rc= my_errno ? my_errno : -1; pthread_mutex_unlock(&archive_mutex); + pthread_mutex_destroy(&share->mutex); my_free(share, MYF(0)); DBUG_RETURN(NULL); } diff --git a/storage/pbxt/src/cache_xt.cc b/storage/pbxt/src/cache_xt.cc index 24e42d9e984..090250dd802 100644 --- a/storage/pbxt/src/cache_xt.cc +++ b/storage/pbxt/src/cache_xt.cc @@ -717,6 +717,11 @@ xtPublic void xt_ind_exit(XTThreadPtr self) ind_handle_exit(self); if (ind_cac_globals.cg_blocks) { + XTIndBlockPtr block = ind_cac_globals.cg_blocks; + for (u_int i=0; i<ind_cac_globals.cg_block_count; i++) { + XT_IPAGE_FREE_LOCK(self, &block->cb_lock); + block++; + } xt_free(self, ind_cac_globals.cg_blocks); ind_cac_globals.cg_blocks = NULL; xt_free_mutex(&ind_cac_globals.cg_lock); diff --git a/storage/pbxt/src/heap_xt.cc b/storage/pbxt/src/heap_xt.cc index a4e3fec1611..11331f6489f 100644 --- a/storage/pbxt/src/heap_xt.cc +++ b/storage/pbxt/src/heap_xt.cc @@ -109,6 +109,7 @@ xtPublic void xt_heap_release(XTThreadPtr self, XTHeapPtr hp) if (hp->h_finalize) (*hp->h_finalize)(self, hp); xt_spinlock_unlock(&hp->h_lock); + xt_spinlock_free(NULL, &hp->h_lock); xt_free(self, hp); return; } diff --git a/storage/pbxt/src/lock_xt.cc b/storage/pbxt/src/lock_xt.cc index 5dbba9db83a..e4a38716845 100644 --- a/storage/pbxt/src/lock_xt.cc +++ b/storage/pbxt/src/lock_xt.cc @@ -726,11 +726,15 @@ xtBool xt_init_row_locks(XTRowLocksPtr rl) rl->rl_groups[i].lg_list_in_use = 0; rl->rl_groups[i].lg_list = NULL; } + rl->valid = 1; return OK; } void xt_exit_row_locks(XTRowLocksPtr rl) { + if (!rl->valid) + return; + for (int i=0; i<XT_ROW_LOCK_GROUP_COUNT; i++) { xt_spinlock_free(NULL, &rl->rl_groups[i].lg_lock); rl->rl_groups[i].lg_wait_queue = NULL; @@ -741,6 +745,7 @@ void xt_exit_row_locks(XTRowLocksPtr rl) rl->rl_groups[i].lg_list = NULL; } } + rl->valid = 0; } /* diff --git a/storage/pbxt/src/lock_xt.h b/storage/pbxt/src/lock_xt.h index 4e5af648c37..28737478d48 100644 --- a/storage/pbxt/src/lock_xt.h +++ b/storage/pbxt/src/lock_xt.h @@ -658,6 +658,7 @@ typedef struct XTLockGroup { struct XTLockWait; typedef struct XTRowLocks { + int valid; XTLockGroupRec rl_groups[XT_ROW_LOCK_GROUP_COUNT]; void xt_cancel_temp_lock(XTLockWaitPtr lw); diff --git a/storage/pbxt/src/xaction_xt.cc b/storage/pbxt/src/xaction_xt.cc index 48abc5d2b66..0d94449c3da 100644 --- a/storage/pbxt/src/xaction_xt.cc +++ b/storage/pbxt/src/xaction_xt.cc @@ -1123,7 +1123,6 @@ xtPublic void xt_xn_init_db(XTThreadPtr self, XTDatabaseHPtr db) */ for (u_int i=0; i<XT_XN_NO_OF_SEGMENTS; i++) { seg = &db->db_xn_idx[i]; - XT_XACT_INIT_LOCK(self, &seg->xs_tab_lock); seg->xs_last_xn_id = db->db_xn_curr_id; } diff --git a/vio/viosocket.c b/vio/viosocket.c index f47a7a10ad2..f780764cbe4 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -193,6 +193,11 @@ int vio_fastsend(Vio * vio __attribute__((unused))) int r=0; DBUG_ENTER("vio_fastsend"); + if (vio->type == VIO_TYPE_NAMEDPIPE ||vio->type == VIO_TYPE_SHARED_MEMORY) + { + DBUG_RETURN(0); + } + #if defined(IPTOS_THROUGHPUT) { int tos = IPTOS_THROUGHPUT; @@ -228,7 +233,7 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive) DBUG_ENTER("vio_keepalive"); DBUG_PRINT("enter", ("sd: %d set_keep_alive: %d", vio->sd, (int) set_keep_alive)); - if (vio->type != VIO_TYPE_NAMEDPIPE) + if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY) { if (set_keep_alive) opt = 1; |