Doctrine 1
  1. Doctrine 1
  2. DC-389

query cache doesn't cache _isLimitSubqueryUsed

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.5, 1.1.6
    • Fix Version/s: None
    • Component/s: Caching, Query
    • Labels:
      None
    • Environment:
      Postgres db, php5.2, linux

      Description

      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()));
        }

        Activity

        Peter Kovacs created issue -
        Roman S. Borschel made changes -
        Field Original Value New Value
        Assignee Roman S. Borschel [ romanb ] Jonathan H. Wage [ jwage ]
        Pablo Grass made changes -
        Affects Version/s 1.2.4 [ 10063 ]
        Guilherme Blanco made changes -
        Affects Version/s 1.2.4 [ 10063 ]

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Peter Kovacs
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: