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

Assertion `(mem_root->flags & 4) == 0' failed in safe_lexcstrdup_root

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      SET innodb_compression_default=ON;
      PREPARE stmt FROM 'CREATE OR REPLACE TABLE t ENGINE=InnoDB SELECT 1 AS f';
      EXECUTE stmt;
      EXECUTE stmt;
       
      # Cleanup
      DROP TABLE t;
      

      10.5 9b3413c71f16a3d738af358e288a0168f4c15827

      Version: '10.5.27-MariaDB-debug-log'  socket: '/mnt8t/bld/10.5-asan/mysql-test/var/tmp/mysqld.1.sock'  port: 19000  Source distribution
      mariadbd: /data/bld/10.5-asan/mysys/my_alloc.c:212: alloc_root: Assertion `(mem_root->flags & 4) == 0' failed.
       
      #9  0x00007f1ff0e53e32 in __GI___assert_fail (assertion=0x558d881f4880 "(mem_root->flags & 4) == 0", file=0x558d881f4580 "/data/bld/10.5-asan/mysys/my_alloc.c", line=212, function=0x558d881f4ba0 <__PRETTY_FUNCTION__.0> "alloc_root") at ./assert/assert.c:101
      #10 0x0000558d86e24e6d in alloc_root (mem_root=0x6190000f4518, length=3) at /data/bld/10.5-asan/mysys/my_alloc.c:212
      #11 0x0000558d86e26995 in strmake_root (root=0x6190000f4518, str=0x7f1fdaf3aa8e "ON", len=2) at /data/bld/10.5-asan/mysys/my_alloc.c:494
      #12 0x0000558d86e26b81 in safe_lexcstrdup_root (root=0x6190000f4518, str=...) at /data/bld/10.5-asan/mysys/my_alloc.c:516
      #13 0x0000558d8550c80f in extend_option_list (thd=0x62b00007e218, hton=0x615000002898, create=true, option_list=0x7f1fdaf3de60, rules=0x558d8907b400 <innodb_table_option_list>, root=0x6190000f4518) at /data/bld/10.5-asan/sql/create_options.cc:279
      #14 0x0000558d85280da9 in mysql_prepare_create_table (thd=0x62b00007e218, create_info=0x7f1fdaf3dd80, alter_info=0x7f1fdaf3dc50, db_options=0x7f1fdaf3b220, file=0x62b0000867f8, key_info_buffer=0x7f1fdaf3c430, key_count=0x7f1fdaf3c420, create_table_mode=1) at /data/bld/10.5-asan/sql/sql_table.cc:4634
      #15 0x0000558d85285417 in mysql_create_frm_image (thd=0x62b00007e218, create_info=0x7f1fdaf3dd80, alter_info=0x7f1fdaf3dc50, create_table_mode=1, key_info=0x7f1fdaf3c430, key_count=0x7f1fdaf3c420, frm=0x7f1fdaf3c450) at /data/bld/10.5-asan/sql/sql_table.cc:5148
      #16 0x0000558d85287161 in create_table_impl (thd=0x62b00007e218, orig_db=..., orig_table_name=..., db=..., table_name=..., path=0x7f1fdaf3c470 "./test/t", options=..., create_info=0x7f1fdaf3dd80, alter_info=0x7f1fdaf3dc50, create_table_mode=1, is_trans=0x0, key_info=0x7f1fdaf3c430, key_count=0x7f1fdaf3c420, frm=0x7f1fdaf3c450) at /data/bld/10.5-asan/sql/sql_table.cc:5434
      #17 0x0000558d85287c7f in mysql_create_table_no_lock (thd=0x62b00007e218, create_info=0x7f1fdaf3dd80, alter_info=0x7f1fdaf3dc50, is_trans=0x0, create_table_mode=1, table_list=0x62b0000befd0) at /data/bld/10.5-asan/sql/sql_table.cc:5537
      #18 0x0000558d84f48f78 in select_create::create_table_from_items (this=0x62b000085568, thd=0x62b00007e218, items=0x7f1fdaf3d430, lock=0x7f1fdaf3d410, hooks=0x7f1fdaf3d4b0) at /data/bld/10.5-asan/sql/sql_insert.cc:4604
      #19 0x0000558d84f4a762 in select_create::prepare (this=0x62b000085568, _values=..., u=0x62b0000bd310) at /data/bld/10.5-asan/sql/sql_insert.cc:4800
      #20 0x0000558d850a961e in JOIN::prepare (this=0x62b000085670, 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=0x62b0000bf6f8, unit_arg=0x62b0000bd310) at /data/bld/10.5-asan/sql/sql_select.cc:1635
      #21 0x0000558d850cc0fc in mysql_select (thd=0x62b00007e218, tables=0x0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201171004160, result=0x62b000085568, unit=0x62b0000bd310, select_lex=0x62b0000bf6f8) at /data/bld/10.5-asan/sql/sql_select.cc:4894
      #22 0x0000558d8509c55c in handle_select (thd=0x62b00007e218, lex=0x62b0000bd248, result=0x62b000085568, setup_tables_done_option=0) at /data/bld/10.5-asan/sql/sql_select.cc:449
      #23 0x0000558d852bc89e in Sql_cmd_create_table_like::execute (this=0x62b0000bef48, thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_table.cc:12618
      #24 0x0000558d85000bc6 in mysql_execute_command (thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_parse.cc:6179
      #25 0x0000558d850642ae in Prepared_statement::execute (this=0x6190000f4198, expanded_query=0x7f1fdaf3ed70, open_cursor=false) at /data/bld/10.5-asan/sql/sql_prepare.cc:5131
      #26 0x0000558d8505f3f5 in Prepared_statement::execute_loop (this=0x6190000f4198, expanded_query=0x7f1fdaf3ed70, open_cursor=false, packet=0x0, packet_end=0x0) at /data/bld/10.5-asan/sql/sql_prepare.cc:4553
      #27 0x0000558d85058e2f in mysql_sql_stmt_execute (thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_prepare.cc:3594
      #28 0x0000558d84ff160c in mysql_execute_command (thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_parse.cc:4045
      #29 0x0000558d8500df93 in mysql_parse (thd=0x62b00007e218, rawbuf=0x62b000085238 "EXECUTE stmt", length=12, parser_state=0x7f1fdaf3fc70, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:8237
      #30 0x0000558d84fe3279 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:1891
      #31 0x0000558d84fdfc0c in do_command (thd=0x62b00007e218) at /data/bld/10.5-asan/sql/sql_parse.cc:1375
      #32 0x0000558d85439755 in do_handle_one_connection (connect=0x6080000039b8, put_in_cache=true) at /data/bld/10.5-asan/sql/sql_connect.cc:1407
      #33 0x0000558d854392bb in handle_one_connection (arg=0x608000003938) at /data/bld/10.5-asan/sql/sql_connect.cc:1319
      #34 0x0000558d8609606c in pfs_spawn_thread (arg=0x61500000e198) at /data/bld/10.5-asan/storage/perfschema/pfs.cc:2201
      #35 0x00007f1ff0ea8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #36 0x00007f1ff0f2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 10.5:

      commit 3da565c41d87e29233724c96c47bbf737a673b6e (HEAD)
      Author: Sergei Golubchik
      Date:   Thu Oct 17 15:57:03 2024 +0200
       
          MDEV-35144 CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              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.