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

Assertion `(mem_root->flags & 4) == 0' failed in st_select_lex::save_item_list_names

    XMLWordPrintable

Details

    Description

      CREATE VIEW v1 AS select 'foo';
      CREATE VIEW v2 AS select 'bar' AS x union select 'qux' AS x;
      PREPARE stmt FROM 'SELECT * FROM v1 JOIN v2 WHERE v2.x = "foo"';
       
      SET optimizer_switch='condition_pushdown_for_derived=off';
      EXECUTE stmt;
      SET optimizer_switch='condition_pushdown_for_derived=on';
      EXECUTE stmt;
       
      # Cleanup
      DROP VIEW v1;
      DROP VIEW v2;
      

      10.5 855c21eb99a5c6a6f9eb52eea6ce7d3279a9f8c3

      mariadbd: /data/bld/10.5-asan/mysys/my_alloc.c:212: alloc_root: Assertion `(mem_root->flags & 4) == 0' failed.
      241022 22:55:51 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007fd433653e32 in __GI___assert_fail (assertion=0x561d20e58880 "(mem_root->flags & 4) == 0", file=0x561d20e58580 "/data/bld/10.5-asan/mysys/my_alloc.c", line=212, function=0x561d20e58ba0 <__PRETTY_FUNCTION__.0> "alloc_root") at ./assert/assert.c:101
      #10 0x0000561d1fa88e6d in alloc_root (mem_root=0x619000099618, length=24) at /data/bld/10.5-asan/mysys/my_alloc.c:212
      #11 0x0000561d1d941732 in Sql_alloc::operator new (size=24, mem_root=0x619000099618) at /data/bld/10.5-asan/sql/sql_alloc.h:39
      #12 0x0000561d1dc0cc63 in st_select_lex::save_item_list_names (this=0x62900023fa78, thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_lex.cc:11396
      #13 0x0000561d1db75548 in pushdown_cond_for_derived (thd=0x62b000069218, cond=0x62b00003a388, derived=0x62b00009cd30) at /data/bld/10.5-asan/sql/sql_derived.cc:1560
      #14 0x0000561d1dd14182 in JOIN::optimize_inner (this=0x62b000038460) at /data/bld/10.5-asan/sql/sql_select.cc:2231
      #15 0x0000561d1dd0efa9 in JOIN::optimize (this=0x62b000038460) at /data/bld/10.5-asan/sql/sql_select.cc:1765
      #16 0x0000561d1dd30170 in mysql_select (thd=0x62b000069218, tables=0x62b00009c5c8, fields=..., conds=0x62b00009de60, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201171004160, result=0x62b00009e920, unit=0x62b00009a310, select_lex=0x62b00009bf38) at /data/bld/10.5-asan/sql/sql_select.cc:4904
      #17 0x0000561d1dd0055c in handle_select (thd=0x62b000069218, lex=0x62b00009a248, result=0x62b00009e920, setup_tables_done_option=0) at /data/bld/10.5-asan/sql/sql_select.cc:449
      #18 0x0000561d1dc67185 in execute_sqlcom_select (thd=0x62b000069218, all_tables=0x62b00009c5c8) at /data/bld/10.5-asan/sql/sql_parse.cc:6437
      #19 0x0000561d1dc555c7 in mysql_execute_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:4029
      #20 0x0000561d1dcc82ae in Prepared_statement::execute (this=0x619000099298, expanded_query=0x7fd42a220d70, open_cursor=false) at /data/bld/10.5-asan/sql/sql_prepare.cc:5131
      #21 0x0000561d1dcc33f5 in Prepared_statement::execute_loop (this=0x619000099298, expanded_query=0x7fd42a220d70, open_cursor=false, packet=0x0, packet_end=0x0) at /data/bld/10.5-asan/sql/sql_prepare.cc:4553
      #22 0x0000561d1dcbce2f in mysql_sql_stmt_execute (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_prepare.cc:3594
      #23 0x0000561d1dc5560c in mysql_execute_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:4045
      #24 0x0000561d1dc71f93 in mysql_parse (thd=0x62b000069218, rawbuf=0x62b000038238 "EXECUTE stmt", length=12, parser_state=0x7fd42a221c70, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:8237
      #25 0x0000561d1dc47279 in dispatch_command (command=COM_QUERY, thd=0x62b000069218, packet=0x629000235219 "EXECUTE stmt", packet_length=12, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:1891
      #26 0x0000561d1dc43c0c in do_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:1375
      #27 0x0000561d1e09d755 in do_handle_one_connection (connect=0x608000002ab8, put_in_cache=true) at /data/bld/10.5-asan/sql/sql_connect.cc:1407
      #28 0x0000561d1e09d2bb in handle_one_connection (arg=0x608000002a38) at /data/bld/10.5-asan/sql/sql_connect.cc:1319
      #29 0x0000561d1ecfa06c in pfs_spawn_thread (arg=0x615000006c18) at /data/bld/10.5-asan/storage/perfschema/pfs.cc:2201
      #30 0x00007fd4336a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #31 0x00007fd43372861c 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.