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

Assertion `maybe_null && item->null_value' fails in make_sortkey on CASE with different return types, GROUP_CONCAT, GROUP BY

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.1, 5.5.30, 5.3.12
    • 10.0.2, 5.5.31, 5.3.13
    • None
    • None

    Description

      CREATE TABLE t1 (d DATE, t TIME) ENGINE=MyISAM;
      INSERT INTO t1 VALUES ('2000-12-03','22:55:23'),('2008-05-03','10:19:31');
      SELECT CASE WHEN d = '2012-12-12' THEN d ELSE t END AS cond, GROUP_CONCAT( d ) FROM t1 GROUP BY cond;

      mysqld: filesort.cc:872: void make_sortkey(SORTPARAM*, uchar*, uchar*): Assertion `maybe_null && item->null_value' failed.
      [ERROR] mysqld got signal 6 ;

      #7  0x00007f3bc7de7192 in __GI___assert_fail (assertion=0xda16a0 "maybe_null && item->null_value", file=0xda1572 "filesort.cc", line=872, function=0xda19a0 "void make_sortkey(SORTPARAM*, uchar*, uchar*)") at assert.c:103
      #8  0x000000000080cefc in make_sortkey (param=0x7f3bc6c68f90, to=0x7f3bac02f8c0 "", ref_pos=0x7f3bc6c68f00 "") at filesort.cc:872
      #9  0x000000000080c49e in find_all_keys (param=0x7f3bc6c68f90, select=0x7f3bac02d648, sort_keys=0x7f3bac02f860, sort_keys_buf=0x7f3bac02f8c0 "", buffpek_pointers=0x7f3bc6c692a0, tempfile=0x7f3bc6c69110, indexfile=0x0) at filesort.cc:648
      #10 0x000000000080af83 in filesort (thd=0x2c944d0, table=0x7f3bac026940, sortorder=0x7f3bac02f638, s_length=1, select=0x7f3bac02d648, max_rows=18446744073709551615, sort_positions=false, examined_rows=0x7f3bc6c694b8) at filesort.cc:247
      #11 0x000000000073c51d in create_sort_index (thd=0x2c944d0, join=0x7f3bac02c058, order=0x7f3bac01a9b8, filesort_limit=18446744073709551615, select_limit=18446744073709551615, is_order_by=true) at sql_select.cc:18950
      #12 0x0000000000713d1d in JOIN::exec (this=0x7f3bac02c058) at sql_select.cc:2718
      #13 0x00000000007148f9 in mysql_select (thd=0x2c944d0, rref_pointer_array=0x2c97238, tables=0x7f3bac047a08, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f3bac01a9b8, having=0x0, proc_param=0x0, select_options=2147764736, result=0x7f3bac048468, unit=0x2c96a68, select_lex=0x2c96f90) at sql_select.cc:2990
      #14 0x000000000070b2a3 in handle_select (thd=0x2c944d0, lex=0x2c969c8, result=0x7f3bac048468, setup_tables_done_option=0) at sql_select.cc:288
      #15 0x0000000000696737 in execute_sqlcom_select (thd=0x2c944d0, all_tables=0x7f3bac047a08) at sql_parse.cc:5172
      #16 0x000000000068d4f6 in mysql_execute_command (thd=0x2c944d0) at sql_parse.cc:2305
      #17 0x00000000006991b1 in mysql_parse (thd=0x2c944d0, rawbuf=0x7f3bac110758 "SELECT CASE WHEN d = '2012-12-12' THEN d ELSE t END AS cond, GROUP_CONCAT( d ) FROM t1 GROUP BY cond", length=100, found_semicolon=0x7f3bc6c6a7d8) at sql_parse.cc:6173
      #18 0x000000000068ac9a in dispatch_command (command=COM_QUERY, thd=0x2c944d0, packet=0x2d1f251 "SELECT CASE WHEN d = '2012-12-12' THEN d ELSE t END AS cond, GROUP_CONCAT( d ) FROM t1 GROUP BY cond", packet_length=100) at sql_parse.cc:1243
      #19 0x0000000000689f38 in do_command (thd=0x2c944d0) at sql_parse.cc:923
      #20 0x0000000000686993 in handle_one_connection (arg=0x2c944d0) at sql_connect.cc:1231
      #21 0x00007f3bc8982e9a in start_thread (arg=0x7f3bc6c6b700) at pthread_create.c:308
      #22 0x00007f3bc7eabcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      revision-id: igor@askmonty.org-20130308082526-5w0b7gya5ed97uzo
      revno: 3635
      branch-nick: 5.3

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              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.