• unknown's avatar
    Bug#32798: DISTINCT in GROUP_CONCAT clause fails when ordering by a column · 0c4b3f57
    unknown authored
    with null values
    
    For queries containing GROUP_CONCAT(DISTINCT fields ORDER BY fields), there 
    was a limitation that the DISTINCT fields had to be the same as ORDER BY 
    fields, owing to the fact that one single sorted tree was used for keeping 
    track of tuples, ordering and uniqueness. Fixed by introducing a second 
    structure to handle uniqueness so that the original structure has only to 
    order the result.
    
    
    mysql-test/r/func_gconcat.result:
      Bug#32798:
      - Wrong test result turned correct after fix.
      - Correct test result
    mysql-test/t/func_gconcat.test:
      Bug#32798: Test case
    sql/item_sum.cc:
      Bug#32798: Implementation of fix. Dead code removal.
      
      - removed comment describing this bug
      - replaced body of function group_concat_key_cmp_with_distinct
      - removed function group_concat_key_cmp_with_distinct_and_order
      - Added a Unique object to maintain uniqueness of values.
    sql/item_sum.h:
      Bug#32798: Declarations and comments.
    0c4b3f57
func_gconcat.result 38.9 KB