diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-01 11:32:21 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-01 12:03:55 +0300 |
commit | ea2bc974dce2ac509011807c80b36192cd18f686 (patch) | |
tree | afbed3c29a2af90c44af2f086c6eb0d83c909840 /mysql-test/t/nested_profiling.test | |
parent | fbfb5b5f68a428ec819bc09d14b30cebf660b37b (diff) | |
parent | 1ea266f3ef36e779d23697b18cb94e1b0f8e65ef (diff) | |
download | mariadb-git-bb-10.2-merge.tar.gz |
Merge 10.1 into 10.2bb-10.2-merge
Diffstat (limited to 'mysql-test/t/nested_profiling.test')
-rw-r--r-- | mysql-test/t/nested_profiling.test | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/t/nested_profiling.test b/mysql-test/t/nested_profiling.test new file mode 100644 index 00000000000..ba89aefc647 --- /dev/null +++ b/mysql-test/t/nested_profiling.test @@ -0,0 +1,42 @@ +# ==== 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; +SELECT @a, @b; +--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; |