Skip to content
Permalink
Browse files

Actually set MYSQLI_OPT_LOCAL_INFILE

1e6b740 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>
  • Loading branch information...
vrana authored and nijel committed Jan 21, 2019
1 parent 2f4a011 commit c5e01f84ad48c5c626001cb92d7a95500920a900
Showing with 6 additions and 6 deletions.
  1. +6 −6 libraries/classes/Dbi/DbiMysqli.php
@@ -88,12 +88,6 @@ public function connect(
$link = mysqli_init();
if (defined('PMA_ENABLE_LDI')) {
mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, true);
} else {
mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, false);
}
$client_flags = 0;
/* Optionally compress connection */
@@ -175,6 +169,12 @@ public function connect(
return false;
}
if (defined('PMA_ENABLE_LDI')) {
mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, true);
} else {
mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, false);
}
return $link;
}

0 comments on commit c5e01f8

Please sign in to comment.
You can’t perform that action at this time.