Skip to content

Commit ddb93b4

Browse files
author
Nirbhay Choubey
committed
WSREP_TO_ISOLATION_BEGIN should be called with the table list.
1 parent 950e6f5 commit ddb93b4

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

sql/sql_base.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4706,17 +4706,6 @@ bool open_tables(THD *thd, const DDL_options_st &options,
47064706
if (!tbl)
47074707
continue;
47084708

4709-
if (WSREP_ON &&
4710-
wsrep_replicate_myisam &&
4711-
tables &&
4712-
tbl->file->ht == myisam_hton &&
4713-
sqlcom_can_generate_row_events(thd) &&
4714-
thd->get_command() != COM_STMT_PREPARE &&
4715-
tables->lock_type >= TL_WRITE_ALLOW_WRITE)
4716-
{
4717-
WSREP_TO_ISOLATION_BEGIN(NULL, NULL, tables);
4718-
}
4719-
47204709
/* Schema tables may not have a TABLE object here. */
47214710
if (tbl->file->ht->db_type == DB_TYPE_MRG_MYISAM)
47224711
{
@@ -4743,6 +4732,17 @@ bool open_tables(THD *thd, const DDL_options_st &options,
47434732
}
47444733
}
47454734

4735+
if (WSREP_ON &&
4736+
wsrep_replicate_myisam &&
4737+
(*start) &&
4738+
(*start)->table &&
4739+
(*start)->table->file->ht == myisam_hton &&
4740+
sqlcom_can_generate_row_events(thd) &&
4741+
thd->get_command() != COM_STMT_PREPARE)
4742+
{
4743+
WSREP_TO_ISOLATION_BEGIN(NULL, NULL, (*start));
4744+
}
4745+
47464746
error:
47474747
THD_STAGE_INFO(thd, stage_after_opening_tables);
47484748
thd_proc_info(thd, 0);

sql/wsrep_mysqld.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,6 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd,
10911091
if (db || table)
10921092
{
10931093
TABLE_LIST tmp_table;
1094-
MDL_request mdl_request;
10951094

10961095
memset(&tmp_table, 0, sizeof(tmp_table));
10971096
tmp_table.table_name= (char*)table;
@@ -1683,7 +1682,7 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
16831682
}
16841683
else if (granted_thd->lex->sql_command == SQLCOM_FLUSH)
16851684
{
1686-
WSREP_DEBUG("mdl granted over FLUSH BF");
1685+
WSREP_DEBUG("MDL granted over FLUSH BF");
16871686
ticket->wsrep_report(wsrep_debug);
16881687
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
16891688
ret = TRUE;
@@ -1698,7 +1697,7 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
16981697
}
16991698
else if (granted_thd->wsrep_query_state == QUERY_COMMITTING)
17001699
{
1701-
WSREP_DEBUG("mdl granted, but commiting thd abort scheduled");
1700+
WSREP_DEBUG("MDL granted, but committing thd abort scheduled");
17021701
ticket->wsrep_report(wsrep_debug);
17031702
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
17041703
wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1);

0 commit comments

Comments
 (0)