summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-11-02 15:35:31 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-11-02 15:35:31 +0100
commite26b30d1bbb6e9c8c8de386f6f8b5759d0ab8fb9 (patch)
tree9a786ac249615c7d97ad0c72c996d4e707d5a5cd /mysql-test/main
parent7846c56fbec72941abd8bada25ac63fc4eb94552 (diff)
parenteb2c3d38e4c9167b385aeb5b3660eb01359f6820 (diff)
downloadmariadb-git-e26b30d1bbb6e9c8c8de386f6f8b5759d0ab8fb9.tar.gz
Merge branch '10.4' into 10.5
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/sp-no-valgrind.result25
-rw-r--r--mysql-test/main/sp-no-valgrind.test26
-rw-r--r--mysql-test/main/sp.result19
-rw-r--r--mysql-test/main/sp.test18
4 files changed, 51 insertions, 37 deletions
diff --git a/mysql-test/main/sp-no-valgrind.result b/mysql-test/main/sp-no-valgrind.result
new file mode 100644
index 00000000000..bc5809ba79e
--- /dev/null
+++ b/mysql-test/main/sp-no-valgrind.result
@@ -0,0 +1,25 @@
+# MDEV-20699 do not cache SP in SHOW CREATE
+# Warmup round, this might allocate some memory for session variable
+# 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;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp0 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp0`()
+SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
+DROP PROCEDURE sp0;
+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;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+sp1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
+SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
+SELECT VARIABLE_VALUE-@local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
+VARIABLE_VALUE-@local_mem_used
+0
+DROP PROCEDURE sp1;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/main/sp-no-valgrind.test b/mysql-test/main/sp-no-valgrind.test
new file mode 100644
index 00000000000..89f8250bf72
--- /dev/null
+++ b/mysql-test/main/sp-no-valgrind.test
@@ -0,0 +1,26 @@
+
+--source include/not_valgrind.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 #
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index 135734a513d..6c0dd6d4c8a 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -8872,25 +8872,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
BEGIN
RETURN '';
END' at line 2
-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;
-Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-sp0 STRICT_ALL_TABLES CREATE DEFINER=`root`@`localhost` PROCEDURE `sp0`()
-SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
-DROP PROCEDURE sp0;
-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;
-Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-sp1 STRICT_ALL_TABLES CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
-SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
-SELECT VARIABLE_VALUE-@local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
-VARIABLE_VALUE-@local_mem_used
-0
-DROP PROCEDURE sp1;
# End of 10.3 tests
#
# Start of 10.4 tests
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 18e3e1bd499..681ffa3fb33 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -10419,24 +10419,6 @@ END;
$$
DELIMITER ;$$
-# MDEV-20699 do not cache SP in SHOW CREATE
-# Warmup round, this might allocate some memory for session variable
-# 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 # End of 10.3 tests