1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for bug #10015 "Crash in InnoDB if stored routines are used".

We should not allow explicit or implicit transaction commits inside
of stored functions or triggers (so in autocommit mode we should not
do commits after execution of sub-statement).
Also since we don't support nested statement transactions in 5.0,
we shouldn't commit or rollback stmt transactions while we are inside
stored functions or triggers. This should be fixed in later (>=5.1)
releases.
This commit is contained in:
dlenev@brandersnatch.localdomain
2005-06-07 14:53:08 +04:00
parent 329d974df7
commit 270b695f59
10 changed files with 433 additions and 5 deletions

View File

@ -1065,6 +1065,8 @@ public:
THD_TRANS all; // Trans since BEGIN WORK
THD_TRANS stmt; // Trans for current statement
bool on; // see ha_enable_transaction()
/* TRUE if we are inside of trigger or stored function. */
bool in_sub_stmt;
XID xid; // transaction identifier
enum xa_states xa_state; // used by external XA only
/*