summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/local_infile_tools.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests/local_infile_tools.inc')
-rw-r--r--ext/mysqli/tests/local_infile_tools.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/mysqli/tests/local_infile_tools.inc b/ext/mysqli/tests/local_infile_tools.inc
index fef400d0a9..d45d15e6ac 100644
--- a/ext/mysqli/tests/local_infile_tools.inc
+++ b/ext/mysqli/tests/local_infile_tools.inc
@@ -6,8 +6,7 @@
}
}
- function check_local_infile_support($link, $engine, $table_name = 'test') {
-
+ function check_local_infile_allowed_by_server($link) {
if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"'))
return "Cannot check if Server variable 'local_infile' is set to 'ON'";
@@ -16,6 +15,15 @@
if ('ON' != $row['Value'])
return sprintf("Server variable 'local_infile' seems not set to 'ON', found '%s'", $row['Value']);
+ return "";
+ }
+
+ function check_local_infile_support($link, $engine, $table_name = 'test') {
+ $res = check_local_infile_allowed_by_server($link);
+ if ($res) {
+ return $res;
+ }
+
if (!mysqli_query($link, sprintf('DROP TABLE IF EXISTS %s', $table_name))) {
return "Failed to drop old test table";
}