1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -820,11 +820,7 @@ void do_handle_bootstrap(THD *thd)
if (my_thread_init() || thd->store_globals())
{
#ifndef EMBEDDED_LIBRARY
#ifdef WITH_WSREP
close_connection(thd, ER_OUT_OF_RESOURCES, 1);
#else
close_connection(thd, ER_OUT_OF_RESOURCES);
#endif /* WITH_WSREP */
#endif
thd->fatal_error();
goto end;
@ -2736,7 +2732,9 @@ mysql_execute_command(THD *thd)
if (trans_commit_implicit(thd))
{
thd->mdl_context.release_transactional_locks();
#ifdef WITH_WSREP
WSREP_DEBUG("implicit commit failed, MDL released: %lu", thd->thread_id);
#endif /* WITH_WSREP */
goto error;
}
/* Release metadata locks acquired in this transaction. */
@ -4758,7 +4756,9 @@ end_with_restore_list:
if (trans_begin(thd, lex->start_transaction_opt))
{
thd->mdl_context.release_transactional_locks();
#ifdef WITH_WSREP
WSREP_DEBUG("BEGIN failed, MDL released: %lu", thd->thread_id);
#endif /* WITH_WSREP */
goto error;
}
my_ok(thd);
@ -4776,7 +4776,9 @@ end_with_restore_list:
if (trans_commit(thd))
{
thd->mdl_context.release_transactional_locks();
#ifdef WITH_WSREP
WSREP_DEBUG("COMMIT failed, MDL released: %lu", thd->thread_id);
#endif /* WITH_WSREP */
goto error;
}
thd->mdl_context.release_transactional_locks();
@ -4802,9 +4804,9 @@ end_with_restore_list:
if (WSREP(thd)) {
if (thd->wsrep_conflict_state == NO_CONFLICT ||
thd->wsrep_conflict_state == REPLAYING)
thd->wsrep_conflict_state == REPLAYING)
{
my_ok(thd);
my_ok(thd);
}
} else {
#endif /* WITH_WSREP */
@ -4828,7 +4830,9 @@ end_with_restore_list:
if (trans_rollback(thd))
{
thd->mdl_context.release_transactional_locks();
#ifdef WITH_WSREP
WSREP_DEBUG("rollback failed, MDL released: %lu", thd->thread_id);
#endif /* WITH_WSREP */
goto error;
}
thd->mdl_context.release_transactional_locks();
@ -4850,7 +4854,7 @@ end_with_restore_list:
#ifdef WITH_WSREP
if (WSREP(thd)) {
if (thd->wsrep_conflict_state == NO_CONFLICT) {
my_ok(thd);
my_ok(thd);
}
} else {
#endif /* WITH_WSREP */
@ -5375,7 +5379,9 @@ create_sp_error:
if (trans_xa_commit(thd))
{
thd->mdl_context.release_transactional_locks();
#ifdef WITH_WSREP
WSREP_DEBUG("XA commit failed, MDL released: %lu", thd->thread_id);
#endif /* WITH_WSREP */
goto error;
}
thd->mdl_context.release_transactional_locks();
@ -5391,7 +5397,9 @@ create_sp_error:
if (trans_xa_rollback(thd))
{
thd->mdl_context.release_transactional_locks();
#ifdef WITH_WSREP
WSREP_DEBUG("XA rollback failed, MDL released: %lu", thd->thread_id);
#endif /* WITH_WSREP */
goto error;
}
thd->mdl_context.release_transactional_locks();
@ -7930,7 +7938,7 @@ kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type typ
#ifdef WITH_WSREP
if (((thd->security_ctx->master_access & SUPER_ACL) ||
thd->security_ctx->user_matches(tmp->security_ctx)) &&
!wsrep_thd_is_brute_force((void *)tmp))
!wsrep_thd_is_BF((void *)tmp, true))
#else
if ((thd->security_ctx->master_access & SUPER_ACL) ||
thd->security_ctx->user_matches(tmp->security_ctx))