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

Server crashes in Charset::mbminlen / Item_func_vec_fromtext::val_str upon mixing vector type with string

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 11.7(EOL), 11.8
    • 11.7.2
    • Vector search
    • None

    Description

      SELECT 0x31313131 IN ('1111', VEC_FROMTEXT('[1]'));
      

      11.7 697b88bf75d89b79a18c6dd0bfb9c5c9d6f25503

      #3  <signal handler called>
      #4  0x0000560d05398ffb in Charset::mbminlen (this=0x62d000340498) at /data/bld/11.7-asan/sql/sql_string.h:116
      #5  0x0000560d0539462f in String::append (this=0x62d000340498, s=0x7fecca6dd3b0 "", size=4) at /data/bld/11.7-asan/sql/sql_string.cc:549
      #6  0x0000560d05f839eb in Item_func_vec_fromtext::val_str (this=0x62d00033ee00, buf=0x62d000340498) at /data/bld/11.7-asan/sql/item_vectorfunc.cc:181
      #7  0x0000560d05b4a621 in in_string::set (this=0x62d0003403d0, pos=1, item=0x62d00033ee00) at /data/bld/11.7-asan/sql/item_cmpfunc.cc:3819
      #8  0x0000560d05b528f0 in Item_func_in::fix_in_vector (this=0x62d00033ef40) at /data/bld/11.7-asan/sql/item_cmpfunc.cc:4676
      #9  0x0000560d0581a5e4 in Item_func_in::fix_for_scalar_comparison_using_bisection (this=0x62d00033ef40, thd=0x62c0000c0218) at /data/bld/11.7-asan/sql/item_cmpfunc.h:2603
      #10 0x0000560d057ecac7 in Type_handler_string_result::Item_func_in_fix_comparator_compatible_types (this=0x560d09c03200 <type_handler_long_blob>, thd=0x62c0000c0218, func=0x62d00033ef40) at /data/bld/11.7-asan/sql/sql_type.cc:6030
      #11 0x0000560d05b5247f in Item_func_in::fix_length_and_dec (this=0x62d00033ef40, thd=0x62c0000c0218) at /data/bld/11.7-asan/sql/item_cmpfunc.cc:4642
      #12 0x0000560d05bb18a9 in Item_func::fix_fields (this=0x62d00033ef40, thd=0x62c0000c0218, ref=0x62d00033f0d0) at /data/bld/11.7-asan/sql/item_func.cc:366
      #13 0x0000560d05b50c97 in Item_func_in::fix_fields (this=0x62d00033ef40, thd=0x62c0000c0218, ref=0x62d00033f0d0) at /data/bld/11.7-asan/sql/item_cmpfunc.cc:4471
      #14 0x0000560d04df4bfb in Item::fix_fields_if_needed (this=0x62d00033ef40, thd=0x62c0000c0218, ref=0x62d00033f0d0) at /data/bld/11.7-asan/sql/item.h:1168
      #15 0x0000560d04df4c31 in Item::fix_fields_if_needed_for_scalar (this=0x62d00033ef40, thd=0x62c0000c0218, ref=0x62d00033f0d0) at /data/bld/11.7-asan/sql/item.h:1177
      #16 0x0000560d04f1c2b1 in setup_fields (thd=0x62c0000c0218, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x62d00033fe58, pre_fix=0x62d00033e998, allow_sum_func=true, where=THD_WHERE::DEFAULT_WHERE) at /data/bld/11.7-asan/sql/sql_base.cc:8094
      #17 0x0000560d051b9aad in JOIN::prepare (this=0x62d00033fab0, 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=0x62d00033e6c8, unit_arg=0x62c0000c4740) at /data/bld/11.7-asan/sql/sql_select.cc:1572
      #18 0x0000560d051e1bb3 in mysql_select (thd=0x62c0000c0218, tables=0x0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x62d00033fa80, unit=0x62c0000c4740, select_lex=0x62d00033e6c8) at /data/bld/11.7-asan/sql/sql_select.cc:5331
      #19 0x0000560d051aff95 in handle_select (thd=0x62c0000c0218, lex=0x62c0000c4660, result=0x62d00033fa80, setup_tables_done_option=0) at /data/bld/11.7-asan/sql/sql_select.cc:633
      #20 0x0000560d050d2156 in execute_sqlcom_select (thd=0x62c0000c0218, all_tables=0x0) at /data/bld/11.7-asan/sql/sql_parse.cc:6191
      #21 0x0000560d050c1d4a in mysql_execute_command (thd=0x62c0000c0218, is_called_from_prepared_stmt=false) at /data/bld/11.7-asan/sql/sql_parse.cc:3980
      #22 0x0000560d050dcbe8 in mysql_parse (thd=0x62c0000c0218, rawbuf=0x62d00033e5f0 "SELECT 0x31313131 IN ('1111', VEC_FROMTEXT('[1]'))", length=50, parser_state=0x7fecca6dfa30) at /data/bld/11.7-asan/sql/sql_parse.cc:7915
      #23 0x0000560d050b3a03 in dispatch_command (command=COM_QUERY, thd=0x62c0000c0218, packet=0x629000253219 "SELECT 0x31313131 IN ('1111', VEC_FROMTEXT('[1]'))", packet_length=50, blocking=true) at /data/bld/11.7-asan/sql/sql_parse.cc:1903
      #24 0x0000560d050b070b in do_command (thd=0x62c0000c0218, blocking=true) at /data/bld/11.7-asan/sql/sql_parse.cc:1416
      #25 0x0000560d055a877b in do_handle_one_connection (connect=0x608000003ab8, put_in_cache=true) at /data/bld/11.7-asan/sql/sql_connect.cc:1415
      #26 0x0000560d055a82da in handle_one_connection (arg=0x608000003a38) at /data/bld/11.7-asan/sql/sql_connect.cc:1327
      #27 0x0000560d06267472 in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/11.7-asan/storage/perfschema/pfs.cc:2198
      #28 0x00007fecda4a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #29 0x00007fecda52885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value

            Set to blocker as a crash in a new feature which is soon to be GA.

            elenst Elena Stepanova added a comment - Set to blocker as a crash in a new feature which is soon to be GA.
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Status Stalled [ 10000 ] In Testing [ 10301 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 11.7.2 [ 29914 ]
            Fix Version/s 11.7 [ 29815 ]
            Resolution Fixed [ 1 ]
            Status In Testing [ 10301 ] Closed [ 6 ]

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.