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

Insufficient history for index, Assertion `inited == RND' failed with precise-versioned table

    XMLWordPrintable

Details

    Description

      Given that we have MDEV-29726 which already fails without any concurrency, I'm filing this one as minor.

      The test case is non-deterministic, run with --repeat=N. It usually fails for me on the first attempt, but sometimes it misses a round.

      --source include/have_innodb.inc
      --source include/have_sequence.inc
       
      CREATE TABLE t (
        f INT,
        row_start BIGINT UNSIGNED GENERATED ALWAYS AS ROW START,
        row_end BIGINT UNSIGNED GENERATED ALWAYS AS ROW END,
        PERIOD FOR SYSTEM_TIME (row_start, row_end)
      ) ENGINE=InnoDB WITH SYSTEM VERSIONING;
      INSERT INTO t (f) SELECT seq FROM seq_1_to_100;
      INSERT INTO t (f) SELECT seq FROM seq_1_to_100;
      --connect (con1,localhost,root,,)
      --send
        OPTIMIZE TABLE mysql.transaction_registry;
      --connection default
      SELECT * from t FOR system_time AS OF '2038-01-19 05:14:07.999999';
       
      --connection con1
      --reap
      --disconnect con1
      --connection default
      DROP TABLE t;
      

      10.6 debug 3bcfc2ed0aed64882868b42885c6b55a98e7c505

      mariadbd: /data/bld/10.6-asan-ubsan/sql/handler.cc:3573: int handler::ha_rnd_next(uchar*): Assertion `inited == RND' failed.
      250715 22:40:29 [ERROR] /share8t/bld/10.6-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #10 0x00007fc994a53eb2 in __GI___assert_fail (assertion=0x556474d1f7a0 "inited == RND", file=0x556474d18c20 "/data/bld/10.6-asan-ubsan/sql/handler.cc", line=3573, function=0x556474d1f6e0 "int handler::ha_rnd_next(uchar*)") at ./assert/assert.c:101
      #11 0x0000556472325fac in handler::ha_rnd_next (this=this@entry=0x625000294158, buf=<optimized out>) at /data/bld/10.6-asan-ubsan/sql/handler.cc:3573
      #12 0x0000556472dbcbd7 in rr_sequential (info=0x7fc9853ec370) at /data/bld/10.6-asan-ubsan/sql/records.cc:519
      #13 0x0000556471778dc1 in READ_RECORD::read_record (this=0x7fc9853ec370) at /data/bld/10.6-asan-ubsan/sql/records.h:81
      #14 TR_table::query (this=this@entry=0x7fc9853ec560, trx_id=trx_id@entry=25) at /data/bld/10.6-asan-ubsan/sql/table.cc:10271
      #15 0x00005564717791e7 in TR_table::query_sees (this=this@entry=0x7fc9853ec560, result=@0x7fc9853ec550: true, trx_id1=trx_id1@entry=25, trx_id0=trx_id0@entry=20, commit_id1=commit_id1@entry=0, iso_level1=iso_level1@entry=ISO_READ_UNCOMMITTED, commit_id0=0) at /data/bld/10.6-asan-ubsan/sql/table.cc:10370
      #16 0x0000556471db8643 in Item_func_trt_trx_sees::val_bool (this=0x62d0000a27a0) at /data/bld/10.6-asan-ubsan/sql/item_vers.cc:194
      #17 0x00005564725003ce in Item_cond_and::val_bool (this=0x62d0000a5340) at /data/bld/10.6-asan-ubsan/sql/item_cmpfunc.cc:5643
      #18 0x0000556471276106 in evaluate_join_record (join=join@entry=0x62d0000a1d10, join_tab=join_tab@entry=0x62d0000a4398, error=error@entry=0) at /data/bld/10.6-asan-ubsan/sql/sql_select.cc:22497
      #19 0x00005564712a55e7 in sub_select (join=<optimized out>, join_tab=<optimized out>, end_of_records=<optimized out>) at /data/bld/10.6-asan-ubsan/sql/sql_select.cc:22438
      #20 0x000055647134c324 in do_select (join=join@entry=0x62d0000a1d10, procedure=<optimized out>) at /data/bld/10.6-asan-ubsan/sql/sql_select.cc:21922
      #21 0x00005564714064a8 in JOIN::exec_inner (this=this@entry=0x62d0000a1d10) at /data/bld/10.6-asan-ubsan/sql/sql_select.cc:4939
      #22 0x0000556471406bda in JOIN::exec (this=this@entry=0x62d0000a1d10) at /data/bld/10.6-asan-ubsan/sql/sql_select.cc:4717
      #23 0x00005564713fd568 in mysql_select (thd=thd@entry=0x62b0000bd218, tables=<optimized out>, fields=..., conds=conds@entry=0x0, og_num=og_num@entry=0, order=order@entry=0x0, group=<optimized out>, having=<optimized out>, proc_param=<optimized out>, select_options=<optimized out>, result=<optimized out>, unit=<optimized out>, select_lex=<optimized out>) at /data/bld/10.6-asan-ubsan/sql/sql_select.cc:5196
      #24 0x00005564713fe752 in handle_select (thd=thd@entry=0x62b0000bd218, lex=lex@entry=0x62b0000c1538, result=result@entry=0x62d0000a1ce0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/bld/10.6-asan-ubsan/sql/sql_select.cc:573
      #25 0x00005564710f4360 in execute_sqlcom_select (thd=thd@entry=0x62b0000bd218, all_tables=<optimized out>) at /data/bld/10.6-asan-ubsan/sql/sql_parse.cc:6422
      #26 0x0000556471137dea in mysql_execute_command (thd=thd@entry=0x62b0000bd218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/10.6-asan-ubsan/sql/sql_parse.cc:4013
      #27 0x0000556471159d04 in mysql_parse (thd=thd@entry=0x62b0000bd218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fc9853eeac0) at /data/bld/10.6-asan-ubsan/sql/sql_parse.cc:8200
      #28 0x0000556471162fd4 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62b0000bd218, packet=packet@entry=0x629000276219 "", packet_length=packet_length@entry=66, blocking=blocking@entry=true) at /data/bld/10.6-asan-ubsan/sql/sql_parse.cc:1908
      #29 0x000055647116fc26 in do_command (thd=thd@entry=0x62b0000bd218, blocking=blocking@entry=true) at /data/bld/10.6-asan-ubsan/sql/sql_parse.cc:1421
      #30 0x00005564718f16ee in do_handle_one_connection (connect=<optimized out>, connect@entry=0x608000018938, put_in_cache=put_in_cache@entry=true) at /data/bld/10.6-asan-ubsan/sql/sql_connect.cc:1386
      #31 0x00005564718f284b in handle_one_connection (arg=0x608000018938) at /data/bld/10.6-asan-ubsan/sql/sql_connect.cc:1298
      #32 0x00005564733212d7 in pfs_spawn_thread (arg=0x617000007e98) at /data/bld/10.6-asan-ubsan/storage/perfschema/pfs.cc:2201
      #33 0x00007fc994aa81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #34 0x00007fc994b2885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      10.6 non-debug 3bcfc2ed0aed64882868b42885c6b55a98e7c505

      mysqltest: At line 16: query 'SELECT * from t FOR system_time AS OF '2038-01-19 05:14:07.999999'' failed: ER_TABLE_DEF_CHANGED (1412): Table definition has changed, please retry transaction
       
      Warnings from just before the error:
      Warning 159 InnoDB: insufficient history for index 0 
      Error 1412 Table definition has changed, please retry transaction 
      Error 1412 Table definition has changed, please retry transaction
      

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.