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

Using varbinary as vector-storing column results in assertion failures

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 11.7.1
    • Vector search
    • None

    Description

      Test case 1

      --source include/have_innodb.inc
       
      create table t (pk int primary key, v varbinary(1024) not null, vector key(v)) engine=InnoDB;
      insert into t values (1, x'B047263C9F87233fcfd27e3eae493e3f0329f43e');
      select * from t;
       
      # Cleanup
      drop table t;
      

      bb-11.6-MDEV-32887-vector e19526802732b5723664b17ac026a1ea36f99dce

      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/vector_mhnsw.cc:1191: int mhnsw_insert(TABLE*, KEY*): Assertion `keyinfo->usable_key_parts == 1' failed.
      240925  1:18:16 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007fe154253e32 in __GI___assert_fail (assertion=0x5618fb33cba0 "keyinfo->usable_key_parts == 1", file=0x5618fb33bfe0 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/vector_mhnsw.cc", line=1191, function=0x5618fb33cb00 "int mhnsw_insert(TABLE*, KEY*)") at ./assert/assert.c:101
      #10 0x00005618f96665c8 in mhnsw_insert (table=0x6190000cd098, keyinfo=0x6190000cdb70) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/vector_mhnsw.cc:1191
      #11 0x00005618f8701c75 in TABLE::hlindexes_on_insert (this=0x6190000cd098) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_base.cc:9918
      #12 0x00005618f9257789 in handler::ha_write_row (this=0x61d000303eb8, buf=0x61d0003048b8 "\001") at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/handler.cc:8154
      #13 0x00005618f87d35ee in write_record (thd=0x62c0001e0218, table=0x6190000cd098, info=0x7fe144c2d4e0, sink=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_insert.cc:2322
      #14 0x00005618f87c9d1e in mysql_insert (thd=0x62c0001e0218, table_list=0x6290000fa3a8, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false, result=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_insert.cc:1179
      #15 0x00005618f8899fe8 in mysql_execute_command (thd=0x62c0001e0218, is_called_from_prepared_stmt=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:4458
      #16 0x00005618f88b1baa in mysql_parse (thd=0x62c0001e0218, rawbuf=0x6290000fa238 "insert into t values (1, x'B047263C9F87233fcfd27e3eae493e3f0329f43e')", length=69, parser_state=0x7fe144c2e9f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:7873
      #17 0x00005618f8888bcc in dispatch_command (command=COM_QUERY, thd=0x62c0001e0218, packet=0x629000280219 "insert into t values (1, x'B047263C9F87233fcfd27e3eae493e3f0329f43e')", packet_length=69, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1892
      #18 0x00005618f88858e0 in do_command (thd=0x62c0001e0218, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1405
      #19 0x00005618f8d7539f in do_handle_one_connection (connect=0x6080000048b8, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1448
      #20 0x00005618f8d74d60 in handle_one_connection (arg=0x608000004838) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
      #21 0x00005618f9ab4d1a in pfs_spawn_thread (arg=0x617000008218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
      #22 0x00007fe1542a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #23 0x00007fe15432861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Test case 2

      --source include/have_innodb.inc
       
      create table t (v varbinary(1024) not null, vector key(v)) engine=InnoDB;
      select * from t;
       
      # Cleanup
      drop table t;
      

      bb-11.6-MDEV-32887-vector e19526802732b5723664b17ac026a1ea36f99dce

      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:24758: int join_read_first(JOIN_TAB*): Assertion `tab->join->order' failed.
      240925  1:21:15 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007ff024053e32 in __GI___assert_fail (assertion=0x5632f7366dc0 "tab->join->order", file=0x5632f7357880 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc", line=24758, function=0x5632f7366ca0 "int join_read_first(JOIN_TAB*)") at ./assert/assert.c:101
      #10 0x00005632f50d8920 in join_read_first (tab=0x6290000fd338) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:24758
      #11 0x00005632f50d0485 in sub_select (join=0x6290000fba60, join_tab=0x6290000fd338, end_of_records=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:23648
      #12 0x00005632f50cded5 in do_select (join=0x6290000fba60, procedure=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:23162
      #13 0x00005632f504c432 in JOIN::exec_inner (this=0x6290000fba60) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:5025
      #14 0x00005632f50497bc in JOIN::exec (this=0x6290000fba60) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:4808
      #15 0x00005632f504deeb in mysql_select (thd=0x62c0001e0218, tables=0x6290000fa938, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x6290000fba30, unit=0x62c0001e4710, select_lex=0x6290000fa2c0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:5341
      #16 0x00005632f501c5a3 in handle_select (thd=0x62c0001e0218, lex=0x62c0001e4630, result=0x6290000fba30, setup_tables_done_option=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:624
      #17 0x00005632f4f3f159 in execute_sqlcom_select (thd=0x62c0001e0218, all_tables=0x6290000fa938) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:6151
      #18 0x00005632f4f2ed84 in mysql_execute_command (thd=0x62c0001e0218, is_called_from_prepared_stmt=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:3953
      #19 0x00005632f4f49baa in mysql_parse (thd=0x62c0001e0218, rawbuf=0x6290000fa238 "select * from t", length=15, parser_state=0x7ff0147ed9f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:7873
      #20 0x00005632f4f20bcc in dispatch_command (command=COM_QUERY, thd=0x62c0001e0218, packet=0x629000280219 "", packet_length=15, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1892
      #21 0x00005632f4f1d8e0 in do_command (thd=0x62c0001e0218, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1405
      #22 0x00005632f540d39f in do_handle_one_connection (connect=0x6080000048b8, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1448
      #23 0x00005632f540cd60 in handle_one_connection (arg=0x608000004838) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
      #24 0x00005632f614cd1a in pfs_spawn_thread (arg=0x617000008218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
      #25 0x00007ff0240a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #26 0x00007ff02412861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      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.