From 3f15c920aebf161f27c81397446e58e0827863ba Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 10:37:40 +0100 Subject: [PATCH 01/22] WL#4189 mtr.pl v2 - Rewrite "check testcase" to use LOAD DATA INFILE instead of 'load_file' in order to speed up the reading of the servers error log. --- mysql-test/include/check-warnings.test | 38 ++++++++++++++++++++++++++ mysql-test/include/mtr_warnings.sql | 30 -------------------- 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index 9f404201ab8..ef0e92df29c 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -4,6 +4,44 @@ # for unexpected warnings found in the servers error log # --disable_query_log + +# Turn off any debug crashes, allow the variable to be +# non existent in release builds +--error 0,1193 +set debug=""; + +use mtr; + +create temporary table error_log ( + row int auto_increment primary key, + line varchar(1024) null +) engine=myisam; + +# Get the name of servers error log +let $log_error= query_get_value(show variables like 'log_error', Value, 1); + +# Try to load the error log into the temporary table +--error 0,1085 +eval load data infile '$log_error' into table error_log (line); +if ($mysql_errno) +{ + # The error log was not world readable, this is normally + # caused by a "flush logs" in the test program. mysqld + # will then rename the error log to .err-old and open + # a new error log file that is not world readable. + # chmod the error log file and try to open it again + chmod 0644 $log_error; + eval load data infile '$log_error' into table error_log (line); + + # Also load the .err-old file where there might be + # additional warnings + let $old_log_error = $log_error-old; + chmod 0644 $old_log_error; + eval load data infile '$old_log_error' into table error_log (line); +} + +# Call check_warnings to filter out any warning in +# the error_log table call mtr.check_warnings(@result); if (`select @result = 0`){ skip OK; diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 3da64fbd791..b65a6ae69ba 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -219,40 +219,10 @@ INSERT INTO global_suppressions VALUES -- CREATE DEFINER=root@localhost PROCEDURE check_warnings(OUT result INT) BEGIN - DECLARE `text` mediumtext charset utf8; DECLARE `pos` bigint unsigned; -- Don't write these queries to binlog SET SQL_LOG_BIN=0; - -- - -- Load the server .err file into "error_log" table - -- - CREATE TEMPORARY TABLE error_log ( - row INT AUTO_INCREMENT PRIMARY KEY, - line mediumtext NULL - ) ENGINE=MyISAM; - - SELECT variable_value INTO @log_error - FROM information_schema.global_variables - WHERE variable_name='LOG_ERROR'; - - SET @old_max_allowed_packet= @@global.max_allowed_packet; - SET @@global.max_allowed_packet= 1024*1024*1024; - SET text= load_file(@log_error); - SET @@global.max_allowed_packet= @old_max_allowed_packet; - -- select text; - - SET pos= LOCATE('\n', text); - WHILE pos DO - INSERT error_log (line) - VALUES ( - SUBSTR(text, 1, pos-1) - ); - SET text= SUBSTR(text FROM pos+1); - SET pos= LOCATE('\n', text); - END WHILE; - - -- select * from error_log; -- -- Remove all lines belonging to previous tests From 2f5ffdfa7629c82047388c4b2cfd280252065ea2 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 11:05:38 +0100 Subject: [PATCH 02/22] mtr.pl v2 - Add debug prints for analyzing mkdir "Permission denied" failure --- mysql-test/lib/My/File/Path.pm | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/mysql-test/lib/My/File/Path.pm b/mysql-test/lib/My/File/Path.pm index 7c0004ef526..c4352f77850 100644 --- a/mysql-test/lib/My/File/Path.pm +++ b/mysql-test/lib/My/File/Path.pm @@ -59,6 +59,42 @@ sub rmtree { }; +use File::Basename; +sub _mkpath_dbug { + my ($message, $path, $dir, $err)= @_; + + print "=" x 40, "\n"; + print $message, "\n"; + print "err: '$err'\n"; + print "path: '$path'\n"; + print "dir: '$dir'\n"; + + print "-" x 40, "\n"; + my $dirname= dirname($path); + print "dirname: $dirname\n"; + print `ls -l $dirname`, "\n"; + print "-" x 40, "\n"; + my $dirname2= dirname($dirname); + print "dirname2: $dirname2\n"; + print `ls -l $dirname2`, "\n"; + print "-" x 40, "\n"; + print "file exists\n" if (-e $path); + print "file is a plain file\n" if (-f $path); + print "file is a directory\n" if (-d $path); + print "-" x 40, "\n"; + + if (IS_CYGWIN) + { + my $posix_path= Cygwin::win_to_posix_path($path); + print "trying to create using posix path: '$posix_path'\n"; + mkdir($posix_path) or print "mkdir(posixpath) returned erro: $!\n"; + } + + print "=" x 40, "\n"; + +} + + sub mkpath { my $path; @@ -78,15 +114,20 @@ sub mkpath { next if -d $path; # Path already exists and is a directory croak("File already exists but is not a directory: '$path'") if -e $path; next if mkdir($path); + _mkpath_debug("mkdir failed", $path, $dir, $!); # mkdir failed, try one more time next if mkdir($path); + _mkpath_debug("mkdir failed, second time", $path, $dir, $!); # mkdir failed again, try two more time after sleep(s) sleep(1); next if mkdir($path); + _mkpath_debug("mkdir failed, third time", $path, $dir, $!); + sleep(1); next if mkdir($path); + _mkpath_debug("mkdir failed, fourth time", $path, $dir, $!); # Report failure and die croak("Couldn't create directory '$path' ", From 73e96ec9ce1fc9c0ff817e9ebb153cf6e557b8b4 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 11:07:54 +0100 Subject: [PATCH 03/22] Remove debug printouts of all remaining tests when test suite has been terminated in the middle --- mysql-test/mysql-test-run.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 9f932532a39..63f57492ba4 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -372,9 +372,9 @@ sub main { if ($opt_force){ # All test should have been run, print any that are still in $tests - foreach my $test ( @$tests ){ - $test->print_test(); - } + #foreach my $test ( @$tests ){ + # $test->print_test(); + #} } # Not all tests completed, failure From 3ae3a5eb73139a78baddcf0855aeda978e39cb67 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 12:09:36 +0100 Subject: [PATCH 04/22] mtr.pl v2 - Add name of error log file to the erro log table to get better erorr message when warning is found --- mysql-test/include/check-warnings.test | 11 ++++++++--- mysql-test/include/mtr_warnings.sql | 5 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index ef0e92df29c..8b0d2803081 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -14,6 +14,7 @@ use mtr; create temporary table error_log ( row int auto_increment primary key, + file_name varchar(255), line varchar(1024) null ) engine=myisam; @@ -22,7 +23,8 @@ let $log_error= query_get_value(show variables like 'log_error', Value, 1); # Try to load the error log into the temporary table --error 0,1085 -eval load data infile '$log_error' into table error_log (line); +eval load data infile '$log_error' into table error_log (line) + set file_name='$log_error'; if ($mysql_errno) { # The error log was not world readable, this is normally @@ -31,13 +33,16 @@ if ($mysql_errno) # a new error log file that is not world readable. # chmod the error log file and try to open it again chmod 0644 $log_error; - eval load data infile '$log_error' into table error_log (line); + eval load data infile '$log_error' into table error_log (line) + set file_name='$log_error'; # Also load the .err-old file where there might be # additional warnings + let $old_log_error = $log_error-old; chmod 0644 $old_log_error; - eval load data infile '$old_log_error' into table error_log (line); + eval load data infile '$old_log_error' into table error_log (line) + set file_name='$log_error'; } # Call check_warnings to filter out any warning in diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index b65a6ae69ba..d61f91d4d6f 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -233,7 +233,7 @@ BEGIN DELETE FROM error_log WHERE row < @max_row; CREATE TEMPORARY TABLE suspect_lines ENGINE=MyISAM AS - SELECT DISTINCT el.line, 0 as "suppressed" + SELECT DISTINCT el.file_name, el.line, 0 as "suppressed" FROM error_log el, suspicious_patterns ep WHERE el.line REGEXP ep.pattern; @@ -251,8 +251,7 @@ BEGIN WHERE suppressed=0; IF @num_warnings > 0 THEN - SELECT @log_error; - SELECT line as log_error + SELECT file_name, line as log_error FROM suspect_lines WHERE suppressed=0; --SELECT * FROM test_suppressions; -- Return 2 -> check failed From ead3853f34395de3f158d3c94efa254449390754 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 12:18:52 +0100 Subject: [PATCH 05/22] WL#4189 mtr.pl v2 - Don't save ndb_*_fs directory after test failure --- mysql-test/mysql-test-run.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 63f57492ba4..b9963ce23aa 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3632,6 +3632,17 @@ sub save_datadir_after_failure($$) { } +sub remove_ndbfs_from_ndbd_datadir { + my ($ndbd_datadir)= @_; + # Remove the ndb_*_fs directory from ndbd.X/ dir + foreach my $ndbfs_dir ( glob("$ndbd_datadir/ndb_*_fs") ) + { + next unless -d $ndbfs_dir; # Skip if not a directory + rmtree($ndbfs_dir); + } +} + + sub after_failure ($) { my ($tinfo)= @_; @@ -3657,6 +3668,14 @@ sub after_failure ($) { if ( clusters() ) { foreach my $cluster ( clusters() ) { my $cluster_dir= "$opt_vardir/".$cluster->{name}; + + # Remove the fileystem of each ndbd + foreach my $ndbd ( in_cluster($cluster, ndbds()) ) + { + my $ndbd_datadir= $ndbd->value("DataDir"); + remove_ndbfs_from_ndbd_datadir($ndbd_datadir); + } + save_datadir_after_failure($cluster_dir, $save_dir); } } From 1f724b9ddd5d5f2d3642cc904724561c7e6df862 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 13:00:50 +0100 Subject: [PATCH 06/22] WL#4189 mtr.pl v2 - fix typo --- mysql-test/lib/My/File/Path.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/lib/My/File/Path.pm b/mysql-test/lib/My/File/Path.pm index c4352f77850..e9ae52bbac9 100644 --- a/mysql-test/lib/My/File/Path.pm +++ b/mysql-test/lib/My/File/Path.pm @@ -60,7 +60,7 @@ sub rmtree { use File::Basename; -sub _mkpath_dbug { +sub _mkpath_debug { my ($message, $path, $dir, $err)= @_; print "=" x 40, "\n"; From 90509b22b58901d2925285f9acd4307cf40553b3 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 13:02:27 +0100 Subject: [PATCH 07/22] WL#4189 mtr.pl v2 - Clear test variables "comment" and "logfile" to make sure thay aren't already set from previous run of same test - Print warning if test result already set and set it anyway --- mysql-test/lib/mtr_report.pm | 9 ++++++--- mysql-test/mysql-test-run.pl | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 81304ab58e1..4e66e5a67da 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -91,11 +91,14 @@ sub mtr_report_test_passed ($) { $tinfo->{timer}= $timer_str; } - # Set as passed unless already set - if ( not defined $tinfo->{'result'} ){ - $tinfo->{'result'}= 'MTR_RES_PASSED'; + # Big warning if status already set + if ( $tinfo->{'result'} ){ + mtr_warning("mtr_report_test_passed: Test result", + "already set to '", $tinfo->{'result'}, ","); } + $tinfo->{'result'}= 'MTR_RES_PASSED'; + mtr_report_test($tinfo); } diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b9963ce23aa..4aa5030c6f5 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -698,6 +698,12 @@ sub run_worker ($) { if ($line eq 'TESTCASE'){ my $test= My::Test::read_test($server); #$test->print_test(); + + # Clear comment and logfile, to avoid + # reusing them from previous test + delete($test->{'comment'}); + delete($test->{'logfile'}); + run_testcase($test); #$test->{result}= 'MTR_RES_PASSED'; # Send it back, now with results set From db72d0dbf510724be44ce26214ee434cbd0b04ea Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 15:07:57 +0100 Subject: [PATCH 08/22] mtr.pl v2 - extend debug prints for "permission denied" --- mysql-test/lib/My/File/Path.pm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mysql-test/lib/My/File/Path.pm b/mysql-test/lib/My/File/Path.pm index e9ae52bbac9..99edeecdaf7 100644 --- a/mysql-test/lib/My/File/Path.pm +++ b/mysql-test/lib/My/File/Path.pm @@ -71,24 +71,25 @@ sub _mkpath_debug { print "-" x 40, "\n"; my $dirname= dirname($path); - print "dirname: $dirname\n"; + print "ls -l $dirname\n"; print `ls -l $dirname`, "\n"; print "-" x 40, "\n"; + print "dir $dirname\n"; + print `dir $dirname`, "\n"; + print "-" x 40, "\n"; my $dirname2= dirname($dirname); - print "dirname2: $dirname2\n"; + print "ls -l $dirname2\n"; print `ls -l $dirname2`, "\n"; print "-" x 40, "\n"; + print "dir $dirname2\n"; + print `dir $dirname2`, "\n"; + print "-" x 40, "\n"; print "file exists\n" if (-e $path); print "file is a plain file\n" if (-f $path); print "file is a directory\n" if (-d $path); print "-" x 40, "\n"; - - if (IS_CYGWIN) - { - my $posix_path= Cygwin::win_to_posix_path($path); - print "trying to create using posix path: '$posix_path'\n"; - mkdir($posix_path) or print "mkdir(posixpath) returned erro: $!\n"; - } + print "showing handles for $path\n"; + My::Handles::show_handles($path); print "=" x 40, "\n"; From 097508292d70f5699d272f4033e5f836ed4c5c63 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 15:55:48 +0100 Subject: [PATCH 09/22] WL#4198 mtr.pl v2 - fix typo, use "$old_log_error" as name when loading from .err-old file --- mysql-test/include/check-warnings.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index 8b0d2803081..ca9c434e265 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -42,7 +42,7 @@ if ($mysql_errno) let $old_log_error = $log_error-old; chmod 0644 $old_log_error; eval load data infile '$old_log_error' into table error_log (line) - set file_name='$log_error'; + set file_name='$old_log_error'; } # Call check_warnings to filter out any warning in From e090e7fb3dc28202f91b526064f2005e84ea32e5 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 18:31:41 +0100 Subject: [PATCH 10/22] Bug#42320 Read also "mysql.err-old" when checking the server for warnings - disable check of .err-old until bug has been fixed --- mysql-test/include/check-warnings.test | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index ca9c434e265..6dff51d07d8 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -39,10 +39,11 @@ if ($mysql_errno) # Also load the .err-old file where there might be # additional warnings - let $old_log_error = $log_error-old; - chmod 0644 $old_log_error; - eval load data infile '$old_log_error' into table error_log (line) - set file_name='$old_log_error'; + # Disabled intil Bug#42320 has been fixed + #let $old_log_error = $log_error-old; + #chmod 0644 $old_log_error; + #eval load data infile '$old_log_error' into table error_log (line) + # set file_name='$old_log_error'; } # Call check_warnings to filter out any warning in From 1dc963216a2335e4cc6250203a886754461bd376 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 18:32:57 +0100 Subject: [PATCH 11/22] WL#4189 mtr.pl v2 - turn auto detection of parallelism value ON again --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4aa5030c6f5..dbb5b44d760 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -226,7 +226,7 @@ my $opt_max_save_core= $ENV{MTR_MAX_SAVE_CORE} || 5; my $opt_max_save_datadir= $ENV{MTR_MAX_SAVE_DATADIR} || 20; my $opt_max_test_fail= $ENV{MTR_MAX_TEST_FAIL} || 10; -my $opt_parallel= $ENV{MTR_PARALLEL} || 1; +my $opt_parallel= $ENV{MTR_PARALLEL}; select(STDOUT); $| = 1; # Automatically flush STDOUT From 3bec589becf6c7bbf2ee62b333d10fe0a6d91b0d Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Sat, 24 Jan 2009 23:40:08 +0100 Subject: [PATCH 12/22] mtr.pl - default parallel to 1(again) --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index dbb5b44d760..4aa5030c6f5 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -226,7 +226,7 @@ my $opt_max_save_core= $ENV{MTR_MAX_SAVE_CORE} || 5; my $opt_max_save_datadir= $ENV{MTR_MAX_SAVE_DATADIR} || 20; my $opt_max_test_fail= $ENV{MTR_MAX_TEST_FAIL} || 10; -my $opt_parallel= $ENV{MTR_PARALLEL}; +my $opt_parallel= $ENV{MTR_PARALLEL} || 1; select(STDOUT); $| = 1; # Automatically flush STDOUT From ee156bf0c58a973df1ea05bdb6ad0748d31c43b4 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Mon, 26 Jan 2009 15:20:33 +0100 Subject: [PATCH 13/22] WL#4189 mtr.pl v2 - rewrite "check warnings" to be faster by not creating a full join between error_log and suspicious_patterns while running REGEXP. Instead add a column to error_log that will be set to 1 to indicate a warning and run the 6 REGEXP's we have for suspicious lines as 6 separate full table scans. - Remove the "suspicious_patterns" table from mtr db - Use 'xykls37' as separator when loading the error log, that line should hopefully never exist in a line that should be a warning --- mysql-test/include/check-warnings.test | 15 +++- mysql-test/include/mtr_warnings.sql | 102 ++++++++++++------------- mysql-test/r/mysql_upgrade.result | 4 - mysql-test/r/mysqlcheck.result | 1 - 4 files changed, 58 insertions(+), 64 deletions(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index 6dff51d07d8..9fbce4acd3d 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -5,6 +5,9 @@ # --disable_query_log +# Don't write these queries to binlog +set SQL_LOG_BIN=0; + # Turn off any debug crashes, allow the variable to be # non existent in release builds --error 0,1193 @@ -14,8 +17,9 @@ use mtr; create temporary table error_log ( row int auto_increment primary key, + suspicious int default 0, file_name varchar(255), - line varchar(1024) null + line varchar(1024) default null ) engine=myisam; # Get the name of servers error log @@ -23,7 +27,8 @@ let $log_error= query_get_value(show variables like 'log_error', Value, 1); # Try to load the error log into the temporary table --error 0,1085 -eval load data infile '$log_error' into table error_log (line) +eval load data infile '$log_error' into table error_log + fields terminated by 'xykls37' (line) set file_name='$log_error'; if ($mysql_errno) { @@ -33,7 +38,8 @@ if ($mysql_errno) # a new error log file that is not world readable. # chmod the error log file and try to open it again chmod 0644 $log_error; - eval load data infile '$log_error' into table error_log (line) + eval load data infile '$log_error' into table error_log + fields terminated by 'xykls37' (line) set file_name='$log_error'; # Also load the .err-old file where there might be @@ -42,7 +48,8 @@ if ($mysql_errno) # Disabled intil Bug#42320 has been fixed #let $old_log_error = $log_error-old; #chmod 0644 $old_log_error; - #eval load data infile '$old_log_error' into table error_log (line) + #eval load data infile '$old_log_error' into table error_log + # fields terminated by 'xykls37' (line) # set file_name='$old_log_error'; } diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index d61f91d4d6f..fce7977df16 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -2,44 +2,6 @@ delimiter ||; use mtr|| --- --- Load table with the patterns that are considered --- as suspicious and should be examined further --- -CREATE TABLE suspicious_patterns ( - pattern VARCHAR(255) -) ENGINE=MyISAM|| - - --- --- Declare a trigger that makes sure --- no invalid patterns can be inserted --- into suspicious_patterns --- -/*!50002 -CREATE DEFINER=root@localhost TRIGGER sp_insert -BEFORE INSERT ON suspicious_patterns -FOR EACH ROW BEGIN - DECLARE dummy INT; - SELECT "" REGEXP NEW.pattern INTO dummy; -END -*/|| - - --- --- Insert patterns for the lines we should check --- -INSERT INTO suspicious_patterns VALUES - ("^Warning:|mysqld: Warning|\\[Warning\\]"), - ("^Error:|\\[ERROR\\]"), - ("^==.* at 0x"), - ("InnoDB: Warning"), - ("^safe_mutex:|allocated at line"), - ("missing DBUG_RETURN"), - ("Attempting backtrace"), - ("Assertion .* failed")|| - - -- -- Create table where testcases can insert patterns to -- be suppressed @@ -232,27 +194,57 @@ BEGIN WHERE line REGEXP "^CURRENT_TEST:"; DELETE FROM error_log WHERE row < @max_row; - CREATE TEMPORARY TABLE suspect_lines ENGINE=MyISAM AS - SELECT DISTINCT el.file_name, el.line, 0 as "suppressed" - FROM error_log el, suspicious_patterns ep - WHERE el.line REGEXP ep.pattern; + -- + -- Mark all lines with certain patterns as suspicious + -- + UPDATE error_log SET suspicious= 1 + WHERE suspicious=0 + AND line REGEXP "^Warning:|mysqld: Warning|\\[Warning\\]"; + UPDATE error_log SET suspicious= 1 + WHERE suspicious=0 + AND line REGEXP "^Error:|\\[ERROR\\]"; + UPDATE error_log SET suspicious= 1 + WHERE suspicious=0 + AND line REGEXP "^==.* at 0x"; + UPDATE error_log SET suspicious= 1 + WHERE suspicious=0 + AND line REGEXP "InnoDB: Warning"; + UPDATE error_log SET suspicious= 1 + WHERE suspicious=0 + AND line REGEXP "^safe_mutex:|allocated at line"; + UPDATE error_log SET suspicious= 1 + WHERE suspicious=0 + AND line REGEXP "missing DBUG_RETURN"; + UPDATE error_log SET suspicious= 1 + WHERE suspicious=0 + AND line REGEXP "Attempting backtrace"; + UPDATE error_log SET suspicious= 1 + WHERE suspicious=0 + AND line REGEXP "Assertion .* failed"; - -- Mark lines that are suppressed by global suppressions - UPDATE suspect_lines sl, global_suppressions gs - SET suppressed=1 - WHERE sl.line REGEXP gs.pattern; + -- + -- Remove mark from lines that are suppressed by global suppressions + -- + UPDATE error_log el, global_suppressions gs + SET suspicious=0 + WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; - -- Mark lines that are suppressed by test specific suppressions - UPDATE suspect_lines sl, test_suppressions ts - SET suppressed=2 - WHERE sl.line REGEXP ts.pattern; + -- + -- Remove mark from lines that are suppressed by test specific suppressions + -- + UPDATE error_log el, test_suppressions ts + SET suspicious=0 + WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; - SELECT COUNT(*) INTO @num_warnings FROM suspect_lines - WHERE suppressed=0; + -- + -- Get the number of marked lines and return result + -- + SELECT COUNT(*) INTO @num_warnings FROM error_log + WHERE suspicious=1; IF @num_warnings > 0 THEN - SELECT file_name, line as log_error - FROM suspect_lines WHERE suppressed=0; + SELECT file_name, line + FROM error_log WHERE suspicious=1; --SELECT * FROM test_suppressions; -- Return 2 -> check failed SELECT 2 INTO result; @@ -263,7 +255,7 @@ BEGIN -- Cleanup for next test TRUNCATE test_suppressions; - DROP TABLE error_log, suspect_lines; + DROP TABLE error_log; END|| diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index be14e282f2a..384442f8c31 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -1,6 +1,5 @@ Run mysql_upgrade once mtr.global_suppressions OK -mtr.suspicious_patterns OK mtr.test_suppressions OK mysql.columns_priv OK mysql.db OK @@ -33,7 +32,6 @@ Run it again - should say already completed This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade Force should run it regardless of wether it's been run before mtr.global_suppressions OK -mtr.suspicious_patterns OK mtr.test_suppressions OK mysql.columns_priv OK mysql.db OK @@ -66,7 +64,6 @@ CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila'; GRANT ALL ON *.* TO mysqltest1@'%'; Run mysql_upgrade with password protected account mtr.global_suppressions OK -mtr.suspicious_patterns OK mtr.test_suppressions OK mysql.columns_priv OK mysql.db OK @@ -101,7 +98,6 @@ mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errn FATAL ERROR: Upgrade failed set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE'; mtr.global_suppressions OK -mtr.suspicious_patterns OK mtr.test_suppressions OK mysql.columns_priv OK mysql.db OK diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result index b98a800fb36..c25275cb75a 100644 --- a/mysql-test/r/mysqlcheck.result +++ b/mysql-test/r/mysqlcheck.result @@ -2,7 +2,6 @@ DROP TABLE IF EXISTS t1, `t``1`, `t 1`; drop view if exists v1; drop database if exists client_test_db; mtr.global_suppressions OK -mtr.suspicious_patterns OK mtr.test_suppressions OK mysql.columns_priv OK mysql.db OK From 2cc7e72aaa813cfe368fab27846d1b7801082561 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Mon, 26 Jan 2009 16:39:00 +0100 Subject: [PATCH 14/22] WL#4189 mtr.pl v2 - Suppress intentional safemalloc dump warnings - add fflush(stdout) to make sure that the "End safemalloc memory dump." marker is flushed. --- mysql-test/include/mtr_warnings.sql | 11 +++++++++++ sql/sql_test.cc | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index fce7977df16..c1476457ff4 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -236,6 +236,17 @@ BEGIN SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; + -- + -- Suppress intentional safemalloc dump warnings + -- i.e inside "Begin/End safemalloc memeory dump" block + -- + SELECT @min_row:=row + FROM error_log WHERE line = "Begin safemalloc memory dump:"; + SELECT @max_row:=row + FROM error_log WHERE line = "End safemalloc memory dump."; + UPDATE error_log SET suspicious=0 + WHERE suspicious=1 AND row > @min_row AND row < @max_row; + -- -- Get the number of marked lines and return result -- diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 01363714484..78932396efe 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -513,7 +513,7 @@ Next alarm time: %lu\n", fprintf(stdout,"\nBegin safemalloc memory dump:\n"); // tag needed for test suite TERMINATE(stdout, 1); // Write malloc information fprintf(stdout,"\nEnd safemalloc memory dump.\n"); - + fflush(stdout); #ifdef HAVE_MALLINFO struct mallinfo info= mallinfo(); printf("\nMemory status:\n\ From 5112fcebdbc30a696e3a052b0cc2186b04828d43 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Tue, 27 Jan 2009 10:39:42 +0100 Subject: [PATCH 15/22] WL#4189 mtr.pl v2 - Pass verbose flag to My::SafeProcess also when starting check_warnings and run_on_all --- mysql-test/mysql-test-run.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4aa5030c6f5..841757af251 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2908,6 +2908,7 @@ sub start_run_one ($$) { output => $errfile, args => \$args, user_data => $errfile, + verbose => $opt_verbose, ); mtr_verbose("Started $proc"); return $proc; @@ -3402,6 +3403,7 @@ sub start_check_warnings ($$) { output => $errfile, args => \$args, user_data => $errfile, + verbose => $opt_verbose, ); mtr_verbose("Started $proc"); return $proc; From c7c0dc68828ca7b206e6bd36099e0fe7ec652f59 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Tue, 27 Jan 2009 10:45:39 +0100 Subject: [PATCH 16/22] Bug#42358 fulltext_plugin test fails on pushbuild: Too many arguments (first extra is '') - pass empty "--plugin-dir" if simple parser was not found. --- mysql-test/mysql-test-run.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 49d40915985..4bd9f107f9d 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1677,8 +1677,8 @@ sub environment_setup { $ENV{'SIMPLE_PARSER'}= ($lib_simple_parser ? basename($lib_simple_parser) : ""); - $ENV{'SIMPLE_PARSER_OPT'}= - ($lib_simple_parser ? "--plugin_dir=" . dirname($lib_simple_parser) : ""); + $ENV{'SIMPLE_PARSER_OPT'}= "--plugin-dir=". + ($lib_simple_parser ? dirname($lib_simple_parser) : ""); # -------------------------------------------------------------------------- # Valgrind need to be run with debug libraries otherwise it's almost From d85073033372b7e1513f8f72dabfd2bbda8faf24 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Tue, 27 Jan 2009 14:21:18 +0100 Subject: [PATCH 17/22] WL#4189 mtr.pl v2 - Add a "skip-ssl=1" to [mysqltest] section so that mysqltest will not run with ssl turned on by default but stil be able to turn it on when requested - This avoids that check_warnings and check_testcase connects to the server woth SSL turned on --- mysql-test/lib/My/ConfigFactory.pm | 8 ++++++++ mysql-test/mysql-test-run.pl | 20 ++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 31927f5e8d5..567a05ac7a1 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -150,6 +150,13 @@ sub ssl_supported { return $self->{ARGS}->{ssl}; } +sub fix_skip_ssl { + return if !ssl_supported(@_); + # Add skip-ssl if ssl is supported to avoid + # that mysqltest connects with SSL by default + return 1; +} + sub fix_ssl_ca { return if !ssl_supported(@_); my $std_data= fix_std_data(@_); @@ -287,6 +294,7 @@ my @mysqltest_rules= { 'ssl-ca' => \&fix_ssl_ca }, { 'ssl-cert' => \&fix_ssl_client_cert }, { 'ssl-key' => \&fix_ssl_client_key }, + { 'skip-ssl' => \&fix_skip_ssl }, ); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4bd9f107f9d..53e87e30f29 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -130,14 +130,14 @@ our @opt_combinations; our @opt_extra_mysqld_opt; -our $opt_compress; -our $opt_ssl; -our $opt_skip_ssl; -our $opt_ssl_supported; -our $opt_ps_protocol; -our $opt_sp_protocol; -our $opt_cursor_protocol; -our $opt_view_protocol; +my $opt_compress; +my $opt_ssl; +my $opt_skip_ssl; +my $opt_ssl_supported; +my $opt_ps_protocol; +my $opt_sp_protocol; +my $opt_cursor_protocol; +my $opt_view_protocol; our $opt_debug; our @opt_cases; # The test cases names in argv @@ -4454,10 +4454,6 @@ sub start_mysqltest ($) { # Turn on SSL for _all_ test cases if option --ssl was used mtr_add_arg($args, "--ssl"); } - elsif ( $opt_ssl_supported ) - { - mtr_add_arg($args, "--skip-ssl"); - } if ( $opt_embedded_server ) { From 5a1e073fc7a61eb0d60198992552411dadc95ab2 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Tue, 27 Jan 2009 14:53:58 +0100 Subject: [PATCH 18/22] WL#4189 mtr.pl v2 - Make a rough filtering of the servers error log and write all suspicious warnings to $error_log.warnings The .warnings file is then examined more carefully by check_warnings.test - This will speed things up, doing all of this in a server running under valgrind takes far too long time. --- mysql-test/include/check-warnings.test | 39 ++++--------- mysql-test/include/mtr_warnings.sql | 47 --------------- mysql-test/mysql-test-run.pl | 81 ++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 75 deletions(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index 9fbce4acd3d..154de4be290 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -1,8 +1,11 @@ - # # This test is executed once after each test to check the servers # for unexpected warnings found in the servers error log # +# NOTE! mysql-test-run.pl has already done a rough filtering +# of the file and written any suspicious lines +# to $error_log.warnings file +# --disable_query_log # Don't write these queries to binlog @@ -17,41 +20,21 @@ use mtr; create temporary table error_log ( row int auto_increment primary key, - suspicious int default 0, + suspicious int default 1, file_name varchar(255), line varchar(1024) default null ) engine=myisam; # Get the name of servers error log let $log_error= query_get_value(show variables like 'log_error', Value, 1); +let $log_warning= $log_error.warnings; -# Try to load the error log into the temporary table ---error 0,1085 -eval load data infile '$log_error' into table error_log - fields terminated by 'xykls37' (line) +# Load the warnings into a temporary table +eval load data infile '$log_warning' into table error_log + fields terminated by 'xykls37' + ignore 1 lines + (line) set file_name='$log_error'; -if ($mysql_errno) -{ - # The error log was not world readable, this is normally - # caused by a "flush logs" in the test program. mysqld - # will then rename the error log to .err-old and open - # a new error log file that is not world readable. - # chmod the error log file and try to open it again - chmod 0644 $log_error; - eval load data infile '$log_error' into table error_log - fields terminated by 'xykls37' (line) - set file_name='$log_error'; - - # Also load the .err-old file where there might be - # additional warnings - - # Disabled intil Bug#42320 has been fixed - #let $old_log_error = $log_error-old; - #chmod 0644 $old_log_error; - #eval load data infile '$old_log_error' into table error_log - # fields terminated by 'xykls37' (line) - # set file_name='$old_log_error'; -} # Call check_warnings to filter out any warning in # the error_log table diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index c1476457ff4..73287900f3c 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -186,42 +186,6 @@ BEGIN -- Don't write these queries to binlog SET SQL_LOG_BIN=0; - -- - -- Remove all lines belonging to previous tests - -- - SELECT COALESCE(MAX(row),0) INTO @max_row - FROM error_log - WHERE line REGEXP "^CURRENT_TEST:"; - DELETE FROM error_log WHERE row < @max_row; - - -- - -- Mark all lines with certain patterns as suspicious - -- - UPDATE error_log SET suspicious= 1 - WHERE suspicious=0 - AND line REGEXP "^Warning:|mysqld: Warning|\\[Warning\\]"; - UPDATE error_log SET suspicious= 1 - WHERE suspicious=0 - AND line REGEXP "^Error:|\\[ERROR\\]"; - UPDATE error_log SET suspicious= 1 - WHERE suspicious=0 - AND line REGEXP "^==.* at 0x"; - UPDATE error_log SET suspicious= 1 - WHERE suspicious=0 - AND line REGEXP "InnoDB: Warning"; - UPDATE error_log SET suspicious= 1 - WHERE suspicious=0 - AND line REGEXP "^safe_mutex:|allocated at line"; - UPDATE error_log SET suspicious= 1 - WHERE suspicious=0 - AND line REGEXP "missing DBUG_RETURN"; - UPDATE error_log SET suspicious= 1 - WHERE suspicious=0 - AND line REGEXP "Attempting backtrace"; - UPDATE error_log SET suspicious= 1 - WHERE suspicious=0 - AND line REGEXP "Assertion .* failed"; - -- -- Remove mark from lines that are suppressed by global suppressions -- @@ -236,17 +200,6 @@ BEGIN SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; - -- - -- Suppress intentional safemalloc dump warnings - -- i.e inside "Begin/End safemalloc memeory dump" block - -- - SELECT @min_row:=row - FROM error_log WHERE line = "Begin safemalloc memory dump:"; - SELECT @max_row:=row - FROM error_log WHERE line = "End safemalloc memory dump."; - UPDATE error_log SET suspicious=0 - WHERE suspicious=1 AND row > @min_row AND row < @max_row; - -- -- Get the number of marked lines and return result -- diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 841757af251..0d2a7f8c861 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3356,6 +3356,85 @@ sub run_testcase ($) { } +# +# Perform a rough examination of the servers +# error log and write all lines that look +# suspicious into $error_log.warnings +# +sub extract_warning_lines ($) { + my ($error_log) = @_; + + # Open the servers .err log file and read all lines + # belonging to current tets into @lines + my $Ferr = IO::File->new($error_log) + or mtr_error("Could not open file '$error_log' for reading: $!"); + + my @lines; + while ( my $line = <$Ferr> ) + { + if ( $line =~ /"^CURRENT_TEST:"/ ) + { + # Throw away lines from previous tests + @lines = (); + } + push(@lines, $line); + } + $Ferr = undef; # Close error log file + + # mysql_client_test.test sends a COM_DEBUG packet to the server + # to provoke a SAFEMALLOC leak report, ignore any warnings + # between "Begin/end safemalloc memory dump" + if ( grep(/Begin safemalloc memory dump:/, @lines) > 0) + { + my $discard_lines= 1; + foreach my $line ( @lines ) + { + if ($line =~ /Begin safemalloc memory dump:/){ + $discard_lines = 1; + } elsif ($line =~ /End safemalloc memory dump./){ + $discard_lines = 0; + } + + if ($discard_lines){ + $line = "ignored"; + } + } + } + + # Write all suspicious lines to $error_log.warnings file + my $warning_log = "$error_log.warnings"; + my $Fwarn = IO::File->new($warning_log, "w") + or die("Could not open file '$warning_log' for writing: $!"); + print $Fwarn "Suspicious lines from $error_log\n"; + + my @patterns = + ( + qr/^Warning:|mysqld: Warning|\\[Warning\\]/, + qr/^Error:|\\[ERROR\\]/, + qr/^==.* at 0x/, + qr/InnoDB: Warning|InnoDB: Error/, + qr/^safe_mutex:|allocated at line/, + qr/missing DBUG_RETURN/, + qr/Attempting backtrace/, + qr/Assertion .* failed/, + ); + + foreach my $line ( @lines ) + { + foreach my $pat ( @patterns ) + { + if ( $line =~ /$pat/ ) + { + print $Fwarn $line; + last; + } + } + } + $Fwarn = undef; # Close file + +} + + # Run include/check-warnings.test # # RETURN VALUE @@ -3368,6 +3447,8 @@ sub start_check_warnings ($$) { my $name= "warnings-".$mysqld->name(); + extract_warning_lines($mysqld->value('log-error')); + my $args; mtr_init_args(\$args); From 6ad47b97e9f0075f6d47c94371fa6700b900c327 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Tue, 27 Jan 2009 15:12:08 +0100 Subject: [PATCH 19/22] Bug#42366 server-cert.pem expired: "Not After : Jan 27 08:54:13 2009 GMT --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index ab3887c6cd4..1dc3ce9ed85 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -132,7 +132,7 @@ our @opt_extra_mysqld_opt; my $opt_compress; my $opt_ssl; -my $opt_skip_ssl; +my $opt_skip_ssl = 1; # Until bug#42366 has been fixed my $opt_ssl_supported; my $opt_ps_protocol; my $opt_sp_protocol; From c1376aeae02087db8596f456692072a782a627e6 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Tue, 27 Jan 2009 16:35:52 +0100 Subject: [PATCH 20/22] WL#4189 mtr.pl v2 - Bypass --secure-file-priv by loading the file from the client using LOAD DATA LOCAL INFILE --- mysql-test/include/check-warnings.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index 154de4be290..6dd58c9f859 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -30,7 +30,7 @@ let $log_error= query_get_value(show variables like 'log_error', Value, 1); let $log_warning= $log_error.warnings; # Load the warnings into a temporary table -eval load data infile '$log_warning' into table error_log +eval load data local infile '$log_warning' into table error_log fields terminated by 'xykls37' ignore 1 lines (line) From ef397ddce297d59e01ecfd3278799084dd17d051 Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Tue, 27 Jan 2009 16:44:50 +0100 Subject: [PATCH 21/22] WL#4189 mtr.pl v2 - Remove double escape of [ and ] --- mysql-test/mysql-test-run.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1dc3ce9ed85..4ba21bf383e 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3422,8 +3422,8 @@ sub extract_warning_lines ($) { my @patterns = ( - qr/^Warning:|mysqld: Warning|\\[Warning\\]/, - qr/^Error:|\\[ERROR\\]/, + qr/^Warning:|mysqld: Warning|\[Warning\]/, + qr/^Error:|\[ERROR\]/, qr/^==.* at 0x/, qr/InnoDB: Warning|InnoDB: Error/, qr/^safe_mutex:|allocated at line/, From 9a530951e06185a363ca989360ebfc68c52217ed Mon Sep 17 00:00:00 2001 From: Magnus Svensson Date: Tue, 27 Jan 2009 17:00:38 +0100 Subject: [PATCH 22/22] WL#4198 mtr.pl v2 - Use empty escape char as not to convert "\test" to a tab + "est" when loading the servers .err file --- mysql-test/include/check-warnings.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index 6dd58c9f859..34ae257e168 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -31,7 +31,7 @@ let $log_warning= $log_error.warnings; # Load the warnings into a temporary table eval load data local infile '$log_warning' into table error_log - fields terminated by 'xykls37' + fields terminated by 'xykls37' escaped by '' ignore 1 lines (line) set file_name='$log_error';