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

Assertion `undo_no <= 1' fails upon CREATE TEMPORARY .. IGNORE

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      Maybe it will be fixed along with MDEV-38948, but I'm not quite sure about it, as both the test case and the assertion are different, so filing separately.

      --source include/have_partition.inc
      --source include/have_innodb.inc
       
      CREATE TABLE t (a INT) PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN (10), PARTITION pn VALUES LESS THAN (MAXVALUE));
      INSERT INTO t VALUES (1),(100);
      CREATE TEMPORARY TABLE tmp ENGINE=InnoDB IGNORE AS SELECT * FROM t;
       
      DROP TABLE t;
      

      10.11 e5fed9eaf49419fe81d3695a4323816db1df8e32

      mariadbd: /data/bld/10.11-bug/storage/innobase/handler/ha_innodb.cc:15817: void trx_t::reset_and_truncate_undo(const dict_table_t*): Assertion `undo_no <= 1' failed.
      260303 13:26:06 [ERROR] /share8t/bld/10.11-bug/sql/mariadbd got signal 6 ;
       
      #8  0x00007f27cf045395 in __assert_fail_base (fmt=0x7f27cf1b9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55cfb179a300 "undo_no <= 1", file=file@entry=0x55cfb1783e80 "/data/bld/10.11-bug/storage/innobase/handler/ha_innodb.cc", line=line@entry=15817, function=function@entry=0x55cfb179a340 "void trx_t::reset_and_truncate_undo(const dict_table_t*)") at ./assert/assert.c:92
      #9  0x00007f27cf053eb2 in __GI___assert_fail (assertion=0x55cfb179a300 "undo_no <= 1", file=0x55cfb1783e80 "/data/bld/10.11-bug/storage/innobase/handler/ha_innodb.cc", line=15817, function=0x55cfb179a340 "void trx_t::reset_and_truncate_undo(const dict_table_t*)") at ./assert/assert.c:101
      #10 0x000055cfafd78b65 in trx_t::reset_and_truncate_undo (this=0x7f27c71d03c0, table=0x61800003c120) at /data/bld/10.11-bug/storage/innobase/handler/ha_innodb.cc:15817
      #11 0x000055cfafd4b3b2 in ha_innobase::extra (this=0x625000291948, operation=HA_EXTRA_END_COPY) at /data/bld/10.11-bug/storage/innobase/handler/ha_innodb.cc:15927
      #12 0x000055cfae93319a in select_insert::prepare_eof (this=0x62d0000a2390) at /data/bld/10.11-bug/sql/sql_insert.cc:4545
      #13 0x000055cfae93b86d in select_create::send_eof (this=0x62d0000a2390) at /data/bld/10.11-bug/sql/sql_insert.cc:5364
      #14 0x000055cfaeb830f2 in do_select (join=0x62d0000a24e0, procedure=0x0) at /data/bld/10.11-bug/sql/sql_select.cc:22654
      #15 0x000055cfaeb04b04 in JOIN::exec_inner (this=0x62d0000a24e0) at /data/bld/10.11-bug/sql/sql_select.cc:5023
      #16 0x000055cfaeb0217a in JOIN::exec (this=0x62d0000a24e0) at /data/bld/10.11-bug/sql/sql_select.cc:4807
      #17 0x000055cfaeb06408 in mysql_select (thd=0x62c0001f0218, tables=0x62d0000a1370, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201187781376, result=0x62d0000a2390, unit=0x62c0001f46e8, select_lex=0x62d0000a0d00) at /data/bld/10.11-bug/sql/sql_select.cc:5285
      #18 0x000055cfaead4a14 in handle_select (thd=0x62c0001f0218, lex=0x62c0001f4610, result=0x62d0000a2390, setup_tables_done_option=0) at /data/bld/10.11-bug/sql/sql_select.cc:601
      #19 0x000055cfaed049b1 in Sql_cmd_create_table_like::execute (this=0x62d0000a0530, thd=0x62c0001f0218) at /data/bld/10.11-bug/sql/sql_table.cc:13104
      #20 0x000055cfae9f3acd in mysql_execute_command (thd=0x62c0001f0218, is_called_from_prepared_stmt=false) at /data/bld/10.11-bug/sql/sql_parse.cc:6201
      #21 0x000055cfaea0094c in mysql_parse (thd=0x62c0001f0218, rawbuf=0x62d0000a0438 "CREATE TEMPORARY TABLE tmp ENGINE=InnoDB IGNORE AS SELECT * FROM t", length=66, parser_state=0x7f27bf726a80) at /data/bld/10.11-bug/sql/sql_parse.cc:8223
      #22 0x000055cfae9d5d6c in dispatch_command (command=COM_QUERY, thd=0x62c0001f0218, packet=0x62900028a219 "CREATE TEMPORARY TABLE tmp ENGINE=InnoDB IGNORE AS SELECT * FROM t", packet_length=66, blocking=true) at /data/bld/10.11-bug/sql/sql_parse.cc:1924
      #23 0x000055cfae9d2a3f in do_command (thd=0x62c0001f0218, blocking=true) at /data/bld/10.11-bug/sql/sql_parse.cc:1434
      #24 0x000055cfaeea53cc in do_handle_one_connection (connect=0x6080000155b8, put_in_cache=true) at /data/bld/10.11-bug/sql/sql_connect.cc:1475
      #25 0x000055cfaeea4f2b in handle_one_connection (arg=0x608000015538) at /data/bld/10.11-bug/sql/sql_connect.cc:1387
      #26 0x000055cfafae55ee in pfs_spawn_thread (arg=0x617000007e98) at /data/bld/10.11-bug/storage/perfschema/pfs.cc:2201
      #27 0x00007f27cf0a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #28 0x00007f27cf12885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 10.11:

      commit e5fed9eaf49419fe81d3695a4323816db1df8e32 (HEAD)
      Author: Thirunarayanan Balathandayuthapani
      Date:   Thu Feb 26 12:07:23 2026 +0530
       
          MDEV-36436  Assertion "unexpected references" == 0 after ALTER IGNORE TABLE
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.