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

Fix return code from check-warnings to indicate if test failed or not.

No more string matching


mysql-test/include/check-warnings.test:
  Check return value from check_warnings and call skip if ok
mysql-test/include/mtr_check.sql:
  Improve readability
mysql-test/include/mtr_warnings.sql:
  Add out parameter for result.
  Increase the max_allowed_packet variable so the load_file works
  even if the server is started with low such value
This commit is contained in:
unknown
2008-04-09 14:38:42 +02:00
parent fc0de68e00
commit 5242048883
4 changed files with 18 additions and 16 deletions

View File

@ -208,7 +208,7 @@ INSERT INTO global_supressions VALUES
-- Procedure that uses the above created tables to check
-- the servers error log for warnings
--
CREATE DEFINER=root@localhost PROCEDURE check_warnings()
CREATE DEFINER=root@localhost PROCEDURE check_warnings(OUT result INT)
BEGIN
-- Don't write these queries to binlog
@ -225,6 +225,7 @@ BEGIN
FROM information_schema.global_variables
WHERE variable_name='LOG_ERROR';
SET @@session.max_allowed_packet= 1024*1024*1024;
SET @text= load_file(@log_error);
-- select @text;
@ -269,8 +270,11 @@ BEGIN
SELECT line as log_error
FROM suspect_lines WHERE supressed=0;
SELECT * FROM test_supressions;
-- Return 2 -> check failed
SELECT 2 INTO result;
ELSE
SELECT "OK";
-- Return 0 -> OK
SELECT 0 INTO RESULT;
END IF;
-- Cleanup for next test