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

Assertion `order_list->elements == 1' failed in Frame_range_n_bottom::Frame_range_n_bottom

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (a int, b int, c int, d int) ENGINE=MyISAM;
      INSERT INTO t VALUES (1,1,1,1);
      CREATE VIEW v AS SELECT * FROM t;
       
      SELECT LEAD(a) OVER (ORDER BY b, c), COUNT(*) OVER (ORDER BY d RANGE BETWEEN CURRENT ROW AND 5 FOLLOWING) FROM v;
       
      # Cleanup
      DROP VIEW v;
      DROP TABLE t;
      

      10.4 9856bb42

      mysqld: /data/src/10.4/sql/sql_window.cc:1427: Frame_range_n_bottom::Frame_range_n_bottom(THD*, SQL_I_List<st_order>*, SQL_I_List<st_order>*, bool, Item*): Assertion `order_list->elements == 1' failed.
      230719 22:07:12 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007fe50d253df2 in __GI___assert_fail (assertion=0x558096292160 "order_list->elements == 1", file=0x5580962917e0 "/data/src/10.4/sql/sql_window.cc", line=1427, function=0x558096292240 "Frame_range_n_bottom::Frame_range_n_bottom(THD*, SQL_I_List<st_order>*, SQL_I_List<st_order>*, bool, Item*)") at ./assert/assert.c:101
      #10 0x0000558094621d34 in Frame_range_n_bottom::Frame_range_n_bottom (this=0x62900024f268, thd=0x62b00005b208, partition_list=0x62b000062e68, order_list=0x62b000062e88, is_preceding_arg=false, n_val_arg=0x62b000063428) at /data/src/10.4/sql/sql_window.cc:1427
      #11 0x0000558094618f23 in get_frame_cursor (thd=0x62b00005b208, spec=0x62b000063540, is_top_bound=false) at /data/src/10.4/sql/sql_window.cc:2495
      #12 0x000055809461aca7 in get_window_functions_required_cursors (thd=0x62b00005b208, window_functions=..., cursor_managers=0x7fe505523e50) at /data/src/10.4/sql/sql_window.cc:2725
      #13 0x000055809461c36f in Window_func_runner::exec (this=0x62900024d1a8, thd=0x62b00005b208, tbl=0x623000018928, filesort_result=0x615000011880) at /data/src/10.4/sql/sql_window.cc:3020
      #14 0x000055809461c5bc in Window_funcs_sort::exec (this=0x62900024d1a0, join=0x629000249868, keep_filesort_result=true) at /data/src/10.4/sql/sql_window.cc:3052
      #15 0x000055809461d401 in Window_funcs_computation::exec (this=0x62900024d178, join=0x629000249868, keep_last_filesort_result=true) at /data/src/10.4/sql/sql_window.cc:3179
      #16 0x00005580941fabfc in AGGR_OP::end_send (this=0x62900024d0d0) at /data/src/10.4/sql/sql_select.cc:29647
      #17 0x00005580941b829d in sub_select_postjoin_aggr (join=0x629000249868, join_tab=0x62900024c690, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:20590
      #18 0x00005580941b74b4 in do_select (join=0x629000249868, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:20414
      #19 0x000055809414623d in JOIN::exec_inner (this=0x629000249868) at /data/src/10.4/sql/sql_select.cc:4605
      #20 0x0000558094143844 in JOIN::exec (this=0x629000249868) at /data/src/10.4/sql/sql_select.cc:4387
      #21 0x00005580941478d6 in mysql_select (thd=0x62b00005b208, tables=0x62b0000637e0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x629000249838, unit=0x62b00005f140, select_lex=0x62b000062378) at /data/src/10.4/sql/sql_select.cc:4826
      #22 0x0000558094118515 in handle_select (thd=0x62b00005b208, lex=0x62b00005f080, result=0x629000249838, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:442
      #23 0x000055809408833f in execute_sqlcom_select (thd=0x62b00005b208, all_tables=0x62b0000637e0) at /data/src/10.4/sql/sql_parse.cc:6473
      #24 0x0000558094075854 in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:3976
      #25 0x0000558094091517 in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "SELECT LEAD(a) OVER (ORDER BY b, c), COUNT(*) OVER (ORDER BY d RANGE BETWEEN CURRENT ROW AND 5 FOLLOWING) FROM v", length=112, parser_state=0x7fe505526860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8008
      #26 0x000055809406785a in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x629000230209 "", packet_length=112, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
      #27 0x00005580940643c9 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
      #28 0x00005580944631c6 in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
      #29 0x0000558094462add in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
      #30 0x00005580950d0f28 in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #31 0x00007fe50d2a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #32 0x00007fe50d3285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      No obvious problem on a non-debug build.

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            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.