Questions tagged [autocommit]
204 questions
9
votes
8 answers
Disable autocommit in SQL Developer when using MySQL
I'd like to connect to a MySQL server with Oracle SQL Developer, but with autocommit disabled. By default, all MySQL connections have autocommit enabled, which is rather odd.
The global setting in SQL Developer is unchecked, and
set…

Michael
- 291
- 1
- 3
- 13
9
votes
2 answers
MySQL AUTOCOMMIT status while using BEGIN and START TRANSACTION
I need to use a transaction in my project on MySQL. But I'm not sure if I have to use mysql_query("SET AUTOCOMMIT=0"); or not.
I know I have 2 options:
BEGIN
START TRANSACTION
Also I have heard that one of the both items does not need using…

Mohammad Saberi
- 12,864
- 27
- 75
- 127
8
votes
7 answers
How to make Subversion (or any program) perform periodic commits?
I want to configure my computer so that say every half an hour it automatically commits the program I am working on. I am using a svn repository so even if it was just a script that ran 'svn ci' every 30 min that would be okay. The problem is that I…

Robert Massaioli
- 13,379
- 7
- 57
- 73
8
votes
1 answer
SQL PreparedStatement & autocommit
If I create a preparedstatement using a JDBC connection which has "autocommit off", do I need to call commit() to make the transaction permanent or only the prepare call is enough? Note that I only want to prepare a statement and keep it for later…

AliM
- 83
- 1
- 1
- 3
7
votes
3 answers
Do transactions add overhead to the DB?
Would it add overhead to put a DB transactions around every single service method in our application?
We currently only use DB transactions where it's an explicit/obvious necessity. I have recently suggested transactions around all service methods,…

David Parks
- 30,789
- 47
- 185
- 328
7
votes
2 answers
MySQL: LOCK TABLES with autocommit vs. START TRANSACTION
In the MySQL docs there is a statement I don't understand:
The correct way to use LOCK TABLES and UNLOCK TABLES with transactional tables, such as InnoDB tables, is to begin a transaction with SET autocommit = 0 (not START TRANSACTION) followed by…

Anumi
- 139
- 1
- 11
7
votes
3 answers
Postgres setting autocommit off globally
How do you set autocommit off in psql 8.4 at a global level? is there a configuration attribute that i can change that will introduce this behaviour for all dbs on a cluster to start db sessions with autocommit off?

ajeeshpu
- 190
- 1
- 2
- 9
6
votes
4 answers
what happens on connection.setAutoCommit = false
what happens if I do connection.setAutoCommit(false); does it creates a new transaction at database side?

eatSleepCode
- 4,427
- 7
- 44
- 93
5
votes
1 answer
PHP: PGSQL driver and AutoCommit?
I use pg_connect, and pg_query in a project.
But I'm really not sure that is pg_connect using AutoCommit mode or not?
It is important question, because I need to write some block under transaction, and if one of the statements would be ignored by…

durumdara
- 3,411
- 4
- 43
- 71
5
votes
3 answers
Transactions are auto committed on PostgreSQL 9.5.2 with no option to change it?
I've just set up a new PostgreSQL 9.5.2, and it seems that all my transactions are auto committed.
Running the following SQL:
CREATE TABLE test (id NUMERIC PRIMARY KEY);
INSERT INTO test (id) VALUES (1);
ROLLBACK;
results in a warning:
WARNING:…

Eyal Roth
- 3,895
- 6
- 34
- 45
5
votes
2 answers
Disable autocommit during hundreds of MySQL UPDATE statements in Django program
In a Django program, how to explicitly disable auto transaction management before hundreds of UPDATEs and enable it after the UPDATEs finish?
I looked into http://docs.djangoproject.com/en/dev/topics/db/transactions/ but didn't find any clue.
I…

jack
- 17,261
- 37
- 100
- 125
5
votes
1 answer
Execute postgreSQL stored procedure as one transaction
I'm using PostgreSQL 9.3 and I have some stored procedures created which contains several statements. I'm calling this stored procedures in a Java application with the help of a prepared statement.
Now I've read that each statement inside the stored…

machinery
- 5,972
- 12
- 67
- 118
5
votes
4 answers
How to setup mixed (S)FTP + Git workflow for website
I have a lot of virtualhosted websites that are currently being updated via chrooted SFTP. Updates are done by clients (Typically using Dreamweaver and CuteFTP/Filezilla) and staff at my company (typically using Eclipse Team Syncronisation with…

SpliFF
- 38,186
- 16
- 91
- 120
4
votes
1 answer
python pymysql set autocommit false fails
my script reads MYSQL UPDATE queries from a file and then should execute them at once by using autocommit = 0. However, if I remove conn.commit() it still runs one by one, although I have not commited. Where is the error?
import pymysql
conn =…

user670186
- 2,588
- 6
- 37
- 55
4
votes
2 answers
Is it good practice to leave MySQL's "auto commit" mode disabled across a web application?
Regarding MySQL and InnoDB tables, is it considered good practice to globally keep the autocommit mode disabled, so that all SQL statements throughout your code have to be explicitly committed? Does this introduce any overhead or other adverse…

reformed
- 4,505
- 11
- 62
- 88