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 ) ) ;
INSERT INTO x ( x ) VALUES ( 'x' ) , ( NULL ) , ( 'x' ) , ( NULL ) ;
SELECT 1 , ( SELECT 1 WHERE 1 GROUP BY x , x HAVING x IN ( x NOT LIKE ( SELECT x ) + x IS NOT NULL ) AND x NOT IN ( 1 , 1 ) ) NOT LIKE ( SELECT x FROM ( WITH x AS ( WITH x ( x ) AS ( SELECT 1 INTERSECT SELECT x ^ 1 FROM x ) SELECT * FROM x ) SELECT x FROM x UNION SELECT x FROM x ) AS x ORDER BY ( SELECT x WHERE x = 1 AND x IN ( x , x = 'x' OR ( x IN ( x NOT LIKE ( SELECT x ) + x IS NOT NULL ) AND x NOT IN ( 'x' - CASE 1 NOT IN ( SELECT x FROM x WHERE x IS NULL AND x IN ( 1 , 1 ) GROUP BY x HAVING x ) WHEN x IN ( SELECT x FROM x ) THEN 1 ELSE 1 END = CASE WHEN x = 'x' THEN 'x' ELSE x END AND x = 1 , 1 ) ) LIKE ( ( NOT ( x IS NULL ) ) AND ( NOT ( x IS NULL ) ) ) ) GROUP BY x HAVING x < 'x' UNION SELECT 1 - x FROM x GROUP BY x * 1.000000 HAVING 1.000000 ORDER BY 1 ) , ( SELECT x GROUP BY 'x' , ( x >= x ) , 1 , 1.000000 HAVING CASE WHEN - 'x' >= x IS NOT NULL = ( ( WITH RECURSIVE x ( x ) AS ( SELECT 1 UNION SELECT 1 - x FROM x INTERSECT SELECT * FROM x ) SELECT x FROM x WHERE 1 = x ) < x AND CASE WHEN x = 1.000000 THEN 1 ELSE ( SELECT ( x NOT IN ( 1 ) AND x NOT IN ( 1 ) ) ORDER BY 1 ) + 1 ^ 1.000000 ^ CASE x WHEN 1 THEN x ELSE 1.000000 END END < x = ( 1 < x AND x < 'x' ) NOT LIKE x > CASE x WHEN 1 THEN NULL IN ( x ) AND x = 1 ELSE 1 END ) THEN 'x' ELSE x END ORDER BY 1 ) ) , 1 FROM x GROUP BY 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 0x0000555557b9d9ab in Item_field::fix_outer_field (this=0x6290000f7320, thd=0x62c0001d0288, from_field=0x7fffd192ac60, reference=0x6290000f7450) at /home/wx/mariadb-11.3.0/sql/item.cc:5807
#5 0x0000555557b9fdaf in Item_field::fix_fields (this=0x6290000f7320, thd=0x62c0001d0288, reference=0x6290000f7450) at /home/wx/mariadb-11.3.0/sql/item.cc:6105
#6 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x6290000f7320, thd=0x62c0001d0288, ref=0x6290000f7450) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#7 0x0000555556f04089 in Item::fix_fields_if_needed_for_scalar (this=0x6290000f7320, thd=0x62c0001d0288, ref=0x6290000f7450) at /home/wx/mariadb-11.3.0/sql/item.h:1156
#8 0x0000555557022e20 in setup_fields (thd=0x62c0001d0288, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x62d000090758, pre_fix=0x6290000f7118, allow_sum_func=true) at /home/wx/mariadb-11.3.0/sql/sql_base.cc:8061
#9 0x00005555572b6835 in JOIN::prepare (this=0x62d0000903a8, tables_init=0x0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x6290000f6e48, unit_arg=0x6290000f7478) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1526
#10 0x0000555557dcc18e in subselect_single_select_engine::prepare (this=0x6290000f7e58, thd=0x62c0001d0288) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:3943
#11 0x0000555557da5ca5 in Item_subselect::fix_fields (this=0x6290000f7cb8, thd_param=0x62c0001d0288, ref=0x6290000f8040) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:296
#12 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x6290000f7cb8, thd=0x62c0001d0288, ref=0x6290000f8040) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#13 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x6290000f7fc0, thd=0x62c0001d0288, ref=0x6290000f8198) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#14 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x6290000f7fc0, thd=0x62c0001d0288, ref=0x6290000f8198) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#15 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x6290000f8110, thd=0x62c0001d0288, ref=0x6290000f82e0) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#16 0x0000555557c1bc50 in Item_func_like::fix_fields (this=0x6290000f8110, thd=0x62c0001d0288, ref=0x6290000f82e0) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:5879
#17 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x6290000f8110, thd=0x62c0001d0288, ref=0x6290000f82e0) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#18 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x6290000f8260, thd=0x62c0001d0288, ref=0x6290000f83a8) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#19 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x6290000f8260, thd=0x62c0001d0288, ref=0x6290000f83a8) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#20 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x6290000f8320, thd=0x62c0001d0288, ref=0x6290000f8aa8) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#21 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x6290000f8320, thd=0x62c0001d0288, ref=0x6290000f8aa8) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#22 0x0000555556f04089 in Item::fix_fields_if_needed_for_scalar (this=0x6290000f8320, thd=0x62c0001d0288, ref=0x6290000f8aa8) at /home/wx/mariadb-11.3.0/sql/item.h:1156
#23 0x000055555703235b in Item::fix_fields_if_needed_for_bool (this=0x6290000f8320, thd=0x62c0001d0288, ref=0x6290000f8aa8) at /home/wx/mariadb-11.3.0/sql/item.h:1160
#24 0x0000555557c13a3b in Item_cond::fix_fields (this=0x6290000f8998, thd=0x62c0001d0288, ref=0x62d00008fa40) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:4941
#25 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x6290000f8998, thd=0x62c0001d0288, ref=0x62d00008fa40) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#26 0x0000555556f04089 in Item::fix_fields_if_needed_for_scalar (this=0x6290000f8998, thd=0x62c0001d0288, ref=0x62d00008fa40) at /home/wx/mariadb-11.3.0/sql/item.h:1156
#27 0x000055555703235b in Item::fix_fields_if_needed_for_bool (this=0x6290000f8998, thd=0x62c0001d0288, ref=0x62d00008fa40) at /home/wx/mariadb-11.3.0/sql/item.h:1160
#28 0x00005555572b77b9 in JOIN::prepare (this=0x62d00008f828, tables_init=0x0, conds_init=0x6290000f6850, og_num=2, order_init=0x0, skip_order_by=false, group_init=0x6290000f6a10, having_init=0x6290000f8998, proc_param_init=0x0, select_lex_arg=0x6290000f62c8, unit_arg=0x62900016d2a8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1589
#29 0x0000555557dcc18e in subselect_single_select_engine::prepare (this=0x6290000f8c88, thd=0x62c0001d0288) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:3943
#30 0x0000555557da5ca5 in Item_subselect::fix_fields (this=0x6290000f8ae8, thd_param=0x62c0001d0288, ref=0x62d000083c50) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:296
#31 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x6290000f8ae8, thd=0x62c0001d0288, ref=0x62d000083c50) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#32 0x0000555557c6c9f2 in Item_func::fix_fields (this=0x62d000083bd0, thd=0x62c0001d0288, ref=0x62d000083d28) at /home/wx/mariadb-11.3.0/sql/item_func.cc:349
#33 0x0000555557c1bc50 in Item_func_like::fix_fields (this=0x62d000083bd0, thd=0x62c0001d0288, ref=0x62d000083d28) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:5879
#34 0x0000555556f0404f in Item::fix_fields_if_needed (this=0x62d000083bd0, thd=0x62c0001d0288, ref=0x62d000083d28) at /home/wx/mariadb-11.3.0/sql/item.h:1147
#35 0x0000555556f04089 in Item::fix_fields_if_needed_for_scalar (this=0x62d000083bd0, thd=0x62c0001d0288, ref=0x62d000083d28) at /home/wx/mariadb-11.3.0/sql/item.h:1156
#36 0x0000555557022e20 in setup_fields (thd=0x62c0001d0288, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x62d00008d098, pre_fix=0x6290000f6020, allow_sum_func=true) at /home/wx/mariadb-11.3.0/sql/sql_base.cc:8061
#37 0x00005555572b6835 in JOIN::prepare (this=0x62d00008cce8, tables_init=0x62d000083f40, conds_init=0x0, og_num=1, order_init=0x0, skip_order_by=false, group_init=0x62d0000847a8, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x6290000f5d50, unit_arg=0x62c0001d46d8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1526
#38 0x00005555572dd916 in mysql_select (thd=0x62c0001d0288, tables=0x62d000083f40, fields=..., conds=0x0, og_num=1, order=0x0, group=0x62d0000847a8, having=0x0, proc_param=0x0, select_options=2165049856, result=0x62d00008a078, unit=0x62c0001d46d8, select_lex=0x6290000f5d50) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:5224
#39 0x00005555572ad18a in handle_select (thd=0x62c0001d0288, lex=0x62c0001d45f8, result=0x62d00008a078, setup_tables_done_option=0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:628
#40 0x00005555571ce583 in execute_sqlcom_select (thd=0x62c0001d0288, all_tables=0x62d000083f40) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:6013
#41 0x00005555571becf6 in mysql_execute_command (thd=0x62c0001d0288, is_called_from_prepared_stmt=false) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:3912
#42 0x00005555571d95e2 in mysql_parse (thd=0x62c0001d0288, rawbuf=0x6290000f52a8 "SELECT 1 , ( SELECT 1 WHERE 1 GROUP BY x , x HAVING x IN ( x NOT LIKE ( SELECT x ) + x IS NOT NULL ) AND x NOT IN ( 1 , 1 ) ) NOT LIKE ( SELECT x FROM ( WITH x AS ( WITH x ( x ) AS ( SELECT 1 INTERSEC"..., length=1311, parser_state=0x7fffd192e870) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:7734
#43 0x00005555571b1237 in dispatch_command (command=COM_QUERY, thd=0x62c0001d0288, packet=0x6290000fa289 " SELECT 1 , ( SELECT 1 WHERE 1 GROUP BY x , x HAVING x IN ( x NOT LIKE ( SELECT x ) + x IS NOT NULL ) AND x NOT IN ( 1 , 1 ) ) NOT LIKE ( SELECT x FROM ( WITH x AS ( WITH x ( x ) AS ( SELECT 1 INTERSE"..., packet_length=1315, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1893
#44 0x00005555571adf7c in do_command (thd=0x62c0001d0288, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1406
#45 0x000055555768e557 in do_handle_one_connection (connect=0x6110000410c8, put_in_cache=true) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1445
#46 0x000055555768deb4 in handle_one_connection (arg=0x611000040f88) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1347
#47 0x00005555582fa350 in pfs_spawn_thread (arg=0x618000005508) at /home/wx/mariadb-11.3.0/storage/perfschema/pfs.cc:2201
#48 0x00007ffff7115609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#49 0x00007ffff6ce8133 in clone () from /lib/x86_64-linux-gnu/libc.so.6