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

Assertion `mysql_table' failed in innobase_get_computed_value upon DDL/DML on a table with virtual columns

    XMLWordPrintable

Details

    Description

      Run the test case with --mysqld=--lock-wait-timeout=2 --repeat=50 --mem.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (y YEAR, vy YEAR AS (y) VIRTUAL, pk INT, PRIMARY KEY(pk), UNIQUE(vy)) ENGINE=InnoDB;
       
      INSERT IGNORE INTO t1 (pk,y) VALUES (1,2022);
      REPLACE INTO t1 (pk,y) SELECT pk,y FROM t1;
      ALTER TABLE t1 ENGINE=InnoDB;
      REPLACE INTO t1 (pk,y) SELECT pk,y FROM t1;
      TRUNCATE TABLE t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 18e8d420b796

      mysqld: /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21079: dfield_t* innobase_get_computed_value(const dtuple_t*, const dict_v_col_t*, const dict_index_t*, mem_heap_t**, mem_heap_t*, const dict_field_t*, THD*, TABLE*, const dict_table_t*, upd_t*, dict_foreign_t*): Assertion `mysql_table' failed.
      180412 21:12:28 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007ff408cd1ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000559e7ce7dbef in innobase_get_computed_value (row=0x7ff3cc015dd0, col=0x7ff3ac075198, index=0x7ff3ac1738f8, local_heap=0x7ff3ecff7990, heap=0x7ff3cc015d00, ifield=0x0, thd=0x7ff3cc000b00, mysql_table=0x0, old_table=0x0, parent_update=0x0, foreign=0x0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21079
      #9  0x0000559e7d0281bd in row_vers_build_clust_v_col (row=0x7ff3cc015dd0, clust_index=0x7ff3ac1738f8, index=0x7ff3ac174658, heap=0x7ff3cc015d00) at /data/src/10.3/storage/innobase/row/row0vers.cc:473
      #10 0x0000559e7d0291dc in row_vers_old_has_index_entry (also_curr=1, rec=0x7ff3fe76c07e "\200", mtr=0x7ff3ecff7ac0, index=0x7ff3ac174658, ientry=0x7ff3cc0144e8, roll_ptr=3940649694921243, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:921
      #11 0x0000559e7cfdda78 in row_purge_poss_sec (node=0x559e7f8df308, index=0x7ff3ac174658, entry=0x7ff3cc0144e8) at /data/src/10.3/storage/innobase/row/row0purge.cc:265
      #12 0x0000559e7cfde2a5 in row_purge_remove_sec_if_poss_leaf (node=0x559e7f8df308, index=0x7ff3ac174658, entry=0x7ff3cc0144e8) at /data/src/10.3/storage/innobase/row/row0purge.cc:477
      #13 0x0000559e7cfde75e in row_purge_remove_sec_if_poss (node=0x559e7f8df308, index=0x7ff3ac174658, entry=0x7ff3cc0144e8) at /data/src/10.3/storage/innobase/row/row0purge.cc:584
      #14 0x0000559e7cfde95b in row_purge_del_mark (node=0x559e7f8df308) at /data/src/10.3/storage/innobase/row/row0purge.cc:654
      #15 0x0000559e7cfdfdc7 in row_purge_record_func (node=0x559e7f8df308, undo_rec=0x559e7f8df8b8 "", thr=0x559e7f8df138, updated_extern=false) at /data/src/10.3/storage/innobase/row/row0purge.cc:1043
      #16 0x0000559e7cfe00e4 in row_purge (node=0x559e7f8df308, undo_rec=0x559e7f8df8b8 "", thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/row/row0purge.cc:1108
      #17 0x0000559e7cfe03e5 in row_purge_step (thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/row/row0purge.cc:1187
      #18 0x0000559e7cf646cc in que_thr_step (thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/que/que0que.cc:1051
      #19 0x0000559e7cf648ff in que_run_threads_low (thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/que/que0que.cc:1113
      #20 0x0000559e7cf64af0 in que_run_threads (thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/que/que0que.cc:1153
      #21 0x0000559e7d031916 in srv_task_execute () at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2485
      #22 0x0000559e7d031abb in srv_worker_thread (arg=0x0) at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2533
      #23 0x00007ff40a9a8494 in start_thread (arg=0x7ff3ecff9700) at pthread_create.c:333
      #24 0x00007ff408d8e93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Couldn't reproduce on 10.2.
      See comments for the test case which affects non-debug build.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.