SET innodb_table_locks=1; SET autocommit=0;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN;
INSERT INTO m VALUES (1);
INSERT INTO t VALUES (1);
SELECT @@in_transaction; <- return 1
UNLOCK TABLES;
SELECT @@in_transaction; <- return 1
--
SET innodb_table_locks=1; SET autocommit=0;
SET TRAN
well from kb what i understand is:
to use unlock with innodb (the engine you use with both tables), you should
SET innodb_table_locks=1; SET autocommit=0; after that any LOCK/UNLOCK with
innodb tables inside a transaction will commit the transaction
try again using innodb_table_locks, and autocomm
No, becuase the first test case I've posted shows that the reality is
different... :)
I'm just asking to explain the exact interaction between trx and UNLOCK,
because I need to know if statements I use are safe.
Federico
Mar 23/9/14, Roberto Spadim
better explained at mariadb kb
https://mariadb.com/kb/en/mariadb/documentation/sql-commands/transactions/lock-tables-and-unlock-tables/#limitations
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Un
this don't work too:
LOCK TABLE t WRITE;
BEGIN;
SELECT @@in_transaction; (return 1)
UNLOCK TABLES;
SELECT @@in_transaction; (return 1)
maybe a wrong documentation 'bug'
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@
LOCK always commits current transaction. This is documented. But I wasn't able
to commit a transaction with UNLOCK. Perhaps I'm missing something?
Federico
Lun 22/9/14, Roberto Spadim ha scritto:
Oggetto: Re: [Maria-discuss] transactions and UNLOC
good question, at least here the implicity commit is with LOCK table and
not unlock table
CREATE OR REPLACE TABLE m (c INT) ENGINE = InnoDB;
CREATE OR REPLACE TABLE t (c INT) ENGINE = myisam; (must be nontransaction
table)
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN;
SELECT @@in_transacti
In this MySQL manual page:
http://dev.mysql.com/doc/refman/5.6/en/implicit-commit.html
I read:
"UNLOCK TABLES commits a transaction only if any tables currently have been
locked with LOCK TABLES to acquire nontransactional table locks."
However, this doesn't seem to be the case, at least with Ma
8 matches
Mail list logo