Fossil SCM

Correct SQL syntax error on "fossil changes -merge" which is not supposed to display any files yet still tries to run the file query even though it says only "ORDER BY pathname" with no SELECT

andygoth 2016-11-06 23:40 UTC andygoth-changes
Commit 61da77525f0a1e3cc2e99d0eb0730b414cad3cca
1 file changed +6
--- src/checkin.c
+++ src/checkin.c
@@ -119,10 +119,15 @@
119119
int nErr = 0;
120120
Blob rewrittenPathname;
121121
Blob sql = BLOB_INITIALIZER, where = BLOB_INITIALIZER;
122122
const char *zName;
123123
int i;
124
+
125
+ /* Skip the file report if no files are requested at all. */
126
+ if( !(flags & (C_ALL | C_EXTRA)) ){
127
+ goto skipFiles;
128
+ }
124129
125130
/* Assemble the path-limiting WHERE clause, if any. */
126131
blob_zero(&where);
127132
for(i=2; i<g.argc; i++){
128133
Blob fname;
@@ -293,10 +298,11 @@
293298
}
294299
blob_reset(&rewrittenPathname);
295300
db_finalize(&q);
296301
297302
/* If C_MERGE, put merge contributors at the end of the report. */
303
+skipFiles:
298304
if( flags & C_MERGE ){
299305
db_prepare(&q, "SELECT uuid, id FROM vmerge JOIN blob ON merge=rid"
300306
" WHERE id<=0");
301307
while( db_step(&q)==SQLITE_ROW ){
302308
if( flags & C_COMMENT ){
303309
--- src/checkin.c
+++ src/checkin.c
@@ -119,10 +119,15 @@
119 int nErr = 0;
120 Blob rewrittenPathname;
121 Blob sql = BLOB_INITIALIZER, where = BLOB_INITIALIZER;
122 const char *zName;
123 int i;
 
 
 
 
 
124
125 /* Assemble the path-limiting WHERE clause, if any. */
126 blob_zero(&where);
127 for(i=2; i<g.argc; i++){
128 Blob fname;
@@ -293,10 +298,11 @@
293 }
294 blob_reset(&rewrittenPathname);
295 db_finalize(&q);
296
297 /* If C_MERGE, put merge contributors at the end of the report. */
 
298 if( flags & C_MERGE ){
299 db_prepare(&q, "SELECT uuid, id FROM vmerge JOIN blob ON merge=rid"
300 " WHERE id<=0");
301 while( db_step(&q)==SQLITE_ROW ){
302 if( flags & C_COMMENT ){
303
--- src/checkin.c
+++ src/checkin.c
@@ -119,10 +119,15 @@
119 int nErr = 0;
120 Blob rewrittenPathname;
121 Blob sql = BLOB_INITIALIZER, where = BLOB_INITIALIZER;
122 const char *zName;
123 int i;
124
125 /* Skip the file report if no files are requested at all. */
126 if( !(flags & (C_ALL | C_EXTRA)) ){
127 goto skipFiles;
128 }
129
130 /* Assemble the path-limiting WHERE clause, if any. */
131 blob_zero(&where);
132 for(i=2; i<g.argc; i++){
133 Blob fname;
@@ -293,10 +298,11 @@
298 }
299 blob_reset(&rewrittenPathname);
300 db_finalize(&q);
301
302 /* If C_MERGE, put merge contributors at the end of the report. */
303 skipFiles:
304 if( flags & C_MERGE ){
305 db_prepare(&q, "SELECT uuid, id FROM vmerge JOIN blob ON merge=rid"
306 " WHERE id<=0");
307 while( db_step(&q)==SQLITE_ROW ){
308 if( flags & C_COMMENT ){
309

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button