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

Assertion `inited == NONE || lookup_handler != this' failed in FVectorNode::save

Details

    Description

      --source include/have_innodb.inc 
       
      CREATE TABLE t (c1 VARCHAR(1024) NOT NULL,c2 VECTOR(1) NOT NULL,  UNIQUE KEY c1(c1), VECTOR KEY c2 (c2)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ;
      INSERT INTO t VALUES(1,0x30303030), (2,0x30303030);
      

      Leads to:

      CS 12.0.0 c92add291e636c797e6d6ddca605905541b2a441 (Debug) Build 19/02/2025

      mariadbd: /test/12.0_dbg/sql/handler.cc:8184: int handler::ha_write_row(const uchar *): Assertion `inited == NONE || lookup_handler != this' failed.
      

      CS 12.0.0 c92add291e636c797e6d6ddca605905541b2a441 (Debug) Build 19/02/2025

      Core was generated by `/test/MD190225-mariadb-12.0.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (Thread 0x14c0bda606c0 (LWP 3344312))]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  0x00001534aa04527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x00001534aa0288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00001534aa02881b in __assert_fail_base (fmt=0x1534aa1d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55b04b7d7171 "inited == NONE || lookup_handler != this", file=file@entry=0x55b04b7d4906 "/test/12.0_dbg/sql/handler.cc", line=line@entry=8184, function=function@entry=0x55b04b7d7074 "int handler::ha_write_row(const uchar *)") at ./assert/assert.c:96
      #6  0x00001534aa03b517 in __assert_fail (assertion=0x55b04b7d7171 "inited == NONE || lookup_handler != this", file=0x55b04b7d4906 "/test/12.0_dbg/sql/handler.cc", line=8184, function=0x55b04b7d7074 "int handler::ha_write_row(const uchar *)") at ./assert/assert.c:105
      #7  0x000055b04ab5b836 in handler::ha_write_row (this=0x153470072238, buf=0x153470074230 "\376") at /test/12.0_dbg/sql/handler.cc:8184
      #8  0x000055b04ad2fc3e in FVectorNode::save (this=0x1534700bb070, graph=0x1534700a6820) at /test/12.0_dbg/sql/vector_mhnsw.cc:1022
      #9  0x000055b04ad30b58 in mhnsw_insert (table=0x15347006bdf8, keyinfo=0x1534700a66e0) at /test/12.0_dbg/sql/vector_mhnsw.cc:1262
      #10 0x000055b04a67e72c in TABLE::hlindexes_on_insert (this=0x15347006bdf8) at /test/12.0_dbg/sql/sql_base.cc:9950
      #11 0x000055b04ab5b964 in handler::ha_write_row (this=0x1534700a5b58, buf=0x1534700a9c00 "\001") at /test/12.0_dbg/sql/handler.cc:8203
      #12 0x000055b04a6d33a7 in write_record (thd=0x153470000d58, table=0x15347006bdf8, info=0x15349efb10d0, sink=0x0) at /test/12.0_dbg/sql/sql_insert.cc:2332
      #13 0x000055b04a6cf89d in mysql_insert (thd=0x153470000d58, table_list=0x153470016ab8, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false, result=0x0) at /test/12.0_dbg/sql/sql_insert.cc:1159
      #14 0x000055b04a72ea82 in mysql_execute_command (thd=0x153470000d58, is_called_from_prepared_stmt=false) at /test/12.0_dbg/sql/sql_parse.cc:4484
      #15 0x000055b04a724784 in mysql_parse (thd=0x153470000d58, rawbuf=0x1534700169a0 "INSERT INTO t VALUES(1,0x30303030), (2,0x30303030)", length=50, parser_state=0x15349efb2a20) at /test/12.0_dbg/sql/sql_parse.cc:7915
      #16 0x000055b04a721b54 in dispatch_command (command=COM_QUERY, thd=0x153470000d58, packet=0x1534701c90e9 "INSERT INTO t VALUES(1,0x30303030), (2,0x30303030)", packet_length=50, blocking=true) at /test/12.0_dbg/sql/sql_parse.cc:1902
      #17 0x000055b04a725333 in do_command (thd=0x153470000d58, blocking=true) at /test/12.0_dbg/sql/sql_parse.cc:1415
      #18 0x000055b04a90e989 in do_handle_one_connection (connect=0x55b07e4e0c58, put_in_cache=true) at /test/12.0_dbg/sql/sql_connect.cc:1415
      #19 0x000055b04a90e72e in handle_one_connection (arg=0x55b07e4d3ef8) at /test/12.0_dbg/sql/sql_connect.cc:1327
      #20 0x00001534aa09caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #21 0x00001534aa129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 11.7.2 (dbg), 11.8.1 (dbg), 12.0.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.6.21 (dbg), 10.6.21 (opt), 10.11.12 (dbg), 10.11.12 (opt), 11.4.6 (dbg), 11.4.6 (opt), 11.7.2 (opt), 11.8.1 (opt), 12.0.0 (opt)

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            serg Sergei Golubchik
            ramesh Ramesh Sivaraman
            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.