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

Assertion `!trx->read_only' failed in trx_undo_report_row_operation on CREATE TABLE

    XMLWordPrintable

Details

    Description

      Different from MDEV-24812, and possibly related to MDEV-24859, we have:

      SET GLOBAL innodb_limit_optimistic_insert_debug=2;
      SET GLOBAL tx_read_only=1;
      CREATE TABLE t (c1 INT(1),c2 CHAR(1), KEY A (c1,c2 (1))) ENGINE=InnoDB  DEFAULT CHARSET=latin1;
      SET GLOBAL innodb_defragment_stats_accuracy=10;
      CREATE TABLE t2 (a INT,b INT,c CHAR(1),d CHAR(1),e VARCHAR(1),f VARCHAR(1),g BLOB,h BLOB,id INT,KEY(b),KEY(e));
      

      Leads to:

      10.8.0 ccdf5711a8fff0cd610a91fdcf37c8ff1182878c (Debug)

      mysqld: /test/10.8_dbg/storage/innobase/trx/trx0rec.cc:2081: dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*): Assertion `!trx->read_only' failed.
      

      10.8.0 ccdf5711a8fff0cd610a91fdcf37c8ff1182878c (Debug)

      Core was generated by `/test/MD121221-mariadb-10.8.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      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 0x14c56a0f8700 (LWP 4072538))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014c5a09b8859 in __GI_abort () at abort.c:79
      #2  0x000014c5a09b8729 in __assert_fail_base (fmt=0x14c5a0b4e588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55fa9148a90b "!trx->read_only", file=0x55fa9148ab80 "/test/10.8_dbg/storage/innobase/trx/trx0rec.cc", line=2081, function=<optimized out>) at assert.c:92
      #3  0x000014c5a09c9f36 in __GI___assert_fail (assertion=assertion@entry=0x55fa9148a90b "!trx->read_only", file=file@entry=0x55fa9148ab80 "/test/10.8_dbg/storage/innobase/trx/trx0rec.cc", line=line@entry=2081, function=function@entry=0x55fa9148b770 "dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*)") at assert.c:101
      #4  0x000055fa90de9c0b in trx_undo_report_row_operation (thr=thr@entry=0x14c4fc012e88, index=index@entry=0x14c53800c0e8, clust_entry=clust_entry@entry=0x14c4fc0151c8, update=update@entry=0x0, cmpl_info=cmpl_info@entry=0, rec=rec@entry=0x0, offsets=0x0, roll_ptr=0x14c56a0f6030) at /test/10.8_dbg/storage/innobase/trx/trx0rec.cc:2081
      #5  0x000055fa90e44b14 in btr_cur_ins_lock_and_undo (flags=flags@entry=0, cursor=cursor@entry=0x14c56a0f61c0, entry=entry@entry=0x14c4fc0151c8, thr=thr@entry=0x14c4fc012e88, mtr=mtr@entry=0x14c56a0f6770, inherit=inherit@entry=0x14c56a0f60cb) at /test/10.8_dbg/storage/innobase/btr/btr0cur.cc:3288
      #6  0x000055fa90e4889e in btr_cur_pessimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x14c56a0f61c0, offsets=offsets@entry=0x14c56a0f6188, heap=heap@entry=0x14c56a0f6180, entry=entry@entry=0x14c4fc0151c8, rec=rec@entry=0x14c56a0f6198, big_rec=0x14c56a0f6178, n_ext=<optimized out>, thr=0x14c4fc012e88, mtr=0x14c56a0f6770) at /test/10.8_dbg/storage/innobase/btr/btr0cur.cc:3704
      #7  0x000055fa90d2e295 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=33, index=index@entry=0x14c53800c0e8, n_uniq=n_uniq@entry=4, entry=entry@entry=0x14c4fc0151c8, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.8_dbg/storage/innobase/row/row0ins.cc:2794
      #8  0x000055fa90d2f071 in row_ins_clust_index_entry (index=index@entry=0x14c53800c0e8, entry=entry@entry=0x14c4fc0151c8, thr=thr@entry=0x14c4fc012e88, n_ext=n_ext@entry=0) at /test/10.8_dbg/storage/innobase/row/row0ins.cc:3263
      #9  0x000055fa90d33d2d in row_ins_index_entry (thr=0x14c4fc012e88, entry=0x14c4fc0151c8, index=0x14c53800c0e8) at /test/10.8_dbg/storage/innobase/row/row0ins.cc:3380
      #10 row_ins_index_entry_step (thr=0x14c4fc012e88, node=0x14c4fc012bd0) at /test/10.8_dbg/storage/innobase/row/row0ins.cc:3548
      #11 row_ins (thr=0x14c4fc012e88, node=0x14c4fc012bd0) at /test/10.8_dbg/storage/innobase/row/row0ins.cc:3694
      #12 row_ins_step (thr=thr@entry=0x14c4fc012e88) at /test/10.8_dbg/storage/innobase/row/row0ins.cc:3840
      #13 0x000055fa90ce8e95 in que_thr_step (thr=0x14c4fc012e88) at /test/10.8_dbg/storage/innobase/que/que0que.cc:632
      #14 que_run_threads_low (thr=0x14c4fc012e88) at /test/10.8_dbg/storage/innobase/que/que0que.cc:709
      #15 que_run_threads (thr=0x14c4fc012e88) at /test/10.8_dbg/storage/innobase/que/que0que.cc:729
      #16 0x000055fa90ce95a8 in que_eval_sql (info=info@entry=0x14c4fc010828, sql=sql@entry=0x55fa914aa220 "PROCEDURE INDEX_STATS_SAVE () IS\nBEGIN\nDELETE FROM \"mysql/innodb_index_stats\"\nWHERE\ndatabase_name = :database_name AND\ntable_name = :table_name AND\nindex_name = :index_name AND\nstat_name = :stat_name;"..., trx=trx@entry=0x14c58bd95390) at /test/10.8_dbg/storage/innobase/que/que0que.cc:768
      #17 0x000055fa90f0bd3c in dict_stats_exec_sql (pinfo=pinfo@entry=0x14c4fc010828, sql=sql@entry=0x55fa914aa220 "PROCEDURE INDEX_STATS_SAVE () IS\nBEGIN\nDELETE FROM \"mysql/innodb_index_stats\"\nWHERE\ndatabase_name = :database_name AND\ntable_name = :table_name AND\nindex_name = :index_name AND\nstat_name = :stat_name;"..., trx=trx@entry=0x14c58bd95390) at /test/10.8_dbg/storage/innobase/dict/dict0stats.cc:532
      #18 0x000055fa90f0c396 in dict_stats_save_index_stat (index=index@entry=0x14c53800c0e8, last_update=last_update@entry=1641902500, stat_name=<optimized out>, stat_name@entry=0x55fa914a957a "n_page_split", stat_value=10, sample_size=sample_size@entry=0x0, stat_description=stat_description@entry=0x55fa914abf68 "Number of new page splits on leaves since last defragmentation.", trx=0x14c58bd95390) at /test/10.8_dbg/storage/innobase/dict/dict0stats.cc:2968
      #19 0x000055fa90f17a7b in dict_stats_save_defrag_stats (index=0x14c53800c0e8) at /test/10.8_dbg/storage/innobase/dict/dict0defrag_bg.cc:398
      #20 0x000055fa90f18133 in dict_stats_process_entry_from_defrag_pool (thd=0x14c4fc004538) at /test/10.8_dbg/storage/innobase/dict/dict0defrag_bg.cc:198
      #21 dict_defrag_process_entries_from_defrag_pool (thd=thd@entry=0x14c4fc004538) at /test/10.8_dbg/storage/innobase/dict/dict0defrag_bg.cc:209
      #22 0x000055fa90f15e53 in dict_stats_func () at /test/10.8_dbg/storage/innobase/dict/dict0stats_bg.cc:382
      #23 0x000055fa90fb9966 in tpool::thread_pool_generic::timer_generic::run (this=0x55fa93b0e970) at /test/10.8_dbg/tpool/tpool_generic.cc:313
      #24 tpool::thread_pool_generic::timer_generic::execute (arg=0x55fa93b0e970) at /test/10.8_dbg/tpool/tpool_generic.cc:332
      #25 0x000055fa90fba7f9 in tpool::task::execute (this=0x55fa93b0e9b0) at /test/10.8_dbg/tpool/task.cc:37
      #26 0x000055fa90fb9481 in tpool::thread_pool_generic::worker_main (this=0x55fa93785220, thread_var=0x55fa937942c0) at /test/10.8_dbg/tpool/tpool_generic.cc:549
      #27 0x000055fa90fb97b8 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
      #28 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/9/bits/invoke.h:95
      #29 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/9/thread:244
      #30 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
      #31 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
      #32 0x000014c5a0dacde4 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
      #33 0x000014c5a0ec7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #34 0x000014c5a0ab5293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.6 (dbg), 10.7.2 (dbg), 10.8.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.42 (dbg), 10.2.42 (opt), 10.3.33 (dbg), 10.3.33 (opt), 10.4.23 (dbg), 10.4.23 (opt), 10.5.14 (dbg), 10.5.14 (opt), 10.6.6 (opt), 10.7.2 (opt), 10.8.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.36 (dbg), 5.7.36 (opt), 8.0.27 (dbg), 8.0.27 (opt)

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.