Hi, Sanja! On Nov 17, sanja@askmonty.org wrote:
------------------------------------------------------------ revno: 4350 revision-id: sanja@askmonty.org-20141117132635-gf281ipiomifw1oc parent: psergey@askmonty.org-20141113111559-cuhsyfhor141qo6a committer: sanja@askmonty.org branch nick: work-maria-5.5-MDEV-6985 timestamp: Mon 2014-11-17 14:26:35 +0100 message: MDEV-6985: MariaDB crashes on stored procedure call
Item_ident fixed to allow double cleanup().
=== modified file 'sql/item.cc' --- a/sql/item.cc 2014-10-06 17:53:55 +0000 +++ b/sql/item.cc 2014-11-17 13:26:35 +0000 @@ -862,12 +862,20 @@ void Item_ident::cleanup() field_name ? field_name : "(null)", orig_field_name ? orig_field_name : "(null)")); #endif
Before pushing, please remove the above #ifdef, in a separate commit. thanks!
+ bool was_fixed= fixed; Item::cleanup(); db_name= orig_db_name; table_name= orig_table_name; field_name= orig_field_name; /* Store if this Item was depended */ - can_be_depended= test(depended_from); + if (was_fixed) + { + /* + We can trust that depended_from set correctly only if this item + was fixed + */ + can_be_depended= test(depended_from); + }
Are double cleanups generally normal? Why this item is cleaned up twice?
DBUG_VOID_RETURN; }
Regards, Sergei