1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fixed bug mdev-5382

When marking used columns the function find_field_in_table_ref() erroneously
called the walk method for the real item behind a view/derived table field
with the second parameter set to TRUE.
This erroneous code was introduced in 2006.
This commit is contained in:
Igor Babaev
2013-12-05 11:13:20 -08:00
parent 62e959437e
commit ccf5871d7b
3 changed files with 33 additions and 2 deletions

View File

@ -6429,9 +6429,9 @@ find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
else
{
if (thd->mark_used_columns == MARK_COLUMNS_READ)
it->walk(&Item::register_field_in_read_map, 1, (uchar *) 0);
it->walk(&Item::register_field_in_read_map, 0, (uchar *) 0);
else
it->walk(&Item::register_field_in_write_map, 1, (uchar *) 0);
it->walk(&Item::register_field_in_write_map, 0, (uchar *) 0);
}
}
else