Second wrong result with views and ranges in maria-5.3

Bug #798625 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Critical
Igor Babaev

Bug 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

Changed in maria:
milestone: none → 5.3
assignee: nobody → Igor Babaev (igorb-seattle)
Changed in maria:
importance: Undecided → Critical
status: New → Confirmed
Changed in maria:
status: Confirmed → In Progress
Changed in maria:
status: In Progress → Fix Committed
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.