Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-2760

LP:612894 - Some aggregate functions (such as MIN MAX) work incorrectly in subqueries after getting NULL value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The following query

      SELECT table1 .`col_varchar_nokey`
      FROM CC table1 STRAIGHT_JOIN ( view_B table2 STRAIGHT_JOIN CC table3 ON table3 .`col_varchar_key` = table2 .`col_varchar_key` ) ON table3 .`col_varchar_nokey` = table2 .`col_varchar_key`
      WHERE EXISTS (
      SELECT DISTINCT `pk`
      FROM CC
      WHERE `pk` < table3 .`pk` ) OR table1 .`col_int_nokey` ;

      Returns 1 extra row when executed with subquery cache, as compared to execution with no subquery cache, maria-5.2 or mysql 5.5.5-m3.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.