• unknown's avatar
    Fix for valgrind warning introduced by the fix for bug#21354: · cc558cfb
    unknown authored
    (COUNT(*) = 1) not working in SELECT inside prepared statement.
    Note: the warning was introduced in 5.0 and 5.1, 4.1 is OK with the
    original fix.
    
    The problem was that in 5.0 and 5.1 clear() for group functions may
    access hybrid_type member, and this member is initialized in
    fix_fields().
    
    So we should not call clear() from item cleanup() methods, as cleanup()
    may be called for unfixed items.
    
    
    sql/item_sum.cc:
      Do not call clear() from item cleanup() methods, as cleanup() may be
      called for unfixed items, and clear() assumes the item was fixed.
    sql/item_sum.h:
      Do not call clear() from item cleanup() methods, as cleanup() may be
      called for unfixed items, and clear() assumes the item was fixed.
    cc558cfb
item_sum.h 40.1 KB