File tree 4 files changed +18
-16
lines changed
4 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 4
4
# for unexpected warnings found in the servers error log
5
5
#
6
6
--disable_query_log
7
- call mtr.check_warnings();
7
+ call mtr.check_warnings(@result);
8
+ if (`select @result = 0`){
9
+ skip OK;
10
+ }
11
+ echo Found warnings;
8
12
--enable_query_log
Original file line number Diff line number Diff line change 19
19
SELECT * FROM INFORMATION_SCHEMA .SCHEMATA ;
20
20
21
21
-- The test database should not contain any tables
22
- SELECT table_name FROM INFORMATION_SCHEMA .TABLES
22
+ SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA .TABLES
23
23
WHERE table_schema= ' test' ;
24
24
25
25
-- Show "mysql" database, tables and columns
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ INSERT INTO global_supressions VALUES
208
208
-- Procedure that uses the above created tables to check
209
209
-- the servers error log for warnings
210
210
--
211
- CREATE DEFINER= root@localhost PROCEDURE check_warnings()
211
+ CREATE DEFINER= root@localhost PROCEDURE check_warnings(OUT result INT )
212
212
BEGIN
213
213
214
214
-- Don't write these queries to binlog
@@ -225,6 +225,7 @@ BEGIN
225
225
FROM information_schema .global_variables
226
226
WHERE variable_name= ' LOG_ERROR' ;
227
227
228
+ SET @@session .max_allowed_packet = 1024 * 1024 * 1024 ;
228
229
SET @text = load_file(@log_error);
229
230
-- select @text;
230
231
@@ -269,8 +270,11 @@ BEGIN
269
270
SELECT line as log_error
270
271
FROM suspect_lines WHERE supressed= 0 ;
271
272
SELECT * FROM test_supressions;
273
+ -- Return 2 -> check failed
274
+ SELECT 2 INTO result;
272
275
ELSE
273
- SELECT " OK" ;
276
+ -- Return 0 -> OK
277
+ SELECT 0 INTO RESULT;
274
278
END IF;
275
279
276
280
-- Cleanup for next test
Original file line number Diff line number Diff line change @@ -2568,22 +2568,16 @@ ($$)
2568
2568
if ( $res == 0 )
2569
2569
{
2570
2570
my $report = mtr_grab_file($errfile );
2571
- if ($report ne " OK\n OK\n " )
2572
- {
2573
- # Log to var/log/warnings file
2574
- mtr_tofile(" $opt_vardir /log/warnings" ,
2571
+ # Log to var/log/warnings file
2572
+ mtr_tofile(" $opt_vardir /log/warnings" ,
2575
2573
$tname ." \n " ,
2576
2574
$report );
2577
2575
2578
- $res = 1;
2579
- $tinfo -> {' warnings' }.= $report ;
2580
-
2581
- }
2576
+ $res = 1;
2577
+ $tinfo -> {' warnings' }.= $report ;
2582
2578
}
2583
- elsif ( $res == 62 )
2584
- {
2585
- # One of the features needed to run check_warnings.test was not
2586
- # available, check skipped
2579
+ elsif ( $res == 62 ) {
2580
+ # Test case was ok and called "skip"
2587
2581
$res = 0;
2588
2582
}
2589
2583
elsif ( $res )
You can’t perform that action at this time.
0 commit comments