summaryrefslogtreecommitdiff
path: root/mysql-test/include/check-warnings.test
diff options
context:
space:
mode:
authorMagnus Svensson <msvensson@mysql.com>2009-01-27 21:14:23 +0100
committerMagnus Svensson <msvensson@mysql.com>2009-01-27 21:14:23 +0100
commit7855b37c9f9456a967ac97f880e9b253359f0c17 (patch)
tree075c17c829bb97850a3aa8d4e32a312872c99c12 /mysql-test/include/check-warnings.test
parent8a1a3f714ac1c38e834ab8182bf30f14a1dedb25 (diff)
downloadmariadb-git-7855b37c9f9456a967ac97f880e9b253359f0c17.tar.gz
WL#4189 mtr.pl v2
- First try LOAD DATA INFILE and fall back to LOAD DATA LOCAL INFILE if that fails.
Diffstat (limited to 'mysql-test/include/check-warnings.test')
-rw-r--r--mysql-test/include/check-warnings.test18
1 files changed, 16 insertions, 2 deletions
diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test
index 34ae257e168..2144957f742 100644
--- a/mysql-test/include/check-warnings.test
+++ b/mysql-test/include/check-warnings.test
@@ -29,13 +29,27 @@ create temporary table error_log (
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 local infile '$log_warning' into table error_log
+# Try tload the warnings into a temporary table,
+# it might fail with error saying "The MySQL server is
+# running with the --secure-file-priv" in which case
+# an attempt to load the file using LOAD DATA LOCAL is made
+--error 0,1290
+eval load data infile '$log_warning' into table error_log
fields terminated by 'xykls37' escaped by ''
ignore 1 lines
(line)
set file_name='$log_error';
+if ($mysql_errno)
+{
+ # Try LOAD DATA LOCAL
+ eval load data local infile '$log_warning' into table error_log
+ fields terminated by 'xykls37' escaped by ''
+ ignore 1 lines
+ (line)
+ set file_name='$log_error';
+}
+
# Call check_warnings to filter out any warning in
# the error_log table
call mtr.check_warnings(@result);