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" <[EMAIL PROTECTED]>
To: <mysql@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/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]