Commit e78ce632 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-17711 Assertion `arena_for_set_stmt== 0' failed in...

MDEV-17711 Assertion `arena_for_set_stmt== 0' failed in LEX::set_arena_for_set_stmt upon SET STATEMENT

restore SET STATEMENT variables between statements in a multi-statement
parent 28f77257
......@@ -1271,4 +1271,16 @@ SET sql_mode=ORACLE;
SET STATEMENT max_statement_time=30 FOR DELETE FROM mysql.user where user = 'unknown';
SET sql_mode=default;
SET STATEMENT max_statement_time=30 FOR DELETE FROM mysql.user where user = 'unknown';
#
# MDEV-17711 Assertion `arena_for_set_stmt== 0' failed in LEX::set_arena_for_set_stmt upon SET STATEMENT
#
set rand_seed1=1, rand_seed2=2;
set statement rand_seed1=4 for select 2, @@rand_seed1, @@rand_seed2;
set statement rand_seed2=5 for select 3, @@rand_seed1, @@rand_seed2 $
2 @@rand_seed1 @@rand_seed2
2 4 2
3 @@rand_seed1 @@rand_seed2
3 1 5
#
# End of 10.4 tests
#
......@@ -1191,4 +1191,16 @@ SET STATEMENT max_statement_time=30 FOR DELETE FROM mysql.user where user = 'unk
SET sql_mode=default;
SET STATEMENT max_statement_time=30 FOR DELETE FROM mysql.user where user = 'unknown';
--echo #
--echo # MDEV-17711 Assertion `arena_for_set_stmt== 0' failed in LEX::set_arena_for_set_stmt upon SET STATEMENT
--echo #
--delimiter $
set rand_seed1=1, rand_seed2=2;
set statement rand_seed1=4 for select 2, @@rand_seed1, @@rand_seed2;
set statement rand_seed2=5 for select 3, @@rand_seed1, @@rand_seed2 $
--delimiter ;
--echo #
--echo # End of 10.4 tests
--echo #
......@@ -1901,6 +1901,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
MYSQL_QUERY_DONE(thd->is_error());
}
thd->lex->restore_set_statement_var();
#if defined(ENABLED_PROFILING)
thd->profiling.finish_current_query();
thd->profiling.start_new_query("continuing");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment