Questions tagged [autocommit]

204 questions
67
votes
4 answers

How do you set autocommit in an SQL Server session?

How do you set autocommit in an SQL Server session?
hawkeye
  • 34,745
  • 30
  • 150
  • 304
46
votes
10 answers

Large Objects may not be used in auto-commit mode

I have a Spring application which uses Hibernate on a PostgreSQL database. I'm trying to store files in a table of the database. It seems it stores the row with the file (I just use persist method on EntityManager), but when the object is loaded…
Javi
  • 19,387
  • 30
  • 102
  • 135
40
votes
8 answers

How do I turn off autocommit for a MySQL client?

I have a web app that has been written with the assumption that autocommit is turned on on the database, so I don't want to make any changes there. However all the documentation I can find only seems to talk about using init_connect on the database,…
Michael Hinds
  • 881
  • 1
  • 11
  • 17
30
votes
4 answers

How does kafka consumer auto commit work?

I am reading this one: Automatic Commit The easiest way to commit offsets is to allow the consumer to do it for you. If you configure enable.auto.commit=true, then every five seconds the consumer will commit the largest offset your client…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
29
votes
4 answers

Why is "hibernate.connection.autocommit = true" not recommended in Hibernate?

In Hibernate API, there is a property hibernate.connection.autocommit which can be set to true. But in the API, they have mentioned that it is not recommended to set it like so: Enables autocommit for JDBC pooled connections (it is not …
Ponmudi VN
  • 1,493
  • 1
  • 18
  • 22
27
votes
1 answer

JDBC connection default autoCommit behavior

I'm working with JDBC to connect to Oracle. I tested connection.setAutoCommit(false) vs connection.setAutoCommit(true) and the results were as expected. While by default connection is supposed to work as if autoCommit(true) [correct me if I'm…
stackex
  • 299
  • 1
  • 3
  • 7
26
votes
3 answers

Is there any way to rollback after commit in MySQL?

I did a big mistake that I updated a table without 'where' clause in MySQL :'( It is auto-committed. Is there any way to rollback from it?
Johnny Lim
  • 5,623
  • 8
  • 38
  • 53
21
votes
5 answers

Why doesn’t SQLite require a commit() call to save data?

I read somewhere that to save data to an SQLite database in Python, a commit() call is required. Yet I have never needed to do this. Why?
james
  • 919
  • 4
  • 11
  • 17
20
votes
3 answers

How to check if autocommit is on or not postgres' psql

I'm using postgres 9.5. How can I check if auto commit is on or off? I tried SHOW AUTOCOMMIT where I got ERROR: unrecognized configuration parameter "autocommit" then I did a \set autocommit off and then SHOW AUTOCOMMIT gives me blank output. How…
codec
  • 7,978
  • 26
  • 71
  • 127
15
votes
2 answers

Is there a way to get the default value of autocommit in MySQL?

I'm just wondering as per the title if this can be done? For example, if I was to do something like this: $this->db->autocommit(false); But then afterwards I wanted to set it back to it's default value; I can't just assume it's defaults to true and…
Brett
  • 19,449
  • 54
  • 157
  • 290
12
votes
1 answer

Reset (autoCommit) on connection in HikariCP

I keep seeing this log when I use connections in Hikari pool. [com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314 [com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset…
Bee
  • 12,251
  • 11
  • 46
  • 73
11
votes
2 answers

DBI database handle with AutoCommit set to 0 not returning proper data with SELECT?

This is a tricky one to explain (and very weird), so bear with me. I will explain the problem, and the fix for it, but I would like to see if anyone can explain why it works the way it works :) I have a web application that uses mod_perl. It uses…
sentinel
  • 249
  • 2
  • 10
11
votes
2 answers

MySQL - How to check if START TRANSACTION is active

I have noticed that START TRANSACTION automatically COMMIT the previous queries. Because of this and the fact that I have several stored procedure called before the end of the whole transaction, I need to check if I am inside a START TRANSACTION or…
Stefano Giacone
  • 2,016
  • 3
  • 27
  • 50
10
votes
2 answers

SQLite error: cannot commit transaction - SQL statements in progress using Java Code

I am facing an SQLite error though I am not using any explicit AutoCommit true or false. can anyone provide any input on this error. What are the situation where you will get this error. Thanks in advance. Regards, Manasi Save
MySQL DBA
  • 5,692
  • 21
  • 54
  • 71
9
votes
2 answers

JDBC commit failed, calling commit when autocommit=true. Multithreaded hibernate session somehow changing autocommit?

I have the main thread that spawns thread #2 which uses the same hibernate Session in the main thread. Thread #2 just does a "select 1" every few min to keep the db connection alive because of a long running process from the main thread. Once the…
czer
  • 676
  • 3
  • 8
  • 20
1
2 3
13 14