Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.3.0, 10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
None
-
Ubuntu 20.04
Description
Run these queries in debug build:
CREATE TABLE x ( x VARCHAR ( 1 ) UNIQUE ) ;
INSERT INTO x ( x ) VALUES ( 1 ) ;
UPDATE x SET x = 1 WHERE x = 1 ORDER BY 'x' / ( ( WITH RECURSIVE x ( x ) AS ( SELECT 1 UNION SELECT 1 - x FROM x WINDOW x AS ( PARTITION BY x ORDER BY ( WITH x AS ( SELECT * FROM x WHERE NOT EXISTS ( WITH RECURSIVE x ( x ) AS ( SELECT 1 INTERSECT SELECT x + 1 FROM x GROUP BY 'x' , 'x' , x + x ) SELECT x AS x FROM x ORDER BY x LIMIT 1 OFFSET 1 ) ) SELECT * FROM x WHERE x <= 1 GROUP BY x HAVING x > 'x' ) IS NOT NULL DESC ) ) SELECT 1 WHERE x != 'x' ) AND x = 1 ) / ( - 1.000000 >= ( SELECT x NOT LIKE 'x' FROM x WHERE ( SELECT x FROM x WHERE NULL = x GROUP BY x HAVING ( ( SELECT 1 FROM x GROUP BY ( x OR - 1.000000 >= ( SELECT x NOT LIKE 'x' FROM x WHERE ( SELECT x FROM x WHERE NULL = x ) GROUP BY 1.000000 / x = ( SELECT x + 'x' AS x FROM x WHERE x = x ) HAVING x WINDOW x AS ( ORDER BY x DESC ) ) IS NOT NULL = 1 ) BETWEEN 1 AND 1 ) , x ) > ( 'x' , 'x' ) ) ) IS NOT NULL = 1 AND x = 1 ) , x ;
Will trigger Assertion Failed.
GDB info:
#0 0x00007ffff6c0c00b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff6beb859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff6beb729 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff6bfcfd6 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000555557b3488f in handler::ha_index_first (this=0x61d000248728, buf=0x61a000531138 "\377") at /home/wx/mariadb-11.3.0/sql/handler.cc:3765
#5 0x0000555557368083 in join_read_first (tab=0x62d0000869e8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:24511
#6 0x0000555557360006 in sub_select (join=0x62d000082ac8, join_tab=0x62d0000869e8, end_of_records=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23441
#7 0x000055555735dadd in do_select (join=0x62d000082ac8, procedure=0x0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:22961
#8 0x00005555572dbfe9 in JOIN::exec_inner (this=0x62d000082ac8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4941
#9 0x00005555572d93a0 in JOIN::exec (this=0x62d000082ac8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4718
#10 0x0000555557dce72f in subselect_single_select_engine::exec (this=0x62d0000722c0) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:4159
#11 0x0000555557da9c85 in Item_subselect::exec (this=0x62d000072120) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:812
#12 0x0000555557dafbe9 in Item_singlerow_subselect::val_int (this=0x62d000072120) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:1462
#13 0x00005555578b1e2c in Type_handler_int_result::Item_update_null_value (this=0x55555b7b6980 <type_handler_slong>, item=0x62d000072120) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:4278
#14 0x0000555556e15a64 in Item::update_null_value (this=0x62d000072120) at /home/wx/mariadb-11.3.0/sql/item.h:2079
#15 0x0000555557de3283 in Item_subselect::is_null (this=0x62d000072120) at /home/wx/mariadb-11.3.0/sql/item_subselect.h:190
#16 0x0000555557cfbd14 in Item_row::fix_fields (this=0x62d000072478, thd=0x62c0001e0288, ref=0x62d0000727f8) at /home/wx/mariadb-11.3.0/sql/item_row.cc:60
#17 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d000072478, thd=0x62c0001e0288, ref=0x62d0000727f8) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#18 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x62d000072778, thd=0x62c0001e0288, ref=0x62d00007fe30) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#19 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d000072778, thd=0x62c0001e0288, ref=0x62d00007fe30) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#20 0x0000555556f04089 in Item::fix_fields_if_needed_for_scalar (this=0x62d000072778, thd=0x62c0001e0288, ref=0x62d00007fe30) at /home/wx/mariadb-11.3.0/sql/item.h:1156
#21 0x000055555703235b in Item::fix_fields_if_needed_for_bool (this=0x62d000072778, thd=0x62c0001e0288, ref=0x62d00007fe30) at /home/wx/mariadb-11.3.0/sql/item.h:1160
#22 0x00005555572b77b9 in JOIN::prepare (this=0x62d00007fc18, tables_init=0x62900017a098, conds_init=0x62900017a980, og_num=1, order_init=0x0, skip_order_by=false, group_init=0x62900017acf0, having_init=0x62d000072778, proc_param_init=0x0, select_lex_arg=0x629000179a30, unit_arg=0x62d0000729c0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1589
#23 0x0000555557dcc18e in subselect_single_select_engine::prepare (this=0x62d0000733a0, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:3943
#24 0x0000555557da5ca5 in Item_subselect::fix_fields (this=0x62d000073200, thd_param=0x62c0001e0288, ref=0x62d00007f350) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:296
#25 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d000073200, thd=0x62c0001e0288, ref=0x62d00007f350) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#26 0x0000555556f04089 in Item::fix_fields_if_needed_for_scalar (this=0x62d000073200, thd=0x62c0001e0288, ref=0x62d00007f350) at /home/wx/mariadb-11.3.0/sql/item.h:1156
#27 0x000055555703235b in Item::fix_fields_if_needed_for_bool (this=0x62d000073200, thd=0x62c0001e0288, ref=0x62d00007f350) at /home/wx/mariadb-11.3.0/sql/item.h:1160
#28 0x0000555557029190 in setup_conds (thd=0x62c0001e0288, tables=0x629000179300, leaves=..., conds=0x62d00007f350) at /home/wx/mariadb-11.3.0/sql/sql_base.cc:8888
#29 0x00005555572af1c9 in setup_without_group (thd=0x62c0001e0288, ref_pointer_array=..., tables=0x629000179300, leaves=..., fields=..., all_fields=..., conds=0x62d00007f350, order=0x0, group=0x0, win_specs=..., win_funcs=..., hidden_group_fields=0x62d00007f217, reserved=0x629000178dcc) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:931
#30 0x00005555572b6b86 in JOIN::prepare (this=0x62d00007eeb8, tables_init=0x629000179300, conds_init=0x62d000073200, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x6290001789e0, unit_arg=0x62d000073400) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1531
#31 0x0000555557dcc18e in subselect_single_select_engine::prepare (this=0x62d000073de0, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:3943
#32 0x0000555557da5ca5 in Item_subselect::fix_fields (this=0x62d000073c40, thd_param=0x62c0001e0288, ref=0x62d000073eb0) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:296
#33 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d000073c40, thd=0x62c0001e0288, ref=0x62d000073eb0) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#34 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x62d000073e28, thd=0x62c0001e0288, ref=0x62d0000740d8) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#35 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d000073e28, thd=0x62c0001e0288, ref=0x62d0000740d8) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#36 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x62d000074058, thd=0x62c0001e0288, ref=0x62d000074230) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#37 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d000074058, thd=0x62c0001e0288, ref=0x62d000074230) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#38 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x62d0000741b0, thd=0x62c0001e0288, ref=0x62d000074900) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#39 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d0000741b0, thd=0x62c0001e0288, ref=0x62d000074900) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#40 0x0000555556f04089 in Item::fix_fields_if_needed_for_scalar (this=0x62d0000741b0, thd=0x62c0001e0288, ref=0x62d000074900) at /home/wx/mariadb-11.3.0/sql/item.h:1156
#41 0x000055555703235b in Item::fix_fields_if_needed_for_bool (this=0x62d0000741b0, thd=0x62c0001e0288, ref=0x62d000074900) at /home/wx/mariadb-11.3.0/sql/item.h:1160
#42 0x0000555557c13a3b in Item_cond::fix_fields (this=0x62d0000747f0, thd=0x62c0001e0288, ref=0x62d0000749b0) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:4941
#43 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d0000747f0, thd=0x62c0001e0288, ref=0x62d0000749b0) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#44 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x62d000074928, thd=0x62c0001e0288, ref=0x62d000074a20) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#45 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d000074928, thd=0x62c0001e0288, ref=0x62d000074a20) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#46 0x0000555556f04089 in Item::fix_fields_if_needed_for_scalar (this=0x62d000074928, thd=0x62c0001e0288, ref=0x62d000074a20) at /home/wx/mariadb-11.3.0/sql/item.h:1156
#47 0x00005555573add95 in Item::fix_fields_if_needed_for_order_by (this=0x62d000074928, thd=0x62c0001e0288, ref=0x62d000074a20) at /home/wx/mariadb-11.3.0/sql/item.h:1164
#48 0x000055555737df94 in find_order_in_list (thd=0x62c0001e0288, ref_pointer_array=..., tables=0x6290000f5a80, order=0x62d000074a10, fields=..., all_fields=..., is_group_field=false, add_to_all_fields=true, from_window_spec=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:27533
#49 0x000055555737e55a in setup_order (thd=0x62c0001e0288, ref_pointer_array=..., tables=0x6290000f5a80, fields=..., all_fields=..., order=0x62d000074a10, from_window_spec=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:27580
#50 0x00005555572af634 in setup_without_group (thd=0x62c0001e0288, ref_pointer_array=..., tables=0x6290000f5a80, leaves=..., fields=..., all_fields=..., conds=0x62d00007da60, order=0x62d000074a10, group=0x0, win_specs=..., win_funcs=..., hidden_group_fields=0x62d00007d927, reserved=0x62c0001e52fc) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:947
#51 0x00005555572b6b86 in JOIN::prepare (this=0x62d00007d5c8, tables_init=0x6290000f5a80, conds_init=0x6290000f65e8, og_num=2, order_init=0x62d000074a10, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x62c0001e4f10, unit_arg=0x62c0001e46d8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1531
#52 0x0000555557569318 in Sql_cmd_update::prepare_inner (this=0x6290000f63c0, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/sql_update.cc:2999
#53 0x00005555573a79a7 in Sql_cmd_dml::prepare (this=0x6290000f63c0, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:33265
#54 0x00005555573a7c66 in Sql_cmd_dml::execute (this=0x6290000f63c0, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:33318
#55 0x00005555571c1637 in mysql_execute_command (thd=0x62c0001e0288, is_called_from_prepared_stmt=false) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:4361
#56 0x00005555571d95e2 in mysql_parse (thd=0x62c0001e0288, rawbuf=0x6290000f52a8 "UPDATE x SET x = 1 WHERE x = 1 ORDER BY 'x' / ( ( WITH RECURSIVE x ( x ) AS ( SELECT 1 UNION SELECT 1 - x FROM x WINDOW x AS ( PARTITION BY x ORDER BY ( WITH x AS ( SELECT * FROM x WHERE NOT EXISTS ( "..., length=896, parser_state=0x7fffd192e870) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:7734
#57 0x00005555571b1237 in dispatch_command (command=COM_QUERY, thd=0x62c0001e0288, packet=0x6290000fa289 " UPDATE x SET x = 1 WHERE x = 1 ORDER BY 'x' / ( ( WITH RECURSIVE x ( x ) AS ( SELECT 1 UNION SELECT 1 - x FROM x WINDOW x AS ( PARTITION BY x ORDER BY ( WITH x AS ( SELECT * FROM x WHERE NOT EXISTS ("..., packet_length=900, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1893
#58 0x00005555571adf7c in do_command (thd=0x62c0001e0288, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1406
#59 0x000055555768e557 in do_handle_one_connection (connect=0x611000058688, put_in_cache=true) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1445
#60 0x000055555768deb4 in handle_one_connection (arg=0x611000058548) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1347
#61 0x00005555582fa350 in pfs_spawn_thread (arg=0x618000005508) at /home/wx/mariadb-11.3.0/storage/perfschema/pfs.cc:2201
#62 0x00007ffff7115609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#63 0x00007ffff6ce8133 in clone () from /lib/x86_64-linux-gnu/libc.so.6
Attachments
Issue Links
- is duplicated by
-
MDEV-32706 Assertion Failed at /mariadb-11.3.0/sql/handler.cc:3785
- Closed