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

Assertion `!join->only_const_tables() && fsort' failed in int create_sort_index

    XMLWordPrintable

Details

    Description

      create view v1 as select 1 as i;
      select rank() over (order by i) from v1;
      

      Stack trace from 10.2 commit b532be9f8ce4872be4a3f1ef2fa296a1de347859

      mysqld: /src/10.2/sql/sql_select.cc:21225: int create_sort_index(THD*, JOIN*, JOIN_TAB*, Filesort*): Assertion `!join->only_const_tables() && fsort' failed.
      160414 21:37:02 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f3a98f4b1d2 in __assert_fail () from /lib64/libc.so.6
      #8  0x00005644c3aec8dd in create_sort_index (thd=0x7f3a6ca10c70, join=0x7f3a6ca77d58, tab=0x7f3a6ca79ab0, fsort=0x7f3a6ca7a7c8) at /src/10.2/sql/sql_select.cc:21225
      #9  0x00005644c3c27aa4 in Window_funcs_sort::exec (this=0x7f3a6ca7a6e8, join=0x7f3a6ca77d58) at /src/10.2/sql/sql_window.cc:1815
      #10 0x00005644c3c27eb6 in Window_funcs_computation::exec (this=0x7f3a6ca7a6c8, join=0x7f3a6ca77d58) at /src/10.2/sql/sql_window.cc:1909
      #11 0x00005644c3af91aa in AGGR_OP::end_send (this=0x7f3a6ca7a5a0) at /src/10.2/sql/sql_select.cc:25979
      #12 0x00005644c3ae52db in sub_select_postjoin_aggr (join=0x7f3a6ca77d58, join_tab=0x7f3a6ca79ab0, end_of_records=true) at /src/10.2/sql/sql_select.cc:17970
      #13 0x00005644c3ae4e5b in do_select (join=0x7f3a6ca77d58, procedure=0x0) at /src/10.2/sql/sql_select.cc:17800
      #14 0x00005644c3ac0ebc in JOIN::exec_inner (this=0x7f3a6ca77d58) at /src/10.2/sql/sql_select.cc:3341
      #15 0x00005644c3ac043c in JOIN::exec (this=0x7f3a6ca77d58) at /src/10.2/sql/sql_select.cc:3153
      #16 0x00005644c3ac151c in mysql_select (thd=0x7f3a6ca10c70, tables=0x7f3a6ca75a98, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f3a6ca77d38, unit=0x7f3a6ca146c0, select_lex=0x7f3a6ca14de0) at /src/10.2/sql/sql_select.cc:3535
      #17 0x00005644c3ab6d62 in handle_select (thd=0x7f3a6ca10c70, lex=0x7f3a6ca145f8, result=0x7f3a6ca77d38, setup_tables_done_option=0) at /src/10.2/sql/sql_select.cc:377
      #18 0x00005644c3a868d5 in execute_sqlcom_select (thd=0x7f3a6ca10c70, all_tables=0x7f3a6ca75a98) at /src/10.2/sql/sql_parse.cc:6299
      #19 0x00005644c3a7c603 in mysql_execute_command (thd=0x7f3a6ca10c70) at /src/10.2/sql/sql_parse.cc:3338
      #20 0x00005644c3a89f6a in mysql_parse (thd=0x7f3a6ca10c70, rawbuf=0x7f3a6ca75548 "select rank() over (order by i) from v1", length=39, parser_state=0x7f3a9b1fca30, is_next_command=false) at /src/10.2/sql/sql_parse.cc:7702
      #21 0x00005644c3a784d5 in dispatch_command (command=COM_QUERY, thd=0x7f3a6ca10c70, packet=0x7f3a6ca68471 "", packet_length=39, is_com_multi=false, is_next_command=false) at /src/10.2/sql/sql_parse.cc:1790
      #22 0x00005644c3a76f4a in do_command (thd=0x7f3a6ca10c70) at /src/10.2/sql/sql_parse.cc:1353
      #23 0x00005644c3bacc64 in do_handle_one_connection (connect=0x7f3a98a879d0) at /src/10.2/sql/sql_connect.cc:1358
      #24 0x00005644c3bac9f6 in handle_one_connection (arg=0x7f3a98a879d0) at /src/10.2/sql/sql_connect.cc:1264
      #25 0x00007f3a9ae940a4 in start_thread () from /lib64/libpthread.so.0
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.