-
unknown authored
- The bug was caused by COUNT(DISTINCT ...) code using Unique object in a way that assumed that BIT(N) column occupies a contiguous space in temp_table->record[0] buffer. - The fix is to make COUNT(DISTINCT ...) code instruct create_tmp_table to create temporary table with column of type BIGINT, not BIT(N). mysql-test/r/type_bit.result: BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results - Testcase mysql-test/t/type_bit.test: BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results - Testcase sql/item_sum.cc: BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results - Make COUNT(DISTINCT ...) code instruct create_tmp_table to create temporary table with BIGINT, not BIT(N) column.
466747d5