[sr-dev] continuous rls related db_mysql errors

Juha Heinanen jh at tutpro.com
Fri Sep 27 14:12:10 CEST 2013


Daniel-Constantin Mierla writes:

> Then, my open issue with the alternative of using autocommit=0 is 
> whether it has to be set back to 1 after COMMIT, or COMMIT is making it 
> 1 implicitly.

COMMIT does not affect autocommit value:

mysql> SET autocommit=0;
Query OK, 0 rows affected (0.00 sec)

mysql> LOCK TABLES htable WRITE, dialplan READ;
Query OK, 0 rows affected (0.02 sec)

mysql> update htable set id=50 where id=5;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> COMMIT;
Query OK, 0 rows affected (0.00 sec)

mysql> UNLOCK TABLES;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW VARIABLES LIKE 'autocommit%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| autocommit    | OFF   |
+---------------+-------+
1 row in set (0.01 sec)

it thus has to be set back to 1 explicitly after COMMIT.

-- juha



More information about the sr-dev mailing list