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

Server crashes after UPDATE with ORDER BY expression containing window function

    XMLWordPrintable

Details

    Description

      could be the same as MDEV-24374, but slightly different:

       
      CREATE TABLE t1 ( i int);
      INSERT INTO t1 VALUES (1),(2),(3);
      CREATE TABLE t2 ( i int);
      INSERT INTO t2 VALUES (1),(2),(3);
       
      UPDATE t2 SET i = 2 WHERE i IN (SELECT 1 FROM t1 ORDER BY  min('2020-02-11') over ());
      

      10.2 a3f7f2334a267ec4e120

      Version: '10.2.37-MariaDB-debug-log' 
       
      201209 12:54:28 [ERROR] mysqld got signal 11 ;
       
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f6986078730]
      sql/item_sum.cc:2081(Item_sum_hybrid::clear())[0x55f49cf46334]
      sql/sql_window.cc:2666(compute_window_func(THD*, List<Item_window_func>&, List<Cursor_manager>&, TABLE*, SORT_INFO*))[0x55f49cb7aeef]
      sql/sql_window.cc:2782(Window_func_runner::exec(THD*, TABLE*, SORT_INFO*))[0x55f49cb7b5f9]
      sql/sql_window.cc:2810(Window_funcs_sort::exec(JOIN*, bool))[0x55f49cb7b84a]
      sql/sql_window.cc:2937(Window_funcs_computation::exec(JOIN*, bool))[0x55f49cb7c509]
      sql/sql_select.cc:26853(AGGR_OP::end_send())[0x55f49c817f1f]
      sql/sql_select.cc:18577(sub_select_postjoin_aggr(JOIN*, st_join_table*, bool))[0x55f49c7d9198]
      sql/sql_select.cc:18813(sub_select(JOIN*, st_join_table*, bool))[0x55f49c7d9d3e]
      sql/sql_select.cc:18408(do_select(JOIN*, Procedure*))[0x55f49c7d8218]
      sql/sql_select.cc:3641(JOIN::exec_inner())[0x55f49c76f1ee]
      sql/sql_select.cc:3437(JOIN::exec())[0x55f49c76cd60]
      sql/item_subselect.cc:3923(subselect_single_select_engine::exec())[0x55f49cf1df39]
      sql/item_subselect.cc:722(Item_subselect::exec())[0x55f49cefda39]
      sql/item_subselect.cc:902(Item_in_subselect::exec())[0x55f49cefef16]
      sql/item_subselect.cc:1773(Item_in_subselect::val_bool())[0x55f49cf074ee]
      sql/item.h:1278(Item::val_bool_result())[0x55f49c4858a6]
      sql/item_cmpfunc.cc:1675(Item_in_optimizer::val_int())[0x55f49cdc7062]
      sql/opt_range.h:1633(SQL_SELECT::skip_record(THD*))[0x55f49c95861f]
      sql/sql_update.cc:755(mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool, unsigned long long*, unsigned long long*))[0x55f49c946440]
      sql/sql_parse.cc:4032(mysql_execute_command(THD*))[0x55f49c6af04f]
      sql/sql_parse.cc:7762(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55f49c6ca35a]
      sql/sql_parse.cc:1830(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55f49c6a11a6]
      sql/sql_parse.cc:1381(do_command(THD*))[0x55f49c69dbcb]
      sql/sql_connect.cc:1336(do_handle_one_connection(CONNECT*))[0x55f49ca45097]
      sql/sql_connect.cc:1242(handle_one_connection)[0x55f49ca44958]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55f49dedd01e]
      nptl/pthread_create.c:487(start_thread)[0x7f698606dfa3]
      x86_64/clone.S:97(clone)[0x7f69859f14cf]
       
      Query (0x62b000000290): UPDATE t2 SET i = 2 WHERE i IN (SELECT 1 FROM t1 ORDER BY  min('2020-02-11') over ())
      

      10.3 bc2dc83cb5685114

      201209 12:54:33 [ERROR] mysqld got signal 11 ;
       
      Server version: 10.3.28-MariaDB-debug-log
       
      sql/signal_handler.cc:209(handle_fatal_signal)[0x55f0cce214d3]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7fa7f8a30730]
      sql/item_sum.cc:2367(Item_sum_min_max::clear())[0x55f0cd09a93c]
      sql/sql_window.cc:2845(compute_window_func(THD*, List<Item_window_func>&, List<Cursor_manager>&, TABLE*, SORT_INFO*))[0x55f0ccbdc89f]
      sql/sql_window.cc:2968(Window_func_runner::exec(THD*, TABLE*, SORT_INFO*))[0x55f0ccbdd049]
      sql/sql_window.cc:2996(Window_funcs_sort::exec(JOIN*, bool))[0x55f0ccbdd29a]
      sql/sql_window.cc:3123(Window_funcs_computation::exec(JOIN*, bool))[0x55f0ccbde291]
      sql/sql_select.cc:27803(AGGR_OP::end_send())[0x55f0cc8019fd]
      sql/sql_select.cc:19427(sub_select_postjoin_aggr(JOIN*, st_join_table*, bool))[0x55f0cc7c023b]
      sql/sql_select.cc:19662(sub_select(JOIN*, st_join_table*, bool))[0x55f0cc7c0df2]
      sql/sql_select.cc:19253(do_select(JOIN*, Procedure*))[0x55f0cc7bf4f9]
      sql/sql_select.cc:4120(JOIN::exec_inner())[0x55f0cc74fe7c]
      sql/sql_select.cc:3915(JOIN::exec())[0x55f0cc74d854]
      sql/item_subselect.cc:3921(subselect_single_select_engine::exec())[0x55f0cd06aaf2]
      sql/item_subselect.cc:736(Item_subselect::exec())[0x55f0cd046bc1]
      sql/item_subselect.cc:916(Item_in_subselect::exec())[0x55f0cd0481f7]
      sql/item_subselect.cc:1774(Item_in_subselect::val_bool())[0x55f0cd05255d]
      sql/item.h:1320(Item::val_bool_result())[0x55f0cc3de46e]
      sql/item_cmpfunc.cc:1620(Item_in_optimizer::val_int())[0x55f0cceee763]
      sql/opt_range.h:1659(SQL_SELECT::skip_record(THD*))[0x55f0cc95af0f]
      sql/sql_update.cc:888(mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, bool, unsigned long long*, unsigned long long*))[0x55f0cc9458f2]
      sql/sql_parse.cc:4320(mysql_execute_command(THD*))[0x55f0cc68496a]
      sql/sql_parse.cc:7837(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55f0cc69e219]
      sql/sql_parse.cc:1855(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55f0cc674936]
      sql/sql_parse.cc:1398(do_command(THD*))[0x55f0cc671071]
      sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x55f0cca61367]
      sql/sql_connect.cc:1309(handle_one_connection)[0x55f0cca60c1f]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55f0ce1c41d3]
      nptl/pthread_create.c:487(start_thread)[0x7fa7f8a25fa3]
      x86_64/clone.S:97(clone)[0x7fa7f83a94cf]
      
      

      Attachments

        Issue Links

          Activity

            People

              varun Varun Gupta (Inactive)
              alice Alice Sherepa
              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.