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

Assertion failure upon updating a MERGE table via view

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (f INT) ENGINE=MyISAM;
      INSERT INTO t VALUES (1),(2);
      CREATE TABLE tm (f INT) ENGINE=MERGE UNION (t) INSERT_METHOD=FIRST;
      CREATE VIEW v AS SELECT f FROM tm;
      UPDATE v SET f = 3;
       
      # Cleanup
      DROP VIEW v;
      DROP TABLE tm, t;
      

      11.1 3ef11161

      mariadbd: /data/src/11.1/storage/myisammrg/ha_myisammrg.cc:860: int ha_myisammrg::attach_children(): Assertion `!this->file->children_attached' failed.
      230503 21:31:14 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007fddeaa53df2 in __GI___assert_fail (assertion=0x560beb6cf260 "!this->file->children_attached", file=0x560beb6cec20 "/data/src/11.1/storage/myisammrg/ha_myisammrg.cc", line=860, function=0x560beb6cf880 "int ha_myisammrg::attach_children()") at ./assert/assert.c:101
      #10 0x0000560bea3b73ed in ha_myisammrg::attach_children (this=0x61b0000261b8) at /data/src/11.1/storage/myisammrg/ha_myisammrg.cc:860
      #11 0x0000560bea3bc69a in ha_myisammrg::extra (this=0x61b0000261b8, operation=HA_EXTRA_ATTACH_CHILDREN) at /data/src/11.1/storage/myisammrg/ha_myisammrg.cc:1367
      #12 0x0000560be843314d in open_tables (thd=0x62b00007e218, options=..., start=0x7fdde3345c60, counter=0x6290000e6ca0, flags=0, prelocking_strategy=0x6290000e6cc0) at /data/src/11.1/sql/sql_base.cc:4768
      #13 0x0000560be8419830 in open_tables (thd=0x62b00007e218, tables=0x7fdde3345c60, counter=0x6290000e6ca0, flags=0, prelocking_strategy=0x6290000e6cc0) at /data/src/11.1/sql/sql_base.h:267
      #14 0x0000560be8438650 in open_tables_for_query (thd=0x62b00007e218, tables=0x6290000e6338, table_count=0x6290000e6ca0, flags=0, prelocking_strategy=0x6290000e6cc0) at /data/src/11.1/sql/sql_base.cc:5740
      #15 0x0000560be87b5e47 in Sql_cmd_dml::prepare (this=0x6290000e6c88, thd=0x62b00007e218) at /data/src/11.1/sql/sql_select.cc:32458
      #16 0x0000560be87b61a4 in Sql_cmd_dml::execute (this=0x6290000e6c88, thd=0x62b00007e218) at /data/src/11.1/sql/sql_select.cc:32520
      #17 0x0000560be85deead in mysql_execute_command (thd=0x62b00007e218, is_called_from_prepared_stmt=false) at /data/src/11.1/sql/sql_parse.cc:4393
      #18 0x0000560be85f633a in mysql_parse (thd=0x62b00007e218, rawbuf=0x6290000e6238 "UPDATE v SET f = 3", length=18, parser_state=0x7fdde3346a20) at /data/src/11.1/sql/sql_parse.cc:7760
      #19 0x0000560be85ceab1 in dispatch_command (command=COM_QUERY, thd=0x62b00007e218, packet=0x629000258219 "UPDATE v SET f = 3", packet_length=18, blocking=true) at /data/src/11.1/sql/sql_parse.cc:1892
      #20 0x0000560be85cb7ef in do_command (thd=0x62b00007e218, blocking=true) at /data/src/11.1/sql/sql_parse.cc:1405
      #21 0x0000560be8a836e2 in do_handle_one_connection (connect=0x608000002eb8, put_in_cache=true) at /data/src/11.1/sql/sql_connect.cc:1416
      #22 0x0000560be8a830a3 in handle_one_connection (arg=0x608000002e38) at /data/src/11.1/sql/sql_connect.cc:1318
      #23 0x0000560be967c870 in pfs_spawn_thread (arg=0x617000005b98) at /data/src/11.1/storage/perfschema/pfs.cc:2201
      #24 0x00007fddeaaa7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #25 0x00007fddeab285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after a batch of MDEV-28883 -related commits. The first one which fails this way is

      commit ee495b2235275925bb24c8b67bcf61c3c4a0f266
      Author: Igor Babaev
      Date:   Tue Sep 13 16:14:10 2022 -0700
       
          Fix after the latest rebase of commits for MDEV-28883
      

      and the last one which passes is 7ca89af6f8f, but there are 5-6 commits between them which I couldn't build, it could be any of those.

      Attachments

        Activity

          People

            igor Igor Babaev
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.