Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25012

Server crash in find_field_in_tables, Assertion `name' failed in find_field_in_table_ref

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.5, 10.6, 10.11, 11.4
    • Server, Views

    Description

      CREATE TABLE t1 (f INT);
      INSERT INTO t1 VALUES (1),(2); # Optional, fails either way
      CREATE VIEW v1 AS SELECT f, COUNT(*) c FROM t1 GROUP BY f;
       
      SELECT * FROM v1 WHERE EXPORT_SET(1, DEFAULT(f) MOD 1, 'x', AES_DECRYPT('secret',f));
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      10.3 25ecf8ed debub

      mysqld: /data/src/10.3/sql/sql_base.cc:5990: Field* find_field_in_table_ref(THD*, TABLE_LIST*, const char*, size_t, const char*, const char*, const char*, Item**, bool, bool, uint*, bool, TABLE_LIST**): Assertion `name' failed.
      210228 18:59:55 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f239e582f36 in __GI___assert_fail (assertion=0x56086e7b483d "name", file=0x56086e7b2818 "/data/src/10.3/sql/sql_base.cc", line=5990, function=0x56086e7b47a0 "Field* find_field_in_table_ref(THD*, TABLE_LIST*, const char*, size_t, const char*, const char*, const char*, Item**, bool, bool, uint*, bool, TABLE_LIST**)") at assert.c:101
      #8  0x000056086dadd6e8 in find_field_in_table_ref (thd=0x7f2388000d90, table_list=0x7f2388012d28, name=0x0, length=0, item_name=0x0, db_name=0x0, table_name=0x0, ref=0x7f2388017fd8, check_privileges=true, allow_rowid=true, cached_field_index_ptr=0x7f2388017e7c, register_tree_change=true, actual_table=0x7f23985a6bb0) at /data/src/10.3/sql/sql_base.cc:5990
      #9  0x000056086dade7ce in find_field_in_tables (thd=0x7f2388000d90, item=0x7f2388017da8, first_table=0x7f2388012d28, last_table=0x0, ref=0x7f2388017fd8, report_error=IGNORE_EXCEPT_NON_UNIQUE, check_privileges=true, register_tree_change=true) at /data/src/10.3/sql/sql_base.cc:6348
      #10 0x000056086dec531c in Item_field::fix_fields (this=0x7f2388017da8, thd=0x7f2388000d90, reference=0x7f2388017fd8) at /data/src/10.3/sql/item.cc:6070
      #11 0x000056086da65a7c in Item::fix_fields_if_needed (this=0x7f2388017da8, thd=0x7f2388000d90, ref=0x7f2388017fd8) at /data/src/10.3/sql/item.h:829
      #12 0x000056086df203f6 in Item_func::fix_fields (this=0x7f2388017f48, thd=0x7f2388000d90, ref=0x7f2388017d00) at /data/src/10.3/sql/item_func.cc:352
      #13 0x000056086da65a7c in Item::fix_fields_if_needed (this=0x7f2388017f48, thd=0x7f2388000d90, ref=0x7f2388017d00) at /data/src/10.3/sql/item.h:829
      #14 0x000056086df203f6 in Item_func::fix_fields (this=0x7f2388018320, thd=0x7f2388000d90, ref=0x7f23880172d0) at /data/src/10.3/sql/item_func.cc:352
      #15 0x000056086df57b91 in Item_str_func::fix_fields (this=0x7f2388018320, thd=0x7f2388000d90, ref=0x7f23880172d0) at /data/src/10.3/sql/item_strfunc.cc:127
      #16 0x000056086dbb77af in JOIN::optimize_inner (this=0x7f2388016ec8) at /data/src/10.3/sql/sql_select.cc:1717
      #17 0x000056086dbb6b6e in JOIN::optimize (this=0x7f2388016ec8) at /data/src/10.3/sql/sql_select.cc:1502
      #18 0x000056086db20091 in mysql_derived_optimize (thd=0x7f2388000d90, lex=0x7f2388004b98, derived=0x7f2388012d28) at /data/src/10.3/sql/sql_derived.cc:940
      #19 0x000056086db1e251 in mysql_handle_single_derived (lex=0x7f2388004b98, derived=0x7f2388012d28, phases=4) at /data/src/10.3/sql/sql_derived.cc:199
      #20 0x000056086dbb7c2f in JOIN::optimize_inner (this=0x7f2388016878) at /data/src/10.3/sql/sql_select.cc:1783
      #21 0x000056086dbb6b6e in JOIN::optimize (this=0x7f2388016878) at /data/src/10.3/sql/sql_select.cc:1502
      #22 0x000056086dbc0cc0 in mysql_select (thd=0x7f2388000d90, tables=0x7f2388012d28, wild_num=1, fields=..., conds=0x7f2388013c78, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f2388016850, unit=0x7f2388004c58, select_lex=0x7f23880053e0) at /data/src/10.3/sql/sql_select.cc:4310
      #23 0x000056086dbb22ec in handle_select (thd=0x7f2388000d90, lex=0x7f2388004b98, result=0x7f2388016850, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:370
      #24 0x000056086db7876a in execute_sqlcom_select (thd=0x7f2388000d90, all_tables=0x7f2388012d28) at /data/src/10.3/sql/sql_parse.cc:6317
      #25 0x000056086db6ef77 in mysql_execute_command (thd=0x7f2388000d90) at /data/src/10.3/sql/sql_parse.cc:3848
      #26 0x000056086db7caee in mysql_parse (thd=0x7f2388000d90, rawbuf=0x7f2388012ab8 "SELECT * FROM v1 WHERE EXPORT_SET(1, DEFAULT(f) MOD 1, 'x', AES_DECRYPT('secret',f))", length=84, parser_state=0x7f23985a85c0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7841
      #27 0x000056086db69232 in dispatch_command (command=COM_QUERY, thd=0x7f2388000d90, packet=0x7f2388008f11 "SELECT * FROM v1 WHERE EXPORT_SET(1, DEFAULT(f) MOD 1, 'x', AES_DECRYPT('secret',f))", packet_length=84, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
      #28 0x000056086db67bd2 in do_command (thd=0x7f2388000d90) at /data/src/10.3/sql/sql_parse.cc:1398
      #29 0x000056086dce678d in do_handle_one_connection (connect=0x560870672860) at /data/src/10.3/sql/sql_connect.cc:1403
      #30 0x000056086dce64e9 in handle_one_connection (arg=0x560870672860) at /data/src/10.3/sql/sql_connect.cc:1308
      #31 0x000056086e6b3c2d in pfs_spawn_thread (arg=0x5608707174a0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #32 0x00007f239ea94609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #33 0x00007f239e66e293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.2 259e5243 non-debug

      #3  <signal handler called>
      #4  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
      #5  0x000055a2b9b53271 in find_field_in_tables (thd=thd@entry=0x7fc058000c48, item=item@entry=0x7fc0580143d8, first_table=0x7fc05800f5b0, last_table=0x0, ref=ref@entry=0x7fc0580145f8, report_error=IGNORE_EXCEPT_NON_UNIQUE, check_privileges=true, register_tree_change=true) at /data/src/10.2/sql/sql_base.cc:5962
      #6  0x000055a2b9d6c495 in Item_field::fix_fields (this=0x7fc0580143d8, thd=0x7fc058000c48, reference=0x7fc0580145f8) at /data/src/10.2/sql/item.cc:5454
      #7  0x000055a2b9dab636 in Item_func::fix_fields (ref=<optimized out>, thd=0x7fc058000c48, this=0x7fc058014568) at /data/src/10.2/sql/item_func.cc:201
      #8  Item_func::fix_fields (this=0x7fc058014568, thd=0x7fc058000c48, ref=<optimized out>) at /data/src/10.2/sql/item_func.cc:168
      #9  0x000055a2b9dab636 in Item_func::fix_fields (ref=<optimized out>, thd=0x7fc058000c48, this=0x7fc058014930) at /data/src/10.2/sql/item_func.cc:201
      #10 Item_func::fix_fields (this=this@entry=0x7fc058014930, thd=thd@entry=0x7fc058000c48, ref=<optimized out>) at /data/src/10.2/sql/item_func.cc:168
      #11 0x000055a2b9dd5566 in Item_str_func::fix_fields (this=0x7fc058014930, thd=0x7fc058000c48, ref=<optimized out>) at /data/src/10.2/sql/item_strfunc.cc:106
      #12 0x000055a2b9bf489f in JOIN::optimize_inner (this=0x7fc058013538) at /data/src/10.2/sql/sql_select.cc:1356
      #13 0x000055a2b9bf7b69 in JOIN::optimize (this=0x7fc058013538) at /data/src/10.2/sql/sql_select.cc:1118
      #14 JOIN::optimize (this=this@entry=0x7fc058013538) at /data/src/10.2/sql/sql_select.cc:1110
      #15 0x000055a2b9b72b63 in mysql_derived_optimize (thd=0x7fc058000c48, lex=0x7fc0580045c0, derived=0x7fc05800f5b0) at /data/src/10.2/sql/sql_derived.cc:898
      #16 0x000055a2b9b72623 in mysql_handle_single_derived (lex=0x7fc0580045c0, derived=derived@entry=0x7fc05800f5b0, phases=phases@entry=4) at /data/src/10.2/sql/sql_derived.cc:198
      #17 0x000055a2b9bf4aa7 in JOIN::optimize_inner (this=0x7fc058012f10) at /data/src/10.2/sql/sql_select.cc:1404
      #18 0x000055a2b9bf7b69 in JOIN::optimize (this=0x7fc058012f10) at /data/src/10.2/sql/sql_select.cc:1118
      #19 JOIN::optimize (this=0x7fc058012f10) at /data/src/10.2/sql/sql_select.cc:1110
      #20 0x000055a2b9bf9ca8 in mysql_select (thd=0x7fc058000c48, tables=0x7fc05800f5b0, wild_num=1, fields=..., conds=0x7fc058010490, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fc058012ef0, unit=0x7fc058004680, select_lex=0x7fc058004dc0) at /data/src/10.2/sql/sql_select.cc:3823
      #21 0x000055a2b9bf9f77 in handle_select (thd=thd@entry=0x7fc058000c48, lex=lex@entry=0x7fc0580045c0, result=result@entry=0x7fc058012ef0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.2/sql/sql_select.cc:361
      #22 0x000055a2b9b8f1d1 in execute_sqlcom_select (thd=0x7fc058000c48, all_tables=0x7fc05800f5b0) at /data/src/10.2/sql/sql_parse.cc:6275
      #23 0x000055a2b9b9c9da in mysql_execute_command (thd=<optimized out>) at /data/src/10.2/sql/sql_parse.cc:3586
      #24 0x000055a2b9b9f93b in mysql_parse (thd=thd@entry=0x7fc058000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fc0693cf5b0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:7790
      #25 0x000055a2b9ba2b4d in dispatch_command (command=COM_QUERY, thd=0x7fc058000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.2/sql/sql_class.h:1096
      #26 0x000055a2b9ba3d97 in do_command (thd=0x7fc058000c48) at /data/src/10.2/sql/sql_parse.cc:1381
      #27 0x000055a2b9c7ce26 in do_handle_one_connection (connect=connect@entry=0x55a2bc8e72f8) at /data/src/10.2/sql/sql_connect.cc:1336
      #28 0x000055a2b9c7cf9f in handle_one_connection (arg=arg@entry=0x55a2bc8e72f8) at /data/src/10.2/sql/sql_connect.cc:1241
      #29 0x000055a2ba2180c6 in pfs_spawn_thread (arg=0x55a2bc8f81a8) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #30 0x00007fc06f788609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #31 0x00007fc06f37d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3 25ecf8ed non-debug

      #3  <signal handler called>
      #4  0x00005573388021bc in my_strcasecmp_utf8 (cs=0x557338f75320 <my_charset_utf8_general_ci>, s=0x0, t=0x5573388543b4 "_rowid") at /data/src/10.3/strings/ctype-utf8.c:5297
      #5  0x000055733800a5c8 in find_field_in_table (thd=thd@entry=0x7fdb78000c48, table=0x7fdb7815d990, name=name@entry=0x0, length=length@entry=0, allow_rowid=<optimized out>, cached_field_index_ptr=cached_field_index_ptr@entry=0x7fdb78014ad4) at /data/src/10.3/sql/sql_base.cc:5919
      #6  0x000055733800acd6 in find_field_in_table_ref (thd=thd@entry=0x7fdb78000c48, table_list=table_list@entry=0x7fdb7800f980, name=name@entry=0x0, length=length@entry=0, item_name=<optimized out>, db_name=<optimized out>, db_name@entry=0x0, table_name=<optimized out>, ref=0x7fdb78014c30, check_privileges=true, allow_rowid=true, cached_field_index_ptr=0x7fdb78014ad4, register_tree_change=true, actual_table=0x7fdb951ccf98) at /data/src/10.3/sql/sql_base.cc:6054
      #7  0x000055733800b3cf in find_field_in_tables (thd=thd@entry=0x7fdb78000c48, item=item@entry=0x7fdb78014a00, first_table=<optimized out>, last_table=0x0, ref=ref@entry=0x7fdb78014c30, report_error=IGNORE_EXCEPT_NON_UNIQUE, check_privileges=true, register_tree_change=true) at /data/src/10.3/sql/sql_base.cc:6348
      #8  0x0000557338285fa5 in Item_field::fix_fields (this=0x7fdb78014a00, thd=0x7fdb78000c48, reference=0x7fdb78014c30) at /data/src/10.3/sql/item.cc:6070
      #9  0x00005573382c3ffc in Item::fix_fields_if_needed (ref=0x7fdb78014c30, thd=0x7fdb78000c48, this=0x7fdb78014a00) at /data/src/10.3/sql/item.h:827
      #10 Item::fix_fields_if_needed (ref=0x7fdb78014c30, thd=0x7fdb78000c48, this=0x7fdb78014a00) at /data/src/10.3/sql/item.h:827
      #11 Item_func::fix_fields (ref=<optimized out>, thd=0x7fdb78000c48, this=0x7fdb78014ba0) at /data/src/10.3/sql/item_func.cc:352
      #12 Item_func::fix_fields (this=0x7fdb78014ba0, thd=0x7fdb78000c48, ref=<optimized out>) at /data/src/10.3/sql/item_func.cc:319
      #13 0x00005573382c3ffc in Item::fix_fields_if_needed (ref=0x7fdb78014958, thd=0x7fdb78000c48, this=0x7fdb78014ba0) at /data/src/10.3/sql/item.h:827
      #14 Item::fix_fields_if_needed (ref=0x7fdb78014958, thd=0x7fdb78000c48, this=0x7fdb78014ba0) at /data/src/10.3/sql/item.h:827
      #15 Item_func::fix_fields (ref=<optimized out>, thd=0x7fdb78000c48, this=0x7fdb78014f78) at /data/src/10.3/sql/item_func.cc:352
      #16 Item_func::fix_fields (this=this@entry=0x7fdb78014f78, thd=thd@entry=0x7fdb78000c48, ref=<optimized out>) at /data/src/10.3/sql/item_func.cc:319
      #17 0x00005573382f1ef6 in Item_str_func::fix_fields (this=0x7fdb78014f78, thd=0x7fdb78000c48, ref=<optimized out>) at /data/src/10.3/sql/item_strfunc.cc:127
      #18 0x00005573380c7ea5 in JOIN::optimize_inner (this=0x7fdb78013b20) at /data/src/10.3/sql/sql_select.cc:1717
      #19 0x00005573380c8912 in JOIN::optimize (this=this@entry=0x7fdb78013b20) at /data/src/10.3/sql/sql_select.cc:1502
      #20 0x000055733802be67 in mysql_derived_optimize (thd=0x7fdb78000c48, lex=0x7fdb78004890, derived=0x7fdb7800f980) at /data/src/10.3/sql/sql_derived.cc:940
      #21 0x000055733802b78c in mysql_handle_single_derived (lex=0x7fdb78004890, derived=derived@entry=0x7fdb7800f980, phases=phases@entry=4) at /data/src/10.3/sql/sql_derived.cc:199
      #22 0x00005573380c814b in JOIN::optimize_inner (this=0x7fdb780134d0) at /data/src/10.3/sql/sql_select.cc:1783
      #23 0x00005573380c8912 in JOIN::optimize (this=this@entry=0x7fdb780134d0) at /data/src/10.3/sql/sql_select.cc:1502
      #24 0x00005573380ca9a4 in mysql_select (thd=0x7fdb78000c48, tables=0x7fdb7800f980, wild_num=1, fields=..., conds=0x7fdb780108d0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fdb780134a8, unit=0x7fdb78004950, select_lex=0x7fdb780050d8) at /data/src/10.3/sql/sql_select.cc:4310
      #25 0x00005573380cabeb in handle_select (thd=thd@entry=0x7fdb78000c48, lex=lex@entry=0x7fdb78004890, result=result@entry=0x7fdb780134a8, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:370
      #26 0x000055733805b151 in execute_sqlcom_select (thd=0x7fdb78000c48, all_tables=0x7fdb7800f980) at /data/src/10.3/sql/sql_parse.cc:6317
      #27 0x0000557338068be9 in mysql_execute_command (thd=0x7fdb78000c48) at /data/src/10.3/sql/sql_parse.cc:3848
      #28 0x000055733806baa3 in mysql_parse (thd=0x7fdb78000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7841
      #29 0x000055733806de7d in dispatch_command (command=COM_QUERY, thd=0x7fdb78000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_class.h:1139
      #30 0x000055733806fe5d in do_command (thd=0x7fdb78000c48) at /data/src/10.3/sql/sql_parse.cc:1398
      #31 0x0000557338157866 in do_handle_one_connection (connect=connect@entry=0x55733ad494d8) at /data/src/10.3/sql/sql_connect.cc:1403
      #32 0x0000557338157a3f in handle_one_connection (arg=arg@entry=0x55733ad494d8) at /data/src/10.3/sql/sql_connect.cc:1308
      #33 0x0000557338733096 in pfs_spawn_thread (arg=0x55733ae2d258) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #34 0x00007fdb9b5ed609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #35 0x00007fdb9b1e2293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5 8d714db6 non-debug

      #3  <signal handler called>
      #4  my_strcasecmp_utf8mb3 (cs=<optimized out>, s=0x0, t=0x559c32ed4c47 "_rowid") at /data/src/10.5/strings/ctype-utf8.c:5109
      #5  0x0000559c3251d808 in find_field_in_table (thd=thd@entry=0x7fe408000c58, table=0x7fe408198280, name=name@entry=0x0, length=length@entry=0, allow_rowid=<optimized out>, cached_field_index_ptr=cached_field_index_ptr@entry=0x7fe408034c5c) at /data/src/10.5/sql/sql_base.cc:6007
      #6  0x0000559c3251debe in find_field_in_table_ref (thd=thd@entry=0x7fe408000c58, table_list=table_list@entry=0x7fe408010ba8, name=name@entry=0x0, length=length@entry=0, item_name=<optimized out>, db_name=<optimized out>, db_name@entry=0x0, table_name=<optimized out>, ref=0x7fe408034dd0, check_privileges=true, allow_rowid=true, cached_field_index_ptr=0x7fe408034c5c, register_tree_change=true, actual_table=0x7fe419017bd8) at /data/src/10.5/sql/sql_base.cc:6142
      #7  0x0000559c3251e5ef in find_field_in_tables (thd=thd@entry=0x7fe408000c58, item=item@entry=0x7fe408034b60, first_table=<optimized out>, last_table=0x0, ref=ref@entry=0x7fe408034dd0, report_error=IGNORE_EXCEPT_NON_UNIQUE, check_privileges=true, register_tree_change=true) at /data/src/10.5/sql/sql_base.cc:6437
      #8  0x0000559c327bda45 in Item_field::fix_fields (this=0x7fe408034b60, thd=0x7fe408000c58, reference=0x7fe408034dd0) at /data/src/10.5/sql/item.cc:5844
      #9  0x0000559c327fc8fd in Item::fix_fields_if_needed (ref=0x7fe408034dd0, thd=0x7fe408000c58, this=0x7fe408034b60) at /data/src/10.5/sql/item.h:986
      #10 Item::fix_fields_if_needed (ref=0x7fe408034dd0, thd=0x7fe408000c58, this=0x7fe408034b60) at /data/src/10.5/sql/item.h:986
      #11 Item_func::fix_fields (ref=<optimized out>, thd=0x7fe408000c58, this=0x7fe408034d38) at /data/src/10.5/sql/item_func.cc:352
      #12 Item_func::fix_fields (this=0x7fe408034d38, thd=0x7fe408000c58, ref=<optimized out>) at /data/src/10.5/sql/item_func.cc:319
      #13 0x0000559c327fc8fd in Item::fix_fields_if_needed (ref=0x7fe408034ab0, thd=0x7fe408000c58, this=0x7fe408034d38) at /data/src/10.5/sql/item.h:986
      #14 Item::fix_fields_if_needed (ref=0x7fe408034ab0, thd=0x7fe408000c58, this=0x7fe408034d38) at /data/src/10.5/sql/item.h:986
      #15 Item_func::fix_fields (ref=<optimized out>, thd=0x7fe408000c58, this=0x7fe408035158) at /data/src/10.5/sql/item_func.cc:352
      #16 Item_func::fix_fields (this=this@entry=0x7fe408035158, thd=thd@entry=0x7fe408000c58, ref=<optimized out>) at /data/src/10.5/sql/item_func.cc:319
      #17 0x0000559c32837dd6 in Item_str_func::fix_fields (this=0x7fe408035158, thd=0x7fe408000c58, ref=<optimized out>) at /data/src/10.5/sql/item_strfunc.cc:122
      #18 0x0000559c325eae4d in JOIN::optimize_inner (this=0x7fe408033db8) at /data/src/10.5/sql/sql_select.cc:1970
      #19 0x0000559c325edf53 in JOIN::optimize (this=this@entry=0x7fe408033db8) at /data/src/10.5/sql/sql_select.cc:1628
      #20 0x0000559c3253ff08 in mysql_derived_optimize (thd=0x7fe408000c58, lex=0x7fe408004b78, derived=0x7fe408010ba8) at /data/src/10.5/sql/sql_derived.cc:1026
      #21 0x0000559c3253f7c4 in mysql_handle_single_derived (lex=0x7fe408004b78, derived=derived@entry=0x7fe408010ba8, phases=phases@entry=4) at /data/src/10.5/sql/sql_derived.cc:206
      #22 0x0000559c325eb29c in JOIN::optimize_inner (this=0x7fe408033840) at /data/src/10.5/sql/sql_select.cc:2088
      #23 0x0000559c325edf53 in JOIN::optimize (this=this@entry=0x7fe408033840) at /data/src/10.5/sql/sql_select.cc:1628
      #24 0x0000559c325ee017 in mysql_select (thd=0x7fe408000c58, tables=0x7fe408010ba8, fields=..., conds=0x7fe408011c28, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fe4080161c0, unit=0x7fe408004c40, select_lex=0x7fe4080105b8) at /data/src/10.5/sql/sql_select.cc:4706
      #25 0x0000559c325eea37 in handle_select (thd=thd@entry=0x7fe408000c58, lex=lex@entry=0x7fe408004b78, result=result@entry=0x7fe4080161c0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.5/sql/sql_select.cc:417
      #26 0x0000559c3257d371 in execute_sqlcom_select (thd=0x7fe408000c58, all_tables=0x7fe408010ba8) at /data/src/10.5/sql/sql_parse.cc:6282
      #27 0x0000559c3258b607 in mysql_execute_command (thd=0x7fe408000c58) at /data/src/10.5/sql/sql_parse.cc:3978
      #28 0x0000559c32577eff in mysql_parse (thd=0x7fe408000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.5/sql/sql_parse.cc:8063
      #29 0x0000559c32583abf in dispatch_command (command=COM_QUERY, thd=0x7fe408000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.5/sql/sql_class.h:1257
      #30 0x0000559c32585e97 in do_command (thd=0x7fe408000c58) at /data/src/10.5/sql/sql_parse.cc:1370
      #31 0x0000559c3268bc71 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559c34b62f58, put_in_cache=put_in_cache@entry=true) at /data/src/10.5/sql/sql_connect.cc:1410
      #32 0x0000559c3268c0ed in handle_one_connection (arg=arg@entry=0x559c34b62f58) at /data/src/10.5/sql/sql_connect.cc:1312
      #33 0x0000559c32a14f96 in pfs_spawn_thread (arg=0x559c34af9b58) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #34 0x00007fe41eb75609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #35 0x00007fe41e764293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      The assertion failure is reproducible on 10.3-10.6 debug builds.
      The sigsegv is reproducible on 10.2-10.6 non-debug builds and 10.2 debug build.
      The failure happens with at least MyISAM and InnoDB.

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar added a comment - - edited

            Additional testcase, very lightly sporadic (works 9 out of 10 attempts):

            ALTER TABLE t1 PARTITION BY SYSTEM_TIME INTERVAL (SELECT i FROM t2) DAY (PARTITION p HISTORY;
            

            Leads to:

            10.6.1 34340fb501f97d7289c165dd6599a3942087bc41 (Optimized)

            Core was generated by `/test/MD180521-mariadb-10.6.1-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGSEGV, Segmentation fault.
            #0  0x0000557d9ef12d44 in find_field_in_table (thd=thd@entry=0x14f708000c58,
                table=0x0, name=name@entry=0x14f708011960 "i", length=length@entry=1,
                allow_rowid=true,
                cached_field_index_ptr=cached_field_index_ptr@entry=0x14f708011a64)
                at /test/10.6_opt/sql/sql_base.cc:6020
            [Current thread is 1 (Thread 0x14f754a10700 (LWP 3224893))]
            (gdb) bt
            #0  0x0000557d9ef12d44 in find_field_in_table (thd=thd@entry=0x14f708000c58, table=0x0, name=name@entry=0x14f708011960 "
            i", length=length@entry=1, allow_rowid=true, cached_field_index_ptr=cached_field_index_ptr@entry=0x14f708011a64) at /tes
            t/10.6_opt/sql/sql_base.cc:6020
            #1  0x0000557d9ef1356f in find_field_in_table_ref (thd=thd@entry=0x14f708000c58, table_list=table_list@entry=0x14f708011
            af0, name=name@entry=0x14f708011960 "i", length=length@entry=1, item_name=0x14f708011960 "i", db_name=db_name@entry=0x0,
             table_name=0x0, ignored_tables=0x0, ref=0x14f708011ab0, check_privileges=true, allow_rowid=true, cached_field_index_ptr
            =0x14f708011a64, register_tree_change=true, actual_table=0x14f754a0de08) at /test/10.6_opt/sql/sql_base.cc:6186
            #2  0x0000557d9ef13cc2 in find_field_in_tables (thd=thd@entry=0x14f708000c58, item=item@entry=0x14f708011968, first_tabl
            e=<optimized out>, last_table=last_table@entry=0x0, ignored_tables=0x0, ref=ref@entry=0x14f708011ab0, report_error=IGNOR
            E_EXCEPT_NON_UNIQUE, check_privileges=true, register_tree_change=true) at /test/10.6_opt/sql/sql_base.cc:6496
            #3  0x0000557d9f1b0e2f in Item_field::fix_fields (this=0x14f708011968, thd=0x14f708000c58, reference=0x14f708011ab0) at 
            /test/10.6_opt/sql/item.cc:5855
            #4  0x0000557d9ef147e1 in Item::fix_fields_if_needed (ref=0x14f708011ab0, thd=0x14f708000c58, this=0x14f708011968) at /t
            est/10.6_opt/sql/item.h:996
            #5  Item::fix_fields_if_needed (ref=0x14f708011ab0, thd=0x14f708000c58, this=0x14f708011968) at /test/10.6_opt/sql/item.
            h:996
            #6  Item::fix_fields_if_needed_for_scalar (ref=0x14f708011ab0, thd=0x14f708000c58, this=0x14f708011968) at /test/10.6_op
            t/sql/item.h:1002
            #7  setup_fields (thd=0x14f708000c58, ref_pointer_array=<optimized out>, fields=<optimized out>, column_usage=column_usa
            ge@entry=MARK_COLUMNS_READ, sum_func_list=sum_func_list@entry=0x14f708012f38, pre_fix=0x14f708011638, allow_sum_func=tru
            e) at /test/10.6_opt/sql/sql_base.cc:7695
            #8  0x0000557d9efcdaa1 in JOIN::prepare (this=0x14f708012be8, tables_init=<optimized out>, conds_init=<optimized out>, o
            g_num=<optimized out>, order_init=<optimized out>, skip_order_by=skip_order_by@entry=false, group_init=<optimized out>, 
            having_init=<optimized out>, proc_param_init=<optimized out>, select_lex_arg=<optimized out>, unit_arg=<optimized out>) 
            at /test/10.6_opt/sql/sql_select.cc:1294
            #9  0x0000557d9f2537e3 in subselect_single_select_engine::prepare (thd=0x14f708000c58, this=0x14f708012ba8) at /test/10.
            6_opt/sql/sql_lex.h:1361
            #10 subselect_single_select_engine::prepare (this=0x14f708012ba8, thd=0x14f708000c58) at /test/10.6_opt/sql/item_subsele
            ct.cc:3860
            #11 0x0000557d9f252b60 in Item_subselect::fix_fields (this=0x14f708012a00, thd_param=<optimized out>, ref=0x14f754a0e3d8
            ) at /test/10.6_opt/sql/item_subselect.cc:289
            #12 0x0000557d9f068964 in Item::fix_fields_if_needed (ref=0x14f754a0e3d8, thd=0x14f708000c58, this=0x14f708012a00) at /test/10.6_opt/sql/item.h:996
            #13 Item::fix_fields_if_needed (ref=0x14f754a0e3d8, thd=0x14f708000c58, this=0x14f708012a00) at /test/10.6_opt/sql/item.h:996
            #14 Item::fix_fields_if_needed_for_scalar (ref=0x14f754a0e3d8, thd=0x14f708000c58, this=0x14f708012a00) at /test/10.6_opt/sql/item.h:1002
            #15 partition_info::vers_set_interval (this=0x14f708011220, thd=thd@entry=0x14f708000c58, interval=<optimized out>, int_type=INTERVAL_DAY, starts=<optimized out>, table_name=0x14f708010b08 "t1") at /test/10.6_opt/sql/partition_info.cc:2655
            #16 0x0000557d9f1207cc in MYSQLparse (thd=<optimized out>) at /test/10.6_opt/sql/sql_yacc.yy:5394
            #17 0x0000557d9ef709b5 in parse_sql (thd=thd@entry=0x14f708000c58, parser_state=parser_state@entry=0x14f754a0f440, creation_ctx=creation_ctx@entry=0x0, do_pfs_digest=do_pfs_digest@entry=true) at /test/10.6_opt/include/mysql/psi/mysql_statement.h:159
            #18 0x0000557d9ef6beb7 in mysql_parse (thd=0x14f708000c58, rawbuf=0x14f7080109e0 "ALTER TABLE t1 PARTITION BY SYSTEM_TIME INTERVAL (SELECT i FROM t2) DAY (PARTITION p HISTORY", length=<optimized out>, parser_state=0x14f754a0f440) at /test/10.6_opt/sql/sql_parse.cc:7971
            #19 0x0000557d9ef77ff5 in dispatch_command (command=COM_QUERY, thd=0x14f708000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1333
            #20 0x0000557d9ef79f57 in do_command (thd=0x14f708000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1406
            #21 0x0000557d9f07d1e7 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.6_opt/sql/sql_connect.cc:1410
            #22 0x0000557d9f07d54d in handle_one_connection (arg=arg@entry=0x557da27396c8) at /test/10.6_opt/sql/sql_connect.cc:1312
            #23 0x0000557d9f402d58 in pfs_spawn_thread (arg=0x557da26b1b98) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
            #24 0x000014f757aa2609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #25 0x000014f757691293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (dbg), 10.6.1 (dbg), 10.6.1 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.38 (dbg), 10.2.38 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt)

            This issue is a present as of 10.3:

            10.2.38 (Debug+Optimized)

            10.2.38>ALTER TABLE t1 PARTITION BY SYSTEM_TIME INTERVAL (SELECT i FROM t2) DAY (PARTITION p HISTORY;
            ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SYSTEM_TIME INTERVAL (SELECT i FROM t2) DAY (PARTITION p HISTORY' at line 1
            

            Roel Roel Van de Paar added a comment - - edited Additional testcase, very lightly sporadic (works 9 out of 10 attempts): ALTER TABLE t1 PARTITION BY SYSTEM_TIME INTERVAL ( SELECT i FROM t2) DAY (PARTITION p HISTORY; Leads to: 10.6.1 34340fb501f97d7289c165dd6599a3942087bc41 (Optimized) Core was generated by `/test/MD180521-mariadb-10.6.1-linux-x86_64-opt/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000557d9ef12d44 in find_field_in_table (thd=thd@entry=0x14f708000c58, table=0x0, name=name@entry=0x14f708011960 "i", length=length@entry=1, allow_rowid=true, cached_field_index_ptr=cached_field_index_ptr@entry=0x14f708011a64) at /test/10.6_opt/sql/sql_base.cc:6020 [Current thread is 1 (Thread 0x14f754a10700 (LWP 3224893))] (gdb) bt #0 0x0000557d9ef12d44 in find_field_in_table (thd=thd@entry=0x14f708000c58, table=0x0, name=name@entry=0x14f708011960 " i", length=length@entry=1, allow_rowid=true, cached_field_index_ptr=cached_field_index_ptr@entry=0x14f708011a64) at /tes t/10.6_opt/sql/sql_base.cc:6020 #1 0x0000557d9ef1356f in find_field_in_table_ref (thd=thd@entry=0x14f708000c58, table_list=table_list@entry=0x14f708011 af0, name=name@entry=0x14f708011960 "i", length=length@entry=1, item_name=0x14f708011960 "i", db_name=db_name@entry=0x0, table_name=0x0, ignored_tables=0x0, ref=0x14f708011ab0, check_privileges=true, allow_rowid=true, cached_field_index_ptr =0x14f708011a64, register_tree_change=true, actual_table=0x14f754a0de08) at /test/10.6_opt/sql/sql_base.cc:6186 #2 0x0000557d9ef13cc2 in find_field_in_tables (thd=thd@entry=0x14f708000c58, item=item@entry=0x14f708011968, first_tabl e=<optimized out>, last_table=last_table@entry=0x0, ignored_tables=0x0, ref=ref@entry=0x14f708011ab0, report_error=IGNOR E_EXCEPT_NON_UNIQUE, check_privileges=true, register_tree_change=true) at /test/10.6_opt/sql/sql_base.cc:6496 #3 0x0000557d9f1b0e2f in Item_field::fix_fields (this=0x14f708011968, thd=0x14f708000c58, reference=0x14f708011ab0) at /test/10.6_opt/sql/item.cc:5855 #4 0x0000557d9ef147e1 in Item::fix_fields_if_needed (ref=0x14f708011ab0, thd=0x14f708000c58, this=0x14f708011968) at /t est/10.6_opt/sql/item.h:996 #5 Item::fix_fields_if_needed (ref=0x14f708011ab0, thd=0x14f708000c58, this=0x14f708011968) at /test/10.6_opt/sql/item. h:996 #6 Item::fix_fields_if_needed_for_scalar (ref=0x14f708011ab0, thd=0x14f708000c58, this=0x14f708011968) at /test/10.6_op t/sql/item.h:1002 #7 setup_fields (thd=0x14f708000c58, ref_pointer_array=<optimized out>, fields=<optimized out>, column_usage=column_usa ge@entry=MARK_COLUMNS_READ, sum_func_list=sum_func_list@entry=0x14f708012f38, pre_fix=0x14f708011638, allow_sum_func=tru e) at /test/10.6_opt/sql/sql_base.cc:7695 #8 0x0000557d9efcdaa1 in JOIN::prepare (this=0x14f708012be8, tables_init=<optimized out>, conds_init=<optimized out>, o g_num=<optimized out>, order_init=<optimized out>, skip_order_by=skip_order_by@entry=false, group_init=<optimized out>, having_init=<optimized out>, proc_param_init=<optimized out>, select_lex_arg=<optimized out>, unit_arg=<optimized out>) at /test/10.6_opt/sql/sql_select.cc:1294 #9 0x0000557d9f2537e3 in subselect_single_select_engine::prepare (thd=0x14f708000c58, this=0x14f708012ba8) at /test/10. 6_opt/sql/sql_lex.h:1361 #10 subselect_single_select_engine::prepare (this=0x14f708012ba8, thd=0x14f708000c58) at /test/10.6_opt/sql/item_subsele ct.cc:3860 #11 0x0000557d9f252b60 in Item_subselect::fix_fields (this=0x14f708012a00, thd_param=<optimized out>, ref=0x14f754a0e3d8 ) at /test/10.6_opt/sql/item_subselect.cc:289 #12 0x0000557d9f068964 in Item::fix_fields_if_needed (ref=0x14f754a0e3d8, thd=0x14f708000c58, this=0x14f708012a00) at /test/10.6_opt/sql/item.h:996 #13 Item::fix_fields_if_needed (ref=0x14f754a0e3d8, thd=0x14f708000c58, this=0x14f708012a00) at /test/10.6_opt/sql/item.h:996 #14 Item::fix_fields_if_needed_for_scalar (ref=0x14f754a0e3d8, thd=0x14f708000c58, this=0x14f708012a00) at /test/10.6_opt/sql/item.h:1002 #15 partition_info::vers_set_interval (this=0x14f708011220, thd=thd@entry=0x14f708000c58, interval=<optimized out>, int_type=INTERVAL_DAY, starts=<optimized out>, table_name=0x14f708010b08 "t1") at /test/10.6_opt/sql/partition_info.cc:2655 #16 0x0000557d9f1207cc in MYSQLparse (thd=<optimized out>) at /test/10.6_opt/sql/sql_yacc.yy:5394 #17 0x0000557d9ef709b5 in parse_sql (thd=thd@entry=0x14f708000c58, parser_state=parser_state@entry=0x14f754a0f440, creation_ctx=creation_ctx@entry=0x0, do_pfs_digest=do_pfs_digest@entry=true) at /test/10.6_opt/include/mysql/psi/mysql_statement.h:159 #18 0x0000557d9ef6beb7 in mysql_parse (thd=0x14f708000c58, rawbuf=0x14f7080109e0 "ALTER TABLE t1 PARTITION BY SYSTEM_TIME INTERVAL (SELECT i FROM t2) DAY (PARTITION p HISTORY", length=<optimized out>, parser_state=0x14f754a0f440) at /test/10.6_opt/sql/sql_parse.cc:7971 #19 0x0000557d9ef77ff5 in dispatch_command (command=COM_QUERY, thd=0x14f708000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1333 #20 0x0000557d9ef79f57 in do_command (thd=0x14f708000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1406 #21 0x0000557d9f07d1e7 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.6_opt/sql/sql_connect.cc:1410 #22 0x0000557d9f07d54d in handle_one_connection (arg=arg@entry=0x557da27396c8) at /test/10.6_opt/sql/sql_connect.cc:1312 #23 0x0000557d9f402d58 in pfs_spawn_thread (arg=0x557da26b1b98) at /test/10.6_opt/storage/perfschema/pfs.cc:2201 #24 0x000014f757aa2609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #25 0x000014f757691293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (dbg), 10.6.1 (dbg), 10.6.1 (opt) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.38 (dbg), 10.2.38 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt) This issue is a present as of 10.3: 10.2.38 (Debug+Optimized) 10.2.38>ALTER TABLE t1 PARTITION BY SYSTEM_TIME INTERVAL (SELECT i FROM t2) DAY (PARTITION p HISTORY; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SYSTEM_TIME INTERVAL (SELECT i FROM t2) DAY (PARTITION p HISTORY' at line 1
            alice Alice Sherepa added a comment -

            220715 14:23:54 [ERROR] mysqld got signal 11 ;
             
            Server version: 10.10.0-MariaDB-log
             
            sql/signal_handler.cc:236(handle_fatal_signal)[0x56377f85ce85]
            sigaction.c:0(__restore_rt)[0x7fdfdc8bd420]
            strings/ctype-utf8.c:5372(my_strcasecmp_utf8mb3)[0x56377fd61a81]
            sql/sql_base.cc:6294(find_field_in_table(THD*, TABLE*, char const*, unsigned long, bool, unsigned short*))[0x56377f5b2874]
            sql/sql_base.cc:6431(find_field_in_table_ref(THD*, TABLE_LIST*, char const*, unsigned long, char const*, char const*, char const*, List<TABLE_LIST>*, Item**, bool, bool, unsigned short*, bool, TABLE_LIST**))[0x56377f5b2f9e]
            sql/sql_base.cc:6755(find_field_in_tables(THD*, Item_ident*, TABLE_LIST*, TABLE_LIST*, List<TABLE_LIST>*, Item**, find_item_error_report_type, bool, bool))[0x56377f5b35fd]
            sql/item.cc:6029(Item_field::fix_fields(THD*, Item**))[0x56377f88510e]
            sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x56377f8c5a7d]
            sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x56377f8c5a7d]
            sql/item_strfunc.cc:132(Item_str_func::fix_fields(THD*, Item**))[0x56377f8fb576]
            sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x56377f8c5a7d]
            sql/item_func.cc:4709(Item_func_set_user_var::fix_fields(THD*, Item**))[0x56377f8d402c]
            sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x56377f8c5a7d]
            sql/sql_select.cc:2208(JOIN::optimize_inner())[0x56377f690f5c]
            sql/sql_select.cc:1852(JOIN::optimize())[0x56377f6946a3]
            sql/sql_derived.cc:1064(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x56377f5d8eba]
            sql/sql_derived.cc:200(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x56377f5d872c]
            sql/sql_select.cc:2329(JOIN::optimize_inner())[0x56377f69139c]
            sql/sql_select.cc:1852(JOIN::optimize())[0x56377f6946a3]
            sql/sql_select.cc:5038(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x56377f69478e]
            sql/sql_select.cc:583(handle_select(THD*, LEX*, select_result*, unsigned long))[0x56377f694f97]
            sql/sql_parse.cc:6260(execute_sqlcom_select(THD*, TABLE_LIST*))[0x56377f617806]
            sql/sql_parse.cc:3944(mysql_execute_command(THD*, bool))[0x56377f625c34]
            sql/sql_parse.cc:8053(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x56377f612337]
            sql/sql_parse.cc:1896(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56377f61e5fd]
            sql/sql_parse.cc:1409(do_command(THD*, bool))[0x56377f620848]
            sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x56377f73abe7]
            sql/sql_connect.cc:1312(handle_one_connection)[0x56377f73af1d]
            

            alice Alice Sherepa added a comment - 220715 14:23:54 [ERROR] mysqld got signal 11 ;   Server version: 10.10.0-MariaDB-log   sql/signal_handler.cc:236(handle_fatal_signal)[0x56377f85ce85] sigaction.c:0(__restore_rt)[0x7fdfdc8bd420] strings/ctype-utf8.c:5372(my_strcasecmp_utf8mb3)[0x56377fd61a81] sql/sql_base.cc:6294(find_field_in_table(THD*, TABLE*, char const*, unsigned long, bool, unsigned short*))[0x56377f5b2874] sql/sql_base.cc:6431(find_field_in_table_ref(THD*, TABLE_LIST*, char const*, unsigned long, char const*, char const*, char const*, List<TABLE_LIST>*, Item**, bool, bool, unsigned short*, bool, TABLE_LIST**))[0x56377f5b2f9e] sql/sql_base.cc:6755(find_field_in_tables(THD*, Item_ident*, TABLE_LIST*, TABLE_LIST*, List<TABLE_LIST>*, Item**, find_item_error_report_type, bool, bool))[0x56377f5b35fd] sql/item.cc:6029(Item_field::fix_fields(THD*, Item**))[0x56377f88510e] sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x56377f8c5a7d] sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x56377f8c5a7d] sql/item_strfunc.cc:132(Item_str_func::fix_fields(THD*, Item**))[0x56377f8fb576] sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x56377f8c5a7d] sql/item_func.cc:4709(Item_func_set_user_var::fix_fields(THD*, Item**))[0x56377f8d402c] sql/item_func.cc:347(Item_func::fix_fields(THD*, Item**))[0x56377f8c5a7d] sql/sql_select.cc:2208(JOIN::optimize_inner())[0x56377f690f5c] sql/sql_select.cc:1852(JOIN::optimize())[0x56377f6946a3] sql/sql_derived.cc:1064(mysql_derived_optimize(THD*, LEX*, TABLE_LIST*))[0x56377f5d8eba] sql/sql_derived.cc:200(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x56377f5d872c] sql/sql_select.cc:2329(JOIN::optimize_inner())[0x56377f69139c] sql/sql_select.cc:1852(JOIN::optimize())[0x56377f6946a3] sql/sql_select.cc:5038(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x56377f69478e] sql/sql_select.cc:583(handle_select(THD*, LEX*, select_result*, unsigned long))[0x56377f694f97] sql/sql_parse.cc:6260(execute_sqlcom_select(THD*, TABLE_LIST*))[0x56377f617806] sql/sql_parse.cc:3944(mysql_execute_command(THD*, bool))[0x56377f625c34] sql/sql_parse.cc:8053(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x56377f612337] sql/sql_parse.cc:1896(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56377f61e5fd] sql/sql_parse.cc:1409(do_command(THD*, bool))[0x56377f620848] sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x56377f73abe7] sql/sql_connect.cc:1312(handle_one_connection)[0x56377f73af1d]
            sbester1 sbester1 added a comment -

            Please fix this bug, it's impossible to do random query testing when this is hit so frequently!

            Version: '11.0.0-preview-MariaDB'  socket: '/tmp/mysql.sock'  port: 3306  MariaDB Server
             
            Thread 18 "mysqld" received signal SIGSEGV, Segmentation fault.
            (gdb) bt
            #0  in my_strcasecmp_utf8mb3 at ./strings/ctype-utf8.c:5372
            #1  in find_field_in_table at ./sql/sql_base.cc:6322
            #2  in find_field_in_table_ref at ./sql/sql_base.cc:6456
            #3  in find_field_in_tables at ./sql/sql_base.cc:6775
            #4  in Item_field::fix_fields at ./sql/item.cc:6033
            #5  in Item::fix_fields_if_needed at ./sql/item.h:1147
            #6  in Item_func::fix_fields at ./sql/item_func.cc:350
            #7  in JOIN::optimize_inner at ./sql/sql_select.cc:2259
            #8  in JOIN::optimize at ./sql/sql_select.cc:1897
            #9  in mysql_derived_optimize at ./sql/sql_derived.cc:1062
            #10 in mysql_handle_single_derived at ./sql/sql_derived.cc:200
            #11 in JOIN::optimize_inner at ./sql/sql_select.cc:2384
            #12 in JOIN::optimize at ./sql/sql_select.cc:1897
            #13 in mysql_select at ./sql/sql_select.cc:5110
            #14 in handle_select at ./sql/sql_select.cc:620
            #15 in execute_sqlcom_select at ./sql/sql_parse.cc:6265
            #16 in mysql_execute_command at ./sql/sql_parse.cc:3949
            #17 in mysql_parse at ./sql/sql_parse.cc:8000
            #18 in dispatch_command at ./sql/sql_parse.cc:1894
            #19 in do_command at ./sql/sql_parse.cc:1408
            #20 in do_handle_one_connection at ./sql/sql_connect.cc:1416
            

            How to Repeat

            drop table if exists t;
            create table t(c3 longtext) ;
             
            with cte1 as
            (
              select default(c3) as a
              from t group by 1
            )
            select * from cte1
            where cte1.a >= 1;
            

            sbester1 sbester1 added a comment - Please fix this bug, it's impossible to do random query testing when this is hit so frequently! Version: '11.0.0-preview-MariaDB' socket: '/tmp/mysql.sock' port: 3306 MariaDB Server   Thread 18 "mysqld" received signal SIGSEGV, Segmentation fault. (gdb) bt #0 in my_strcasecmp_utf8mb3 at ./strings/ctype-utf8.c:5372 #1 in find_field_in_table at ./sql/sql_base.cc:6322 #2 in find_field_in_table_ref at ./sql/sql_base.cc:6456 #3 in find_field_in_tables at ./sql/sql_base.cc:6775 #4 in Item_field::fix_fields at ./sql/item.cc:6033 #5 in Item::fix_fields_if_needed at ./sql/item.h:1147 #6 in Item_func::fix_fields at ./sql/item_func.cc:350 #7 in JOIN::optimize_inner at ./sql/sql_select.cc:2259 #8 in JOIN::optimize at ./sql/sql_select.cc:1897 #9 in mysql_derived_optimize at ./sql/sql_derived.cc:1062 #10 in mysql_handle_single_derived at ./sql/sql_derived.cc:200 #11 in JOIN::optimize_inner at ./sql/sql_select.cc:2384 #12 in JOIN::optimize at ./sql/sql_select.cc:1897 #13 in mysql_select at ./sql/sql_select.cc:5110 #14 in handle_select at ./sql/sql_select.cc:620 #15 in execute_sqlcom_select at ./sql/sql_parse.cc:6265 #16 in mysql_execute_command at ./sql/sql_parse.cc:3949 #17 in mysql_parse at ./sql/sql_parse.cc:8000 #18 in dispatch_command at ./sql/sql_parse.cc:1894 #19 in do_command at ./sql/sql_parse.cc:1408 #20 in do_handle_one_connection at ./sql/sql_connect.cc:1416 How to Repeat drop table if exists t; create table t(c3 longtext) ;   with cte1 as ( select default (c3) as a from t group by 1 ) select * from cte1 where cte1.a >= 1;

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.