Commit 11f13bff authored by Alexander Barkov's avatar Alexander Barkov

MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in...

MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
parent bee24fe1
......@@ -2549,11 +2549,14 @@ Item_sum_hybrid::min_max_update_str_field()
if (!args[0]->null_value)
{
result_field->val_str(&cmp->value2);
if (result_field->is_null() ||
(cmp_sign * sortcmp(res_str,&cmp->value2,collation.collation)) < 0)
if (result_field->is_null())
result_field->store(res_str->ptr(),res_str->length(),res_str->charset());
else
{
result_field->val_str(&cmp->value2);
if ((cmp_sign * sortcmp(res_str,&cmp->value2,collation.collation)) < 0)
result_field->store(res_str->ptr(),res_str->length(),res_str->charset());
}
result_field->set_notnull();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment