Actually set MYSQLI_OPT_LOCAL_INFILE

1e6b740e tried to set this but failed due to https://bugs.php.net/77496
and nobody probably ever tested it.

Tested: Executed `LOAD DATA LOCAL INFILE 'README' INTO TABLE text(text)`
SQL command successfully before, unsuceesfully after.

Signed-off-by: Jakub Vrana <jakub@vrana.cz>
This commit is contained in:
Jakub Vrana 2019-01-21 18:48:51 +01:00
parent 54f0a2c4d1
commit c5ae592370

View File

@ -58,12 +58,6 @@ class DbiMysqli implements DbiExtension
$mysqli = \mysqli_init();
if (defined('PMA_ENABLE_LDI')) {
$mysqli->options(MYSQLI_OPT_LOCAL_INFILE, true);
} else {
$mysqli->options(MYSQLI_OPT_LOCAL_INFILE, false);
}
$client_flags = 0;
/* Optionally compress connection */
@ -142,6 +136,12 @@ class DbiMysqli implements DbiExtension
return false;
}
if (defined('PMA_ENABLE_LDI')) {
$mysqli->options(MYSQLI_OPT_LOCAL_INFILE, true);
} else {
$mysqli->options(MYSQLI_OPT_LOCAL_INFILE, false);
}
return $mysqli;
}