summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-03-27 16:26:00 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-03-27 16:26:00 -0400
commit02ba2bfdb444531e6fe61716a4eaeab40e210bbd (patch)
tree0b67ad5b8f6e8a901ed2b6cac8d4692d8db8f112 /sql/sql_class.cc
parent09e3094945694277a550cccc8bd1fd11338474b1 (diff)
parentc5f7486654d7fd4941b202735799f9a7ec3c15eb (diff)
downloadmariadb-git-02ba2bfdb444531e6fe61716a4eaeab40e210bbd.tar.gz
Merging revision from codership-mysql/5.5 (r3928..3968) and
codership-mysql/5.6 (r4021..4065). - Also contains fixes for some build failures.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index d979df6dc33..7b48d86603e 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -66,6 +66,7 @@
#include "lock.h"
#ifdef WITH_WSREP
#include "wsrep_mysqld.h"
+#include "wsrep_thd.h"
#endif
#include "sql_connect.h"
@@ -958,6 +959,10 @@ extern "C" void wsrep_thd_awake(THD *thd, my_bool signal)
mysql_mutex_unlock(&LOCK_wsrep_replaying);
}
}
+extern "C" int wsrep_thd_retry_counter(THD *thd)
+{
+ return(thd->wsrep_retry_counter);
+}
extern int
wsrep_trx_order_before(void *thd1, void *thd2)
@@ -2129,7 +2134,19 @@ bool THD::notify_shared_lock(MDL_context_owner *ctx_in_use,
(e.g. see partitioning code).
*/
if (!thd_table->needs_reopen())
+#ifdef WITH_WSREP
+ {
+ signalled|= mysql_lock_abort_for_thread(this, thd_table);
+ if (this && WSREP(this) && wsrep_thd_is_BF((void *)this, FALSE))
+ {
+ WSREP_DEBUG("remove_table_from_cache: %llu",
+ (unsigned long long) this->real_id);
+ wsrep_abort_thd((void *)this, (void *)in_use, FALSE);
+ }
+ }
+#else
signalled|= mysql_lock_abort_for_thread(this, thd_table);
+#endif
}
mysql_mutex_unlock(&in_use->LOCK_thd_data);
}