diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/nested_profiling.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/nested_profiling.test')
-rw-r--r-- | mysql-test/main/nested_profiling.test | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/main/nested_profiling.test b/mysql-test/main/nested_profiling.test new file mode 100644 index 00000000..eff348ea --- /dev/null +++ b/mysql-test/main/nested_profiling.test @@ -0,0 +1,44 @@ +# ==== Purpose ==== +# +# Test verifies that "init_connect" and "init_slave" system variables work +# fine when "profiling=on". +# +# ==== Implementation ==== +# +# Steps: +# 0 - Create regular user without super privilege so that "init_connect" +# variable is effective. +# 1 - Enable profiling. +# 2 - Start a new connection which will try to execute the statements +# specified in "init_connect". No assert should be reported. +# 3 - Execute SHOW PROFILES to verify that statements specified in +# "init_connect" are displayed as part of profiling. +# +# ==== References ==== +# +# MDEV-22706: Assertion `!current' failed in PROFILING::start_new_query +# +--source include/not_embedded.inc +--source include/have_profiling.inc + +SET @saved_profiling=@@GLOBAL.profiling; +SET @saved_init_connect=@@GLOBAL.init_connect; +SET GLOBAL init_connect="set @a=2;set @b=3"; +SET GLOBAL profiling=on; + +create user mysqltest1@localhost; +connect (con1,localhost,mysqltest1,,); +connection con1; +--disable_ps2_protocol +SELECT @a, @b; +--enable_ps2_protocol +--replace_column 2 # +SHOW PROFILES; + +#========== Clean up =========== +connection default; +disconnect con1; +DROP USER mysqltest1@localhost; + +SET GLOBAL profiling=@saved_profiling; +SET GLOBAL init_connect=@saved_init_connect; |