• unknown's avatar
    Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion · 24a567e9
    unknown authored
    Problem: GROUP_CONCAT(DISTINCT BIT_FIELD...) uses a tree to store keys;
    which are constructed using a temporary table fields,
    see Item_func_group_concat::setup().
    As a) we don't store null bits in the tree where the bit fields store parts 
    of their data and b) there's no method to properly compare two table records
    we've got problem.
    
    Fix: convert BIT fields to INT in the temporary table used.
    
    
    mysql-test/r/func_gconcat.result:
      Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
        - test result.
    mysql-test/t/func_gconcat.test:
      Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
        - test case.
    sql/item_sum.cc:
      Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
        - force the create_tmp_table() to convert BIT columns to INT 
          in order to be able to compare records containing BIT fields.
    24a567e9
func_gconcat.result 38.2 KB