I see in code of the trigger for mytable1:
if (@DISABLE_TRIGGER is null or @DISABLE_TRIGGER=0) then
So I suppose that can do like:
set @DISABLE_TRIGGER=1;
update mytable1;
delete from mytable1;
..............
.............
insert into mytable1;
.....................
How long this variable @DISABLE_TRIGGER will be =1 ?
Only for 1 query? For session? Always untill MySQL server shutdown?
Thanks.
The MySQL docs say: “User-defined variables are connection-specific. That is, a user variable defined by one client cannot be seen or used by other clients. All variables for a given client connection are automatically freed when that client exits.”
More details at http://dev.mysql.com/doc/refman/5.6/en/user-variables.html