-
unknown authored
HEAP tables can't index BIT fields. Due to this when grouping by such fields is needed they are converted to a fields of the LONG type when temporary table is being created. But a side effect of this is that a wrong type of BIT fields is returned to a client. Now the JOIN::prepare and the create_distinct_group functions are create additional hidden copy of BIT fields to preserve original fields untouched. New hidden fields are used for grouping instead. mysql-test/t/type_bit.test: Added a test case for the bug#30245: A wrong type of a BIT field is reported when grouped by it. mysql-test/r/type_bit.result: Added a test case for the bug#30245: A wrong type of a BIT field is reported when grouped by it. sql/sql_select.cc: Bug#30245: A wrong type of a BIT field is reported when grouped by it. Now the JOIN::prepare and the create_distinct_group functions are create additional hidden copy of BIT fields to preserve original fields untouched. New hidden fields are used for grouping instead.
53aaca43