maria-developers team mailing list archive
Mailing list archive
update_virtual_fields() calls missing in sql_join_cache.cc?
It has come to my attention that sql_join_cache.cc does not have as many
update_virtual_fields() calls as I think it ought to have.
My reasoning was as follows: AFAIU when one has read a record from a table,
they must call update_virtual_fields() before they try to evaluate the
attached table condition (because the condition may refer to virtual fields).
Now if one opens sql_join_cache.cc and looks at these three functions:
while (!(error= file->multi_range_read_next((char **) &rec_ptr)))
/* Check whether pushdown conditions are satisfied */
if (join_tab->select && join_tab->select->skip_record())
one can see a call path where we read a table record with multi_range_read_next
and then proceed to evaluating the attached condition with skip_record()
without calling update_virtual_fields(). Is there a problem.
Another thing I can't understand about update_virtual_fields() is the asymmetry
between rr_XXX() functions. Why do rr_quick() and rr_sequential() call
update_virtual_fields() while rr_index_first() and rr_from_pointers() don't? If
that is intentional, I think it deserves to be documented.
Sergey Petrunia, Software Developer
Monty Program AB, http://askmonty.org