diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2022-03-15 16:28:33 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2022-03-15 16:28:33 +0400 |
commit | 905a453ff78fb998764b6c4e675c6de8a2e2b3f3 (patch) | |
tree | 83ed9844d5dd27e7c43a5120c0720fdb5014c00e /sql/sql_parse.cc | |
parent | 086a212d96b7693d1bacf67e3ad14627fb802269 (diff) | |
download | mariadb-git-bb-10.7-mdev-27159-insert-hf.tar.gz |
MDEV-27159 Re-design the upper level of handling DML commands.bb-10.7-mdev-27159-insert-hf
Sql_cmd_insert class introduced.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 47d42f939cf..eb091ddfcd1 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4392,11 +4392,21 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt) break; } case SQLCOM_REPLACE: + { if ((res= generate_incident_event(thd))) break; /* fall through */ case SQLCOM_INSERT: - { + if (lex->sql_command == SQLCOM_INSERT && + all_tables->lock_type != TL_WRITE_DELAYED) + { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); + DBUG_ASSERT(first_table == all_tables && first_table != 0); + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); + res= lex->m_sql_cmd->execute(thd); + break; + } + /* insert */ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); select_result *sel_result= NULL; DBUG_ASSERT(first_table == all_tables && first_table != 0); |