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

Assertion `!join->select_lex->master_unit()->derived || join->select_lex->master_unit()->derived->is_materialized_derived()' failed upon EXPLAIN INSERT .. SELECT into join view

    Details

      Description

      CREATE TABLE t (f INT);
      CREATE ALGORITHM = MERGE VIEW v AS SELECT a2.f FROM t AS a1, t AS a2;
      EXPLAIN INSERT INTO v (f) SELECT 1;
       
      # Cleanup
      DROP VIEW v;
      DROP TABLE t;
      

      10.1 1eca49577e979220f3ab663a7e46e0eb70d728c4

      mysqld: /data/src/10.1/sql/sql_select.cc:24686: int JOIN::save_explain_data_intern(Explain_query*, bool, bool, bool, const char*): Assertion `!join->select_lex->master_unit()->derived || join->select_lex->master_unit()->derived->is_materialized_derived()' failed.
      181013 19:28:17 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fcfc5e6cee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055eac6d39964 in JOIN::save_explain_data_intern (this=0x7fcfbd046b60, output=0x7fcfbd047948, need_tmp_table=false, need_order=false, distinct=false, message=0x0) at /data/src/10.1/sql/sql_select.cc:24685
      #9  0x000055eac6d01269 in JOIN::save_explain_data (this=0x7fcfbd046b60, output=0x7fcfbd047948, can_overwrite=false, need_tmp_table=false, need_order=false, distinct=false) at /data/src/10.1/sql/sql_select.cc:2531
      #10 0x000055eac6cfc07d in JOIN::optimize (this=0x7fcfbd046b60) at /data/src/10.1/sql/sql_select.cc:1066
      #11 0x000055eac6d04906 in mysql_select (thd=0x7fcfbecd5070, rref_pointer_array=0x7fcfbd0444d0, tables=0x7fcfbd045190, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184068, result=0x7fcfbd047268, unit=0x7fcfbd043b28, select_lex=0x7fcfbd044228) at /data/src/10.1/sql/sql_select.cc:3485
      #12 0x000055eac6d3a67b in mysql_explain_union (thd=0x7fcfbecd5070, unit=0x7fcfbd043b28, result=0x7fcfbd047268) at /data/src/10.1/sql/sql_select.cc:24955
      #13 0x000055eac6d3a3ff in select_describe (join=0x7fcfbd047308, need_tmp_table=false, need_order=false, distinct=false, message=0x55eac761fe97 "No tables used") at /data/src/10.1/sql/sql_select.cc:24909
      #14 0x000055eac6d0176e in JOIN::exec_inner (this=0x7fcfbd047308) at /data/src/10.1/sql/sql_select.cc:2616
      #15 0x000055eac6d01403 in JOIN::exec (this=0x7fcfbd047308) at /data/src/10.1/sql/sql_select.cc:2562
      #16 0x000055eac6d04999 in mysql_select (thd=0x7fcfbecd5070, rref_pointer_array=0x7fcfbecd9550, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184068, result=0x7fcfbd047268, unit=0x7fcfbecd8ba8, select_lex=0x7fcfbecd92a8) at /data/src/10.1/sql/sql_select.cc:3499
      #17 0x000055eac6d3a67b in mysql_explain_union (thd=0x7fcfbecd5070, unit=0x7fcfbecd8ba8, result=0x7fcfbd047268) at /data/src/10.1/sql/sql_select.cc:24955
      #18 0x000055eac6cc2e4b in mysql_execute_command (thd=0x7fcfbecd5070) at /data/src/10.1/sql/sql_parse.cc:4037
      #19 0x000055eac6ccd625 in mysql_parse (thd=0x7fcfbecd5070, rawbuf=0x7fcfbd043088 "EXPLAIN INSERT INTO v (f) SELECT 1", length=34, parser_state=0x7fcfc7ef05e0) at /data/src/10.1/sql/sql_parse.cc:7465
      #20 0x000055eac6cbbe98 in dispatch_command (command=COM_QUERY, thd=0x7fcfbecd5070, packet=0x7fcfc17f9071 "EXPLAIN INSERT INTO v (f) SELECT 1", packet_length=34) at /data/src/10.1/sql/sql_parse.cc:1495
      #21 0x000055eac6cbac1d in do_command (thd=0x7fcfbecd5070) at /data/src/10.1/sql/sql_parse.cc:1124
      #22 0x000055eac6df5606 in do_handle_one_connection (thd_arg=0x7fcfbecd5070) at /data/src/10.1/sql/sql_connect.cc:1330
      #23 0x000055eac6df536a in handle_one_connection (arg=0x7fcfbecd5070) at /data/src/10.1/sql/sql_connect.cc:1242
      #24 0x000055eac71b3208 in pfs_spawn_thread (arg=0x7fcfc5439ef0) at /data/src/10.1/storage/perfschema/pfs.cc:1861
      #25 0x00007fcfc7b70494 in start_thread (arg=0x7fcfc7ef1b00) at pthread_create.c:333
      #26 0x00007fcfc5f2993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on 10.0.
      No obvious problems on a non-debug build.

        Attachments

          Activity

            People

            • Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: