From 4af76d20cafcd456bf3ce0fcb17b25a888c45160 Mon Sep 17 00:00:00 2001 From: Thomas <thomas@roundcube.net> Date: Mon, 21 Oct 2013 15:14:46 -0400 Subject: [PATCH] Bump version --- program/lib/Roundcube/rcube_db_mysql.php | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php index 1c5ba1d..7f5ad2b 100644 --- a/program/lib/Roundcube/rcube_db_mysql.php +++ b/program/lib/Roundcube/rcube_db_mysql.php @@ -2,8 +2,6 @@ /** +-----------------------------------------------------------------------+ - | program/include/rcube_db_mysql.php | - | | | This file is part of the Roundcube Webmail client | | Copyright (C) 2005-2012, The Roundcube Dev Team | | | @@ -14,12 +12,10 @@ | PURPOSE: | | Database wrapper class that implements PHP PDO functions | | for MySQL database | - | | +-----------------------------------------------------------------------+ | Author: Aleksander Machniak <alec@alec.pl> | +-----------------------------------------------------------------------+ */ - /** * Database independent query interface @@ -38,6 +34,13 @@ */ protected function init() { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + rcube::raise_error(array('code' => 600, 'type' => 'db', + 'line' => __LINE__, 'file' => __FILE__, + 'message' => "MySQL driver requires PHP >= 5.3, current version is " . PHP_VERSION), + true, true); + } + // SQL identifiers quoting $this->options['identifier_start'] = '`'; $this->options['identifier_end'] = '`'; @@ -130,6 +133,9 @@ // Always return matching (not affected only) rows count $result[PDO::MYSQL_ATTR_FOUND_ROWS] = true; + // Enable AUTOCOMMIT mode (#1488902) + $dsn_options[PDO::ATTR_AUTOCOMMIT] = true; + return $result; } @@ -148,7 +154,7 @@ $result = $this->query('SHOW VARIABLES'); - while ($sql_arr = $this->fetch_array($result)) { + while ($row = $this->fetch_array($result)) { $this->variables[$row[0]] = $row[1]; } } -- Gitblit v1.9.1