From f6cd739a0a364fe76f6015b7bc70eac4a3a9bf02 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 05 Nov 2012 13:50:12 -0500
Subject: [PATCH] Make sure affected_rows() method returns expected (consistent with other RDBMSes) result on MySQL

---
 program/include/rcube_db_mysql.php |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/program/include/rcube_db_mysql.php b/program/include/rcube_db_mysql.php
index 2cdcf30..6f0acba 100644
--- a/program/include/rcube_db_mysql.php
+++ b/program/include/rcube_db_mysql.php
@@ -127,6 +127,9 @@
             $result[PDO::MYSQL_ATTR_SSL_CA] = $dsn['ca'];
         }
 
+        // Always return matching (not affected only) rows count
+        $result[PDO::MYSQL_ATTR_FOUND_ROWS] = true;
+
         return $result;
     }
 

--
Gitblit v1.9.1