1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-22681 EXECUTE IMMEDIATE crashes server if wsrep is on.

A wsrep transaction was started for EXECUTE IMMEDIATE, which
caused assertion failure when the executed statement was
CREATE TABLE which should be executed in TOI mode.

As a fix, don't start wsrep transaction for EXECUTE IMMEDIATE
to let the wsrep state logic to be handled from inside stored
procedure codepath.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
Teemu Ollakka
2020-10-25 11:17:27 +02:00
committed by Jan Lindström
parent 46c273892e
commit ec0e9d6f76
6 changed files with 241 additions and 3 deletions

View File

@ -3792,6 +3792,7 @@ mysql_execute_command(THD *thd)
lex->sql_command != SQLCOM_BEGIN &&
lex->sql_command != SQLCOM_CALL &&
lex->sql_command != SQLCOM_EXECUTE &&
lex->sql_command != SQLCOM_EXECUTE_IMMEDIATE &&
!(sql_command_flags[lex->sql_command] & CF_AUTO_COMMIT_TRANS))
{
wsrep_start_trx_if_not_started(thd);