Hi!

Heikki Tuuri writes:
> Jari,
> 
> I am Cc:ing this to [EMAIL PROTECTED], so that other readers can follow
> the discussion.
> 
> There is still no my.cnf option to set AUTOCOMMIT=0 globally though users
> have requested it a lot.
> 
> I think that 4.1 will support a SQL script which is automatically executed
> for all new connections. That is naturally the most versatile method of
> session initialization.
> 
> Then you could write the SQL command SET AUTOCOMMIT=0 to that script. I am
> Cc:ing this to the MySQL AB developer who is responsible for global
> variables. He can inform us of the status of 4.1.

Some news:

- AUTOCOMMIT will become a global option in 4.0 and 4.1 within one
  month. Right now it is only available in session mode.
  
- The automatically executed SQL script option will appear in 4.1
  within two months.

- mysql client will soon (~ within two weeks) accept
  --init-command=... option, which can be used in this case too.
  Example: mysql --init-command="SET AUTOCOMMIT=0".
  This will be available in 4.1

However, you can probably already do this in your client;

just tell your client to read options additionally from a special
group, for example [my_group]. A Perl client could do it like this
for example:

$dbh= DBI->connect("DBI:mysql:test" .
                   ";mysql_read_default_file=/path/to/my/defaut/options/file" .
                   ";mysql_read_default_group=my_group")

In file '/path/to/my/defaut/options/file', within the group [my_group],
add this:

----------------------------------------------------------------------
[my_group]
init-command=SET AUTOCOMMIT=0
----------------------------------------------------------------------

This will execute the above command every time your client connects,
or reconnects to server.

Search documentation about 'mysql_options()' C API function for more
details.

> If the 4.1 SQL script method will be delayed, then I have to consider adding
> a new option
> 
> autocommit=0

Regards,

- Jani

For technical support contracts, visit https://order.mysql.com/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Jani Tolonen <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
       <___/   www.mysql.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to