diff --git a/t-mysql-server/sql/item_sum.cc b/t-mysql-server/sql/item_sum.cc index 4713629..11627d3 100644 --- a/t-mysql-server/sql/item_sum.cc +++ b/t-mysql-server/sql/item_sum.cc @@ -1103,6 +1103,9 @@ void Aggregator_distinct::endup() sum->count= table->file->stats.records; endup_done= TRUE; } + + if (!endup_done) + sum->args[0]->maybe_null= 0; } else {