1SET SESSION min_examined_row_limit=0; 2SET SESSION long_query_time=0; 3CREATE PROCEDURE test_inner() 4BEGIN 5SELECT 2; 6END^ 7CREATE PROCEDURE test_outer() 8BEGIN 9SELECT 1; 10CALL test_inner(); 11END^ 12PREPARE stmt FROM "CALL test_outer()"; 13SET @saved_log_slow_sp_statements=@@GLOBAL.log_slow_sp_statements; 14SET GLOBAL log_slow_sp_statements=ON; 15[log_start.inc] percona.slow_extended.sp1 16SELECT "log_always"; 17log_always 18log_always 19CALL test_outer(); 201 211 222 232 24EXECUTE stmt; 251 261 272 282 29[log_stop.inc] percona.slow_extended.sp1 30[log_grep.inc] file: percona.slow_extended.sp1 pattern: log_always 31[log_grep.inc] lines: 1 32[log_grep.inc] file: percona.slow_extended.sp1 pattern: SELECT 1; 33[log_grep.inc] lines: 2 34[log_grep.inc] file: percona.slow_extended.sp1 pattern: SELECT 2; 35[log_grep.inc] lines: 2 36[log_grep.inc] file: percona.slow_extended.sp1 pattern: CALL test_ 37[log_grep.inc] lines: 0 38[log_grep.inc] file: percona.slow_extended.sp1 pattern: # Stored_routine: test.test_outer 39[log_grep.inc] lines: 2 40[log_grep.inc] file: percona.slow_extended.sp1 pattern: # Stored_routine: test.test_inner 41[log_grep.inc] lines: 2 42SET GLOBAL log_slow_sp_statements=OFF; 43[log_start.inc] percona.slow_extended.sp2 44SELECT "log_always"; 45log_always 46log_always 47CALL test_outer(); 481 491 502 512 52EXECUTE stmt; 531 541 552 562 57[log_stop.inc] percona.slow_extended.sp2 58[log_grep.inc] file: percona.slow_extended.sp2 pattern: log_always 59[log_grep.inc] lines: 1 60[log_grep.inc] file: percona.slow_extended.sp2 pattern: SELECT 1; 61[log_grep.inc] lines: 0 62[log_grep.inc] file: percona.slow_extended.sp2 pattern: SELECT 2; 63[log_grep.inc] lines: 0 64[log_grep.inc] file: percona.slow_extended.sp2 pattern: CALL test_ 65[log_grep.inc] lines: 2 66[log_grep.inc] file: percona.slow_extended.sp2 pattern: # Stored_routine: test.test_ 67[log_grep.inc] lines: 0 68SET GLOBAL log_slow_sp_statements=OFF_NO_CALLS; 69[log_start.inc] percona.slow_extended.sp3 70SELECT "log_always"; 71log_always 72log_always 73CALL test_outer(); 741 751 762 772 78EXECUTE stmt; 791 801 812 822 83[log_stop.inc] percona.slow_extended.sp3 84[log_grep.inc] file: percona.slow_extended.sp3 pattern: log_always 85[log_grep.inc] lines: 1 86[log_grep.inc] file: percona.slow_extended.sp3 pattern: SELECT 1; 87[log_grep.inc] lines: 0 88[log_grep.inc] file: percona.slow_extended.sp3 pattern: SELECT 2; 89[log_grep.inc] lines: 0 90[log_grep.inc] file: percona.slow_extended.sp3 pattern: CALL test_ 91[log_grep.inc] lines: 0 92[log_grep.inc] file: percona.slow_extended.sp3 pattern: # Stored_routine: test.test_ 93[log_grep.inc] lines: 0 94DROP PROCEDURE test_outer; 95DROP PROCEDURE test_inner; 96SET GLOBAL log_slow_sp_statements=@saved_log_slow_sp_statements; 97