diff options
Diffstat (limited to 'subversion/libsvn_wc/wc-queries.h')
-rw-r--r-- | subversion/libsvn_wc/wc-queries.h | 162 |
1 files changed, 95 insertions, 67 deletions
diff --git a/subversion/libsvn_wc/wc-queries.h b/subversion/libsvn_wc/wc-queries.h index edcf81e..0246ee5 100644 --- a/subversion/libsvn_wc/wc-queries.h +++ b/subversion/libsvn_wc/wc-queries.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.5/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.8/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_SELECT_NODE_INFO 0 @@ -1991,10 +1991,15 @@ #define STMT_190_INFO {"STMT_SELECT_MOVED_PAIR3", NULL} #define STMT_190 \ "SELECT local_relpath, moved_to, op_depth, kind FROM nodes " \ + "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3 " \ + " AND moved_to IS NOT NULL " \ + "UNION ALL " \ + "SELECT local_relpath, moved_to, op_depth, kind FROM nodes " \ "WHERE wc_id = ?1 " \ - " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ + " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ " AND op_depth > ?3 " \ " AND moved_to IS NOT NULL " \ + "ORDER BY local_relpath, op_depth " \ "" #define STMT_SELECT_MOVED_OUTSIDE 191 @@ -2299,9 +2304,30 @@ " local_relpath); " \ "" -#define STMT_UPGRADE_TO_20 209 -#define STMT_209_INFO {"STMT_UPGRADE_TO_20", NULL} +#define STMT_INSTALL_SCHEMA_STATISTICS 209 +#define STMT_209_INFO {"STMT_INSTALL_SCHEMA_STATISTICS", NULL} #define STMT_209 \ + "ANALYZE sqlite_master; " \ + "INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES " \ + " ('NODES', 'sqlite_autoindex_NODES_1', '8000 8000 2 1'); " \ + "INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES " \ + " ('NODES', 'I_NODES_PARENT', '8000 8000 10 2 1'); " \ + "INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES " \ + " ('NODES', 'I_NODES_MOVED', '8000 8000 1 1'); " \ + "INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES " \ + " ('ACTUAL_NODE', 'sqlite_autoindex_ACTUAL_NODE_1', '8000 8000 1'); " \ + "INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES " \ + " ('ACTUAL_NODE', 'I_ACTUAL_PARENT', '8000 8000 10 1'); " \ + "INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES " \ + " ('LOCK', 'sqlite_autoindex_LOCK_1', '100 100 1'); " \ + "INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES " \ + " ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1', '100 100 1'); " \ + "ANALYZE sqlite_master; " \ + "" + +#define STMT_UPGRADE_TO_20 210 +#define STMT_210_INFO {"STMT_UPGRADE_TO_20", NULL} +#define STMT_210 \ "UPDATE BASE_NODE SET checksum = (SELECT checksum FROM pristine " \ " WHERE md5_checksum = BASE_NODE.checksum) " \ "WHERE EXISTS (SELECT 1 FROM pristine WHERE md5_checksum = BASE_NODE.checksum); " \ @@ -2342,59 +2368,59 @@ "PRAGMA user_version = 20; " \ "" -#define STMT_UPGRADE_TO_21 210 -#define STMT_210_INFO {"STMT_UPGRADE_TO_21", NULL} -#define STMT_210 \ +#define STMT_UPGRADE_TO_21 211 +#define STMT_211_INFO {"STMT_UPGRADE_TO_21", NULL} +#define STMT_211 \ "PRAGMA user_version = 21; " \ "" -#define STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT 211 -#define STMT_211_INFO {"STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT", NULL} -#define STMT_211 \ +#define STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT 212 +#define STMT_212_INFO {"STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT", NULL} +#define STMT_212 \ "SELECT wc_id, local_relpath, tree_conflict_data " \ "FROM actual_node " \ "WHERE tree_conflict_data IS NOT NULL " \ "" -#define STMT_UPGRADE_21_ERASE_OLD_CONFLICTS 212 -#define STMT_212_INFO {"STMT_UPGRADE_21_ERASE_OLD_CONFLICTS", NULL} -#define STMT_212 \ +#define STMT_UPGRADE_21_ERASE_OLD_CONFLICTS 213 +#define STMT_213_INFO {"STMT_UPGRADE_21_ERASE_OLD_CONFLICTS", NULL} +#define STMT_213 \ "UPDATE actual_node SET tree_conflict_data = NULL " \ "" -#define STMT_UPGRADE_TO_22 213 -#define STMT_213_INFO {"STMT_UPGRADE_TO_22", NULL} -#define STMT_213 \ +#define STMT_UPGRADE_TO_22 214 +#define STMT_214_INFO {"STMT_UPGRADE_TO_22", NULL} +#define STMT_214 \ "UPDATE actual_node SET tree_conflict_data = conflict_data; " \ "UPDATE actual_node SET conflict_data = NULL; " \ "PRAGMA user_version = 22; " \ "" -#define STMT_UPGRADE_TO_23 214 -#define STMT_214_INFO {"STMT_UPGRADE_TO_23", NULL} -#define STMT_214 \ +#define STMT_UPGRADE_TO_23 215 +#define STMT_215_INFO {"STMT_UPGRADE_TO_23", NULL} +#define STMT_215 \ "PRAGMA user_version = 23; " \ "" -#define STMT_UPGRADE_23_HAS_WORKING_NODES 215 -#define STMT_215_INFO {"STMT_UPGRADE_23_HAS_WORKING_NODES", NULL} -#define STMT_215 \ +#define STMT_UPGRADE_23_HAS_WORKING_NODES 216 +#define STMT_216_INFO {"STMT_UPGRADE_23_HAS_WORKING_NODES", NULL} +#define STMT_216 \ "SELECT 1 FROM nodes WHERE op_depth > 0 " \ "LIMIT 1 " \ "" -#define STMT_UPGRADE_TO_24 216 -#define STMT_216_INFO {"STMT_UPGRADE_TO_24", NULL} -#define STMT_216 \ +#define STMT_UPGRADE_TO_24 217 +#define STMT_217_INFO {"STMT_UPGRADE_TO_24", NULL} +#define STMT_217 \ "UPDATE pristine SET refcount = " \ " (SELECT COUNT(*) FROM nodes " \ " WHERE checksum = pristine.checksum ); " \ "PRAGMA user_version = 24; " \ "" -#define STMT_UPGRADE_TO_25 217 -#define STMT_217_INFO {"STMT_UPGRADE_TO_25", NULL} -#define STMT_217 \ +#define STMT_UPGRADE_TO_25 218 +#define STMT_218_INFO {"STMT_UPGRADE_TO_25", NULL} +#define STMT_218 \ "DROP VIEW IF EXISTS NODES_CURRENT; " \ "CREATE VIEW NODES_CURRENT AS " \ " SELECT * FROM nodes " \ @@ -2406,9 +2432,9 @@ "PRAGMA user_version = 25; " \ "" -#define STMT_UPGRADE_TO_26 218 -#define STMT_218_INFO {"STMT_UPGRADE_TO_26", NULL} -#define STMT_218 \ +#define STMT_UPGRADE_TO_26 219 +#define STMT_219_INFO {"STMT_UPGRADE_TO_26", NULL} +#define STMT_219 \ "DROP VIEW IF EXISTS NODES_BASE; " \ "CREATE VIEW NODES_BASE AS " \ " SELECT * FROM nodes " \ @@ -2416,15 +2442,15 @@ "PRAGMA user_version = 26; " \ "" -#define STMT_UPGRADE_TO_27 219 -#define STMT_219_INFO {"STMT_UPGRADE_TO_27", NULL} -#define STMT_219 \ +#define STMT_UPGRADE_TO_27 220 +#define STMT_220_INFO {"STMT_UPGRADE_TO_27", NULL} +#define STMT_220 \ "PRAGMA user_version = 27; " \ "" -#define STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS 220 -#define STMT_220_INFO {"STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS", NULL} -#define STMT_220 \ +#define STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS 221 +#define STMT_221_INFO {"STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS", NULL} +#define STMT_221 \ "SELECT 1 FROM actual_node " \ "WHERE NOT ((prop_reject IS NULL) AND (conflict_old IS NULL) " \ " AND (conflict_new IS NULL) AND (conflict_working IS NULL) " \ @@ -2432,18 +2458,18 @@ "LIMIT 1 " \ "" -#define STMT_UPGRADE_TO_28 221 -#define STMT_221_INFO {"STMT_UPGRADE_TO_28", NULL} -#define STMT_221 \ +#define STMT_UPGRADE_TO_28 222 +#define STMT_222_INFO {"STMT_UPGRADE_TO_28", NULL} +#define STMT_222 \ "UPDATE NODES SET checksum = (SELECT checksum FROM pristine " \ " WHERE md5_checksum = nodes.checksum) " \ "WHERE EXISTS (SELECT 1 FROM pristine WHERE md5_checksum = nodes.checksum); " \ "PRAGMA user_version = 28; " \ "" -#define STMT_UPGRADE_TO_29 222 -#define STMT_222_INFO {"STMT_UPGRADE_TO_29", NULL} -#define STMT_222 \ +#define STMT_UPGRADE_TO_29 223 +#define STMT_223_INFO {"STMT_UPGRADE_TO_29", NULL} +#define STMT_223 \ "DROP TRIGGER IF EXISTS nodes_update_checksum_trigger; " \ "DROP TRIGGER IF EXISTS nodes_insert_trigger; " \ "DROP TRIGGER IF EXISTS nodes_delete_trigger; " \ @@ -2473,9 +2499,9 @@ "PRAGMA user_version = 29; " \ "" -#define STMT_UPGRADE_TO_30 223 -#define STMT_223_INFO {"STMT_UPGRADE_TO_30", NULL} -#define STMT_223 \ +#define STMT_UPGRADE_TO_30 224 +#define STMT_224_INFO {"STMT_UPGRADE_TO_30", NULL} +#define STMT_224 \ "CREATE UNIQUE INDEX IF NOT EXISTS I_NODES_MOVED " \ "ON NODES (wc_id, moved_to, op_depth); " \ "CREATE INDEX IF NOT EXISTS I_PRISTINE_MD5 ON PRISTINE (md5_checksum); " \ @@ -2483,9 +2509,9 @@ "UPDATE nodes SET file_external=1 WHERE file_external IS NOT NULL; " \ "" -#define STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE 224 -#define STMT_224_INFO {"STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE", NULL} -#define STMT_224 \ +#define STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE 225 +#define STMT_225_INFO {"STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE", NULL} +#define STMT_225 \ "SELECT wc_id, local_relpath, " \ " conflict_old, conflict_working, conflict_new, prop_reject, tree_conflict_data " \ "FROM actual_node " \ @@ -2497,24 +2523,24 @@ "ORDER by wc_id, local_relpath " \ "" -#define STMT_UPGRADE_30_SET_CONFLICT 225 -#define STMT_225_INFO {"STMT_UPGRADE_30_SET_CONFLICT", NULL} -#define STMT_225 \ +#define STMT_UPGRADE_30_SET_CONFLICT 226 +#define STMT_226_INFO {"STMT_UPGRADE_30_SET_CONFLICT", NULL} +#define STMT_226 \ "UPDATE actual_node SET conflict_data = ?3, conflict_old = NULL, " \ " conflict_working = NULL, conflict_new = NULL, prop_reject = NULL, " \ " tree_conflict_data = NULL " \ "WHERE wc_id = ?1 and local_relpath = ?2 " \ "" -#define STMT_UPGRADE_TO_31_ALTER_TABLE 226 -#define STMT_226_INFO {"STMT_UPGRADE_TO_31_ALTER_TABLE", NULL} -#define STMT_226 \ +#define STMT_UPGRADE_TO_31_ALTER_TABLE 227 +#define STMT_227_INFO {"STMT_UPGRADE_TO_31_ALTER_TABLE", NULL} +#define STMT_227 \ "ALTER TABLE NODES ADD COLUMN inherited_props BLOB; " \ "" -#define STMT_UPGRADE_TO_31_FINALIZE 227 -#define STMT_227_INFO {"STMT_UPGRADE_TO_31_FINALIZE", NULL} -#define STMT_227 \ +#define STMT_UPGRADE_TO_31_FINALIZE 228 +#define STMT_228_INFO {"STMT_UPGRADE_TO_31_FINALIZE", NULL} +#define STMT_228 \ "DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST; " \ "DROP INDEX IF EXISTS I_EXTERNALS_PARENT; " \ "DROP INDEX I_NODES_PARENT; " \ @@ -2526,9 +2552,9 @@ "PRAGMA user_version = 31; " \ "" -#define STMT_UPGRADE_31_SELECT_WCROOT_NODES 228 -#define STMT_228_INFO {"STMT_UPGRADE_31_SELECT_WCROOT_NODES", NULL} -#define STMT_228 \ +#define STMT_UPGRADE_31_SELECT_WCROOT_NODES 229 +#define STMT_229_INFO {"STMT_UPGRADE_31_SELECT_WCROOT_NODES", NULL} +#define STMT_229 \ "SELECT l.wc_id, l.local_relpath FROM nodes as l " \ "LEFT OUTER JOIN nodes as r " \ "ON l.wc_id = r.wc_id " \ @@ -2540,9 +2566,9 @@ " OR (l.repos_path IS NOT (CASE WHEN (r.local_relpath) = '' THEN (CASE WHEN (r.repos_path) = '' THEN (l.local_relpath) WHEN (l.local_relpath) = '' THEN (r.repos_path) ELSE (r.repos_path) || '/' || (l.local_relpath) END) WHEN (r.repos_path) = '' THEN (CASE WHEN (r.local_relpath) = '' THEN (l.local_relpath) WHEN SUBSTR((l.local_relpath), 1, LENGTH(r.local_relpath)) = (r.local_relpath) THEN CASE WHEN LENGTH(r.local_relpath) = LENGTH(l.local_relpath) THEN '' WHEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1, 1) = '/' THEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+2) END END) WHEN SUBSTR((l.local_relpath), 1, LENGTH(r.local_relpath)) = (r.local_relpath) THEN CASE WHEN LENGTH(r.local_relpath) = LENGTH(l.local_relpath) THEN (r.repos_path) WHEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1, 1) = '/' THEN (r.repos_path) || SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1) END END))) " \ "" -#define STMT_UPGRADE_TO_32 229 -#define STMT_229_INFO {"STMT_UPGRADE_TO_32", NULL} -#define STMT_229 \ +#define STMT_UPGRADE_TO_32 230 +#define STMT_230_INFO {"STMT_UPGRADE_TO_32", NULL} +#define STMT_230 \ "DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST; " \ "DROP INDEX IF EXISTS I_EXTERNALS_PARENT; " \ "CREATE INDEX I_EXTERNALS_PARENT ON EXTERNALS (wc_id, parent_relpath); " \ @@ -2595,9 +2621,9 @@ "DROP TABLE ACTUAL_NODE_BACKUP; " \ "" -#define STMT_VERIFICATION_TRIGGERS 230 -#define STMT_230_INFO {"STMT_VERIFICATION_TRIGGERS", NULL} -#define STMT_230 \ +#define STMT_VERIFICATION_TRIGGERS 231 +#define STMT_231_INFO {"STMT_VERIFICATION_TRIGGERS", NULL} +#define STMT_231 \ "CREATE TEMPORARY TRIGGER no_repository_updates BEFORE UPDATE ON repository " \ "BEGIN " \ " SELECT RAISE(FAIL, 'Updates to REPOSITORY are not allowed.'); " \ @@ -2869,6 +2895,7 @@ STMT_228, \ STMT_229, \ STMT_230, \ + STMT_231, \ NULL \ } @@ -3105,5 +3132,6 @@ STMT_228_INFO, \ STMT_229_INFO, \ STMT_230_INFO, \ + STMT_231_INFO, \ {NULL, NULL} \ } |