In this code in sql_select.cc:
the call for cond->update_used_tables() is not needed in most cases.
Look into all "return" in build_equal_items_for_cond().
update_used_tables() is either not needed at all, like in case when "new Item_int" is returned,
or update_used_tables() is already called inside build_equal_items_for_cond().
This task is to move the call for code->update_used_tables() from build_equal_items() into build_equal_items_for_cond(), and then to get rid of the unnecessary calls in the cases that don't really need it.