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

server crashed with NTH_VALUE()

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t1 (i1 int, a int);
      INSERT INTO t1 VALUES (1, 1), (2, 2),(3, 3);
       
      CREATE TABLE t2 (i2 int);
      INSERT INTO t2 VALUES (1),(2),(5),(1),(7),(4),(3);
       
      SELECT NTH_VALUE(i1, i1) OVER (PARTITION BY i1)
      FROM (SELECT * FROM t1,t2 WHERE t1.i1=t2.i2) t;
      

      #3  <signal handler called>
      #4  0x0000560fe20e66c1 in Item_field::used_tables (this=0x7fb66817e350) at /10.2/sql/item.cc:2876
      #5  0x0000560fe21a378e in Item_sum::update_used_tables (this=0x7fb668179870) at /10.2/sql/item_sum.cc:546
      #6  0x0000560fe21a2be6 in Item_sum::check_sum_func (this=0x7fb668179870, thd=0x7fb668000a98, ref=0x7fb668111580) at /10.2/sql/item_sum.cc:312
      #7  0x0000560fe22b8018 in Item_sum_hybrid_simple::fix_fields (this=0x7fb668179870, thd=0x7fb668000a98, ref=0x7fb668111580) at /10.2/sql/item_windowfunc.cc:273
      #8  0x0000560fe22b77eb in Item_window_func::fix_fields (this=0x7fb66817e470, thd=0x7fb668000a98, ref=0x7fb668111580) at /10.2/sql/item_windowfunc.cc:102
      #9  0x0000560fe1df2065 in setup_fields (thd=0x7fb668000a98, ref_pointer_array=..., fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0x7fb668062400, pre_fix=0x7fb668004ee0, allow_sum_func=true) at /10.2/sql/sql_base.cc:7058
      #10 0x0000560fe1e98b4a in JOIN::prepare (this=0x7fb6680620b0, tables_init=0x7fb6681842b0, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7fb668004d90, unit_arg=0x7fb668004638) at /10.2/sql/sql_select.cc:806
      #11 0x0000560fe1ea3080 in mysql_select (thd=0x7fb668000a98, tables=0x7fb6681842b0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb668179e50, unit=0x7fb668004638, select_lex=0x7fb668004d90) at /10.2/sql/sql_select.cc:3713
      #12 0x0000560fe1e9783b in handle_select (thd=0x7fb668000a98, lex=0x7fb668004570, result=0x7fb668179e50, setup_tables_done_option=0) at /10.2/sql/sql_select.cc:373
      #13 0x0000560fe1e637e4 in execute_sqlcom_select (thd=0x7fb668000a98, all_tables=0x7fb6681842b0) at /10.2/sql/sql_parse.cc:6456
      #14 0x0000560fe1e59562 in mysql_execute_command (thd=0x7fb668000a98) at /10.2/sql/sql_parse.cc:3467
      #15 0x0000560fe1e67158 in mysql_parse (thd=0x7fb668000a98, rawbuf=0x7fb66806aa10 "SELECT NTH_VALUE(i1, i1) OVER (PARTITION BY i1)\nFROM (SELECT * FROM t1,t2 WHERE t1.i1=t2.i2) t", length=94, parser_state=0x7fb6842561f0, is_com_multi=false, is_next_command=false) at /10.2/sql/sql_parse.cc:7898
      #16 0x0000560fe1e54e01 in dispatch_command (command=COM_QUERY, thd=0x7fb668000a98, packet=0x7fb668007fe9 "SELECT NTH_VALUE(i1, i1) OVER (PARTITION BY i1)\nFROM (SELECT * FROM t1,t2 WHERE t1.i1=t2.i2) t", packet_length=94, is_com_multi=false, is_next_command=false) at /10.2/sql/sql_parse.cc:1806
      #17 0x0000560fe1e5375d in do_command (thd=0x7fb668000a98) at /10.2/sql/sql_parse.cc:1360
      #18 0x0000560fe1fa18e7 in do_handle_one_connection (connect=0x560fe4008d48) at /10.2/sql/sql_connect.cc:1335
      #19 0x0000560fe1fa1667 in handle_one_connection (arg=0x560fe4008d48) at /10.2/sql/sql_connect.cc:1241
      #20 0x0000560fe22ff01a in pfs_spawn_thread (arg=0x560fe3f68908) at /10.2/storage/perfschema/pfs.cc:1862
      #21 0x00007fb68a3c06ba in start_thread (arg=0x7fb684257700) at pthread_create.c:333
      #22 0x00007fb68985541d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              varun Varun Gupta (Inactive)
              Reporter:
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: