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

Assertion `(mem_root->flags & 4) == 0' failed in Query_arena::alloc / st_select_lex::setup_ref_array

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t (f INT PRIMARY KEY) ENGINE=InnoDB;
      PREPARE stmt FROM "ALTER TABLE t ORDER BY f";
      EXECUTE stmt;
      ALTER TABLE t DROP PRIMARY KEY;
      EXECUTE stmt;
       
      # Cleanup
      DEALLOCATE PREPARE stmt;
      DROP TABLE t;
      

      10.5 4281e0068b9c92efe9ff5485899d0c214b51eeed

      mariadbd: /data/bld/10.5-asan/mysys/my_alloc.c:212: alloc_root: Assertion `(mem_root->flags & 4) == 0' failed.
      241010  0:15:47 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f35f2653e32 in __GI___assert_fail (assertion=0x55686fa8ed60 "(mem_root->flags & 4) == 0", file=0x55686fa8ea60 "/data/bld/10.5-asan/mysys/my_alloc.c", line=212, function=0x55686fa8f080 <__PRETTY_FUNCTION__.0> "alloc_root") at ./assert/assert.c:101
      #10 0x000055686e6befd7 in alloc_root (mem_root=0x6190000e5f18, length=120) at /data/bld/10.5-asan/mysys/my_alloc.c:212
      #11 0x000055686c577636 in Query_arena::alloc (this=0x6190000e5bb0, size=120) at /data/bld/10.5-asan/sql/sql_class.h:1214
      #12 0x000055686c809767 in st_select_lex::setup_ref_array (this=0x62b0000bdb48, thd=0x62b00007e218, order_group_num=1) at /data/bld/10.5-asan/sql/sql_lex.cc:3635
      #13 0x000055686cb4e48f in copy_data_between_tables (thd=0x62b00007e218, from=0x619000100498, to=0x619000102c98, ignore=false, order_num=1, order=0x62b0000bf7e8, copied=0x7f35e2b1bd30, deleted=0x7f35e2b1bd50, alter_info=0x7f35e2b1e480, alter_ctx=0x7f35e2b1d7c0) at /data/bld/10.5-asan/sql/sql_table.cc:11826
      #14 0x000055686cb49de0 in mysql_alter_table (thd=0x62b00007e218, new_db=0x62b0000bdbf0, new_name=0x62b0000be058, create_info=0x7f35e2b1e5b0, table_list=0x62b0000bef78, recreate_info=0x7f35e2b1e3c0, alter_info=0x7f35e2b1e480, order_num=1, order=0x62b0000bf7e8, ignore=false, if_exists=false) at /data/bld/10.5-asan/sql/sql_table.cc:11289
      #15 0x000055686ccee78a in Sql_cmd_alter_table::execute (this=0x62b0000bf848, thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_alter.cc:601
      #16 0x000055686c898d3e in mysql_execute_command (thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_parse.cc:6180
      #17 0x000055686c8fc426 in Prepared_statement::execute (this=0x6190000e5b98, expanded_query=0x7f35e2b1fd10, open_cursor=false) at /data/bld/10.5-asan/sql/sql_prepare.cc:5131
      #18 0x000055686c8f756d in Prepared_statement::execute_loop (this=0x6190000e5b98, expanded_query=0x7f35e2b1fd10, open_cursor=false, packet=0x0, packet_end=0x0) at /data/bld/10.5-asan/sql/sql_prepare.cc:4553
      #19 0x000055686c8f0fa7 in mysql_sql_stmt_execute (thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_prepare.cc:3594
      #20 0x000055686c889784 in mysql_execute_command (thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_parse.cc:4046
      #21 0x000055686c8a610b in mysql_parse (thd=0x62b00007e218, rawbuf=0x62b000085238 "EXECUTE stmt", length=12, parser_state=0x7f35e2b20c10, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:8236
      #22 0x000055686c87b3f1 in dispatch_command (command=COM_QUERY, thd=0x62b00007e218, packet=0x62900026c219 "EXECUTE stmt", packet_length=12, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:1892
      #23 0x000055686c877d84 in do_command (thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_parse.cc:1376
      #24 0x000055686ccd1996 in do_handle_one_connection (connect=0x608000003a38, put_in_cache=true) at /data/bld/10.5-asan/sql/sql_connect.cc:1417
      #25 0x000055686ccd1359 in handle_one_connection (arg=0x6080000039b8) at /data/bld/10.5-asan/sql/sql_connect.cc:1319
      #26 0x000055686d930004 in pfs_spawn_thread (arg=0x61500000c898) at /data/bld/10.5-asan/storage/perfschema/pfs.cc:2201
      #27 0x00007f35f26a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #28 0x00007f35f272861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Activity

          People

            shulga Dmitry Shulga
            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.