Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Documentation says about autocommit:
"as soon as you execute a statement that updates (modifies) a table, MariaDB stores the update on disk to make it permanent".
Also
"Transactions cannot be used in Stored Functions".
But it is not obvious that autocommit is effectively disabled inside stored functions.
Please confirm it and reflect in documentation.
---TRANSACTION 24, ACTIVE 0 sec inserting
|
mysql tables in use 1, locked 1 |
LOCK WAIT 2 lock struct(s), heap size 1128, 1 row lock(s) |
MariaDB thread id 7, OS thread handle 140301147223808, query id 11 localhost root Executing
|
insert into t.t select 1 |
------- TRX HAS BEEN WAITING 201824 ns FOR THIS LOCK TO BE GRANTED:
|
RECORD LOCKS space id 8 page no 3 n bits 8 index PRIMARY of table `t`.`t` trx id 24 lock mode S locks rec but not gap waiting |
Record lock, heap no 2 PHYSICAL RECORD: n_fields 3; compact format; info bits 32 |
0: len 4; hex 80000001; asc ;; |
1: len 6; hex 000000000017; asc ;; |
2: len 7; hex 060000002e0110; asc . ;; |
 |
------------------
|
---TRANSACTION 23, ACTIVE 1 sec
|
mysql tables in use 1, locked 1 |
2 lock struct(s), heap size 1128, 6 row lock(s), undo log entries 5 |
MariaDB thread id 6, OS thread handle 140301147531008, query id 10 localhost root User sleep |
insert into t select case when sleep(5) < 1 then 1 else 2 end |