Hi -- 

I am trying to understand txns under INNODB.
I'm running 4.0.16-nt-log.
Here's my test code, all run in one MySQLYog window.


-- step 1 
use scratch;
-- drop table foo;
-- create table foo (x int);
truncate table scratch.foo; 

-- step 2
use scratch;
set autocommit=1;

-- step 3
begin work;  -- start TXN

-- step 4
insert into scratch.foo (x) values (2);

-- step 5
select * from scratch.foo;

-- step 6
commit;

-- step 7
select * from scratch.foo;

Step 4 does not insert a row.  Why not?
I would have thought it would, though the
row would be invisible to other cxns until Step 6.  
Even after the txn finishes, the row is still 
not there in Step 7.

If I remove the 'begin work', the row goes in immediately,
of course, but then there is no txn.

Advice very much welcomed!!

Thanks

TO






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to