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

Server crashes in my_convert / ErrConvString::ptr / Item_char_typecast::check_truncation_with_warn

    XMLWordPrintable

Details

    Description

      SELECT 'foo' IN ( CAST( COMPRESS('bar') AS CHAR(4) ), 'qux' );
      

      10.2 debug 737c3025

      #3  <signal handler called>
      #4  0x000055560240d4bd in my_convert (to=0x7fd705794be8 "\300\b", to_length=511, to_cs=0x555602f7f6a0 <my_charset_utf8_general_ci>, from=0x7fd6f412ce10 "\003", from_length=15, from_cs=0x0, errors=0x7fd705794b34) at /data/src/10.2/strings/ctype.c:1090
      #5  0x0000555601924c68 in copy_and_convert (to=0x7fd705794be8 "\300\b", to_length=511, to_cs=0x555602f7f6a0 <my_charset_utf8_general_ci>, from=0x7fd6f412ce10 "\003", from_length=15, from_cs=0x0, errors=0x7fd705794b34) at /data/src/10.2/sql/sql_string.h:44
      #6  0x00005556019d254c in err_conv (buff=0x7fd705794be8 "\300\b", to_length=511, from=0x7fd6f412ce10 "\003", from_length=15, from_cs=0x0) at /data/src/10.2/sql/sql_error.cc:947
      #7  0x0000555601931e15 in ErrConvString::ptr (this=0x7fd705794be0) at /data/src/10.2/sql/sql_error.h:577
      #8  0x0000555601d648a5 in Item_char_typecast::check_truncation_with_warn (this=0x7fd6f40128f0, src=0x7fd6f40134a0, dstlen=4) at /data/src/10.2/sql/item_timefunc.cc:2451
      #9  0x0000555601d64998 in Item_char_typecast::reuse (this=0x7fd6f40128f0, src=0x7fd6f40134a0, length=4) at /data/src/10.2/sql/item_timefunc.cc:2462
      #10 0x0000555601d64e86 in Item_char_typecast::val_str (this=0x7fd6f40128f0, str=0x7fd6f40134a0) at /data/src/10.2/sql/item_timefunc.cc:2543
      #11 0x0000555601cbebc9 in in_string::set (this=0x7fd6f4013400, pos=0, item=0x7fd6f40128f0) at /data/src/10.2/sql/item_cmpfunc.cc:3672
      #12 0x0000555601cc09d2 in Item_func_in::create_array (this=0x7fd6f4012ad8, thd=0x7fd6f4000af0) at /data/src/10.2/sql/item_cmpfunc.cc:4205
      #13 0x0000555601cc115a in Item_func_in::fix_length_and_dec (this=0x7fd6f4012ad8) at /data/src/10.2/sql/item_cmpfunc.cc:4363
      #14 0x0000555601ced6b4 in Item_func::fix_fields (this=0x7fd6f4012ad8, thd=0x7fd6f4000af0, ref=0x7fd6f4012c30) at /data/src/10.2/sql/item_func.cc:230
      #15 0x0000555601cc04d1 in Item_func_in::fix_fields (this=0x7fd6f4012ad8, thd=0x7fd6f4000af0, ref=0x7fd6f4012c30) at /data/src/10.2/sql/item_cmpfunc.cc:4119
      #16 0x00005556019971fb in setup_fields (thd=0x7fd6f4000af0, ref_pointer_array=..., fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0x7fd6f40130b0, pre_fix=0x7fd6f4004f68, allow_sum_func=true) at /data/src/10.2/sql/sql_base.cc:7238
      #17 0x0000555601a3c8ed in JOIN::prepare (this=0x7fd6f4012d90, tables_init=0x0, wild_num=0, 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=0x7fd6f4004e28, unit_arg=0x7fd6f40046e8) at /data/src/10.2/sql/sql_select.cc:811
      #18 0x0000555601a472fc in mysql_select (thd=0x7fd6f4000af0, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fd6f4012d70, unit=0x7fd6f40046e8, select_lex=0x7fd6f4004e28) at /data/src/10.2/sql/sql_select.cc:3811
      #19 0x0000555601a3b56c in handle_select (thd=0x7fd6f4000af0, lex=0x7fd6f4004628, result=0x7fd6f4012d70, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:361
      #20 0x0000555601a0701c in execute_sqlcom_select (thd=0x7fd6f4000af0, all_tables=0x0) at /data/src/10.2/sql/sql_parse.cc:6218
      #21 0x00005556019fd89d in mysql_execute_command (thd=0x7fd6f4000af0) at /data/src/10.2/sql/sql_parse.cc:3524
      #22 0x0000555601a0ad53 in mysql_parse (thd=0x7fd6f4000af0, rawbuf=0x7fd6f4012590 "SELECT 'foo' IN ( CAST( COMPRESS('bar') AS CHAR(4) ), 'qux' )", length=61, parser_state=0x7fd705796610, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
      #23 0x00005556019f907f in dispatch_command (command=COM_QUERY, thd=0x7fd6f4000af0, packet=0x7fd6f408cda1 "SELECT 'foo' IN ( CAST( COMPRESS('bar') AS CHAR(4) ), 'qux' )", packet_length=61, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
      #24 0x00005556019f7afa in do_command (thd=0x7fd6f4000af0) at /data/src/10.2/sql/sql_parse.cc:1377
      #25 0x0000555601b4da6f in do_handle_one_connection (connect=0x5556050d0140) at /data/src/10.2/sql/sql_connect.cc:1336
      #26 0x0000555601b4d7da in handle_one_connection (arg=0x5556050d0140) at /data/src/10.2/sql/sql_connect.cc:1241
      #27 0x0000555602363e26 in pfs_spawn_thread (arg=0x55560501ce60) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #28 0x00007fd70d3eb4a4 in start_thread (arg=0x7fd705797700) at pthread_create.c:456
      #29 0x00007fd70b51fd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.5 debug 24ed08c3

      #3  <signal handler called>
      #4  0x0000564df34a20f4 in err_conv (buff=0x7f2c2ac2ee08 "", to_length=511, from=0x7f2c14105858 "\003", from_length=15, from_cs=0x0) at /data/src/10.5/sql/sql_error.cc:919
      #5  0x0000564df33db344 in ErrBuff::set_str (this=0x7f2c2ac2ee08, str=0x7f2c14105858 "\003", len=15, cs=0x0) at /data/src/10.5/sql/sql_error.h:846
      #6  0x0000564df33db4e5 in ErrConvString::ptr (this=0x7f2c2ac2ee00) at /data/src/10.5/sql/sql_error.h:878
      #7  0x0000564df396af02 in Item_char_typecast::check_truncation_with_warn (this=0x7f2c14014208, src=0x7f2c14015668, dstlen=4) at /data/src/10.5/sql/item_timefunc.cc:2291
      #8  0x0000564df396b066 in Item_char_typecast::reuse (this=0x7f2c14014208, src=0x7f2c14015668, length=4) at /data/src/10.5/sql/item_timefunc.cc:2303
      #9  0x0000564df396b62d in Item_char_typecast::val_str_generic (this=0x7f2c14014208, str=0x7f2c14015668) at /data/src/10.5/sql/item_timefunc.cc:2384
      #10 0x0000564df3974eba in Item_char_typecast_func_handler::val_str (this=0x564df4e99b40 <item_char_typecast_func_handler>, item=0x7f2c14014208, to=0x7f2c14015668) at /data/src/10.5/sql/item_timefunc.cc:2453
      #11 0x0000564df3752623 in Item_handled_func::val_str (this=0x7f2c14014208, to=0x7f2c14015668) at /data/src/10.5/sql/item_func.h:750
      #12 0x0000564df38a7125 in in_string::set (this=0x7f2c140155c8, pos=0, item=0x7f2c14014208) at /data/src/10.5/sql/item_cmpfunc.cc:3686
      #13 0x0000564df38aa0e1 in Item_func_in::fix_in_vector (this=0x7f2c14014410) at /data/src/10.5/sql/item_cmpfunc.cc:4449
      #14 0x0000564df3753dc5 in Item_func_in::fix_for_scalar_comparison_using_bisection (this=0x7f2c14014410, thd=0x7f2c14000b18) at /data/src/10.5/sql/item_cmpfunc.h:2412
      #15 0x0000564df373d969 in Type_handler_string_result::Item_func_in_fix_comparator_compatible_types (this=0x564df50a7900 <type_handler_long_blob>, thd=0x7f2c14000b18, func=0x7f2c14014410) at /data/src/10.5/sql/sql_type.cc:5682
      #16 0x0000564df38a9eb1 in Item_func_in::fix_length_and_dec (this=0x7f2c14014410) at /data/src/10.5/sql/item_cmpfunc.cc:4415
      #17 0x0000564df38d8a0d in Item_func::fix_fields (this=0x7f2c14014410, thd=0x7f2c14000b18, ref=0x7f2c14014598) at /data/src/10.5/sql/item_func.cc:370
      #18 0x0000564df38a9a2b in Item_func_in::fix_fields (this=0x7f2c14014410, thd=0x7f2c14000b18, ref=0x7f2c14014598) at /data/src/10.5/sql/item_cmpfunc.cc:4332
      #19 0x0000564df33db96f in Item::fix_fields_if_needed (this=0x7f2c14014410, thd=0x7f2c14000b18, ref=0x7f2c14014598) at /data/src/10.5/sql/item.h:978
      #20 0x0000564df33db99d in Item::fix_fields_if_needed_for_scalar (this=0x7f2c14014410, thd=0x7f2c14000b18, ref=0x7f2c14014598) at /data/src/10.5/sql/item.h:982
      #21 0x0000564df345cea6 in setup_fields (thd=0x7f2c14000b18, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x7f2c14015250, pre_fix=0x7f2c14013c78, allow_sum_func=true) at /data/src/10.5/sql/sql_base.cc:7574
      #22 0x0000564df35405de in JOIN::prepare (this=0x7f2c14014f28, 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=0x7f2c14013b10, unit_arg=0x7f2c14004b30) at /data/src/10.5/sql/sql_select.cc:1250
      #23 0x0000564df354d0e8 in mysql_select (thd=0x7f2c14000b18, tables=0x0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f2c14014f00, unit=0x7f2c14004b30, select_lex=0x7f2c14013b10) at /data/src/10.5/sql/sql_select.cc:4619
      #24 0x0000564df353cf32 in handle_select (thd=0x7f2c14000b18, lex=0x7f2c14004a68, result=0x7f2c14014f00, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:429
      #25 0x0000564df350254e in execute_sqlcom_select (thd=0x7f2c14000b18, all_tables=0x0) at /data/src/10.5/sql/sql_parse.cc:6209
      #26 0x0000564df34f97f5 in mysql_execute_command (thd=0x7f2c14000b18) at /data/src/10.5/sql/sql_parse.cc:3931
      #27 0x0000564df350739b in mysql_parse (thd=0x7f2c14000b18, rawbuf=0x7f2c14013a30 "SELECT 'foo' IN ( CAST( COMPRESS('bar') AS CHAR(4) ), 'qux' )", length=61, parser_state=0x7f2c2ac30520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7993
      #28 0x0000564df34f3694 in dispatch_command (command=COM_QUERY, thd=0x7f2c14000b18, packet=0x7f2c141af209 "SELECT 'foo' IN ( CAST( COMPRESS('bar') AS CHAR(4) ), 'qux' )", packet_length=61, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1867
      #29 0x0000564df34f1dcc in do_command (thd=0x7f2c14000b18) at /data/src/10.5/sql/sql_parse.cc:1348
      #30 0x0000564df36975f5 in do_handle_one_connection (connect=0x564df6aae398, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1411
      #31 0x0000564df369735d in handle_one_connection (arg=0x564df6aae398) at /data/src/10.5/sql/sql_connect.cc:1313
      #32 0x0000564df3bd55b4 in pfs_spawn_thread (arg=0x564df6aadfc8) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #33 0x00007f2c360304a4 in start_thread (arg=0x7f2c2ac31700) at pthread_create.c:456
      #34 0x00007f2c34164d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on non-debug, debug and ASAN builds alike.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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