mariadb/mysql-test/main/sp-no-valgrind.test
Monty 20f22dfa2f Fixed some tests that failes when built with valgrind
Example build: ./BUILD/compile-pentium64-valgrind-max

Fixes:
- sp-no-valgrind failed if binary was built for valgrind as in this case
  mem_root is allocated in very small hunks which the test cannot handle.
  Fixed by testing of valgrind build
- truncate_notembedded failed in reap because of more memory used.
  Fixed by allowing reap to fail too
2021-12-15 23:29:04 +02:00

26 lines
1.2 KiB
Text

--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 #