Fix the version detection logic -- on older sqlite installs, it would create the database. Factored out our open() logic so that we can use a mode==readonly (ie. the database must exist, and we'll just read it).
Fix the version detection logic -- on older sqlite installs, it would
create the database. Factored out our open() logic so that we can use a
mode==readonly (ie. the database must exist, and we'll just read it).

For older sqlite installs, changed the error return from
SVN_ERR_WC_CORRUPT to APR_ENOENT. The sqlite database might have nothing
to do with a working copy.

* subversion/libsvn_subr/sqlite.c:
  (internal_open): new function, factored out of svn_sqlite__open()
  (svn_sqlite__get_schema_version): switch to internal_open, open the
    database readonly, and require its presence.
  (svn_sqlite__open): use new internal_open function.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@875998 13f79535-47bb-0310-9956-ffa450edef68

wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion