diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-18 01:47:48 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-18 09:50:26 +0200 |
commit | 7970ac7fe87d1da34e3e212dccd57b112b94b3fe (patch) | |
tree | 4efda64ba55c4934469f61bda2013f92545dce1b /sql/sql_parse.cc | |
parent | b03ab1270d24c1fe011aa50f9e6b495c6d508706 (diff) | |
parent | 23ddc3518f999e003d54f7a069b63b73585588aa (diff) | |
download | mariadb-git-7970ac7fe87d1da34e3e212dccd57b112b94b3fe.tar.gz |
Merge branch '10.4' into 10.5mariadb-10.5.16
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3ce468d136a..bd35e473018 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1465,22 +1465,6 @@ static bool deny_updates_if_read_only_option(THD *thd, TABLE_LIST *all_tables) } #ifdef WITH_WSREP -static my_bool wsrep_read_only_option(THD *thd, TABLE_LIST *all_tables) -{ - int opt_readonly_saved = opt_readonly; - privilege_t flag_saved= thd->security_ctx->master_access & PRIV_IGNORE_READ_ONLY; - - opt_readonly = 0; - thd->security_ctx->master_access &= ~PRIV_IGNORE_READ_ONLY; - - my_bool ret = !deny_updates_if_read_only_option(thd, all_tables); - - opt_readonly = opt_readonly_saved; - thd->security_ctx->master_access |= flag_saved; - - return ret; -} - static void wsrep_copy_query(THD *thd) { thd->wsrep_retry_command = thd->get_command(); @@ -7911,7 +7895,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, { bool is_autocommit= !thd->in_multi_stmt_transaction_mode() && - wsrep_read_only_option(thd, thd->lex->query_tables); + !thd->wsrep_applier; bool retry_autocommit; do { |