Subject trigger calling old version of stored procedure
Author unordained
I have a utility stored procedure (executable proc) that I call from lots of triggers; I've
noticed that if I modify this stored procedure and commit, the triggers seem to continue to run
the "old" version of the utility procedure, even in new transactions. This only stops if I do
something to the trigger (alter, recreate, etc.), and then it's fine. I keep trying to put debug
code in that procedure, and keep being confused by the code not "working" -- but it seems like it's
really an issue of the code just not being called.

I even had a case where I modified the procedure, committed, then started transaction A, made
changes that would call the trigger that would call the utility procedure, and saw the old version
of the utility procedure running (an exception was then thrown, but I kept the transaction alive);
I then called the procedure directly from A, and the new code was obviously running (difference
between calling the procedure directly and calling it through a trigger); so I started up
transaction B, altered the trigger (just a dummy change), committed, came back to transaction A,
and tried again -- and this time my change to the utility procedure was visible, without having
restarted transation A (both the triggers and direct calls were using the newest version this time.)

So the question is, what's the rule? Are small stored procedures "inline" (in the C sense), and
you have to rebuild the procedures and triggers that use them to make sure you're always using the
latest version? Is it a bug? Is it just me? Did I misinterpret something about the transactionality
of the situation? It's happened several times now, I don't think it's a fluke...

This is on FB2.1rc1, for what it's worth, with an up-to-date ODS file. (Haven't gotten around to
upgrading my dev box.)

Thanks!

- Philip
(resending, original never showed up on the list? or I'm blind?)