summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-06-11 19:28:18 +0400
committerKonstantin Osipov <kostja@sun.com>2010-06-11 19:28:18 +0400
commitb14045660153fc48065774a9bc8a955b2eba093d (patch)
tree9998d9537c3b226707064a868b61c3cb61c4b1c1 /sql/repl_failsafe.cc
parent218bf86cd9bcea47da1bd6db935223ae15d3129f (diff)
downloadmariadb-git-b14045660153fc48065774a9bc8a955b2eba093d.tar.gz
WL#5419 "LOCK_open scalability: make tdc_refresh_version
an atomic counter" Split the large LOCK_open section in open_table(). Do not call open_table_from_share() under LOCK_open. Remove thd->version. This fixes Bug#50589 "Server hang on a query evaluated using a temporary table" Bug#51557 "LOCK_open and kernel_mutex are not happy together" Bug#49463 "LOCK_table and innodb are not nice when handler instances are created". This patch has effect on storage engines that rely on ha_open() PSEA method being called under LOCK_open. In particular: 1) NDB is broken and left unfixed. NDB relies on LOCK_open being kept as part of ha_open(), since it uses auto-discovery. While previously the NDB open code was race-prone, now it simply fails on asserts. 2) HEAP engine had a race in ha_heap::open() when a share for the same table could be added twice to the list of shares, or a dangling reference to a share stored in HEAP handler. This patch aims to address this problem by 'pinning' the newly created share in the internal HEAP engine share list until at least one handler instance is created using that share.
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r--sql/repl_failsafe.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index cddf798aac0..81366d55fc6 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -102,7 +102,6 @@ static int init_failsafe_rpl_thread(THD* thd)
thd->mem_root->free= thd->mem_root->used= 0;
thd_proc_info(thd, "Thread initialized");
- thd->version=refresh_version;
thd->set_time();
DBUG_RETURN(0);
}