-
Is oracle 10g insert with select atomic?
We have a table T with columns A and B with a composite unique constraint on the columns A and B.
Now I insert records into the table T using the following single statement in one session -
insert into T values (
(select a, b from dual)
union
(select c, d from dual)
union
(select e, f from dual))
and in another session I fire -
insert into T values (
(select e, f from dual)
union
(select a, b from dual)
)
My expectation is since there is a composite unique constraint, insert statement in one session will wait
since there is a common subset.
There is clearly a chance of deadlock, in the case, the multiple row inserts using a single insert statement is non atomic.
By atomic, I mean all rows get inserted by this single insert statement at one shot.
What I observe is, with the real dataset, a deadlock "is" occuring -
question is whether that is the expected behavior from Oracle 10G or a bug?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|