Your mysql create table statement was defaulting to MyISAM engine which is non-transactional so the behavior you describe is normal.
The 'start transaction', 'begin work', and 'rollback work' have no effect and deliver this error:
'Some non-transactional changed tables couldn't be rolled back'
Details here:
http://dev.mysql.com/doc/refman/5.0/en/non-transactional-tables.html
Try running this instead:
--drop table stock;
CREATE TABLE stock (mykey SERIAL) engine = InnoDB;
begin work;
insert into stock (mykey) values (125);
rollback;
--commit;
select * from stock;
--there should be no rows in the stock table because though you added a row, it rolled back. These commands will tell you what mysql engines are available and what engine your table has:
show engines;
show table status like "stock";