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

Assertion `fts_id_index->fields[1].col->vers_sys_end()' failed in void fts_add_doc_by_id(fts_trx_table_t*, doc_id_t)

    XMLWordPrintable

Details

    Description

      Stack is almost similar to MDEV-20237, but the test case mentioned in MDEV-20237 does not reproduce the crash in 10.5+ builds.

      --source include/have_innodb.inc
       
      CREATE TABLE t (a TEXT,b TEXT AS (a),c TEXT AS (CONCAT (a)),FULLTEXT KEY a (a)) ENGINE=INNODB;
      ALTER TABLE t ADD COLUMN c1 BIGINT UNSIGNED AS ROW START INVISIBLE,ADD COLUMN c2 BIGINT UNSIGNED AS ROW END INVISIBLE,ADD PERIOD FOR SYSTEM_TIME(c1,c2),ADD SYSTEM VERSIONING;
      INSERT INTO t (a) VALUES (1);
      

      Leads to:

      11.7.0 5bbda9711131845ae6b4315a268b4d1710943a85 (Debug)

      mariadbd: /test/11.7_dbg/storage/innobase/fts/fts0fts.cc:3440: void fts_add_doc_by_id(fts_trx_table_t*, doc_id_t): Assertion `fts_id_index->fields[1].col->vers_sys_end()' failed.
      

      11.7.0 5bbda9711131845ae6b4315a268b4d1710943a85 (Debug)

      Core was generated by `/test/MD090924-mariadb-11.7.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1529081fb700 (LWP 2510053))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000152920ba5859 in __GI_abort () at abort.c:79
      #2  0x0000152920ba5729 in __assert_fail_base (fmt=0x152920d3b588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d2d9a58070 "fts_id_index->fields[1].col->vers_sys_end()", file=0x55d2d9a565d0 "/test/11.7_dbg/storage/innobase/fts/fts0fts.cc", line=3440, function=<optimized out>) at assert.c:92
      #3  0x0000152920bb6fd6 in __GI___assert_fail (assertion=assertion@entry=0x55d2d9a58070 "fts_id_index->fields[1].col->vers_sys_end()", file=file@entry=0x55d2d9a565d0 "/test/11.7_dbg/storage/innobase/fts/fts0fts.cc", line=line@entry=3440, function=function@entry=0x55d2d9a58038 "void fts_add_doc_by_id(fts_trx_table_t*, doc_id_t)") at assert.c:101
      #4  0x000055d2d947b1c9 in fts_add_doc_by_id (ftt=ftt@entry=0x1528dc0a2818, doc_id=doc_id@entry=1) at /test/11.7_dbg/storage/innobase/include/dict0mem.h:578
      #5  0x000055d2d947c8bf in fts_add (ftt=ftt@entry=0x1528dc0a2818, row=row@entry=0x1528dc027a38) at /test/11.7_dbg/storage/innobase/fts/fts0fts.cc:2830
      #6  0x000055d2d947cac4 in fts_commit_table (ftt=0x1528dc0a2818) at /test/11.7_dbg/storage/innobase/fts/fts0fts.cc:2992
      #7  fts_commit (trx=trx@entry=0x152916edab80) at /test/11.7_dbg/storage/innobase/fts/fts0fts.cc:3041
      #8  0x000055d2d932e1ce in trx_t::commit_low (this=this@entry=0x152916edab80, mtr=0x1529081f8d00) at /test/11.7_dbg/storage/innobase/trx/trx0trx.cc:1564
      #9  0x000055d2d932e4a5 in trx_t::commit_persist (this=this@entry=0x152916edab80) at /test/11.7_dbg/storage/innobase/trx/trx0trx.cc:1616
      #10 0x000055d2d932e527 in trx_t::commit (this=this@entry=0x152916edab80) at /test/11.7_dbg/storage/innobase/trx/trx0trx.cc:1625
      #11 0x000055d2d932e7cf in trx_commit_for_mysql (trx=trx@entry=0x152916edab80) at /test/11.7_dbg/storage/innobase/trx/trx0trx.cc:1745
      #12 0x000055d2d90ed927 in innobase_commit_low (trx=trx@entry=0x152916edab80) at /test/11.7_dbg/storage/innobase/handler/ha_innodb.cc:4325
      #13 0x000055d2d90ed973 in innobase_commit_ordered_2 (trx=trx@entry=0x152916edab80, thd=thd@entry=0x1528dc000d48) at /test/11.7_dbg/storage/innobase/handler/ha_innodb.cc:4426
      #14 0x000055d2d90edc28 in innobase_commit (hton=<optimized out>, thd=0x1528dc000d48, commit_trx=<optimized out>) at /test/11.7_dbg/storage/innobase/handler/ha_innodb.cc:4543
      #15 0x000055d2d8d60d1d in commit_one_phase_2 (thd=thd@entry=0x1528dc000d48, all=all@entry=false, trans=trans@entry=0x1528dc004898, is_real_trans=true) at /test/11.7_dbg/sql/handler.cc:2208
      #16 0x000055d2d8d60ef4 in ha_commit_one_phase (thd=thd@entry=0x1528dc000d48, all=all@entry=false) at /test/11.7_dbg/sql/handler.cc:2150
      #17 0x000055d2d8d634ca in ha_commit_trans (thd=thd@entry=0x1528dc000d48, all=all@entry=false) at /test/11.7_dbg/sql/handler.cc:1944
      #18 0x000055d2d8bc3543 in trans_commit_stmt (thd=thd@entry=0x1528dc000d48) at /test/11.7_dbg/sql/transaction.cc:497
      #19 0x000055d2d8a1dbc5 in mysql_execute_command (thd=thd@entry=0x1528dc000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.7_dbg/sql/sql_parse.cc:5933
      #20 0x000055d2d8a08652 in mysql_parse (thd=thd@entry=0x1528dc000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1529081fa270) at /test/11.7_dbg/sql/sql_parse.cc:7876
      #21 0x000055d2d8a1fad1 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1528dc000d48, packet=packet@entry=0x1528dc00b249 "INSERT INTO t (a) VALUES (1)", packet_length=packet_length@entry=28, blocking=blocking@entry=true) at /test/11.7_dbg/sql/sql_class.h:1639
      #22 0x000055d2d8a225d4 in do_command (thd=0x1528dc000d48, blocking=blocking@entry=true) at /test/11.7_dbg/sql/sql_parse.cc:1405
      #23 0x000055d2d8bac067 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55d2db81fa58, put_in_cache=put_in_cache@entry=true) at /test/11.7_dbg/sql/sql_connect.cc:1448
      #24 0x000055d2d8bac628 in handle_one_connection (arg=arg@entry=0x55d2db81fa58) at /test/11.7_dbg/sql/sql_connect.cc:1350
      #25 0x000055d2d903a0fe in pfs_spawn_thread (arg=0x55d2db7783f8) at /test/11.7_dbg/storage/perfschema/pfs.cc:2198
      #26 0x00001529210b6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x0000152920ca2133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.27 (dbg), 10.6.20 (dbg), 10.11.10 (dbg), 11.1.7 (dbg), 11.2.6 (dbg), 11.4.4 (dbg), 11.6.0 (dbg), 11.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.5.27 (opt), 10.6.20 (opt), 10.11.10 (opt), 11.1.7 (opt), 11.2.6 (opt), 11.4.4 (opt), 11.6.0 (opt), 11.7.0 (opt)

      Attachments

        Activity

          People

            marko Marko Mäkelä
            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.