Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11188

postgres search result count does not get the total count

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Search
    • Labels:
      None

      Description

      // if the total result count is not cached yet, retrieve it from the db
      if (!$result_count)
      {
      $result_count = sizeof ($id_ary);
      This doesn't take into account the results that are outside the Limit and offset of the query.
      Mysql uses FOUND_ROWS() function instead of sizeof($id_ary). Since pgsql doesn't have FOUND_ROWS, only possible solution is to use a COUNT function to calculate the total result count so that it can be cached.

        Attachments

          Activity

            People

            Assignee:
            Oleg Oleg [X] (Inactive)
            Reporter:
            dhruv.goel92 Dhruv Goel [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: