support for compression and LOCAL_FILE in mysqli

This commit is contained in:
Marc Delisle
2004-10-16 14:52:28 +00:00
parent 9d58add695
commit 4fb2af8fa5
2 changed files with 13 additions and 7 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-10-16 Marc Delisle <lem9@users.sourceforge.net>
* libraries/dbi/mysqli.dbi.lib.php: support for compressed protocol
and CLIENT_LOCAL_FILES in mysqli
2004-10-15 Marc Delisle <lem9@users.sourceforge.net>
* pdf_schema.php: new way to define font path,
needed with the new fpdf library; also now output inline,

View File

@@ -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();