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

LP:798625 - Second wrong result with views and ranges in maria-5.3

    XMLWordPrintable

Details

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

    Description

      Similar to 724942 , the following query returns a value found in the WHERE clause and not in the underlying table. the derived_merge switch has no effect.

      test case:

      CREATE TABLE t1 ( f1 int NOT NULL , f3 int, f6 int, f10 varchar(32), f11 int) ;
      INSERT INTO t1 VALUES (20,5,2,'r', 0);
      CREATE VIEW v1 AS SELECT * FROM t1;
      SELECT v1.f10 FROM v1 WHERE f1 OR f3 AND f10 = 'v' AND ( f3 OR f6 AND f11 OR f10 LIKE '%b%' );

      EXPLAIN:

      id select_type table type possible_keys key key_len ref rows filtered Extra
      1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00

      EXPLAIN EXTENDED:

      select 'v' AS `f10` from `test`.`t1` where (20 or 0)

      bzr version-info:

      revision-id: <email address hidden>
      date: 2011-06-15 21:48:38 -0700
      build-date: 2011-06-17 13:38:12 +0300
      revno: 3049
      branch-nick: maria-5.3

      Attachments

        Activity

          People

            igor Igor Babaev
            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.