MDEV-5816: Stored programs: validation of stored program statements
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, to iterate every Item_trigger_field object created on parsing a trigger body, it required to use binary cycle. To organize the list of lists structure 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 item 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 is 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 is cleared right after the current SP statement is cleaned up and before re-parsing is started.
Showing
Please register or sign in to comment