From 952e8628549972ebc6db445ce72433b315310d78 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Sat, 12 Mar 2011 14:19:05 +0000 Subject: [PATCH] * add the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY for centos. --- framework/router.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/router.class.php b/framework/router.class.php index a49c2092e0..3ff8bdae2c 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -1464,7 +1464,11 @@ class router $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $dbh->exec("SET NAMES {$config->db->encoding}"); if(isset($config->db->strictMode) and $config->db->strictMode == false) $dbh->exec("SET @@sql_mode= ''"); - if(helper::isCentOS()) $dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); + if(helper::isCentOS()) + { + $dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); + $dbh->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); + } $this->dbh = $dbh; return $dbh; }