I'm writing a term paper that demonstrates Oracle 11g's bells and whistles and I'm having a hard time demonstrating locking. I'm trying to show that "dirty reads" can be prevented with session isolation levels but my sample code seems to allow them but my 2nd SELECT seems to see my INSERTed row even with the SERIALIZABLE isolation level:
/* --------------- */
ALTER SESSION SET ISOLATION_LEVEL=SERIALIZABLE;
set transaction name 'gen_trx';
select count(*) from genres;
-- 135
insert into genres
VALUES (60,'Bar');
select count(*) from genres;
-- 136
COMMIT;
select count(*) from genres;
-- 136
What am I missing here?