4 messages in com.mysql.lists.mysqlRe: AUTOCOMMIT. displaying and setting| From | Sent On | Attachments |
|---|---|---|
| Amit Dor-Shifer | 21 Nov 2006 03:10 | |
| Visolve DB Team | 21 Nov 2006 20:26 | |
| Amit Dor-Shifer | 21 Nov 2006 21:29 | |
| Visolve DB Team | 21 Nov 2006 23:08 |
| Subject: | Re: AUTOCOMMIT. displaying and setting![]() |
|---|---|
| From: | Visolve DB Team (mysq...@visolve.com) |
| Date: | 11/21/2006 08:26:36 PM |
| List: | com.mysql.lists.mysql |
There is no global system variable to set Autocommit; but we can achieve the same with 'init_connect=SET AUTOCOMMIT=0'. This variable can be set from the mysql or in the commandline or in the option file. Like, mysql > SET GLOBAL init_connect='SET AUTOCOMMIT=0'; or mysql>SET @@GLOBAL.init_connect='SET AUTOCOMMIT=0';
or in the option file [mysqld] init_connect='set AUTOCOMMIT=0' or shell> mysqld --init_connect='set AUTOCOMMIT=0' By default AUTOCOMMIT is enabled. ie set to 1. If set to 0, then disabled. check with 2 connections; try inserting or updating in one connection; check in the other with select.
This variable was added in MySQL 4.1.2.
----- Original Message ----- From: "Amit Dor-Shifer" <ami...@oversi.com> To: <mys...@lists.mysql.com> Sent: Tuesday, November 21, 2006 4:41 PM Subject: AUTOCOMMIT. displaying and setting
Hi.
I'm puzzled rgd. a/m. Is AUTOCOMMIT a variable? If so, is it a session variable? Should it show up when issuing a "SHOW VARIABLES" command?
How do I set this variable when initalizing a jdbc connection? Can I pass it on the connection URL? Can someone present a code line for this?
How do I set this variable for an interactive console session? Can i do this from the command line? When I attempt this I get: # mysql -p --autocommit=0; mysql: unknown variable 'autocommit=0'
Thanks, Amit
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=mysq...@visolve.com




