|Subject||Re: [Firebird-Architect] the insert into t select * from t infinite loop|
> > Could we find a fix for that problem by identifying statements thatNo, there are one more problem - INSERT provided by Ann in the
> > might be susceptible - including obscurities like:
> > insert into t select * from a
> > where a.t_val in (select t_val from t)
> > and checking somewhere that the input values aren't dependent on a
> > record that's listed in the verb undo log?
> This doesn't fix this problem:
> TableX x
> x.ID IN (SELECT FIRST 5 y.ID FROM TableY)
> Which is the same problem IMO.
subject will loop infinite since SELECT can see new inserted records
and never stops.
As i understand - Ann proposed to check current savepoint in undo
log for records found by SELECT - i.e. SELECT will see "prior version"
of found on disk record. For INSERT there will be no such "prior version"
in current verb so SELECT can stop.