Re: PATCH][merge-tracking]Create mergeinfo.db with proper schema in case it does not exist.
From: Daniel Rall <dlr_at_collab.net>
Date: 2006-12-29 09:56:01 CET
Kamesh wrote:
> Create mergeinfo.db with the necessary schema if the db does not
I'm in favor of this concept.
> * subversion/libsvn_fs_util/merge-info-sqlite-index.c
If the DB doesn't exist, is this be sufficient to create the DB
> (svn_fs_merge_info__update_index):
> Create the default merge-tracking sqlite schema on first failure of sqlite
Since you say the same thing here, you can condense the change log by
(svn_fs_merge_info__update_index, svn_fs_merge_info__get_merge_info): ...
In this particular case, your change logs should actually have been a
Index: subversion/libsvn_fs_util/merge-info-sqlite-index.c
+/* Create the mergeinfo database with the proper schema if one already does
"is not friendly enough" "table"
+ does not exist.
"the sqlite docs, SQLITE_ERROR corresponds to "
+ Our queries will never cause SQL error, so we can assume SQLITE_ERROR to be
You hope. What if a well-meaning sysadmin modified our table
+ missing schema. Most likely caused by the newly upgraded repository created
Nice last comment.
+#define CREATE_MERGEINFO_SCHEMA(x, db) do \
"err" would be a more meaningful name than "x".
+{ \
I guess we don't need this SQL statement to succeed, if the schema
deletestring = apr_psprintf(pool,
-1 on issuing a "select 1" on this often-invoked code path.
*mergeinfo = apr_hash_make (pool);
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.