Fixed unlikely reference to freed memory in item->print().
sql/item.cc: If a item_ref is referenced by name, we have to reset it's ref in item_ref::cleanup() as the reference may be to a memory that is freed. This happens at least when you have 'HAVING MAX()' in a sub query and you execute 'cond_having->print()' which tries to access items before fix fields. sql/item.h: Added 'reference_trough_name' as a marker for Item_ref that needs to have ref reset during cleanup
Showing
Please register or sign in to comment