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

Assertion `share->rows_recorded' failed in virtual int ha_tina::delete_row(const uchar *)

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      The assertion is similar to MDEV-36997

      CREATE TEMPORARY TABLE t1 (fld1 INT NOT NULL) ENGINE=CSV;
      CREATE TEMPORARY TABLE t2 LIKE t1;
      INSERT INTO t1 VALUES (35274);
      INSERT INTO t2 VALUES (10243);
      --ERROR ER_BAD_FIELD_ERROR
      SELECT t.f FROM t2 HAVING 2 IN (SELECT 1 FROM t2) AND t.f=0;
      INSERT INTO t2 VALUES (1),(2),(1),(3),(2),(1);
      INSERT INTO t2 VALUES (123e2);
      DELETE FROM t2 .*,t1.*,a.* USING t2,t1,t2 AS a;
      DELETE FROM t2;
      

      Leads to:

      CS 12.2.2 997d0c4dfc551ea54faa1e9b7d56f3a0ff2ca849 (Debug, Clang 18.1.3-11) Build 12/12/2025

      mariadbd: /test/12.2_dbg/storage/csv/ha_tina.cc:1142: virtual int ha_tina::delete_row(const uchar *): Assertion `share->rows_recorded' failed.
      

      CS 12.2.2 997d0c4dfc551ea54faa1e9b7d56f3a0ff2ca849 (Debug, Clang 18.1.3-11) Build 12/12/2025

      Core was generated by `/test/MD121225-mariadb-12.2.2-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 669286)]
      (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  0x000076e80fc4527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000076e80fc288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000076e80fc2881b in __assert_fail_base (fmt=0x76e80fdd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x59272dcd1e90 "share->rows_recorded", file=file@entry=0x59272dcd1e12 "/test/12.2_dbg/storage/csv/ha_tina.cc", line=line@entry=1142, function=function@entry=0x59272dcd1ea5 "virtual int ha_tina::delete_row(const uchar *)") at ./assert/assert.c:96
      #6  0x000076e80fc3b517 in __assert_fail (assertion=0x59272dcd1e90 "share->rows_recorded", file=0x59272dcd1e12 "/test/12.2_dbg/storage/csv/ha_tina.cc", line=1142, function=0x59272dcd1ea5 "virtual int ha_tina::delete_row(const uchar *)")at ./assert/assert.c:105
      #7  0x000059272d2ed80b in ha_tina::delete_row (this=0x76e748043f90, buf=0x76e748041f98 "") at /test/12.2_dbg/storage/csv/ha_tina.cc:1142
      #8  0x000059272cef6df0 in handler::ha_delete_row (this=0x76e748043f90, buf=0x76e748041f98 "") at /test/12.2_dbg/sql/handler.cc:8414
      #9  0x000059272ca2d6e9 in TABLE::delete_row<false> (this=0x76e748024a28, treat_versioned=false) at /test/12.2_dbg/sql/sql_delete.cc:373
      #10 0x000059272ca2dd3d in TABLE::delete_row (this=0x76e748024a28)at /test/12.2_dbg/sql/table.h:2016
      #11 0x000059272ca2845f in Sql_cmd_delete::delete_from_single_table (this=0x76e74801ae38, thd=0x76e748000d58)at /test/12.2_dbg/sql/sql_delete.cc:968
      #12 0x000059272ca2cb26 in Sql_cmd_delete::execute_inner (this=0x76e74801ae38, thd=0x76e748000d58) at /test/12.2_dbg/sql/sql_delete.cc:2168
      #13 0x000059272cb61fa6 in Sql_cmd_dml::execute (this=0x76e74801ae38, thd=0x76e748000d58) at /test/12.2_dbg/sql/sql_select.cc:34833
      #14 0x000059272caa6229 in mysql_execute_command (thd=0x76e748000d58, is_called_from_prepared_stmt=false) at /test/12.2_dbg/sql/sql_parse.cc:4400
      #15 0x000059272ca9c644 in mysql_parse (thd=0x76e748000d58, rawbuf=0x76e748019ee0 "DELETE FROM t", length=13, parser_state=0x76e7e4249ac0) at /test/12.2_dbg/sql/sql_parse.cc:7888
      #16 0x000059272ca99a18 in dispatch_command (command=COM_QUERY, thd=0x76e748000d58, packet=0x76e74800b239 "DELETE FROM t", packet_length=13, blocking=true) at /test/12.2_dbg/sql/sql_parse.cc:1878
      #17 0x000059272ca9d1f3 in do_command (thd=0x76e748000d58, blocking=true)at /test/12.2_dbg/sql/sql_parse.cc:1417
      #18 0x000059272cc8b529 in do_handle_one_connection (connect=0x59276a7779b8, put_in_cache=true) at /test/12.2_dbg/sql/sql_connect.cc:1503
      #19 0x000059272cc8b2ce in handle_one_connection (arg=0x59276a7453c8)at /test/12.2_dbg/sql/sql_connect.cc:1415
      #20 0x000076e80fc9caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #21 0x000076e80fd29c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  140126  33413c631898ecfc97abd51e272330feca55bf03  share->rows_recorded|SIGABRT|ha_tina::delete_row|handler::ha_delete_row|TABLE::delete_row|mysql_delete
      CS  10.6   opt  140126  33413c631898ecfc97abd51e272330feca55bf03  No bug found                  
      CS  10.11  dbg  140126  4de773e90cc8ff5a38e5585780643bdcb986f515  share->rows_recorded|SIGABRT|ha_tina::delete_row|handler::ha_delete_row|TABLE::delete_row<false>|TABLE::delete_row                  
      CS  10.11  opt  140126  4de773e90cc8ff5a38e5585780643bdcb986f515  No bug found                  
      CS  11.4   dbg  140126  3009210e63a8168afb0d946397133eb4bc16a5e4  share->rows_recorded|SIGABRT|ha_tina::delete_row|handler::ha_delete_row|TABLE::delete_row<false>|TABLE::delete_row
      CS  11.4   opt  140126  3009210e63a8168afb0d946397133eb4bc16a5e4  No bug found                  
      CS  11.8   dbg  140126  01ff5ae6b677bead4c41d91bf5afb25c593a1d02  GOT_ERROR|Got error: 98: Address already in use
      CS  11.8   opt  140126  01ff5ae6b677bead4c41d91bf5afb25c593a1d02  No bug found                  
      CS  12.2   dbg  140126  24d9893d4446848f5b06ef29f129c1001f0c4560  share->rows_recorded|SIGABRT|ha_tina::delete_row|handler::ha_delete_row|TABLE::delete_row<false>|TABLE::delete_row
      CS  12.2   opt  140126  24d9893d4446848f5b06ef29f129c1001f0c4560  No bug found                  
      CS  12.3   dbg  060126  5ed3668890390060526434b92271756392d77869  share->rows_recorded|SIGABRT|ha_tina::delete_row|handler::ha_delete_row|TABLE::delete_row<false>|TABLE::delete_row
      CS  12.3   opt  060126  5ed3668890390060526434b92271756392d77869  No bug found                  
      ES  10.6   dbg  151225  bc33b05c6a65de27dbe811a30bc37c207d60ee8e  share->rows_recorded|SIGABRT|ha_tina::delete_row|handler::ha_delete_row|TABLE::delete_row|mysql_delete
      ES  10.6   opt  151225  bc33b05c6a65de27dbe811a30bc37c207d60ee8e  No bug found
      ES  11.4   dbg  151225  714f2134597e00f4ff107886cf3a55eff48e4510  share->rows_recorded|SIGABRT|ha_tina::delete_row|handler::ha_delete_row|TABLE::delete_row<false>|TABLE::delete_row
      ES  11.4   opt  151225  714f2134597e00f4ff107886cf3a55eff48e4510  No bug found                  
      ES  11.8   dbg  151225  4008de1a5b06105a64821db7b851328f1b27d99e  share->rows_recorded|SIGABRT|ha_tina::delete_row|handler::ha_delete_row|TABLE::delete_row<false>|TABLE::delete_row
      ES  11.8   opt  151225  4008de1a5b06105a64821db7b851328f1b27d99e  No bug found                  
      

      Attachments

        Activity

          People

            Gosselin Dave Gosselin
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.