Commit c4325fd7 authored by Kristjan Siimson's avatar Kristjan Siimson

Add support for MYSQLI_OPT_READ_TIMEOUT

parent 1527d709
...@@ -11,7 +11,6 @@ use Doctrine\DBAL\Driver\ServerInfoAwareConnection; ...@@ -11,7 +11,6 @@ use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use mysqli; use mysqli;
use function defined;
use function floor; use function floor;
use function func_get_args; use function func_get_args;
use function in_array; use function in_array;
...@@ -28,6 +27,7 @@ use function stripos; ...@@ -28,6 +27,7 @@ use function stripos;
use const MYSQLI_INIT_COMMAND; use const MYSQLI_INIT_COMMAND;
use const MYSQLI_OPT_CONNECT_TIMEOUT; use const MYSQLI_OPT_CONNECT_TIMEOUT;
use const MYSQLI_OPT_LOCAL_INFILE; use const MYSQLI_OPT_LOCAL_INFILE;
use const MYSQLI_OPT_READ_TIMEOUT;
use const MYSQLI_READ_DEFAULT_FILE; use const MYSQLI_READ_DEFAULT_FILE;
use const MYSQLI_READ_DEFAULT_GROUP; use const MYSQLI_READ_DEFAULT_GROUP;
use const MYSQLI_SERVER_PUBLIC_KEY; use const MYSQLI_SERVER_PUBLIC_KEY;
...@@ -243,15 +243,13 @@ class MysqliConnection implements ConnectionInterface, PingableConnection, Serve ...@@ -243,15 +243,13 @@ class MysqliConnection implements ConnectionInterface, PingableConnection, Serve
$supportedDriverOptions = [ $supportedDriverOptions = [
MYSQLI_OPT_CONNECT_TIMEOUT, MYSQLI_OPT_CONNECT_TIMEOUT,
MYSQLI_OPT_LOCAL_INFILE, MYSQLI_OPT_LOCAL_INFILE,
MYSQLI_OPT_READ_TIMEOUT,
MYSQLI_INIT_COMMAND, MYSQLI_INIT_COMMAND,
MYSQLI_READ_DEFAULT_FILE, MYSQLI_READ_DEFAULT_FILE,
MYSQLI_READ_DEFAULT_GROUP, MYSQLI_READ_DEFAULT_GROUP,
MYSQLI_SERVER_PUBLIC_KEY,
]; ];
if (defined('MYSQLI_SERVER_PUBLIC_KEY')) {
$supportedDriverOptions[] = MYSQLI_SERVER_PUBLIC_KEY;
}
$exceptionMsg = "%s option '%s' with value '%s'"; $exceptionMsg = "%s option '%s' with value '%s'";
foreach ($driverOptions as $option => $value) { foreach ($driverOptions as $option => $value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment