[prev in list] [next in list] [prev in thread] [next in thread]
List: solid
Subject: UPDATE causes ref. integrity error on existing row
From: "Jakub Dadak" <dadman () brainsys ! cz>
Date: 1999-01-23 10:46:05
[Download RAW message or body]
Hi,
i have two transactions in same time T1, T2 and
table TAB1 (int ID PK, int A, int B) thats has rows
ID A B
---------------
1 3 3
2 2 3
and table TAB2 (int ID PK, int TB1, FOREIGN KEY (TB1) REFERENCES
TAB1(ID)).
TAB2 has no rows.
T1 begins and reads from TAB1 : SELECT * FROM TAB1 WHERE ID = 1
T2 begins and updates : UPDATE TAB1 SET A = 1 WHERE ID = 1
T2 commit
T1 : INSERT INTO TAB2 VALUES (1, 1);
Now error occured - referential integrity violation.
Why ? T2 makes only UPDATE, T2 doesn't change ID (PK) of TAB1 that id
referenced from TAB2.
Thanks for any idea.
JD
--
,{(~)~(}, Dadak Jakub Brain Systems s.r.o.
,( ((~) ){){} dadman@brainsys.cz Rybkova 1
())~{)}{{}~()} http://www.brainsys.cz Brno 602 00
`~^ ^~{()} Tel. +420 5 41148704 Fax. +420 5 41148852
~~ Motto: Things are different !
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic