1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merging revision from codership-mysql/5.5 (r3928..3968) and

codership-mysql/5.6 (r4021..4065).
- Also contains fixes for some build failures.
This commit is contained in:
Nirbhay Choubey
2014-03-27 16:26:00 -04:00
57 changed files with 2161 additions and 722 deletions

View File

@@ -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);
}