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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 798625

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 798625

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: