Re: [Maria-discuss] transactions and UNLOCK TABLES

2014-09-23 Thread Federico Razzoli
I would never use LOCK TABLES on InnoDB, look again my first test case and you'll see that it's different from what documentation says :) Federico Mar 23/9/14, Roberto Spadim ha scritto: Oggetto: Re: [Maria-discuss] transactions and UNL

Re: [Maria-discuss] transactions and UNLOCK TABLES

2014-09-22 Thread Roberto Spadim
t 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 >> >> >> ---------------- >&

Re: [Maria-discuss] transactions and UNLOCK TABLES

2014-09-22 Thread Roberto Spadim
are safe. > > Federico > > > > Mar 23/9/14, Roberto Spadim ha scritto: > > Oggetto: Re: [Maria-discuss] transactions and UNLOCK TABLES > A: "Federico Razzoli" > Cc: "Maria Discuss" , "maria-docs&q

Re: [Maria-discuss] transactions and UNLOCK TABLES

2014-09-22 Thread Federico Razzoli
rto Spadim ha scritto: Oggetto: Re: [Maria-discuss] transactions and UNLOCK TABLES A: "Federico Razzoli" Cc: "Maria Discuss" , "maria-docs" Data: Martedì 23 settembre 2014, 00:14 better explained at mariadb kbhttps://mariadb.com/kb/en/mariadb/documentati

Re: [Maria-discuss] transactions and UNLOCK TABLES

2014-09-22 Thread 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

Re: [Maria-discuss] transactions and UNLOCK TABLES

2014-09-22 Thread Roberto Spadim
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@

Re: [Maria-discuss] transactions and UNLOCK TABLES

2014-09-22 Thread Federico Razzoli
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] transa

Re: [Maria-discuss] transactions and UNLOCK TABLES

2014-09-22 Thread Roberto Spadim
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

[Maria-discuss] transactions and UNLOCK TABLES

2014-09-22 Thread Federico Razzoli
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