George,

the default in MySQL is

set autocommit = 1;

To be able to do rollbacks you have to execute

set autocommit = 0;

Then you can do

insert into ...;

rollback;

I assume you specified in CREATE TABLE ... (...) TYPE=INNODB?

Regards,

Heikki


Copied message:
.............
Hello everybody !

I'm doing some evaluating on MySQL using InnoDB tables (I need
transactions).

However, I failed admirably in trying to do a "rollback".
I read in the InnoDB manual that several statements (like ALTER,
CREATE, ...) cause an implicit COMMIT,
but it seems like it is doing the same when I do a simple operationlike:
INSERT INTO USR (LOGNAME, PASSWORD, NAME, LASTNAME, EMAIL, CREATED,
CHANGED, STATUS, COUNTRYCODE, PHONETYPEID, LANGUAGECODE)
VALUES ('suop', 'xxxxx', 'SuOp', 'SuperOperator',
'[EMAIL PROTECTED]', sysdate(), sysdate(), 'A', 'DE', '1','en');
I am not able to do a rollback on this operation.

Has someone a clue why ? 

Obviously I'm missing an important part in
the installation / configuration, but I don't have any idea (as the
saying goes: I don't see the tree because of the forest).
Any comments ? 

Thanks - and be kind to each other ;)


---------------------------------------------------------------------
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