Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





AutoCommit


how can I lookup whether autocommit is set or not?
I have a mysql 4.1.13 version with myisam tables.. is there actually a commit possible?

If I update a record in a table, and make a select, I see the updates with a select.. but on the next day the updated record is not updated... very strange.. I hope with commits the problem will be solved.




View Complete Forum Thread with Replies

Related Forum Messages:
Autocommit My.cnf
How can I default autocommit = false for the linux command line mysql client?

View Replies !
Default Autocommit=0?
Is there any way I can set up mysql client so that the default value for autocommit is 0? This is for when I'm running the command line client on linux/windows or the Query Browser on windows. I would feel much more comfortable that I'm not going to accidentally put in the wrong where clause and update or delete a bunch of records. I like to use the number of rows affected by my query as a double-check that I've done what I intended to do, and then commit it.

I've searched around but could not find any mention of this issue -- all of the postings on autocommit that I found have to do with accessing mysqlserver from a program such as java or PHP.

View Replies !
Set Autocommit=0 Not Working
I had set autocommit to 0 but it still commits. Any ideas why?

View Replies !
Turn Off The AutoCommit
well this might not the first time someone is askng this question, but I coudn't find it once before. So:

I'm useing InnoDB and I generally want to switch off the AutoCommit for the transactions. But I can't find any solution.

View Replies !
Can't Get Init_connect='AUTOCOMMIT=0' To Work
I've got 4.1.3 installed on Linux.. everything fine so far except for getting the init_connect string to work.

I followed the instructions on
http://dev.mysql.com/doc/mysql/en/Server_system_variables.html

and added the below line to my '/etc/my.cnf' file under [mysqld]:
init_connect='SET AUTOCOMMIT=0'

When I restart the server and start mysql, I can see that the init_connect was read:
mysql> select @@init_connect;
+--------------------+
| @@init_connect |
+--------------------+
| SET AUTOCOMMIT=0|
+--------------------+

However, the Autocommit variable is still 1!
mysql> select @@AUTOCOMMIT;
+-----------------+
| @@AUTOCOMMIT|
+-----------------+
| 1|
+-----------------+

Anyone seen this before or know what's wrong?

View Replies !
'SET AUTOCOMMIT=0' Insert + Rollback - Doesn't Work
i try to setup a simular behavior as ORACLE ie I can commit; or rollback;
after I am done with my session.

ie
'SET AUTOCOMMIT=0'
then I use BEGIN; or START TRANSACTION;
delete a row and then try to rollback - it doesn't work - it's stuck on autocommit; everything I do is directly commited and there is no way to undo my changes .
WHY?

simple test:

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

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

mysql> delete from one where id='seven';
Query OK, 1 row affected (0.00 sec)

mysql> select * from one;
+------+
| id |
+------+
| one |
| tow |
| tree |
| four |
| five |
| six |
+------+
6 rows in set (0.00 sec)

mysql> rollback;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> select * from one;
+------+
| id |
+------+
| one |
| tow |
| tree |
| four |
| five |
| six |
+------+
6 rows in set (0.00 sec)

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

mysql> delete from one where id='six';
Query OK, 1 row affected (0.00 sec)

mysql> select * from one;
+------+
| id |
+------+
| one |
| tow |
| tree |
| four |
| five |
+------+

mysql> rollback;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> select * from one;
+------+
| id |
+------+
| one |
| tow |
| tree |
| four |
| five |
+------+

mysql>

View Replies !
How To Disable Autocommit Mode Of MySQL5.1 And How To Restart MySQL Database
By default MySQL runs with autocommit mode enabled.

I want to disable the autocommit mode and restart MySQL so that all the database sessions have autocommit mode disables.

So, I want to know how to disable autocommit & start-stop MySQL database.

View Replies !
Transaction Deadlock When Using "autocommit"
Transaction is a big problem in MySQL --> here is what I have done Since the DB is InnoDB, I tried to "set autocommit=0" so that it can be rollback if it wants, and data will not be actually updated into the file disk unless a "commit" is performed.

I typed:

$autocommit = "SET autocommit=0";
$setcommit = mysql_query($autocommit);
echo "<font color = yellow> Setcommit = $setcommit </font><BR>";

and then it worked once, but then for the second time, when I go to mySQL and try to do something, it came an error of :

ERROR 1205: Lock wait timeout exceeded; Try restarting transaction

which is probably the deadlock problem...I have to release the lock by
i) show processlist; (and see which thread is sleeping)
ii) kill thread_id;

Does anyone know how to perform transaction with php using InnoDB?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved