Checkout
rhuijben
committed
on 05 Mar 15
Remove a db transaction on opening wc.db, and at the same time
also verify if the sqlite_stat1 table exists on opening a db
from svn_wc__db_… Show more
Remove a db transaction on opening wc.db, and at the same time

also verify if the sqlite_stat1 table exists on opening a db

from svn_wc__db_wcroot_parse_local_abspath().

If the table exists we try to add the table, but ignore

errors to avoid problems when the database is read only

(This last part will need verification on other platforms)

* subversion/libsvn_wc/wc-queries.sql

 (STMT_HAVE_STAT1_TABLE): New statement.

* subversion/libsvn_wc/wc.h

 (SVN_WC__ENSURE_STAT1_TABLE): New define.

* subversion/libsvn_wc/wc_db_wcroot.c

 (svn_wc__db_pdh_create_wcroot): Only read format from db when requested

   by caller, instead of always when we open the db.

 (verify_stats_table,

  fetch_db_info): New function.

 (svn_wc__db_wcroot_parse_local_abspath): Update caller.

Show less