Questions tagged [autocommit]
204 questions
4
votes
1 answer
Are MySQL user-defined functions part of the autocommit transaction of the statement that calls them?
Suppose I have some InnoDB (or other transaction-aware) tables, and a user-defined function MyFunction() that reads or writes from those tables in the process of computing its return value.
Suppose further that autocommit is enabled (i.e. MySQL is…

Doin
- 7,545
- 4
- 35
- 37
4
votes
1 answer
Prevent Oracle Connection autocommit for JNDI Datasource on JBoss 7 (Jeeves DBMS)
I am currently having an odd situation with the autocommit settings of an Oracle JNDI Datasource in JBoss 7.
The outline
The application I want to deploy, wich I can inspect but not change, obtains connections from the Connection Pool and trys to…

JSniffer
- 41
- 1
- 5
4
votes
3 answers
How to make long-running @Scheduled spring method, hibernate work?
I try to make a Jersey webservice that allows clients to create Jobs. These Jobs are stored in a database, using Hibernate as persistence provider. The jobs will be executed in the background by a Scheduled service, that I would like to schedule…

Rob Audenaerde
- 19,195
- 10
- 76
- 121
4
votes
1 answer
mysql jdbc unsuccessful rollback
I've got some Java code uses JDBC to connect to a MySQL database, then the code does some read operations then a single update, all using the same connection. If there is an exception, then connection.rollback() is called; if there's no exception,…

user1806029
- 101
- 1
- 5
4
votes
2 answers
Does commit or rollback turn autocommit on impliclitly in PHP's mysqli?
I'm doing transactions in PHP with the mysqli class and I find the documentation of autocommit() woefully incomplete.
I infer from the examples that setting autocommit to false implicitly performs a 'begin transaction'. Is this correct?
More…

Jim
- 1,821
- 2
- 13
- 7
3
votes
1 answer
SVN Commit certificate issue
I have a cronjob which commits some files every five minutes. However, it is not working anymore. It prints
Error validating server certificate for 'https://xx.xx.xx.xx:443':
- The certificate hostname does not match.
Certificate information:
-…

Ercan Özdemir
- 334
- 3
- 17
3
votes
1 answer
PostgreSQL Autocommit efficiency on SELECT queries
I am using Psycopg2 to issue many SELECT queries to my Postgres DB. These queries have a small size result and they are sent at a high frequency.
In order to avoid managing transactions myself (because I'm lazy), I have set autocommit = True in the…

Nathan.Eilisha Shiraini
- 628
- 1
- 8
- 24
3
votes
2 answers
in mysql jdbc does auto commit affect all connections?
when using a connection pool,
will setting a connection's autocommit = false
affect this connection only?
if i close this connection without setting autocommit = true
and get a new connection will this connection's policy be set to autocommit= true?

David
- 280
- 1
- 5
- 13
3
votes
3 answers
Autocommit with PDO
The rollback of my transaction doesn't work.
How do I set autocommit to false (or 0) in the php script using PDO (I have InnoDB 5.7.18) ?
Here is my code:
global $bdd; //defined with PDO
try {
…

Matthieu Barthe
- 81
- 1
- 7
3
votes
2 answers
Why does START TRANSACTION doesn't affect on autocommit implicitly as it should
So this is from the docs:
To disable autocommit mode implicitly for a single series of
statements, use the START TRANSACTION statement:
START TRANSACTION;
SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
UPDATE table2 SET summary=@A WHERE…

Whirlwind
- 14,286
- 11
- 68
- 157
3
votes
1 answer
Is HikariCP autocommit usage the same as regular java connection autocommit usage?
I recently uses HikariCP. Before I use my own simple ConnectionPool to meet our needs. In our software sometimes we need to perform multiple database inserts where each inserts depends on some validation. More or less like the sample from this site:…

R.Basuki
- 51
- 1
- 7
3
votes
1 answer
After an Exception, closing the Connection appears to commit the transaction even though AutoCommit is false
setAutoCommit is false and exception is thrown before closing the connection, but still its committing the transaction. Isn't this is strange behavior?
public static void insertEmployee(){
String query1 = "INSERT INTO EMPLOYEE VALUES(80,…

eatSleepCode
- 4,427
- 7
- 44
- 93
3
votes
1 answer
When does pyramid commit zodb transaction?
I followed the tutorial on http://docs.pylonsproject.org/docs/pyramid/en/latest/tutorials/wiki/index.html
I know that when I add or change persistent objects (in this case Page objects), the change will not be persisted until transaction.commit() is…

Eldamir
- 9,888
- 6
- 52
- 73
3
votes
1 answer
Cannot disable autocommit?
I have Ubuntu 12.04 guest VM with a MySQL 5.5.35 instance on it. I cannot seem to bypass / turn off autocommit feature...
I wanted to try out some scenarios related to SELECT ... FOR UPDATE;, so I opened two database sessions - one from the MySQL…

Less
- 3,047
- 3
- 35
- 46
3
votes
1 answer
Mirror tables: triggers, deadlock and implicit commits
I'm have 2 similar tables, for example A and B. I want to replicate insertions in A to B, and insertions in B to A to integrate two users systems . I configured "after insert triggers" on each one. Example:
DELIMITER $$
CREATE DEFINER =…

Leopoldo Sanczyk
- 1,529
- 1
- 26
- 28