On 21 July 2015 at 20:39, Philip Martin <philip.mar...@wandisco.com> wrote: > Ivan Zhakov <i...@visualsvn.com> writes: > >> On 24 June 2015 at 07:00, <svn-r...@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 ( >
Hi Philip, Your patch fixes test failures in maintainer build for me. But r1567080 has other changes in STMT_INSERT_DELETE_FROM_NODE_RECURSIVE query. Do we need them in 1.7.x branch? Also comment for STMT_INSERT_DELETE_FROM_NODE_RECURSIVE query says that STMT_INSERT_DELETE_LIST query also should be updates for any modification of recursive query. Index: subversion/libsvn_wc/wc-queries.sql =================================================================== --- subversion/libsvn_wc/wc-queries.sql (revision 1692272) +++ subversion/libsvn_wc/wc-queries.sql (working copy) @@ -818,6 +818,7 @@ 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 ( @@ -1213,6 +1214,7 @@ AND op_depth = (SELECT MAX(op_depth) FROM nodes s WHERE s.wc_id = n.wc_id AND s.local_relpath = n.local_relpath) +ORDER BY local_relpath -- STMT_SELECT_DELETE_LIST SELECT local_relpath FROM delete_list -- Ivan Zhakov