|
The problem is that _isLimitSubqueryUsed is not cached with query cache.
It gets calculated when building query, but when the query is coming
from cache it's not.
Because of this, line 1087 of Query/Abstract.php is never executed,
when coming from cache:
if ($this->isLimitSubqueryUsed() &&
$this->_conn->getAttribute(Doctrine::ATTR_DRIVER_NAME) !==
'mysql')
{
$params = array_merge((array) $params, (array) $params);
}
Maybe it is on purpose, but I didn't get any answer on the google-groups.
Here is a diff I use now:
Index: trunk/gui/doctrine-library/Doctrine/Query/Abstract.php
===================================================================
--- a/trunk/gui/doctrine-library/Doctrine/Query/Abstract.php
+++ b/trunk/gui/doctrine-library/Doctrine/Query/Abstract.php
@@ -1286,4 +1286,5 @@
$cached = unserialize($cached);
$this->_tableAliasMap = $cached[2];
+ $this->_isLimitSubqueryUsed = $cached[3];
$customComponent = $cached[0];
@@ -1346,5 +1347,5 @@
}
- return serialize(array($customComponent, $componentInfo,
$this->getTableAliasMap()));
+ return serialize(array($customComponent, $componentInfo,
$this->getTableAliasMap(), $this->isLimitSubqueryUsed()));
}
|