mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
WSREP_TO_ISOLATION_BEGIN should be called with the table list.
This commit is contained in:
@ -4706,17 +4706,6 @@ restart:
|
|||||||
if (!tbl)
|
if (!tbl)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (WSREP_ON &&
|
|
||||||
wsrep_replicate_myisam &&
|
|
||||||
tables &&
|
|
||||||
tbl->file->ht == myisam_hton &&
|
|
||||||
sqlcom_can_generate_row_events(thd) &&
|
|
||||||
thd->get_command() != COM_STMT_PREPARE &&
|
|
||||||
tables->lock_type >= TL_WRITE_ALLOW_WRITE)
|
|
||||||
{
|
|
||||||
WSREP_TO_ISOLATION_BEGIN(NULL, NULL, tables);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Schema tables may not have a TABLE object here. */
|
/* Schema tables may not have a TABLE object here. */
|
||||||
if (tbl->file->ht->db_type == DB_TYPE_MRG_MYISAM)
|
if (tbl->file->ht->db_type == DB_TYPE_MRG_MYISAM)
|
||||||
{
|
{
|
||||||
@ -4743,6 +4732,17 @@ restart:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (WSREP_ON &&
|
||||||
|
wsrep_replicate_myisam &&
|
||||||
|
(*start) &&
|
||||||
|
(*start)->table &&
|
||||||
|
(*start)->table->file->ht == myisam_hton &&
|
||||||
|
sqlcom_can_generate_row_events(thd) &&
|
||||||
|
thd->get_command() != COM_STMT_PREPARE)
|
||||||
|
{
|
||||||
|
WSREP_TO_ISOLATION_BEGIN(NULL, NULL, (*start));
|
||||||
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
THD_STAGE_INFO(thd, stage_after_opening_tables);
|
THD_STAGE_INFO(thd, stage_after_opening_tables);
|
||||||
thd_proc_info(thd, 0);
|
thd_proc_info(thd, 0);
|
||||||
|
@ -1091,7 +1091,6 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd,
|
|||||||
if (db || table)
|
if (db || table)
|
||||||
{
|
{
|
||||||
TABLE_LIST tmp_table;
|
TABLE_LIST tmp_table;
|
||||||
MDL_request mdl_request;
|
|
||||||
|
|
||||||
memset(&tmp_table, 0, sizeof(tmp_table));
|
memset(&tmp_table, 0, sizeof(tmp_table));
|
||||||
tmp_table.table_name= (char*)table;
|
tmp_table.table_name= (char*)table;
|
||||||
@ -1683,7 +1682,7 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
|
|||||||
}
|
}
|
||||||
else if (granted_thd->lex->sql_command == SQLCOM_FLUSH)
|
else if (granted_thd->lex->sql_command == SQLCOM_FLUSH)
|
||||||
{
|
{
|
||||||
WSREP_DEBUG("mdl granted over FLUSH BF");
|
WSREP_DEBUG("MDL granted over FLUSH BF");
|
||||||
ticket->wsrep_report(wsrep_debug);
|
ticket->wsrep_report(wsrep_debug);
|
||||||
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
|
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
@ -1698,7 +1697,7 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
|
|||||||
}
|
}
|
||||||
else if (granted_thd->wsrep_query_state == QUERY_COMMITTING)
|
else if (granted_thd->wsrep_query_state == QUERY_COMMITTING)
|
||||||
{
|
{
|
||||||
WSREP_DEBUG("mdl granted, but commiting thd abort scheduled");
|
WSREP_DEBUG("MDL granted, but committing thd abort scheduled");
|
||||||
ticket->wsrep_report(wsrep_debug);
|
ticket->wsrep_report(wsrep_debug);
|
||||||
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
|
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
|
||||||
wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1);
|
wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1);
|
||||||
|
Reference in New Issue
Block a user