Bernard,
you could look at the source code of
the mysql client. I think it is written
in C or C++, and should show how you get
the C API working.
Unfortunately there is no global command
to set all sessions to autocommit = 0.
There has been discussion of adding such
an option.
Regards,
Heikki
http://www.innodb.com
>Hello,
>I am using Innobase with MySql version 3.23.39 under Linux
>and want to run WITHOUT autocommit mode
>(<= autocommit=0 for using commit/roolback instructions)
>I have made a test whith 2 INTERACTIVE MySql sessions and this works fine.
>BUT, when I use the C API (mysql_real_query), it DOESN't work.
>I mean the autocommit=0 is NOT taken in account//------ My C code looks like :
>// set autocommit = 0
>mysql_real_query(connection, "set autocommit = 0", the_length );// begin
>mysql_real_query(connection, "begin", the_length );// insert
>mysql_real_query(connection, "insert into ....", the_length );
>// NO commit is DONE, for test purpose//----- END of My C code
>When I check the table, in an interaction session, my insertion is available!
>I mean a request like 'select... ' show the NEW insertion !
>Why ? NO commit has been DONE!
>I have made several other try, like reading a config file
>(and a 'set-variable = autocommit=0' in it)But the probleme doesn't change
>Furthermore,the server has a global transaction-isolation option set to
serializable.
>We tried to force the autocommit=0 through an init-file.
>The problem is still there !
>The autocommit option seems to be an session command.
>Is there any way to set it for the whole server ?Thank you for your help
>Sincerely.-- Bernard CHAMBONIN2P3 / CNRS (Centre de Calcul de LYON)
>Tél : 04 72 69 42 18 http://www.in2p3.fr/CC
---------------------------------------------------------------------
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