Hi Roy,
Thanks for sorting this out. Approved with the following suggestions:
On 11/18/2010 10:47 AM, Roy Lyseng wrote:
...
> sql/item.cc
> A common implementation of fix_after_pullout() for all Item_ref
> classes has been made. The exception is Item_aggregate_ref which
> must have its own implementation and Item_outer_ref which we
still
> have no test case for.
It would be good it the code could contain a comment as to why
Item_aggregate_ref needs its owmn implementation. I.e., why
Item_ident::fix_after_pullout should not be called.
...
> void Item_ref::cleanup()
> {
> DBUG_ENTER("Item_ref::cleanup");
> + /*
> + Save depended_from so that it can be restored after
Item_ident::cleanup().
> + Item_ref::depended_from is not recalculated in later
fix_fields() calls,
> + so this hack is needed to have correct dependency information in
prepared
> + statement execution. Dependencies should not change unless an
involved
> + view is updated, and this currently has much more severe
implications.
> + */
> + st_select_lex *save_depended_from= depended_from;
> Item_ident::cleanup();
> + depended_from= save_depended_from;
> result_field= 0;
> DBUG_VOID_RETURN;
> }
Instead, why not just remove the setting of depended_from from
Item_iden::cleanup? I tried, and got no test failures for main suite,
not even with --ps-protocol.
--
Øystein