[MDEV-26160] crash/valgrind error in resolve_ref_in_select_and_group Created: 2021-07-16  Updated: 2022-03-16  Resolved: 2022-03-16

Status: Closed
Project: MariaDB Server
Component/s: Data Manipulation - Update
Affects Version/s: 10.6.3, 10.3, 10.4, 10.5, 10.6
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: sbester1 Assignee: Oleksandr Byelkin
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Linux x64


Issue Links:
Duplicate
is duplicated by MDEV-22464 Server crash on UPDATE with nested su... Closed

 Description   

This segfaulted a release build. But run it in valgrind to see:

errors in context 1 of 1:
Conditional jump or move depends on uninitialised value(s)
at: resolve_ref_in_select_and_group (item.cc:5409)
by: Item_ref::fix_fields (item.cc:7910)
by: fix_fields_if_needed (item.h:1144)
by: Item_func::fix_fields (item_func.cc:347)
by: fix_fields_if_needed (item.h:1144)
by: fix_fields_if_needed_for_scalar (item.h:1148)
by: fix_fields_if_needed_for_bool (item.h:1152)
by: JOIN::prepare (sql_select.cc:1459)
by: subselect_single_select_engine::prepare(item_subselect.cc:3895)
by: Item_subselect::fix_fields (item_subselect.cc:295)
by: fix_fields_if_needed (item.h:1144)
by: fix_fields_if_needed_for_scalar (item.h:1148)
by: fix_fields_if_needed_for_bool (item.h:1152)
by: setup_conds (sql_base.cc:8444)
by: setup_without_group (sql_select.cc:832)
by: JOIN::prepare (sql_select.cc:1407)
by: mysql_select (sql_select.cc:4958)
by: mysql_multi_update (sql_update.cc:1968)
by: mysql_execute_command (sql_parse.cc:4499)
by: mysql_parse (sql_parse.cc:8026)

Testcase

 
drop table if exists t;
create table t (a blob,  b text ) engine=innodb;
update t  set  a =current_timestamp 
where exists 
(
 select b from  t
 where @b:=a
 having a  >  72057594037927936
);



 Comments   
Comment by Elena Stepanova [ 2021-07-16 ]

It seems to be the same as MDEV-22464 (ignore the stack trace in the description, see the correct ones in comments).
I'll assign it to sanja though, to double-check

Generated at Thu Feb 08 09:43:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.