1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Added missing calls of update_virtual_fields() in the

join cache module.
Without these calls SELECTs over tables with virtual columns
that used join cache could return wrong results. This could
be seen with the test case added into vcol_misc.test
This commit is contained in:
Igor Babaev
2010-07-01 22:13:19 -07:00
parent 16053e66b6
commit 0d734037cc
3 changed files with 46 additions and 4 deletions

View File

@@ -1799,11 +1799,8 @@ enum_nested_loop_state JOIN_CACHE_BNL::join_matching_records(bool skip_last)
}
int err= 0;
/*
psergey3-merge: should we have this here by any chance:
if (rc == NESTED_LOOP_OK)
update_virtual_fields(join_tab->table);
*/
update_virtual_fields(join_tab->table);
/*
Do not look for matches if the last read record of the joined table
@@ -2324,6 +2321,7 @@ enum_nested_loop_state JOIN_CACHE_BKA::join_matching_records(bool skip_last)
(!check_only_first_match || !get_match_flag_by_pos(rec_ptr)))
{
get_record_by_pos(rec_ptr);
update_virtual_fields(join_tab->table);
rc= generate_full_extensions(rec_ptr);
if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS)
goto finish;
@@ -3211,6 +3209,7 @@ JOIN_CACHE_BKA_UNIQUE::join_matching_records(bool skip_last)
(!check_only_first_match || !get_match_flag_by_pos(rec_ptr)))
{
get_record_by_pos(rec_ptr);
update_virtual_fields(join_tab->table);
rc= generate_full_extensions(rec_ptr);
if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS)
goto finish;