diff --git a/ChangeLog b/ChangeLog index 75fcb89be..6f53d5979 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-10-16 Marc Delisle + * libraries/dbi/mysqli.dbi.lib.php: support for compressed protocol + and CLIENT_LOCAL_FILES in mysqli + 2004-10-15 Marc Delisle * pdf_schema.php: new way to define font path, needed with the new fpdf library; also now output inline, diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php index ec03472fe..4020f0f21 100644 --- a/libraries/dbi/mysqli.dbi.lib.php +++ b/libraries/dbi/mysqli.dbi.lib.php @@ -57,16 +57,18 @@ function PMA_DBI_connect($user, $password) { $cfg['Server']['socket'] = ''; } + // NULL enables connection to the default socket $server_socket = (empty($cfg['Server']['socket'])) - ? FALSE + ? NULL : $cfg['Server']['socket']; - if ($server_socket) { - $link = @mysqli_connect($cfg['Server']['host'], $user, $password, FALSE, $server_port, $server_socket); - } else { - // Omit the last parameter to enable connection to the default socket - $link = @mysqli_connect($cfg['Server']['host'], $user, $password, FALSE, $server_port); - } + $link = mysqli_init(); + + mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, TRUE); + + $client_flags = $cfg['Server']['compress'] && defined('MYSQLI_CLIENT_COMPRESS') ? MYSQLI_CLIENT_COMPRESS : 0; + + @mysqli_real_connect($link, $cfg['Server']['host'], $user, $password, FALSE, $server_port, $server_socket, $client_flags); if (empty($link)) { PMA_auth_fails();