1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixing a failure in tests for "MDEV-18892 Regression in slow log and admin statements"

Tests for MDEV-18892 failed, because of extra 'Prepare' and 'Close stmt'
entries in the output.

Filtering out PS related entries (where it is necessary).
This commit is contained in:
Alexander Barkov
2019-03-21 08:48:44 +04:00
parent ef81d2ea64
commit e9c494c843
2 changed files with 22 additions and 4 deletions

View File

@ -19,6 +19,14 @@ BEGIN
WHERE sql_text NOT LIKE '%debug_dbug%';
END
$$
CREATE PROCEDURE show_slow_log_exclude_ps()
BEGIN
SELECT CONCAT('[slow] ', sql_text) AS sql_text
FROM mysql.slow_log
WHERE sql_text NOT LIKE '%debug_dbug%'
AND sql_text NOT IN ('Prepare','Close stmt');
END
$$
DELIMITER ;$$
@ -42,7 +50,7 @@ PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP TABLE t4;
CALL show_slow_log();
CALL show_slow_log_exclude_ps();
--echo #
@ -111,7 +119,7 @@ PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP TABLE t4;
CALL show_slow_log();
CALL show_slow_log_exclude_ps();
--echo #
@ -124,3 +132,4 @@ SET @@global.slow_query_log= @org_slow_query_log;
SET @@global.log_output= @org_log_output;
SET @@global.log_slow_admin_statements= @org_log_slow_admin_statements;
DROP PROCEDURE show_slow_log;
DROP PROCEDURE show_slow_log_exclude_ps;