Transactions Not Working
Below is a test I did for transactions.
create table test_table (id tinyint unsigned auto_increment primary key, sometext varchar (20)) engine = innodb;
start transaction;
insert into test_table (sometext) values ('first text');
rollback;
start transaction;
insert into test_table (sometext) values ('second text');
commit;
select * from test_table;
As the first transaction was rolled back, 'first text' should not be in the database. However, the first insert is somehow committed and 'first text' is in the table. Am I making a mistake I cannot see?
Subject
Views
Written By
Posted
Transactions Not Working
6467
March 02, 2008 08:47PM
3245
March 02, 2008 09:18PM
2913
March 02, 2008 10:05PM
2622
June 12, 2008 07:49PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.