MDEV-32082 Server crash in find_field_in_table
Attempt to resolve FOR SYSTEM_TIME expression as field for derived table is done before derived table is fully prepared, so we fail on assertion that table_list->table is missing. Actually Vers_history_point::resolve_unit() is done under the call of mysql_derived_prepare() itself (sql_derived.cc:824) and the table is assigned later at 867. The fix disables unit resolution for field type in FOR SYSTEM_TIME expression as it does a little sense in any case: making historical queries based on variable field values produces the result of multiple time points. fix_fields_if_needed() in resolve_units() was introduced by 46be3198
Showing
Please register or sign in to comment