summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-01-26 11:09:58 +0100
committerAndrey Andreev <narf@devilix.net>2015-01-26 11:09:58 +0100
commit9305a8bfe5d23850ab521faf8d1fd5e414e037c7 (patch)
tree1771c5a5f0f436ae5b85b6896c928004b8e0a789 /system
parent9f4eda7495bfec8fe7b28f4192f3c9353cf5fe41 (diff)
Close #3509
Not really a bug, but ...
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 898f80e37..d16c98a68 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -125,6 +125,10 @@ class CI_DB_mysqli_driver extends CI_DB {
$client_flags = ($this->compress === TRUE) ? MYSQLI_CLIENT_COMPRESS : 0;
$mysqli = mysqli_init();
+ $mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 10);
+ $mysqli->options(MYSQLI_OPT_READ_TIMEOUT, 5);
+ $mysqli->options(MYSQLI_OPT_RECONNECT, 1);
+
if ($this->stricton)
{
$mysqli->options(MYSQLI_INIT_COMMAND, 'SET SESSION sql_mode="STRICT_ALL_TABLES"');