BK-#58- Ok, I experimented a bit with rollbacks, transactions, and procedures, and found out some surprising things.  First: when you call SIGNAL, mysql immediately stops what it's doing and returns the message indicated.  That means if you rollback after that line, the rollback never occurs!
BK-#58- Ok, I experimented a bit with rollbacks, transactions, and
procedures, and found out some surprising things.  First: when you
call SIGNAL, mysql immediately stops what it's doing and returns the
message indicated.  That means if you rollback after that line, the
rollback never occurs!

I also learned that even if you call other procedures from your
procedure (like I often do with auditing), as long as it is within the
transaction, rollback will actually fix that guy too.  So that is kind
of neat.

Finally, and this has already been implied, it is cool to know that
yes, rollback definitely works - I can have all sorts of things
getting updated / inserted or whatever, and in the end when I call
rollback it will make everything like it used to be.

One thing to note: it is *very* important that rollback gets called
before SIGNAL, every time SIGNAL is called - because if you don't
rollback, then you leave the transaction hanging, which will lock up
the database!

byronka/xenos,byronka/xenos,byronka/xenos,byronka/xenos,byronka/xenos,byronka/xenos,byronka/xenos