[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r1687152 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/upgrade.c subversion/libsvn_wc/wc-metadata.sql subversion/libsvn_wc/wc_db.c subversion/libsvn_wc/wc_db.h

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 22 Jul 2015 16:35:53 +0200

> -----Original Message-----
> From: Philip Martin [mailto:philip.martin_at_wandisco.com]
> Sent: dinsdag 21 juli 2015 19:40
> To: Ivan Zhakov <ivan_at_visualsvn.com>
> Cc: dev_at_subversion.apache.org
> Subject: Re: svn commit: r1687152 - in /subversion/branches/1.7.x: ./
STATUS
> subversion/libsvn_wc/upgrade.c subversion/libsvn_wc/wc-metadata.sql
> subversion/libsvn_wc/wc_db.c subversion/libsvn_wc/wc_db.h
>
> Ivan Zhakov <ivan_at_visualsvn.com> writes:
>
> > On 24 June 2015 at 07:00, <svn-role_at_apache.org> wrote:
> >> Author: svn-role
> >> Date: Wed Jun 24 04:00:31 2015
> >> New Revision: 1687152
> >>
> >> URL: http://svn.apache.org/r1687152
> >> Log:
> >> Merge the 1.7.x-r1542765 branch:
> >>
> >> * r1542765, r1571214
> >> Add Sqlite index information.
> >> Justification:
> >> Adding this information explains to Sqlite how we use our indexes.
While
> >> Subversion 1.7 doesn't depend on this as much as 1.8 as we didn't
tune
> the
> >> queries as much at that time, this information will make several
queries
> >> use indexes instead of table scans.
> >> Branch:
> >> ^/subversion/branches/1.7.x-r1542765
> >> Votes:
> >> +1: rhuijben, stefan2, brane
> >>
> > I'm getting a lot of test failures like this:
> > [[[
> > CMD: C:\Ivan\SVN\test\subversion\svn\svn.exe delete
> > svn-test-work\working_copies\update_tests-49.wc2\A --config-dir
> > C:\Ivan\SVN\test\subversion\tests\cmdline\svn-test-work\local_tmp\config
> > --password rayjandom --no-auth-cache --username jrandom exited with 1
> > <TIME = 0.035000>
> > C:\Ivan\SVN\1.7.x\subversion\svn\delete-cmd.c:92: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\svn\util.c:913: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_client\delete.c:461:
(apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_wc\adm_ops.c:678: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_wc\adm_ops.c:678: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_wc\adm_ops.c:678: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_wc\wc_db.c:2578: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_wc\wc_db.c:2578: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_subr\sqlite.c:1135: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_subr\sqlite.c:1135: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_wc\wc_db.c:6277: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_wc\wc_db.c:6277: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_subr\sqlite.c:225: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_subr\sqlite.c:209: (apr_err=200035)
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_subr\sqlite.c:245: (apr_err=200035)
> > svn: E200035: sqlite: constraint failed
> > C:\Ivan\SVN\1.7.x\subversion\libsvn_subr\sqlite.c:575: (apr_err=200035)
> > svn: E200035: sqlite: WC DB validity check 03 failed
> > ]]]
> >
> > But all tests pass if I revert this revision.
> >
> > I'm using sqlite 3.7.5, Windows 8.1 x64.
>
> That only occurs in an SVN_DEBUG build. I can reproduce the problem
> with 3.7.5 on Linux but not with 3.8.7.1. It's
> STMT_INSERT_DELETE_FROM_NODE_RECURSIVE that is triggering the
> problem
> and r1567080 does say that that stmt does violate the verification
> triggers. r1567080 doesn't apply directly to 1.7.x but patching like so
> works:
>
> Index: subversion/libsvn_wc/wc-queries.sql
> ================================================================
> ===
> --- subversion/libsvn_wc/wc-queries.sql (revision 1692140)
> +++ subversion/libsvn_wc/wc-queries.sql (working copy)
> @@ -818,6 +818,7 @@ WHERE wc_id = ?1
> OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
> AND op_depth = ?3
> AND presence NOT IN ('base-deleted', 'not-present', 'excluded',
'absent')
> +ORDER BY local_relpath
>
> -- STMT_INSERT_WORKING_NODE_FROM_BASE_COPY
> INSERT INTO nodes (

Yes this is the right fix for that problem.

While the code that processes this query result doesn't rely on the ordering
of the result, the maintainer mode checks do rely on that ordering.

This fix (r1567080) is part of a batch of fixes that I found by asking
Sqlite to return result rows backwards in all cases where queries didn't ask
for an explicit ordering. (Now triggered by setting
SVN_SQLITE_REVERSE_UNORDERED_SELECTS during compilation of libsvn_subr; but
I don't think that support was already available in 1.7)

        Bert
Received on 2015-07-22 16:37:59 CEST

This is an archived mail posted to the Subversion Dev mailing list.