Re: svn commit: r1129818 - /subversion/trunk/subversion/libsvn_wc/wc-checks.sql
Johan Corveleyn <jcorvel_at_gmail.com> writes:
>> @@ -54,10 +54,9 @@ CREATE TEMPORARY TRIGGER validation_03 B
>> WHEN NOT (
>> (new.op_depth = relpath_depth(new.local_relpath))
>> - ((SELECT COUNT(*) FROM nodes
>> - WHERE wc_id = new.wc_id AND op_depth = new.op_depth
>> - AND local_relpath = new.parent_relpath
>> - LIMIT 2) == 1)
>> + (EXISTS (SELECT 1 FROM nodes
>> + WHERE wc_id = new.wc_id AND op_depth = new.op_depth
>> + AND local_relpath = new.parent_relpath))
>> SELECT RAISE(FAIL, 'WC DB validity check 03 failed');
> I don't know the context, but are you sure this is a non-functional change?
> The SELECT COUNT you removed checked for == 1. The EXISTS allows for
>>= 1. So if there are 2 such nodes, the condition you removed would
> have been false, but the one you put in place would be true.
(wc_id, op_depth, local_relpath) is the primary key so the count can
only be zero or one.
Received on 2011-05-31 21:36:04 CEST
This is an archived mail posted to the Subversion Dev