blob: bc5809ba79e649c688de44eead04b6c18d8c0a39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
#
|