summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/sp-no-valgrind.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/sp-no-valgrind.test
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/sp-no-valgrind.test')
-rw-r--r--mysql-test/main/sp-no-valgrind.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/main/sp-no-valgrind.test b/mysql-test/main/sp-no-valgrind.test
new file mode 100644
index 00000000..6bacc7b1
--- /dev/null
+++ b/mysql-test/main/sp-no-valgrind.test
@@ -0,0 +1,26 @@
+--source include/not_msan.inc
+--source include/not_valgrind_build.inc
+
+--echo # MDEV-20699 do not cache SP in SHOW CREATE
+--echo # Warmup round, this might allocate some memory for session variable
+--echo # and the output
+
+SELECT VARIABLE_VALUE into @global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
+SELECT VARIABLE_VALUE into @local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
+CREATE PROCEDURE sp0() SELECT 1;
+SHOW CREATE PROCEDURE sp0;
+DROP PROCEDURE sp0;
+
+#Check that CREATE/SHOW does not use memory in caches.
+SELECT VARIABLE_VALUE into @global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
+SELECT VARIABLE_VALUE into @local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
+CREATE PROCEDURE sp1() SELECT 1;
+SHOW CREATE PROCEDURE sp1;
+SELECT VARIABLE_VALUE-@local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
+# FIXME: MDEV-26754 main.sp test fails for embedded server
+#SELECT VARIABLE_VALUE-@global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
+DROP PROCEDURE sp1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #