aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_wc/wc-queries.h
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_wc/wc-queries.h')
-rw-r--r--subversion/libsvn_wc/wc-queries.h191
1 files changed, 102 insertions, 89 deletions
diff --git a/subversion/libsvn_wc/wc-queries.h b/subversion/libsvn_wc/wc-queries.h
index 2508bcf256e2..50a1d9770dbf 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.10/subversion/libsvn_wc/token-map.h.
+/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.14/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
@@ -2172,9 +2172,16 @@
" AND (inherited_props not null) " \
""
-#define STMT_CREATE_SCHEMA 207
-#define STMT_207_INFO {"STMT_CREATE_SCHEMA", NULL}
+#define STMT_HAVE_STAT1_TABLE 207
+#define STMT_207_INFO {"STMT_HAVE_STAT1_TABLE", NULL}
#define STMT_207 \
+ "SELECT 1 FROM sqlite_master WHERE name='sqlite_stat1' AND type='table' " \
+ "LIMIT 1 " \
+ ""
+
+#define STMT_CREATE_SCHEMA 208
+#define STMT_208_INFO {"STMT_CREATE_SCHEMA", NULL}
+#define STMT_208 \
"CREATE TABLE REPOSITORY ( " \
" id INTEGER PRIMARY KEY AUTOINCREMENT, " \
" root TEXT UNIQUE NOT NULL, " \
@@ -2239,9 +2246,9 @@
"; " \
""
-#define STMT_CREATE_NODES 208
-#define STMT_208_INFO {"STMT_CREATE_NODES", NULL}
-#define STMT_208 \
+#define STMT_CREATE_NODES 209
+#define STMT_209_INFO {"STMT_CREATE_NODES", NULL}
+#define STMT_209 \
"CREATE TABLE NODES ( " \
" wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \
" local_relpath TEXT NOT NULL, " \
@@ -2281,9 +2288,9 @@
" WHERE op_depth = 0; " \
""
-#define STMT_CREATE_NODES_TRIGGERS 209
-#define STMT_209_INFO {"STMT_CREATE_NODES_TRIGGERS", NULL}
-#define STMT_209 \
+#define STMT_CREATE_NODES_TRIGGERS 210
+#define STMT_210_INFO {"STMT_CREATE_NODES_TRIGGERS", NULL}
+#define STMT_210 \
"CREATE TRIGGER nodes_insert_trigger " \
"AFTER INSERT ON nodes " \
"WHEN NEW.checksum IS NOT NULL " \
@@ -2309,9 +2316,9 @@
"END; " \
""
-#define STMT_CREATE_EXTERNALS 210
-#define STMT_210_INFO {"STMT_CREATE_EXTERNALS", NULL}
-#define STMT_210 \
+#define STMT_CREATE_EXTERNALS 211
+#define STMT_211_INFO {"STMT_CREATE_EXTERNALS", NULL}
+#define STMT_211 \
"CREATE TABLE EXTERNALS ( " \
" wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \
" local_relpath TEXT NOT NULL, " \
@@ -2330,32 +2337,36 @@
" local_relpath); " \
""
-#define STMT_INSTALL_SCHEMA_STATISTICS 211
-#define STMT_211_INFO {"STMT_INSTALL_SCHEMA_STATISTICS", NULL}
-#define STMT_211 \
+#define STMT_INSTALL_SCHEMA_STATISTICS 212
+#define STMT_212_INFO {"STMT_INSTALL_SCHEMA_STATISTICS", NULL}
+#define STMT_212 \
"ANALYZE sqlite_master; " \
"DELETE FROM sqlite_stat1 " \
- "WHERE tbl in ('NODES', 'ACTUAL_NODE', 'LOCK', 'WC_LOCK'); " \
- "INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES " \
+ "WHERE tbl in ('NODES', 'ACTUAL_NODE', 'LOCK', 'WC_LOCK', 'EXTERNALS'); " \
+ "INSERT 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 " \
+ "INSERT 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 " \
+ "INSERT 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 " \
+ "INSERT 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 " \
+ "INSERT 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 " \
+ "INSERT 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 " \
+ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \
" ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1', '100 100 1'); " \
+ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \
+ " ('EXTERNALS','sqlite_autoindex_EXTERNALS_1', '100 100 1'); " \
+ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \
+ " ('EXTERNALS','I_EXTERNALS_DEFINED', '100 100 3 1'); " \
"ANALYZE sqlite_master; " \
""
-#define STMT_UPGRADE_TO_20 212
-#define STMT_212_INFO {"STMT_UPGRADE_TO_20", NULL}
-#define STMT_212 \
+#define STMT_UPGRADE_TO_20 213
+#define STMT_213_INFO {"STMT_UPGRADE_TO_20", NULL}
+#define STMT_213 \
"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); " \
@@ -2396,59 +2407,59 @@
"PRAGMA user_version = 20; " \
""
-#define STMT_UPGRADE_TO_21 213
-#define STMT_213_INFO {"STMT_UPGRADE_TO_21", NULL}
-#define STMT_213 \
+#define STMT_UPGRADE_TO_21 214
+#define STMT_214_INFO {"STMT_UPGRADE_TO_21", NULL}
+#define STMT_214 \
"PRAGMA user_version = 21; " \
""
-#define STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT 214
-#define STMT_214_INFO {"STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT", NULL}
-#define STMT_214 \
+#define STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT 215
+#define STMT_215_INFO {"STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT", NULL}
+#define STMT_215 \
"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 215
-#define STMT_215_INFO {"STMT_UPGRADE_21_ERASE_OLD_CONFLICTS", NULL}
-#define STMT_215 \
+#define STMT_UPGRADE_21_ERASE_OLD_CONFLICTS 216
+#define STMT_216_INFO {"STMT_UPGRADE_21_ERASE_OLD_CONFLICTS", NULL}
+#define STMT_216 \
"UPDATE actual_node SET tree_conflict_data = NULL " \
""
-#define STMT_UPGRADE_TO_22 216
-#define STMT_216_INFO {"STMT_UPGRADE_TO_22", NULL}
-#define STMT_216 \
+#define STMT_UPGRADE_TO_22 217
+#define STMT_217_INFO {"STMT_UPGRADE_TO_22", NULL}
+#define STMT_217 \
"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 217
-#define STMT_217_INFO {"STMT_UPGRADE_TO_23", NULL}
-#define STMT_217 \
+#define STMT_UPGRADE_TO_23 218
+#define STMT_218_INFO {"STMT_UPGRADE_TO_23", NULL}
+#define STMT_218 \
"PRAGMA user_version = 23; " \
""
-#define STMT_UPGRADE_23_HAS_WORKING_NODES 218
-#define STMT_218_INFO {"STMT_UPGRADE_23_HAS_WORKING_NODES", NULL}
-#define STMT_218 \
+#define STMT_UPGRADE_23_HAS_WORKING_NODES 219
+#define STMT_219_INFO {"STMT_UPGRADE_23_HAS_WORKING_NODES", NULL}
+#define STMT_219 \
"SELECT 1 FROM nodes WHERE op_depth > 0 " \
"LIMIT 1 " \
""
-#define STMT_UPGRADE_TO_24 219
-#define STMT_219_INFO {"STMT_UPGRADE_TO_24", NULL}
-#define STMT_219 \
+#define STMT_UPGRADE_TO_24 220
+#define STMT_220_INFO {"STMT_UPGRADE_TO_24", NULL}
+#define STMT_220 \
"UPDATE pristine SET refcount = " \
" (SELECT COUNT(*) FROM nodes " \
" WHERE checksum = pristine.checksum ); " \
"PRAGMA user_version = 24; " \
""
-#define STMT_UPGRADE_TO_25 220
-#define STMT_220_INFO {"STMT_UPGRADE_TO_25", NULL}
-#define STMT_220 \
+#define STMT_UPGRADE_TO_25 221
+#define STMT_221_INFO {"STMT_UPGRADE_TO_25", NULL}
+#define STMT_221 \
"DROP VIEW IF EXISTS NODES_CURRENT; " \
"CREATE VIEW NODES_CURRENT AS " \
" SELECT * FROM nodes " \
@@ -2460,9 +2471,9 @@
"PRAGMA user_version = 25; " \
""
-#define STMT_UPGRADE_TO_26 221
-#define STMT_221_INFO {"STMT_UPGRADE_TO_26", NULL}
-#define STMT_221 \
+#define STMT_UPGRADE_TO_26 222
+#define STMT_222_INFO {"STMT_UPGRADE_TO_26", NULL}
+#define STMT_222 \
"DROP VIEW IF EXISTS NODES_BASE; " \
"CREATE VIEW NODES_BASE AS " \
" SELECT * FROM nodes " \
@@ -2470,15 +2481,15 @@
"PRAGMA user_version = 26; " \
""
-#define STMT_UPGRADE_TO_27 222
-#define STMT_222_INFO {"STMT_UPGRADE_TO_27", NULL}
-#define STMT_222 \
+#define STMT_UPGRADE_TO_27 223
+#define STMT_223_INFO {"STMT_UPGRADE_TO_27", NULL}
+#define STMT_223 \
"PRAGMA user_version = 27; " \
""
-#define STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS 223
-#define STMT_223_INFO {"STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS", NULL}
-#define STMT_223 \
+#define STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS 224
+#define STMT_224_INFO {"STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS", NULL}
+#define STMT_224 \
"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) " \
@@ -2486,18 +2497,18 @@
"LIMIT 1 " \
""
-#define STMT_UPGRADE_TO_28 224
-#define STMT_224_INFO {"STMT_UPGRADE_TO_28", NULL}
-#define STMT_224 \
+#define STMT_UPGRADE_TO_28 225
+#define STMT_225_INFO {"STMT_UPGRADE_TO_28", NULL}
+#define STMT_225 \
"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 225
-#define STMT_225_INFO {"STMT_UPGRADE_TO_29", NULL}
-#define STMT_225 \
+#define STMT_UPGRADE_TO_29 226
+#define STMT_226_INFO {"STMT_UPGRADE_TO_29", NULL}
+#define STMT_226 \
"DROP TRIGGER IF EXISTS nodes_update_checksum_trigger; " \
"DROP TRIGGER IF EXISTS nodes_insert_trigger; " \
"DROP TRIGGER IF EXISTS nodes_delete_trigger; " \
@@ -2527,9 +2538,9 @@
"PRAGMA user_version = 29; " \
""
-#define STMT_UPGRADE_TO_30 226
-#define STMT_226_INFO {"STMT_UPGRADE_TO_30", NULL}
-#define STMT_226 \
+#define STMT_UPGRADE_TO_30 227
+#define STMT_227_INFO {"STMT_UPGRADE_TO_30", NULL}
+#define STMT_227 \
"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); " \
@@ -2537,9 +2548,9 @@
"UPDATE nodes SET file_external=1 WHERE file_external IS NOT NULL; " \
""
-#define STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE 227
-#define STMT_227_INFO {"STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE", NULL}
-#define STMT_227 \
+#define STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE 228
+#define STMT_228_INFO {"STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE", NULL}
+#define STMT_228 \
"SELECT wc_id, local_relpath, " \
" conflict_old, conflict_working, conflict_new, prop_reject, tree_conflict_data " \
"FROM actual_node " \
@@ -2551,24 +2562,24 @@
"ORDER by wc_id, local_relpath " \
""
-#define STMT_UPGRADE_30_SET_CONFLICT 228
-#define STMT_228_INFO {"STMT_UPGRADE_30_SET_CONFLICT", NULL}
-#define STMT_228 \
+#define STMT_UPGRADE_30_SET_CONFLICT 229
+#define STMT_229_INFO {"STMT_UPGRADE_30_SET_CONFLICT", NULL}
+#define STMT_229 \
"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 229
-#define STMT_229_INFO {"STMT_UPGRADE_TO_31_ALTER_TABLE", NULL}
-#define STMT_229 \
+#define STMT_UPGRADE_TO_31_ALTER_TABLE 230
+#define STMT_230_INFO {"STMT_UPGRADE_TO_31_ALTER_TABLE", NULL}
+#define STMT_230 \
"ALTER TABLE NODES ADD COLUMN inherited_props BLOB; " \
""
-#define STMT_UPGRADE_TO_31_FINALIZE 230
-#define STMT_230_INFO {"STMT_UPGRADE_TO_31_FINALIZE", NULL}
-#define STMT_230 \
+#define STMT_UPGRADE_TO_31_FINALIZE 231
+#define STMT_231_INFO {"STMT_UPGRADE_TO_31_FINALIZE", NULL}
+#define STMT_231 \
"DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST; " \
"DROP INDEX IF EXISTS I_EXTERNALS_PARENT; " \
"DROP INDEX I_NODES_PARENT; " \
@@ -2580,9 +2591,9 @@
"PRAGMA user_version = 31; " \
""
-#define STMT_UPGRADE_31_SELECT_WCROOT_NODES 231
-#define STMT_231_INFO {"STMT_UPGRADE_31_SELECT_WCROOT_NODES", NULL}
-#define STMT_231 \
+#define STMT_UPGRADE_31_SELECT_WCROOT_NODES 232
+#define STMT_232_INFO {"STMT_UPGRADE_31_SELECT_WCROOT_NODES", NULL}
+#define STMT_232 \
"SELECT l.wc_id, l.local_relpath FROM nodes as l " \
"LEFT OUTER JOIN nodes as r " \
"ON l.wc_id = r.wc_id " \
@@ -2594,9 +2605,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 232
-#define STMT_232_INFO {"STMT_UPGRADE_TO_32", NULL}
-#define STMT_232 \
+#define STMT_UPGRADE_TO_32 233
+#define STMT_233_INFO {"STMT_UPGRADE_TO_32", NULL}
+#define STMT_233 \
"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); " \
@@ -2649,9 +2660,9 @@
"DROP TABLE ACTUAL_NODE_BACKUP; " \
""
-#define STMT_VERIFICATION_TRIGGERS 233
-#define STMT_233_INFO {"STMT_VERIFICATION_TRIGGERS", NULL}
-#define STMT_233 \
+#define STMT_VERIFICATION_TRIGGERS 234
+#define STMT_234_INFO {"STMT_VERIFICATION_TRIGGERS", NULL}
+#define STMT_234 \
"CREATE TEMPORARY TRIGGER no_repository_updates BEFORE UPDATE ON repository " \
"BEGIN " \
" SELECT RAISE(FAIL, 'Updates to REPOSITORY are not allowed.'); " \
@@ -2926,6 +2937,7 @@
STMT_231, \
STMT_232, \
STMT_233, \
+ STMT_234, \
NULL \
}
@@ -3165,5 +3177,6 @@
STMT_231_INFO, \
STMT_232_INFO, \
STMT_233_INFO, \
+ STMT_234_INFO, \
{NULL, NULL} \
}