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

Assertion `n_rows > 0' failed in Frame_cursor* get_frame_cursor

    Details

      Description

      drop table if exists t1;
      create table t1 (i int);
      insert into t1 values (1),(2);
      SELECT COUNT(*) OVER ( PARTITION BY (i) ROWS 0 PRECEDING ) FROM t1;
      

      Stack trace from bb-10.2-mdev9543 commit e292ea8751f83ad0e23d16abc4599eac0390db94

      sql/sql_window.cc:1499: Frame_cursor* get_frame_cursor(Window_frame*, bool): Assertion `n_rows > 0' failed.
      160410 11:48:29 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f87e539b192 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00007f87e7af7416 in Window_func_runner::setup (this=0x7f87b7d9c480, thd=0x7f87b7c14070) at sql/sql_window.cc:1769
      #9  0x00007f87e7af76a4 in Window_funcs_sort::setup (this=0x7f87b7d9c458, thd=0x7f87b7c14070, sel=0x0, it=...) at sql/sql_window.cc:1838
      #10 0x00007f87e7af78df in Window_funcs_computation::setup (this=0x7f87b7d9c438, thd=0x7f87b7c14070, window_funcs=0x7f87b7c18538, tab=0x7f87b7d9b660) at sql/sql_window.cc:1883
      #11 0x00007f87e798e582 in JOIN::make_aggr_tables_info (this=0x7f87b7d99fd8) at sql/sql_select.cc:2666
      #12 0x00007f87e798c0b3 in JOIN::optimize_inner (this=0x7f87b7d99fd8) at sql/sql_select.cc:2065
      #13 0x00007f87e7988c5a in JOIN::optimize (this=0x7f87b7d99fd8) at sql/sql_select.cc:1063
      #14 0x00007f87e7990efd in mysql_select (thd=0x7f87b7c14070, tables=0x7f87b7d998e0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f87b7d99fb8, unit=0x7f87b7c17ac0, select_lex=0x7f87b7c181e0) at sql/sql_select.cc:3517
      #15 0x00007f87e7986862 in handle_select (thd=0x7f87b7c14070, lex=0x7f87b7c179f8, result=0x7f87b7d99fb8, setup_tables_done_option=0) at sql/sql_select.cc:377
      #16 0x00007f87e79563cd in execute_sqlcom_select (thd=0x7f87b7c14070, all_tables=0x7f87b7d998e0) at sql/sql_parse.cc:6300
      #17 0x00007f87e794c0fb in mysql_execute_command (thd=0x7f87b7c14070) at sql/sql_parse.cc:3339
      #18 0x00007f87e7959a62 in mysql_parse (thd=0x7f87b7c14070, rawbuf=0x7f87b7d99088 "SELECT MAX( ALL 0 ) OVER ( PARTITION BY (i COLLATE latin1_general_ci) ROWS UNBOUNDED PRECEDING ) FROM t1", length=104, parser_state=0x7f87e73b39c0, is_next_command=false) at sql/sql_parse.cc:7703
      #19 0x00007f87e7947fcd in dispatch_command (command=COM_QUERY, thd=0x7f87b7c14070, packet=0x7f87b7cba071 "SELECT MAX( ALL 0 ) OVER ( PARTITION BY (i COLLATE latin1_general_ci) ROWS UNBOUNDED PRECEDING ) FROM t1", packet_length=104, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:1791
      #20 0x00007f87e7946a42 in do_command (thd=0x7f87b7c14070) at sql/sql_parse.cc:1354
      #21 0x00007f87e7a7c6e0 in do_handle_one_connection (connect=0x7f87e4874f30) at sql/sql_connect.cc:1358
      #22 0x00007f87e7a7c472 in handle_one_connection (arg=0x7f87e4874f30) at sql/sql_connect.cc:1264
      #23 0x00007f87e5d32e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #24 0x00007f87e545fcbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psergey Sergei Petrunia
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: