You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/01/06 16:17:06 UTC

svn commit: r1055908 - in /subversion/trunk/subversion/libsvn_wc: wc-metadata.sql wc-queries.sql

Author: julianfoad
Date: Thu Jan  6 15:16:41 2011
New Revision: 1055908

URL: http://svn.apache.org/viewvc?rev=1055908&view=rev
Log:
Remove unused aliases from SQLite statements, to avoid misunderstandings.
In a statement of the form

  INSERT INTO t (column1, column2, ...)
  SELECT column1, 'foo' AS column2, ... FROM ...;

it can look at first glance like "AS column2" plays a functional part in the
statement.  In fact, the first occurrence of "column2" names only a target
column in table "t"; the alias created by "AS column2" is redundant.

* subversion/libsvn_wc/wc-metadata.sql,
  subversion/libsvn_wc/wc-queries.sql
    Replace each redundant "AS xxx" with "/*xxx*/".

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
    subversion/trunk/subversion/libsvn_wc/wc-queries.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=1055908&r1=1055907&r2=1055908&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Thu Jan  6 15:16:41 2011
@@ -492,9 +492,9 @@ INSERT INTO NODES (
        changed_revision, changed_date, changed_author,
        checksum, properties, translated_size, last_mod_time,
        dav_cache, symlink_target, file_external )
-SELECT wc_id, local_relpath, 0 AS op_depth, parent_relpath,
+SELECT wc_id, local_relpath, 0 /*op_depth*/, parent_relpath,
        repos_id, repos_relpath, revnum,
-       presence, depth, NULL AS moved_here, NULL AS moved_to, kind,
+       presence, depth, NULL /*moved_here*/, NULL /*moved_to*/, kind,
        changed_rev, changed_date, changed_author,
        checksum, properties, translated_size, last_mod_time,
        dav_cache, symlink_target, file_external
@@ -506,12 +506,12 @@ INSERT INTO NODES (
        changed_revision, changed_date, changed_author,
        checksum, properties, translated_size, last_mod_time,
        dav_cache, symlink_target, file_external )
-SELECT wc_id, local_relpath, 2 AS op_depth, parent_relpath,
+SELECT wc_id, local_relpath, 2 /*op_depth*/, parent_relpath,
        copyfrom_repos_id, copyfrom_repos_path, copyfrom_revnum,
-       presence, depth, NULL AS moved_here, NULL AS moved_to, kind,
+       presence, depth, NULL /*moved_here*/, NULL /*moved_to*/, kind,
        changed_rev, changed_date, changed_author,
        checksum, properties, translated_size, last_mod_time,
-       NULL AS dav_cache, symlink_target, NULL AS file_external
+       NULL /*dav_cache*/, symlink_target, NULL /*file_external*/
 FROM WORKING_NODE;
 
 DROP TABLE BASE_NODE;

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1055908&r1=1055907&r2=1055908&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Thu Jan  6 15:16:41 2011
@@ -516,7 +516,7 @@ INSERT OR REPLACE INTO nodes (
     wc_id, local_relpath, op_depth, parent_relpath, presence, kind, checksum,
     changed_revision, changed_date, changed_author, depth, symlink_target,
     translated_size, last_mod_time, properties)
-SELECT wc_id, local_relpath, ?3 AS op_depth, parent_relpath, ?4 AS presence,
+SELECT wc_id, local_relpath, ?3 /*op_depth*/, parent_relpath, ?4 /*presence*/,
        kind, checksum, changed_revision, changed_date, changed_author, depth,
        symlink_target, translated_size, last_mod_time, properties
 FROM nodes
@@ -527,7 +527,7 @@ INSERT OR REPLACE INTO nodes (
     wc_id, local_relpath, op_depth, parent_relpath, presence, kind, checksum,
     changed_revision, changed_date, changed_author, depth, symlink_target,
     translated_size, last_mod_time, properties)
-SELECT wc_id, local_relpath, ?3 AS op_depth, parent_relpath, ?4 AS presence,
+SELECT wc_id, local_relpath, ?3 /*op_depth*/, parent_relpath, ?4 /*presence*/,
        kind, checksum, changed_revision, changed_date, changed_author, depth,
        symlink_target, translated_size, last_mod_time, properties
 FROM nodes
@@ -541,7 +541,7 @@ INSERT INTO nodes (
     revision, presence, depth, kind, changed_revision, changed_date,
     changed_author, checksum, properties, translated_size, last_mod_time,
     symlink_target )
-SELECT wc_id, local_relpath, ?3 AS op_depth, parent_relpath, repos_id,
+SELECT wc_id, local_relpath, ?3 /*op_depth*/, parent_relpath, repos_id,
     repos_path, revision, presence, depth, kind, changed_revision,
     changed_date, changed_author, checksum, properties, translated_size,
     last_mod_time, symlink_target
@@ -554,8 +554,8 @@ INSERT INTO nodes (
     revision, presence, depth, kind, changed_revision, changed_date,
     changed_author, checksum, properties, translated_size, last_mod_time,
     symlink_target )
-SELECT wc_id, local_relpath, ?3 AS op_depth, parent_relpath, repos_id,
-    repos_path, revision, ?4 AS presence, depth, kind, changed_revision,
+SELECT wc_id, local_relpath, ?3 /*op_depth*/, parent_relpath, repos_id,
+    repos_path, revision, ?4 /*presence*/, depth, kind, changed_revision,
     changed_date, changed_author, checksum, properties, translated_size,
     last_mod_time, symlink_target
 FROM nodes
@@ -607,8 +607,8 @@ INSERT OR REPLACE INTO nodes (
     repos_path, revision, presence, depth, kind, changed_revision,
     changed_date, changed_author, checksum, properties, translated_size,
     last_mod_time, symlink_target )
-SELECT wc_id, ?3 AS local_relpath, ?4 AS op_depth, ?5 AS parent_relpath,
-    ?6 AS repos_id, ?7 AS repos_path, ?8 AS revision, ?9 AS presence, depth,
+SELECT wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
+    ?6 /*repos_id*/, ?7 /*repos_path*/, ?8 /*revision*/, ?9 /*presence*/, depth,
     kind, changed_revision, changed_date, changed_author, checksum, properties,
     translated_size, last_mod_time, symlink_target
 FROM nodes
@@ -620,8 +620,8 @@ INSERT OR REPLACE INTO nodes (
     revision, presence, depth, kind, changed_revision, changed_date,
     changed_author, checksum, properties, translated_size, last_mod_time,
     symlink_target )
-SELECT wc_id, ?3 AS local_relpath, ?4 AS op_depth, ?5 AS parent_relpath,
-    ?6 AS repos_id, ?7 AS repos_path, ?8 AS revision, ?9 AS presence, depth,
+SELECT wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
+    ?6 /*repos_id*/, ?7 /*repos_path*/, ?8 /*revision*/, ?9 /*presence*/, depth,
     kind, changed_revision, changed_date, changed_author, checksum, properties,
     translated_size, last_mod_time, symlink_target
 FROM nodes
@@ -634,7 +634,7 @@ INSERT OR REPLACE INTO actual_node (
      wc_id, local_relpath, parent_relpath, properties,
      conflict_old, conflict_new, conflict_working,
      prop_reject, changelist, text_mod, tree_conflict_data )
-SELECT wc_id, ?3 AS local_relpath, ?4 AS parent_relpath, properties,
+SELECT wc_id, ?3 /*local_relpath*/, ?4 /*parent_relpath*/, properties,
      conflict_old, conflict_new, conflict_working,
      prop_reject, changelist, text_mod, tree_conflict_data
 FROM actual_node