Take the 2-minute tour ×  I have the following triggers on my
users table which copies the value to email field from name
field.  CREATE TRIGGER copy_name_on_insert BEFORE INSERT ON
users   SET NEW.email = NEW.name;  CREATE TRIGGER
copy_name_on_update BEFORE UPDATE ON users   SET NEW.email =
NEW.name;  This trigger is working fine in local env, but in
production its going into an infinite loop. Does anyone have any
idea about this behaviour?  Local and Production envs are
running mysql 5.5.  share|improve this question how is that
possible? the only way is that you have infinite record which I
don't think you have, or that the trigger is calling itself
(recursive function) and the number of recursive call is in
max_sp_recursion_depth that's not infinite. –  jcho360 Jun 1 '12
at 18:56  1 Answer 1  up vote 0 down vote accepted  Got this
answer from our DBA.  So, this was not a recursion bug (though
the error message was really bad, and looked like one). Rather,
it was a memory complexity problem.  Basically, ea