diff options
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 623c0eff5b9..bfbf688c932 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4431,13 +4431,16 @@ restart: tbl->reginfo.lock_type= tables->lock_type; } #ifdef WITH_WSREP - /* + /* At this point we have SE associated with table so we can check wsrep_mode rules at this point. */ - if (WSREP(thd) && + if (WSREP(thd) && wsrep_thd_is_local(thd) && - !wsrep_check_mode_after_open_table(thd, tbl->file->ht->db_type)) + tbl && + tables == *start && + !wsrep_check_mode_after_open_table(thd, + tbl->file->ht, tables)) { error= TRUE; goto error; @@ -4445,35 +4448,7 @@ restart: #endif } -#ifdef WITH_WSREP - if (WSREP(thd) && - wsrep_replicate_myisam && - (*start) && - (*start)->table && - (*start)->table->file->ht == myisam_hton && - wsrep_thd_is_local(thd) && - !is_stat_table(&(*start)->db, &(*start)->alias) && - thd->get_command() != COM_STMT_PREPARE && - ((thd->lex->sql_command == SQLCOM_INSERT || - thd->lex->sql_command == SQLCOM_INSERT_SELECT || - thd->lex->sql_command == SQLCOM_REPLACE || - thd->lex->sql_command == SQLCOM_REPLACE_SELECT || - thd->lex->sql_command == SQLCOM_UPDATE || - thd->lex->sql_command == SQLCOM_UPDATE_MULTI || - thd->lex->sql_command == SQLCOM_LOAD || - thd->lex->sql_command == SQLCOM_DELETE))) - { - wsrep_before_rollback(thd, true); - wsrep_after_rollback(thd, true); - wsrep_after_statement(thd); - WSREP_TO_ISOLATION_BEGIN(NULL, NULL, (*start)); - } -#endif /* WITH_WSREP */ - error: -#ifdef WITH_WSREP -wsrep_error_label: -#endif THD_STAGE_INFO(thd, stage_after_opening_tables); thd_proc_info(thd, 0); |