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

Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX( UNCOMPRESSED_LENGTH( pk ) )

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.67, 5.2.14, 5.3.12, 5.5.36, 10.0.8
    • Fix Version/s: 5.5.37, 10.0.10, 5.3.13
    • Component/s: None
    • Labels:

      Description

      CREATE TABLE t1 (pk INT PRIMARY KEY);
      INSERT INTO t1 VALUES (1),(2);
       
      SELECT * FROM t1 ORDER BY HEX( UNCOMPRESSED_LENGTH( pk ) );

      Version: '5.3.13-MariaDB-debug-log'  
      mysqld: filesort.cc:898: void make_sortkey(SORTPARAM*, uchar*, uchar*): Assertion `0' failed.
      140304 13:37:03 [ERROR] mysqld got signal 6 ;

      #6  0x00007f8836cfd621 in *__GI___assert_fail (assertion=0xd69267 "0", file=<optimized out>, line=898, function=0xd69ae0 "void make_sortkey(SORTPARAM*, uchar*, uchar*)") at assert.c:81
      #7  0x00000000008209b9 in make_sortkey (param=0x7f882e2190d0, to=0x213f788 "\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217"..., ref_pos=0x7f882e218f20 "") at filesort.cc:898
      #8  0x00000000008201ad in find_all_keys (param=0x7f882e2190d0, select=0x213d700, sort_keys=0x213f728, sort_keys_buf=0x213f788 "\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217"..., buffpek_pointers=0x7f882e2192e0, tempfile=0x7f882e219150, indexfile=0x0) at filesort.cc:727
      #9  0x000000000081ea77 in filesort (thd=0x208c858, table=0x2136cf8, sortorder=0x2113888, s_length=1, select=0x213d700, max_rows=18446744073709551615, sort_positions=false, examined_rows=0x7f882e219570) at filesort.cc:247
      #10 0x0000000000757d29 in create_sort_index (thd=0x208c858, join=0x21124c8, order=0x21123d0, filesort_limit=18446744073709551615, select_limit=18446744073709551615, is_order_by=false) at sql_select.cc:19336
      #11 0x000000000072e1c8 in JOIN::exec (this=0x21124c8) at sql_select.cc:2735
      #12 0x000000000072ed8f in mysql_select (thd=0x208c858, rref_pointer_array=0x208f548, tables=0x2111c38, wild_num=1, fields=..., conds=0x0, og_num=1, order=0x21123d0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x21124a8, unit=0x208ede8, select_lex=0x208f2f0) at sql_select.cc:3007
      #13 0x00000000007257f5 in handle_select (thd=0x208c858, lex=0x208ed48, result=0x21124a8, setup_tables_done_option=0) at sql_select.cc:288
      #14 0x00000000006b452c in execute_sqlcom_select (thd=0x208c858, all_tables=0x2111c38) at sql_parse.cc:5172
      #15 0x00000000006ab6c8 in mysql_execute_command (thd=0x208c858) at sql_parse.cc:2305
      #16 0x00000000006b6e93 in mysql_parse (thd=0x208c858, rawbuf=0x2111a00 "SELECT * FROM t1 ORDER BY HEX( UNCOMPRESSED_LENGTH( pk ) )", length=58, found_semicolon=0x7f882e21acb8) at sql_parse.cc:6173
      #17 0x00000000006a8ea8 in dispatch_command (command=COM_QUERY, thd=0x208c858, packet=0x2108599 "SELECT * FROM t1 ORDER BY HEX( UNCOMPRESSED_LENGTH( pk ) )", packet_length=58) at sql_parse.cc:1243
      #18 0x00000000006a8194 in do_command (thd=0x208c858) at sql_parse.cc:923
      #19 0x00000000006a5025 in handle_one_connection (arg=0x208c858) at sql_connect.cc:1231
      #20 0x00007f8837a09b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #21 0x00007f8836daca7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Stack trace from:

      revision-id: igor@askmonty.org-20140221052733-ypg4dpfcmy5l0b3q
      revno: 3765
      branch-nick: 5.3

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: