Skip to content

Commit

Permalink
Merge pull request #4142 from siimsoni/msyqli_opt_read_timeout
Browse files Browse the repository at this point in the history
Add support for MYSQLI_OPT_READ_TIMEOUT
  • Loading branch information
morozov authored Jul 3, 2020
2 parents 0a4630a + c4325fd commit df465cc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Doctrine\DBAL\ParameterType;
use mysqli;

use function defined;
use function floor;
use function func_get_args;
use function in_array;
Expand All @@ -28,6 +27,7 @@
use const MYSQLI_INIT_COMMAND;
use const MYSQLI_OPT_CONNECT_TIMEOUT;
use const MYSQLI_OPT_LOCAL_INFILE;
use const MYSQLI_OPT_READ_TIMEOUT;
use const MYSQLI_READ_DEFAULT_FILE;
use const MYSQLI_READ_DEFAULT_GROUP;
use const MYSQLI_SERVER_PUBLIC_KEY;
Expand Down Expand Up @@ -245,15 +245,13 @@ private function setDriverOptions(array $driverOptions = []): void
$supportedDriverOptions = [
MYSQLI_OPT_CONNECT_TIMEOUT,
MYSQLI_OPT_LOCAL_INFILE,
MYSQLI_OPT_READ_TIMEOUT,
MYSQLI_INIT_COMMAND,
MYSQLI_READ_DEFAULT_FILE,
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'";

foreach ($driverOptions as $option => $value) {
Expand Down

0 comments on commit df465cc

Please sign in to comment.