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

Assertion `!table_list->table || frm.str || !atomic_replace' failed upon CREATE OR REPLACE with ARCHIVE

    XMLWordPrintable

Details

    Description

      --source include/have_archive.inc
      CREATE OR REPLACE TABLE t ENGINE=ARCHIVE AS SELECT 1 AS a;
       
      # Cleanup
      DROP TABLE t;
      

      10.11 ba875e93

      mariadbd: /data/src/10.11/sql/sql_insert.cc:4801: TABLE* select_create::create_table_from_items(THD*, List<Item>*, MYSQL_LOCK**): Assertion `!table_list->table || frm.str || !atomic_replace' failed.
      221004 14:21:57 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f699fef9662 in __GI___assert_fail (assertion=0x55d0ff078700 "!table_list->table || frm.str || !atomic_replace", file=0x55d0ff075280 "/data/src/10.11/sql/sql_insert.cc", line=4801, function=0x55d0ff078680 "TABLE* select_create::create_table_from_items(THD*, List<Item>*, MYSQL_LOCK**)") at assert.c:101
      #8  0x000055d0fd0306f6 in select_create::create_table_from_items (this=0x6290000e7a38, thd=0x62b00007e218, items=0x7f6996ba8e60, lock=0x7f6996ba8e40) at /data/src/10.11/sql/sql_insert.cc:4801
      #9  0x000055d0fd031a5c in select_create::prepare (this=0x6290000e7a38, _values=..., u=0x62b000082650) at /data/src/10.11/sql/sql_insert.cc:4945
      #10 0x000055d0fd1cb569 in JOIN::prepare (this=0x6290000e7b88, tables_init=0x0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x6290000e6ab0, unit_arg=0x62b000082650) at /data/src/10.11/sql/sql_select.cc:1738
      #11 0x000055d0fd1ee41e in mysql_select (thd=0x62b00007e218, tables=0x0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201187781376, result=0x6290000e7a38, unit=0x62b000082650, select_lex=0x6290000e6ab0) at /data/src/10.11/sql/sql_select.cc:5046
      #12 0x000055d0fd1bec7d in handle_select (thd=0x62b00007e218, lex=0x62b000082578, result=0x6290000e7a38, setup_tables_done_option=0) at /data/src/10.11/sql/sql_select.cc:582
      #13 0x000055d0fd3d984e in Sql_cmd_create_table_like::execute (this=0x6290000e6318, thd=0x62b00007e218) at /data/src/10.11/sql/sql_table.cc:12759
      #14 0x000055d0fd0e5ec4 in mysql_execute_command (thd=0x62b00007e218, is_called_from_prepared_stmt=false) at /data/src/10.11/sql/sql_parse.cc:5997
      #15 0x000055d0fd0f32c0 in mysql_parse (thd=0x62b00007e218, rawbuf=0x6290000e6238 "CREATE OR REPLACE TABLE t ENGINE=ARCHIVE AS SELECT 1 AS a", length=57, parser_state=0x7f6996baaab0) at /data/src/10.11/sql/sql_parse.cc:8037
      #16 0x000055d0fd0c9922 in dispatch_command (command=COM_QUERY, thd=0x62b00007e218, packet=0x629000253219 "CREATE OR REPLACE TABLE t ENGINE=ARCHIVE AS SELECT 1 AS a", packet_length=57, blocking=true) at /data/src/10.11/sql/sql_parse.cc:1894
      #17 0x000055d0fd0c66fa in do_command (thd=0x62b00007e218, blocking=true) at /data/src/10.11/sql/sql_parse.cc:1407
      #18 0x000055d0fd56d292 in do_handle_one_connection (connect=0x608000003038, put_in_cache=true) at /data/src/10.11/sql/sql_connect.cc:1416
      #19 0x000055d0fd56cc28 in handle_one_connection (arg=0x608000002fb8) at /data/src/10.11/sql/sql_connect.cc:1318
      #20 0x000055d0fe146f94 in pfs_spawn_thread (arg=0x617000004d98) at /data/src/10.11/storage/perfschema/pfs.cc:2201
      #21 0x00007f69a03d5ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x00007f699ffc4aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      No obvious problem on a non-debug build.

      The failure appeared in 10.11 with atomic create or replace

      commit 93c8252f02faa8ad8dc5f005e52f1990c29d4a0d (HEAD)
      Author: Aleksey Midenkov
      Date:   Wed Aug 31 11:55:04 2022 +0300
       
          MDEV-25292 Atomic CREATE OR REPLACE TABLE
      

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              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.