Bug #112720 | Query triggers an assertion Failure in eval_const_cond | ||
---|---|---|---|
Submitted: | 13 Oct 2023 15:41 | Modified: | 14 Oct 2023 14:23 |
Reporter: | Yupeng Yang | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S6 (Debug Builds) |
Version: | 8.1.0, 8.0.34 | OS: | Ubuntu (20.04) |
Assigned to: | CPU Architecture: | Any |
[13 Oct 2023 15:41]
Yupeng Yang
[14 Oct 2023 14:23]
MySQL Verification Team
Hello Yupeng Yang, Thank you for the report and test case. Observed that 8.0.34 debug build affected. regards, Umesh
[14 Oct 2023 14:25]
MySQL Verification Team
- 8.0.34 debug build ./mtr --nocheck-testcases bug112720 --debug-server Logging: ./mtr --nocheck-testcases bug112720 --debug-server MySQL Version 8.0.34 Checking supported features - Binaries are debug compiled Using 'all' suites Collecting tests Checking leftover processes Removing old var directory Creating var directory '/export/home/tmp/ushastry/mysql-8.0.34/mysql-test/var' Installing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) COMMENT ------------------------------------------------------------------------------ select 1 as i union select 2 order by ( i < LEFT ( 100 + 20 , BINARY ( case when i < ( select ( select 'zero' as "text" union select 1 + ISNULL ( ( i < 0 ) and ( select ( SELECT case when 0E11 then 0E11 end as "float" WHERE ( SELECT ( select ( SELECT case when 0E11 then 3 end as "float" WHERE 0E11 / 0 ) as "text" ) WHERE ( SELECT case when 0E11 then 0E11 end as "float" WHERE - TRUE and LOCALTIMESTAMP ( 4 ) is not null ) ) || ' !' ) as "text" ) is not null or ( i < 0 ) * 0 ) ) as "text" ) then 1 / 0 when ( select 193965 + 4 as "text" ) then 1 else 2 / 0 end ) ) ) ; [ 50%] main.bug112720 [ fail ] Test ended at 2023-10-14 16:22:02 CURRENT_TEST: main.bug112720 mysqltest: At line 1: Query 'select 1 as i union select 2 order by ( i < LEFT ( 100 + 20 , BINARY ( case when i < ( select ( select 'zero' as "text" union select 1 + ISNULL ( ( i < 0 ) and ( select ( SELECT case when 0E11 then 0E11 end as "float" WHERE ( SELECT ( select ( SELECT case when 0E11 then 3 end as "float" WHERE 0E11 / 0 ) as "text" ) WHERE ( SELECT case when 0E11 then 0E11 end as "float" WHERE - TRUE and LOCALTIMESTAMP ( 4 ) is not null ) ) || ' !' ) as "text" ) is not null or ( i < 0 ) * 0 ) ) as "text" ) then 1 / 0 when ( select 193965 + 4 as "text" ) then 1 else 2 / 0 end ) ) ) ' failed. ERROR 2013 (HY000): Lost connection to MySQL server during query
[14 Oct 2023 14:25]
MySQL Verification Team
-bt #0 0x00007f61747b5aa1 in pthread_kill () from /lib64/libpthread.so.0 #1 0x000000000402c28e in my_write_core(int) () #2 0x00000000032d235e in handle_fatal_signal () #3 <signal handler called> #4 0x00007f6172b00387 in raise () from /lib64/libc.so.6 #5 0x00007f6172b01a78 in abort () from /lib64/libc.so.6 #6 0x00007f6172af91a6 in __assert_fail_base () from /lib64/libc.so.6 #7 0x00007f6172af9252 in __assert_fail () from /lib64/libc.so.6 #8 0x000000000347b0e5 in eval_const_cond(THD*, Item*, bool*) () #9 0x000000000313e8f5 in remove_eq_conds(THD*, Item*, Item**, Item::cond_result*) [clone .localalias] () #10 0x000000000313e7ce in remove_eq_conds(THD*, Item*, Item**, Item::cond_result*) [clone .localalias] () #11 0x000000000314c938 in optimize_cond(THD*, Item**, COND_EQUAL**, mem_root_deque<Table_ref*>*, Item::cond_result*) () #12 0x000000000314ffee in JOIN::optimize(bool) () #13 0x00000000031b755f in Query_block::optimize(THD*, bool) () #14 0x000000000322d695 in Query_expression::optimize(THD*, TABLE*, bool, bool) () #15 0x00000000031b75cb in Query_block::optimize(THD*, bool) () #16 0x000000000322d695 in Query_expression::optimize(THD*, TABLE*, bool, bool) () #17 0x00000000034ccc93 in Item_subselect::exec(THD*) () #18 0x00000000034c5689 in Item_singlerow_subselect::val_str(String*) () #19 0x000000000341b384 in Item::evaluate(THD*, String*) () #20 0x000000000341b4c2 in Item::update_null_value() () #21 0x00000000034cdda5 in Item_subselect::is_null() () #22 0x0000000003436b48 in convert_constant_item(THD*, Item_field*, Item**, bool*) () #23 0x000000000343c044 in Item_bool_func2::convert_constant_arg(THD*, Item*, Item**, bool*) () #24 0x000000000343c26d in Item_bool_func2::resolve_type(THD*) () #25 0x000000000347b300 in Item_func::fix_fields(THD*, Item**) () #26 0x000000000347b10b in Item_func::fix_func_arg(THD*, Item**) () #27 0x000000000347b2ee in Item_func::fix_fields(THD*, Item**) () #28 0x0000000003432910 in Item_func_case::fix_fields(THD*, Item**) () #29 0x000000000347b10b in Item_func::fix_func_arg(THD*, Item**) () #30 0x000000000347b2ee in Item_func::fix_fields(THD*, Item**) () #31 0x00000000034b3e58 in Item_str_func::fix_fields(THD*, Item**) () #32 0x000000000347b10b in Item_func::fix_func_arg(THD*, Item**) () #33 0x000000000347b2ee in Item_func::fix_fields(THD*, Item**) () #34 0x00000000034b3e58 in Item_str_func::fix_fields(THD*, Item**) () #35 0x000000000347b10b in Item_func::fix_func_arg(THD*, Item**) () #36 0x000000000347b2ee in Item_func::fix_fields(THD*, Item**) () #37 0x00000000031a0037 in find_order_in_list(THD*, Bounds_checked_array<Item*>, Table_ref*, ORDER*, mem_root_deque<Item*>*, bool, bool) () #38 0x00000000031a0291 in setup_order(THD*, Bounds_checked_array<Item*>, Table_ref*, mem_root_deque<Item*>*, ORDER*) () #39 0x00000000031aa44b in Query_block::prepare(THD*, mem_root_deque<Item*>*) () #40 0x000000000322b4d3 in Query_expression::prepare_query_term(THD*, Query_term*, Query_result*, unsigned long long, unsigned long long, int, Mem_root_array<bool>&) [clone .localalias] () #41 0x000000000322c19c in Query_expression::prepare(THD*, Query_result*, mem_root_deque<Item*>*, unsigned long long, unsigned long long) () #42 0x00000000031b6b6e in Sql_cmd_select::prepare_inner(THD*) () #43 0x00000000031c05c5 in Sql_cmd_dml::prepare(THD*) () #44 0x00000000031c08ed in Sql_cmd_dml::execute(THD*) () #45 0x0000000003161263 in mysql_execute_command(THD*, bool) () #46 0x00000000031626a2 in dispatch_sql_command(THD*, Parser_state*) () #47 0x0000000003163cd5 in dispatch_command(THD*, COM_DATA const*, enum_server_command) () #48 0x000000000316596c in do_command(THD*) () #49 0x00000000032c437c in handle_connection () #50 0x00000000047e1af5 in pfs_spawn_thread () #51 0x00007f61747b0ea5 in start_thread () from /lib64/libpthread.so.0 #52 0x00007f6172bc8b2d in clone () from /lib64/libc.so.6