support for compression and LOCAL_FILE in mysqli
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
2004-10-15 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* pdf_schema.php: new way to define font path,
|
* pdf_schema.php: new way to define font path,
|
||||||
needed with the new fpdf library; also now output inline,
|
needed with the new fpdf library; also now output inline,
|
||||||
|
@@ -57,16 +57,18 @@ function PMA_DBI_connect($user, $password) {
|
|||||||
$cfg['Server']['socket'] = '';
|
$cfg['Server']['socket'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NULL enables connection to the default socket
|
||||||
$server_socket = (empty($cfg['Server']['socket']))
|
$server_socket = (empty($cfg['Server']['socket']))
|
||||||
? FALSE
|
? NULL
|
||||||
: $cfg['Server']['socket'];
|
: $cfg['Server']['socket'];
|
||||||
|
|
||||||
if ($server_socket) {
|
$link = mysqli_init();
|
||||||
$link = @mysqli_connect($cfg['Server']['host'], $user, $password, FALSE, $server_port, $server_socket);
|
|
||||||
} else {
|
mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, TRUE);
|
||||||
// Omit the last parameter to enable connection to the default socket
|
|
||||||
$link = @mysqli_connect($cfg['Server']['host'], $user, $password, FALSE, $server_port);
|
$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)) {
|
if (empty($link)) {
|
||||||
PMA_auth_fails();
|
PMA_auth_fails();
|
||||||
|
Reference in New Issue
Block a user