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

Non-debug assertion failure after unsuccessful attempt to add vector index

    XMLWordPrintable

Details

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

    Description

      Note: The beginning of this scenario is similar to MDEV-35020, it also produces an orphan temporary table/file after a failed ALTER. I do not know yet whether it is the only possible cause of the failure which follows it, feel free to close if MDEV-35020 is indeed its only root cause.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (pk INT, a INT, b INT, c BLOB NOT NULL, PRIMARY KEY (pk), KEY (a), KEY (b)) ENGINE=InnoDB;
      CREATE TABLE t2 (pk INT, d INT, e INT, f BLOB NOT NULL, PRIMARY KEY (pk), KEY (d), KEY (e)) ENGINE=InnoDB;
      INSERT INTO t2 VALUES (1,2,3,'');
       
      --error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
      ALTER TABLE t2 ADD VECTOR INDEX (f);
       
      --error ER_TABLE_EXISTS_ERROR
      ALTER TABLE t1 ADD VECTOR INDEX (c);
       
      SELECT * FROM t1 ORDER BY b LIMIT 1;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      bb-11.6-MDEV-32887-vector f20a1f4e94f5fc700959ff6b7945aa8a5fd0c307

      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:4265: void pfs_end_table_io_wait_v1(PSI_table_locker*, ulonglong): Assertion `(state->m_index < table->m_share->m_key_count) || (state->m_index == MAX_INDEXES)' failed.
      240927 18:50:18 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f7dc2853e32 in __GI___assert_fail (assertion=0x5572694c2e40 "(state->m_index < table->m_share->m_key_count) || (state->m_index == MAX_INDEXES)", file=0x5572694bff80 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc", line=4265, function=0x5572694c2da0 "void pfs_end_table_io_wait_v1(PSI_table_locker*, ulonglong)") at ./assert/assert.c:101
      #10 0x0000557267b17a27 in pfs_end_table_io_wait_v1 (locker=0x61d00031f1e0, numrows=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:4265
      #11 0x000055726732113d in handler::end_psi_batch_mode (this=0x61d00031ecb8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/handler.cc:3560
      #12 0x0000557266b2ee1a in sub_select (join=0x6290000fbc90, join_tab=0x6290003ed238, end_of_records=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:23704
      #13 0x0000557266b2beb5 in do_select (join=0x6290000fbc90, procedure=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:23162
      #14 0x0000557266aaa412 in JOIN::exec_inner (this=0x6290000fbc90) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:5025
      #15 0x0000557266aa779c in JOIN::exec (this=0x6290000fbc90) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:4808
      #16 0x0000557266aabecb in mysql_select (thd=0x62c0001e0218, tables=0x6290000fa968, fields=..., conds=0x0, og_num=1, order=0x6290000fba48, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x6290000fbc60, unit=0x62c0001e4710, select_lex=0x6290000fa2f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:5341
      #17 0x0000557266a7a583 in handle_select (thd=0x62c0001e0218, lex=0x62c0001e4630, result=0x6290000fbc60, setup_tables_done_option=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:624
      #18 0x000055726699d139 in execute_sqlcom_select (thd=0x62c0001e0218, all_tables=0x6290000fa968) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:6151
      #19 0x000055726698cd64 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
      #20 0x00005572669a7b8a in mysql_parse (thd=0x62c0001e0218, rawbuf=0x6290000fa238 "SELECT * FROM t1 ORDER BY b LIMIT 1", length=35, parser_state=0x7f7db33609f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:7873
      #21 0x000055726697ebac in dispatch_command (command=COM_QUERY, thd=0x62c0001e0218, packet=0x629000280219 "", packet_length=35, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1892
      #22 0x000055726697b8c0 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
      #23 0x0000557266e6b421 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
      #24 0x0000557266e6ade2 in handle_one_connection (arg=0x608000004838) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
      #25 0x0000557267b0c99a in pfs_spawn_thread (arg=0x617000008218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
      #26 0x00007f7dc28a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #27 0x00007f7dc292861c 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.