mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #57954: BIT_AND function returns incorrect results
when semijoin=on When setting the aggregate function as having no rows to report the function no_rows_in_result() was calling Item_sum::reset(). However this function in addition to cleaning up the aggregate value by calling aggregator_clear() was also adding the current value to the aggregate value by calling aggregator_add(). Fixed by making no_rows_in_result() to call aggregator_clear() directly. Renamed Item_sum::reset to Item_sum::reset_and_add() to and added a comment to avoid misinterpretation of what the function does.
This commit is contained in:
@ -11391,7 +11391,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_min_result()
|
||||
|
||||
min_functions_it->rewind();
|
||||
while ((min_func= (*min_functions_it)++))
|
||||
min_func->reset();
|
||||
min_func->reset_and_add();
|
||||
}
|
||||
|
||||
|
||||
@ -11423,7 +11423,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_max_result()
|
||||
|
||||
max_functions_it->rewind();
|
||||
while ((max_func= (*max_functions_it)++))
|
||||
max_func->reset();
|
||||
max_func->reset_and_add();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user