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

Re: svn commit: r1080489 - /subversion/trunk/subversion/libsvn_wc/wc-metadata.sql

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 11 Mar 2011 06:05:40 -0500

This is a great simplification, but it makes me wonder... how did that
original version even get conceived?
On Mar 11, 2011 3:53 AM, <julianfoad_at_apache.org> wrote:
> Author: julianfoad
> Date: Fri Mar 11 08:53:14 2011
> New Revision: 1080489
>
> URL: http://svn.apache.org/viewvc?rev=1080489&view=rev
> Log:
> Simplify a SQL view statement in the WC DB. The WC format is not being
> bumped: This is a non-functional change so WCs that already have the old
> version of the statement can continue to have it.
>
> * subversion/libsvn_wc/wc-metadata.sql
> (NODES_BASE, STMT_UPGRADE_TO_26): Simplify this view statement.
> (end of file): Document that old WCs may still have the old version.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
> URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-metadata.sql?rev=1080489&r1=1080488&r2=1080489&view=diff
>
==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Fri Mar 11
08:53:14 2011
> @@ -499,15 +499,9 @@ CREATE VIEW NODES_CURRENT AS
> /* Many queries have to filter the nodes table to pick only that version
> of each node with the base (least "current") op_depth. This view
> does the heavy lifting for such queries. */
> -/* ### The JOIN may be redundant. Maybe we only need
> - "SELECT * FROM nodes WHERE op_depth = 0;". */
> CREATE VIEW NODES_BASE AS
> SELECT * FROM nodes
> - JOIN (SELECT wc_id, local_relpath FROM nodes
> - GROUP BY wc_id, local_relpath) AS filter
> - ON nodes.wc_id = filter.wc_id
> - AND nodes.local_relpath = filter.local_relpath
> - AND nodes.op_depth = 0;
> + WHERE op_depth = 0;
>
> -- STMT_CREATE_NODES_TRIGGERS
>
> @@ -644,11 +638,7 @@ PRAGMA user_version = 25;
> DROP VIEW IF EXISTS NODES_BASE;
> CREATE VIEW NODES_BASE AS
> SELECT * FROM nodes
> - JOIN (SELECT wc_id, local_relpath FROM nodes
> - GROUP BY wc_id, local_relpath) AS filter
> - ON nodes.wc_id = filter.wc_id
> - AND nodes.local_relpath = filter.local_relpath
> - AND nodes.op_depth = 0;
> + WHERE op_depth = 0;
>
> PRAGMA user_version = 26;
>
> @@ -722,5 +712,10 @@ DROP TABLE ACTUAL_NODE_BACKUP;
> * While format 23 was current, "REFERENCES PRISTINE" was added to the
> * columns ACTUAL_NODE.older_checksum, ACTUAL_NODE.left_checksum,
> * ACTUAL_NODE.right_checksum, NODES.checksum.
> + *
> + * The "NODES_BASE" view was originally implemented with a more complex
(but
> + * functionally equivalent) statement using a 'JOIN'. WCs that were
created
> + * at or upgraded to format 26 before it was changed will still have the
old
> + * version.
> */
>
>
>
Received on 2011-03-11 12:06:15 CET

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.