• unknown's avatar
    bug#28273: GROUP_CONCAT and ORDER BY: No warning when result gets truncated. · 10be360e
    unknown authored
    When using GROUP_CONCAT with ORDER BY, a tree is used for the sorting, as 
    opposed to normal nested loops join used when there is no ORDER BY. 
    
    The tree traversal that generates the result counts the lines that have been 
    cut down. (as they get cut down to the field's max_size)
    But the check of that count was before the tree traversal, so no 
    warning was generated if the output is truncated.
    
    Fixed by moving the check to after the tree traversal.
    
    
    mysql-test/r/func_gconcat.result:
      bug#28273: correct result
    mysql-test/t/func_gconcat.test:
      bug#28273: test case
    sql/item_sum.cc:
      bug#28273: the fix
      
      Moved the code that outputs a warning to after temporary table (tree) is traversed.
    10be360e
item_sum.cc 82.7 KB