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

Wrong result (WHERE clause ignored) with multiple clauses using Percona-XtraDB engine

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 5.3.12, 5.5.34, 10.0.7
    • 5.5.35, 10.0.8, 5.3.13
    • None
    • None
    • Centos 6 X64

    Description

      A SELECT statement with multiple WHERE clauses and ASC LIMIT returns all rows up to the limit, the WHERE clauses are ignored. Commenting out one or more of the WHERE clauses causes the query to return the correct results.

      Query:
      SELECT applications.id
      FROM `applications`

      WHERE (`applications`.`configuration_scope_id` = 2)
      AND
      (`applications`.`id` > 2023)
      AND
      ('2013-10-26 23:00:00' <= applications.submitted_at) AND (applications.submitted_at <= '2013-11-23 23:59:59')

      ORDER BY `applications`.`id`
      ASC LIMIT 1000

      See attached .zip which contains a .sql that can be used to create the table.

      The problem only occurs when using the Percona-XtraDB, it does not occure when using INNODB.

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              ScottWylie Scott Wylie
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.