You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2011/03/11 12:05:40 UTC

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

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, <ju...@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.
> */
>
>
>

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

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Mar 11, 2011 at 12:17:38PM +0100, Branko Čibej wrote:
> On 11.03.2011 12:05, Greg Stein wrote:
> > This is a great simplification, but it makes me wonder... how did that
> > original version even get conceived?
> 
> Looks like someone took a hint my NODES_CURRENT view but didn't
> understand why it was more complicated than this one. :)

Now if only we knew who this person was so we could publicly shame him!

Well, I think I know who it was... but I'm not saying... :-P

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

Posted by Branko Čibej <br...@e-reka.si>.
On 11.03.2011 12:05, Greg Stein wrote:
> This is a great simplification, but it makes me wonder... how did that
> original version even get conceived?

Looks like someone took a hint my NODES_CURRENT view but didn't
understand why it was more complicated than this one. :)

-- Brane