[MDEV-2402] LP:798625 - Second wrong result with views and ranges in maria-5.3 Created: 2011-06-17  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Philip Stoev (Inactive) Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug798625.xml    

 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



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ]

Launchpad bug id: 798625

Generated at Thu Feb 08 06:41:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.