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

Assertion `maybe_null' failed in make_sortkey

    XMLWordPrintable

    Details

      Description

      Reproducible on 5.5-10.3, not on 10.4, with MyIsam/Innodb

       CREATE TABLE t1 (pk int NOT NULL, d1 date, d2 date NOT NULL);
      INSERT INTO t1 values (1,'2018-06-22','2018-06-22'),(2,'2018-07-11','2018-07-11');
      CREATE VIEW v1 AS SELECT * FROM t1;
       
      SELECT group_concat(d1/(CASE 'b' WHEN 'j' THEN 'c' END))
      FROM v1 GROUP BY greatest(pk, 0, d2);
      

      10.1 6c08174e365c1a2db

      mysqld: /10.1/sql/filesort.cc:1071: void make_sortkey(Sort_param*, uchar*, uchar*): Assertion `maybe_null' failed.
      190318 14:44:42 [ERROR] mysqld got signal 6 ;
       
      linux/raise.c:54(__GI_raise)[0x7f07ceee6428]
      stdlib/abort.c:91(__GI_abort)[0x7f07ceee802a]
      assert/assert.c:92(__assert_fail_base)[0x7f07ceedebd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f07ceedec82]
      sql/filesort.cc:1072(make_sortkey(Sort_param*, unsigned char*, unsigned char*))[0x560d64aeabc9]
      sql/filesort.cc:840(find_all_keys)[0x560d64aeed5e]
      sql/sql_select.cc:21677(create_sort_index(THD*, JOIN*, st_order*, unsigned long long, unsigned long long, bool))[0x560d64740fb8]
      sql/sql_select.cc:3240(JOIN::exec_inner())[0x560d64764ec6]
      sql/sql_select.cc:2563(JOIN::exec())[0x560d64766420]
      sql/sql_select.cc:3501(mysql_select(THD*, Item***, 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*))[0x560d6475b877]
      sql/sql_select.cc:388(handle_select(THD*, LEX*, select_result*, unsigned long))[0x560d6475c041]
      sql/sql_parse.cc:5940(execute_sqlcom_select(THD*, TABLE_LIST*))[0x560d6463d81c]
      sql/sql_parse.cc:3037(mysql_execute_command(THD*))[0x560d6465633a]
      sql/sql_parse.cc:7458(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x560d6466ce7c]
      sql/sql_parse.cc:1522(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x560d64673399]
      sql/sql_parse.cc:1131(do_command(THD*))[0x560d6467994b]
      sql/sql_connect.cc:1330(do_handle_one_connection(THD*))[0x560d648f2fa4]
      sql/sql_connect.cc:1244(handle_one_connection)[0x560d648f3490]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x560d6571d260]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f07cf90d6ba]
      x86_64/clone.S:111(clone)[0x7f07cefb841d]
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              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.