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

Assertion `!thd->is_error()' fails upon I_S query timeout with vector key

    XMLWordPrintable

Details

    Description

      --source include/have_debug_sync.inc
       
      create table t1 (v vector(1) not null, vector(v));
       
      --connect (con1,localhost,root,,)
      set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR go';
      --send alter table t1 force, algorithm=copy, lock=exclusive
       
      --connection default
      set debug_sync= 'now WAIT_FOR locked';
      set lock_wait_timeout= 1;
       
      # Comment from Claude:
      # fill_schema_table_from_frm() times out on the MDL and leaves ER_LOCK_WAIT_TIMEOUT
      # in the DA; the ALTER is released before fill_schema_table_by_open() retries
       
      set debug_sync= 'before_open_in_get_all_tables SIGNAL go WAIT_FOR done';
      --send select engine from information_schema.tables
       
      --connection con1
      --reap
      set debug_sync= 'now SIGNAL done';
      --disconnect con1
       
      --connection default
      --error ER_LOCK_WAIT_TIMEOUT
      --reap
      set debug_sync= 'reset';
      drop table t1;
      

      11.8 14362356d14b80242d60dceb9b34f988bbcc9945

      mariadbd: /data/bld/11.8-asan-ubsan/sql/table.cc:3765: int TABLE_SHARE::init_from_sql_statement_string(THD*, bool, const char*, size_t): Assertion `!thd->is_error()' failed.
      261010 15:08:32 [ERROR] /share8t/bld/11.8-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #10 0x00007fa7bb852ec2 in __GI___assert_fail (assertion=0x56369a0d7900 "!thd->is_error()", file=0x56369a0cb9c0 "/data/bld/11.8-asan-ubsan/sql/table.cc", line=3765, function=0x56369a0d7940 "int TABLE_SHARE::init_from_sql_statement_string(THD*, bool, const char*, size_t)") at ./assert/assert.c:103
      #11 0x0000563696bf5652 in TABLE_SHARE::init_from_sql_statement_string (this=this@entry=0x625000251b60, thd=0x62c0000b0218, write=write@entry=false, sql=<optimized out>, sql_length=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/table.cc:3765
      #12 0x000056369611089f in TABLE::hlindex_open (this=this@entry=0x61900005a598, nr=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_base.cc:10083
      #13 0x00005636968c3315 in get_schema_tables_record (thd=<optimized out>, tables=<optimized out>, table=0x62d000348438, res=<optimized out>, db_name=<optimized out>, table_name=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_show.cc:6072
      #14 0x000056369689bfbd in fill_schema_table_by_open (thd=thd@entry=0x62c0000b0218, mem_root=mem_root@entry=0x7fa7ae13a050, is_show_fields_or_keys=is_show_fields_or_keys@entry=false, table=table@entry=0x62d000348438, schema_table=schema_table@entry=0x56369c551528 <schema_tables+2952>, orig_db_name=orig_db_name@entry=0x62d000100d38, orig_table_name=<optimized out>, open_tables_state_backup=<optimized out>, can_deadlock=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_show.cc:4954
      #15 0x0000563696936742 in get_all_tables (thd=0x62c0000b0218, tables=<optimized out>, cond=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_show.cc:5683
      #16 0x0000563696908013 in get_schema_tables_result (join=join@entry=0x62d0000fc800, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /data/bld/11.8-asan-ubsan/sql/sql_show.cc:9772
      #17 0x000056369680d80e in JOIN::exec_inner (this=this@entry=0x62d0000fc800) at /data/bld/11.8-asan-ubsan/sql/sql_select.cc:5073
      #18 0x000056369680eb71 in JOIN::exec (this=this@entry=0x62d0000fc800) at /data/bld/11.8-asan-ubsan/sql/sql_select.cc:4900
      #19 0x0000563696805550 in mysql_select (thd=thd@entry=0x62c0000b0218, tables=<optimized out>, fields=..., conds=conds@entry=0x0, og_num=og_num@entry=0, order=order@entry=0x0, group=<optimized out>, having=<optimized out>, proc_param=<optimized out>, select_options=<optimized out>, result=<optimized out>, unit=<optimized out>, select_lex=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_select.cc:5426
      #20 0x0000563696806698 in handle_select (thd=thd@entry=0x62c0000b0218, lex=lex@entry=0x62c0000b4688, result=result@entry=0x62d0000fc7d0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/bld/11.8-asan-ubsan/sql/sql_select.cc:634
      #21 0x000056369648232a in execute_sqlcom_select (thd=thd@entry=0x62c0000b0218, all_tables=<optimized out>) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:6219
      #22 0x00005636964c3011 in mysql_execute_command (thd=thd@entry=0x62c0000b0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:4006
      #23 0x00005636964e1059 in mysql_parse (thd=thd@entry=0x62c0000b0218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fa7ae13c9a0) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:7938
      #24 0x00005636964ea36b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62c0000b0218, packet=packet@entry=0x629000253219 "select engine from information_schema.tables", packet_length=packet_length@entry=44, blocking=blocking@entry=true) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:1923
      #25 0x00005636964f6957 in do_command (thd=thd@entry=0x62c0000b0218, blocking=blocking@entry=true) at /data/bld/11.8-asan-ubsan/sql/sql_parse.cc:1431
      #26 0x0000563696d478d2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x608000003a38, put_in_cache=put_in_cache@entry=true) at /data/bld/11.8-asan-ubsan/sql/sql_connect.cc:1515
      #27 0x0000563696d48a3b in handle_one_connection (arg=0x608000003a38) at /data/bld/11.8-asan-ubsan/sql/sql_connect.cc:1427
      #28 0x00005636987e230a in pfs_spawn_thread (arg=0x617000005f18) at /data/bld/11.8-asan-ubsan/storage/perfschema/pfs.cc:2198
      #29 0x00007fa7bb8a71f5 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #30 0x00007fa7bb9278ec in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 11.8.7

      commit 3ffd8fcab7e8817aec5b1eed4af93027cc4346dc
      Author:     Ahmad
      AuthorDate: Mon Mar 23 00:37:28 2026 +0200
      Commit:     Sergei Golubchik
      CommitDate: Sat Apr 18 00:14:47 2026 +0200
       
          MDEV-35821: Add vector index size to INDEX_LENGTH in SHOW TABLE STATUS
      

      Attachments

        Issue Links

          Activity

            People

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