summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-03-25 18:39:33 +0000
committerthomascube <thomas@roundcube.net>2008-03-25 18:39:33 +0000
commit0ce1a6514975293e134e4a41e739a0d5f9025990 (patch)
treefe7199e12ad8d5f9b78aaa0b47789c03122d2a02
parent0ed265498ca2f5b06827aa96e13f270be74fa24a (diff)
Only emulate prepared queries in debug mode
-rw-r--r--program/include/rcube_mdb2.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/include/rcube_mdb2.inc b/program/include/rcube_mdb2.inc
index 15e55b039..72d906664 100644
--- a/program/include/rcube_mdb2.inc
+++ b/program/include/rcube_mdb2.inc
@@ -96,8 +96,8 @@ class rcube_mdb2
{
// Use persistent connections if available
$dbh = MDB2::connect($dsn, array(
- 'emulate_prepared' => true,
'persistent' => $this->db_pconn,
+ 'emulate_prepared' => $this->debug_mode,
'debug' => $this->debug_mode,
'debug_handler' => 'mdb2_debug_handler',
'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL));
@@ -169,7 +169,10 @@ class rcube_mdb2
{
$this->debug_mode = $dbg;
if ($this->db_connected)
+ {
$this->db_handle->setOption('debug', $dbg);
+ $this->db_handle->setOption('emulate_prepared', $dbg);
+ }
}