[MDEV-14957] JOIN::prepare gets unusable "conds" as argument Created: 2018-01-16  Updated: 2018-01-23  Resolved: 2018-01-23

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 5.5.58, 10.0.33, 10.1.30, 10.2.12, 10.3.3
Fix Version/s: 5.5.60, 10.0.34, 10.1.31, 10.2.13, 10.3.5

Type: Bug Priority: Major
Reporter: Oleksandr Byelkin Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-14786 Server crashes in Item_cond::transfor... Closed
Sprint: 10.0.34

 Description   

If put something like dbug_print_items in the beginning of JOIN::prepare it catches passing unusable conds.
One case was on second execution MDEV-14786 but there are other



 Comments   
Comment by Oleksandr Byelkin [ 2018-01-17 ]

create table t1 (i int, row_start timestamp(6) not null default now(),
                 row_end timestamp(6) not null default '2038-01-19 04:14:07.999999');
create view v1 as select i from t1 where i < 5 and (row_end =
TIMESTAMP'2030-01-01 0:0:0' or row_end is null);
create procedure pr(x int) select i from v1;
#set debug_dbug='d,where';
call pr(1);
call pr(2);
drop procedure pr;
drop view v1;
drop table t1;

Comment by Oleksandr Byelkin [ 2018-01-21 ]

github branch: bb-5.5-MDEV-14786

revision-id: 47bb2dcbcc8c3cdca43baf6259f2434a746c7b03 (mariadb-5.5.58-42-g47bb2dcbcc8)
parent(s): c0e964dcf1787a101f6e9c115751c0d02b0fac1b
author: Oleksandr Byelkin
committer: Oleksandr Byelkin
timestamp: 2018-01-21 23:48:32 +0100
message:

MDEV-14786: Server crashes in Item_cond::transform on 2nd execution of SP querying from a view

MDEV-14957: JOIN::prepare gets unusable "conds" as argument

Do not touch merged derived (it is irreversible)

Fix first argument of in_optimizer for calls possible before fix_fields()

Generated at Thu Feb 08 08:17:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.