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

Assertion `table->stat_initialized()' fails on the slave upon RBR with indexed virtual column

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      --source include/have_innodb.inc
      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      CREATE TABLE t1 (a INT PRIMARY KEY, b INT, v INT AS (b) VIRTUAL, KEY(v)) ENGINE=InnoDB;
      INSERT INTO t1 (a,b) VALUES (1,1),(2,2),(3,3);
      UPDATE t1 SET b=b+10;
       
      --sync_slave_with_master
       
      --let $rpl_server_number= 2
      --source include/rpl_restart_server.inc
       
      --connection slave
      SET GLOBAL innodb_max_purge_lag_wait=0;
      --source include/start_slave.inc
       
      --connection master
      UPDATE t1 SET b=b+1;
      --sync_slave_with_master
       
      --connection master
      DROP TABLE t1;
      --source include/rpl_end.inc
      

      10.11 ead9739532070266040568d68dc4fc10afcbe7f7

      mariadbd: /data/bld/10.11-asan-ubsan/storage/innobase/row/row0mysql.cc:1618: dberr_t row_update_for_mysql(row_prebuilt_t*): Assertion `table->stat_initialized()' failed.
      261010 21:11:48 [ERROR] /share8t/bld/10.11-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #10 0x00007f1dde252ec2 in __GI___assert_fail (assertion=0x5587ab68cc60 "table->stat_initialized()", file=0x5587ab690ae0 "/data/bld/10.11-asan-ubsan/storage/innobase/row/row0mysql.cc", line=1618, function=0x5587ab68cba0 "dberr_t row_update_for_mysql(row_prebuilt_t*)") at ./assert/assert.c:103
      #11 0x00005587aa1f2912 in row_update_for_mysql (prebuilt=<optimized out>) at /data/bld/10.11-asan-ubsan/storage/innobase/row/row0mysql.cc:1618
      #12 0x00005587a9c327c6 in ha_innobase::update_row (this=0x625000070948, old_row=<optimized out>, new_row=<optimized out>) at /data/bld/10.11-asan-ubsan/storage/innobase/handler/ha_innodb.cc:8840
      #13 0x00005587a897b419 in handler::ha_update_row (this=this@entry=0x625000070948, old_data=<optimized out>, new_data=new_data@entry=0x625000071150 "\371\001") at /data/bld/10.11-asan-ubsan/sql/handler.cc:7937
      #14 0x00005587a92f2fa4 in Update_rows_log_event::do_exec_row (this=0x6130000f0198, rgi=0x61d00026fc80) at /data/bld/10.11-asan-ubsan/sql/log_event_server.cc:8883
      #15 0x00005587a92d9e69 in Rows_log_event::do_apply_event (this=0x6130000f0198, rgi=<optimized out>) at /data/bld/10.11-asan-ubsan/sql/log_event_server.cc:6269
      #16 0x00005587a9240fa5 in Log_event::apply_event (this=this@entry=0x6130000f0198, rgi=rgi@entry=0x61d00026fc80) at /data/bld/10.11-asan-ubsan/sql/log_event.cc:4415
      #17 0x00005587a70edb6b in apply_event_and_update_pos_apply (ev=ev@entry=0x6130000f0198, thd=thd@entry=0x62c000250218, rgi=rgi@entry=0x61d00026fc80, reason=reason@entry=0) at /data/bld/10.11-asan-ubsan/sql/slave.cc:4138
      #18 0x00005587a71191c4 in apply_event_and_update_pos (ev=ev@entry=0x6130000f0198, thd=thd@entry=0x62c000250218, rgi=rgi@entry=0x61d00026fc80) at /data/bld/10.11-asan-ubsan/sql/slave.cc:4314
      #19 0x00005587a711ccd0 in exec_relay_log_event (thd=<optimized out>, rli=rli@entry=0x62a0000202c0, serial_rgi=serial_rgi@entry=0x61d00026fc80) at /data/bld/10.11-asan-ubsan/sql/slave.cc:4770
      #20 0x00005587a71263d4 in handle_slave_sql (arg=0x62a00001e200) at /data/bld/10.11-asan-ubsan/sql/slave.cc:6031
      #21 0x00005587a98128bf in pfs_spawn_thread (arg=0x617000030298) at /data/bld/10.11-asan-ubsan/storage/perfschema/pfs.cc:2201
      #22 0x00007f1dde2a71f5 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #23 0x00007f1dde3278ec in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 10.6.26:

      commit 8c930cdc5a5700b1f749dc00cdf36d51911bf563
      Author: Thirunarayanan Balathandayuthapani
      Date:   Wed Apr 15 22:41:59 2026 +0530
       
          MDEV-39261 MariaDB crash on startup in presence of indexed virtual columns
      

      Attachments

        Issue Links

          Activity

            People

              alessandro.vetere Alessandro Vetere
              elenst Elena Stepanova
              Thirunarayanan Balathandayuthapani Thirunarayanan Balathandayuthapani
              Alessandro Vetere Alessandro Vetere
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Time Spent - 3.25h Remaining Estimate - 2.75h
                  2.75h
                  Logged:
                  Time Spent - 3.25h Remaining Estimate - 2.75h
                  3.25h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.