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

Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY

Details

    Description

      --source include/have_innodb.inc
      create table t1 (a integer, c0 varchar(255), fulltext key (c0))
      with system versioning engine innodb;
      insert into t1 values (1, 'politician');
      update t1 set c0= 'criminal';
      delete history from t1;
      drop table t1;
      

      Result

      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
      #5  0x00007fc4e905f864 in __GI_abort () at abort.c:79
      #6  0x00007fc4e905f749 in __assert_fail_base (fmt=0x7fc4e91eb458 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x1752672 "0", file=0x17c2a10 "../src/storage/innobase/row/row0upd.cc", line=2439, function=<optimized out>) at assert.c:92
      #7  0x00007fc4e9071a96 in __GI___assert_fail (assertion=0x1752672 "0", file=0x17c2a10 "../src/storage/innobase/row/row0upd.cc", line=2439, function=0x17c3feb "dberr_t row_upd_sec_index_entry(upd_node_t *, que_thr_t *)") at assert.c:101
      #8  0x000000000105a12b in row_upd_sec_index_entry (node=0x7fc48c0fa8a0, thr=0x7fc48c0fbe98) at ../src/storage/innobase/row/row0upd.cc:2439
      #9  0x000000000105464d in row_upd_sec_step (node=0x7fc48c0fa8a0, thr=0x7fc48c0fbe98) at ../src/storage/innobase/row/row0upd.cc:2582
      #10 0x0000000001050797 in row_upd (node=0x7fc48c0fa8a0, thr=0x7fc48c0fbe98) at ../src/storage/innobase/row/row0upd.cc:3331
      #11 0x0000000001050045 in row_upd_step (thr=0x7fc48c0fbe98) at ../src/storage/innobase/row/row0upd.cc:3446
      #12 0x0000000000fd1fe0 in row_update_for_mysql (prebuilt=0x7fc48c0f9ba8) at ../src/storage/innobase/row/row0mysql.cc:1844
      #13 0x0000000000df00bc in ha_innobase::delete_row (this=0x7fc48c0ec840, record=0x7fc48c0eb290 "\374\001") at ../src/storage/innobase/handler/ha_innodb.cc:9040
      #14 0x0000000000b57ece in handler::ha_delete_row (this=0x7fc48c0ec840, buf=0x7fc48c0eb290 "\374\001") at ../src/sql/handler.cc:6566
      #15 0x0000000000d57a7e in TABLE::delete_row (this=0x7fc48c0f8f68) at ../src/sql/sql_delete.cc:245
      #16 0x0000000000d540cc in mysql_delete (thd=0x7fc48c000d28, table_list=0x7fc48c0613e0, conds=0x7fc48c01e5c0, order_list=0x7fc48c005670, limit=18446744073709551615, options=0, result=0x0) at ../src/sql/sql_delete.cc:730
      #17 0x00000000007ce0a3 in mysql_execute_command (thd=0x7fc48c000d28) at ../src/sql/sql_parse.cc:4707
      #18 0x00000000007c5516 in mysql_parse (thd=0x7fc48c000d28, rawbuf=0x7fc48c0e3120 "delete history from t1", length=22, parser_state=0x7fc4e2237548, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:7870
      

      Attachments

        1. breaks.gdb
          2 kB
          Aleksey Midenkov
        2. breaks.txt
          5 kB
          Aleksey Midenkov
        3. RR_REPLAY_SIMP.sh
          11 kB
          Matthias Leich
        4. TBR-1468_mic.yy
          0.9 kB
          Matthias Leich
        5. TBR-1468.cfg
          43 kB
          Matthias Leich
        6. TBR-1468.zz
          1 kB
          Matthias Leich

        Issue Links

          Activity

            midenok Aleksey Midenkov added a comment - bb-10.6-midenok-MDEV-25004

            The upgrade test fails to execute on Microsoft Windows:

            innodb_fts.versioning 'innodb,prepare'   w26 [ fail ]
                    Test ended at 2022-12-15 15:56:39
            CURRENT_TEST: innodb_fts.versioning
            mysqltest: In included file "./include/have_gzip.inc": 
            included from D:/Buildbot/amd64-windows/build/mysql-test/suite/innodb_fts/t/versioning.test at line 3:
            At line 2: command "gzip --version > /dev/null 2> /dev/null" failed with wrong error: 1
            

            If we are going through the trouble of archiving a copy of the system tablespace in the regression test suite, then I think that we should make use of it on all supported platforms, not only to test the upgrade for this bug, but for unrelated things, such as MDEV-29694.

            I would also suggest some cleanup of the upgrade test.

            marko Marko Mäkelä added a comment - The upgrade test fails to execute on Microsoft Windows : innodb_fts.versioning 'innodb,prepare' w26 [ fail ] Test ended at 2022-12-15 15:56:39 CURRENT_TEST: innodb_fts.versioning mysqltest: In included file "./include/have_gzip.inc": included from D:/Buildbot/amd64-windows/build/mysql-test/suite/innodb_fts/t/versioning.test at line 3: At line 2: command "gzip --version > /dev/null 2> /dev/null" failed with wrong error: 1 If we are going through the trouble of archiving a copy of the system tablespace in the regression test suite, then I think that we should make use of it on all supported platforms, not only to test the upgrade for this bug, but for unrelated things, such as MDEV-29694 . I would also suggest some cleanup of the upgrade test .

            I rechecked that all changed code in InnoDB is covered, including the fts_init_get_doc_id() that is uncovered according to gcov, but is actually covered by the test innodb_fts.crash_recovery.

            I posted a suggestion to avoid adding a Boolean output parameter to vers_row_same_trx(), and simply make it return a special value.

            I hope to complete the review tomorrow.

            marko Marko Mäkelä added a comment - I rechecked that all changed code in InnoDB is covered, including the fts_init_get_doc_id() that is uncovered according to gcov, but is actually covered by the test innodb_fts.crash_recovery . I posted a suggestion to avoid adding a Boolean output parameter to vers_row_same_trx() , and simply make it return a special value. I hope to complete the review tomorrow.

            To reduce your effort for addressing my review comments such as this one, I chose to suggest some changes in the form of code commits, based on the 10.3 version:
            Simplify vers_row_same_trx() and its caller
            Slightly smaller upgrade dataset
            Avoid some pessimization

            OK to push after applying these changes, and after fixing the have_gzip.inc.

            marko Marko Mäkelä added a comment - To reduce your effort for addressing my review comments such as this one , I chose to suggest some changes in the form of code commits, based on the 10.3 version: Simplify vers_row_same_trx() and its caller Slightly smaller upgrade dataset Avoid some pessimization OK to push after applying these changes, and after fixing the have_gzip.inc .

            origin/bb-10.6-MDEV-25004 9226ee211327f595314e2e5a8519858050b841bb 2022-12-16T16:25:24+02:00
            behaved well during RQG testing.

            mleich Matthias Leich added a comment - origin/bb-10.6- MDEV-25004 9226ee211327f595314e2e5a8519858050b841bb 2022-12-16T16:25:24+02:00 behaved well during RQG testing.

            People

              midenok Aleksey Midenkov
              mleich Matthias Leich
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.