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

Filesort::make_sortorder: Assertion `pos->field != __null || pos->item != __null' failed | SIGSEGV in sortlength (on optimized builds)

    XMLWordPrintable

Details

    Description

      testcase:

       
      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  a, RANK() OVER (ORDER BY SUM(DISTINCT i1))
           FROM t1, t2 WHERE t2.i2 = t1.i1 GROUP BY a;
       
      DROP TABLE t1, t2;
      
      

      10.2 00572a0b0cc81c38f198ad

      /10.2/sql/filesort.cc:493: uint Filesort::make_sortorder(THD*, JOIN*, table_map): Assertion `pos->field != __null || pos->item != __null' failed.
       
      assert/assert.c:92(__assert_fail_base)[0x7fcdf5102bd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fcdf5102c82]
      sql/filesort.cc:455(Filesort::make_sortorder(THD*, JOIN*, unsigned long long))[0x56419343528e]
      sql/filesort.cc:159(filesort(THD*, TABLE*, Filesort*, Filesort_tracker*, JOIN*, unsigned long long))[0x564193432c9d]
      sql/sql_select.cc:21908(create_sort_index(THD*, JOIN*, st_join_table*, Filesort*))[0x564192fa0569]
      sql/sql_window.cc:2761(Window_funcs_sort::exec(JOIN*, bool))[0x5641932acac9]
      sql/sql_window.cc:2893(Window_funcs_computation::exec(JOIN*, bool))[0x5641932ad821]
      sql/sql_select.cc:26671(AGGR_OP::end_send())[0x564192fc1e4e]
      sql/sql_select.cc:18473(sub_select_postjoin_aggr(JOIN*, st_join_table*, bool))[0x564192f8a3a5]
      sql/sql_select.cc:18709(sub_select(JOIN*, st_join_table*, bool))[0x564192f8ab24]
      sql/sql_select.cc:18540(sub_select_cache(JOIN*, st_join_table*, bool))[0x564192f8a656]
      sql/sql_select.cc:18709(sub_select(JOIN*, st_join_table*, bool))[0x564192f8ab24]
      sql/sql_select.cc:18304(do_select(JOIN*, Procedure*))[0x564192f897b9]
      sql/sql_select.cc:3623(JOIN::exec_inner())[0x564192f2bfcc]
      sql/sql_select.cc:3419(JOIN::exec())[0x564192f29cd2]
      sql/sql_select.cc:3820(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x564192f2d01f]
      sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x564192f0c7e5]
      sql/sql_parse.cc:6477(execute_sqlcom_select(THD*, TABLE_LIST*))[0x564192e94155]
      sql/sql_parse.cc:3535(mysql_execute_command(THD*))[0x564192e8161b]
      sql/sql_parse.cc:8011(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x564192e9c8b9]
      sql/sql_parse.cc:1834(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x564192e77f6e]
      sql/sql_parse.cc:1386(do_command(THD*))[0x564192e750ed]
      sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x56419319cd62]
      sql/sql_connect.cc:1242(handle_one_connection)[0x56419319c76a]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x56419434dfda]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fcdf5d476ba]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fcdf51dc41d]
      
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              alice Alice Sherepa
              Votes:
              4 Vote for this issue
              Watchers:
              11 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.