Sponsored Content
Top Forums Web Development [Solved] Disable mySQL autocommit Post 302532035 by radoulov on Sunday 19th of June 2011 12:10:34 PM
Old 06-19-2011
Hi Scott,
which storage engine are you using (show create table <table_name>;)?
Bear in mind that MySQL 5.0.x default's storage engine is MyISAM and that storage engine doesn't support transactions (you cannot rollback a statement).

You should take a look at InnoDB if you need transactions (start transaction; do your work; commit or rollback).

InnoDB is the default storage engine in 5.5 (I'm not sure when exactly it became the default storage engine).
This User Gave Thanks to radoulov For This Post:
 

7 More Discussions You Might Find Interesting

1. AIX

how to set AUTOCOMMIT option in AIX

Hi, Can anybody tell,how to set the auto commit option in AIX,i have tried with environmental variables option like 'export db2option=-c +a'. But its not working in my environment. is there any other option? (1 Reply)
Discussion started by: DB2AIX
1 Replies

2. Shell Programming and Scripting

How to disable Enable/Disable Tab Key

Hi All, I have bash script, so what is sintax script in bash for Enable and Disable Tab Key. Thanks for your help.:( Thanks, Rico (1 Reply)
Discussion started by: carnegiex
1 Replies

3. UNIX for Dummies Questions & Answers

[SOLVED] mysql.sock is missing..

mysql.sock file is missing in /opt/lampp/etc/ is there any backup file available in unix... since without that file .. project is not opening.. reply me as soon as possible ... (19 Replies)
Discussion started by: senkerth
19 Replies

4. UNIX and Linux Applications

command to check value of autocommit and isolation level

Hi, Pls let me know command to get following: 1. how to check current value of autocommit 2. how to check current value of isolation level I am using mysql-5.0.26 on unix -Thanks (2 Replies)
Discussion started by: newbielgn
2 Replies

5. Red Hat

SSL/TLS renegotiation DoS -how to disable? Is it advisable to disable?

Hi all Expertise, I have following issue to solve, SSL / TLS Renegotiation DoS (low) 222.225.12.13 Ease of Exploitation Moderate Port 443/tcp Family Miscellaneous Following is the problem description:------------------ Description The remote service encrypts traffic using TLS / SSL and... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

6. Emergency UNIX and Linux Support

[Solved] EMERGENCY - can I revert 1 hour of mysql changes

I know, its stupid.. MYSQL on CENTOS 5 using WHM Imported a lot of users/posts from old forum to new forum, but my backup was lost. Can I somehow simply remove all mysql table changes for the last 3 hours, returning to pre-import status. ---------- Post updated at 03:44 AM ----------... (6 Replies)
Discussion started by: lawstudent
6 Replies

7. Emergency UNIX and Linux Support

[Solved] Mysql - Take data from row and copy it to another row

Sorry if I repost my question in this section, but I'm really in a hurry since I have to finish my work... :( Dear community, I have a table with two rows like: Row1 Row2 ======= ======= 7,3 text 1 1,3 text 2 1,2,3 blabla What i need to do is add/copy... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
BEGIN(7)							   SQL Commands 							  BEGIN(7)

NAME
BEGIN - start a transaction block SYNOPSIS
BEGIN [ WORK | TRANSACTION ] INPUTS WORK TRANSACTION Optional keywords. They have no effect. OUTPUTS BEGIN This signifies that a new transaction has been started. WARNING: BEGIN: already a transaction in progress This indicates that a transaction was already in progress. The current transaction is not affected. DESCRIPTION
By default, PostgreSQL executes transactions in unchained mode (also known as ``autocommit'' in other database systems). In other words, each user statement is executed in its own transaction and a commit is implicitly performed at the end of the statement (if execution was successful, otherwise a rollback is done). BEGIN initiates a user transaction in chained mode, i.e., all user statements after BEGIN com- mand will be executed in a single transaction until an explicit COMMIT [commit(7)] or ROLLBACK [rollback(7)]. Statements are executed more quickly in chained mode, because transaction start/commit requires significant CPU and disk activity. Execution of multiple statements inside a transaction is also useful to ensure consistency when changing several related tables: other clients will be unable to see the intermediate states wherein not all the related updates have been done. The default transaction isolation level in PostgreSQL is READ COMMITTED, wherein each query inside the transaction sees changes committed before that query begins execution. So, you have to use SET TRANSACTION ISOLATION LEVEL SERIALIZABLE just after BEGIN if you need more rig- orous transaction isolation. (Alternatively, you can change the default transaction isolation level; see the PostgreSQL Administrator's Guide for details.) In SERIALIZABLE mode queries will see only changes committed before the entire transaction began (actually, before execution of the first DML statement in the transaction). Transactions have the standard ACID (atomic, consistent, isolatable, and durable) properties. NOTES START TRANSACTION [start_transaction(7)] has the same functionality as BEGIN. Use COMMIT [commit(7)] or ROLLBACK [rollback(7)] to terminate a transaction. Refer to LOCK [lock(7)] for further information about locking tables inside a transaction. If you turn autocommit mode off, then BEGIN is not required: any SQL command automatically starts a transaction. USAGE
To begin a user transaction: BEGIN WORK; COMPATIBILITY
SQL92 BEGIN is a PostgreSQL language extension. There is no explicit BEGIN command in SQL92; transaction initiation is always implicit and it terminates either with a COMMIT or ROLLBACK statement. Note: Many relational database systems offer an autocommit feature as a convenience. Incidentally, the BEGIN keyword is used for a different purpose in embedded SQL. You are advised to be careful about the transaction seman- tics when porting database applications. SQL92 also requires SERIALIZABLE to be the default transaction isolation level. SQL - Language Statements 2002-11-22 BEGIN(7)
All times are GMT -4. The time now is 02:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy