On Tue, Jul 14, 1998 at 07:14:10PM +0800, Vadim Mikheev wrote:
> Could someone run in Oracle test below?
> 1. CREATE TABLE test (x integer, y integer)
> 2. INSERT INTO test VALUES (1, 1);
> INSERT INTO test VALUES (1, 2);
> INSERT INTO test VALUES (3, 2);
> 3. run two session T1 and T2 (in read committed mode)
> 4. in session T2 run
> UPDATE test SET x = 1, y = 2 WHERE x <> 1 OR y <> 2;
> 5. in session T1 run
> UPDATE test SET y = 3 WHERE x = 1;
Blocked until 6 is executed.
> 6. in session T2 run
> COMMIT;
> 7. in session T1 run
> SELECT * FROM test; -- results?
X Y
---------- ----------
1 3
1 3
1 2
> 8. in session T1 run
> COMMIT;
> 9. now in session T2 run
> UPDATE test SET x = 2;
> 10. in session T1 run
> UPDATE test SET y = 4 WHERE x = 1;
Blocked again until after 11. Nothing is updated.
> 11. in session T2 run
> COMMIT;
> 12. in session T1 run
> SELECT * FROM test; -- results?
X Y
---------- ----------
2 3
2 3
2 2
Michael
--
Dr. Michael Meskes meskes@online-club.de, meskes@debian.org
Go SF49ers! Go Rhein Fire! Use Debian GNU/Linux!