-
Dmitry Shulga authored
Re-designed a way by that Item_trigger_field objects are arranged in memory. Item_trigger_field objects created on parsing a trigger's statement is now stored in a per statement list. All lists of Item_trigger_field objects created on parsing the whole trigger's body are organized in the structure "list of lists". So, use binary cycle to iterate every Item_trigger_field object created on parsing a trigger body. To organize the data structure 'list of lists' the new data member Item_trigger_field::next_trig_field_list is introduced that links lists in this hierarchy structure. This re-design is performed in order to avoid refences to already deleted items on re-compilation of failed trigger's statememt. Referencing to already deleted items could take place on re-parsing a trigger's statement since every Item created for a statement being re-parsed is deleted before the statement be re-parsed, but deleted items are still referenced from sp_head. So, to avoid access to dangling references a per statement list of Item_trigger_field objects are cleared right after the current SP statement be cleaned up and before re-parsing be started.
2086f96c