Added better triggers handling support
Authored by: artyom-beilis 2011-02-12
Parent: [r1691]
Child: [r1693]