Fossil SCM
Fix comment and error-message
Commit
9a07b24935c6c4bda2c5a63b00a466a60563b711
Parent
0134654db60898d…
1 file changed
+3
-2
+3
-2
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -236,16 +236,17 @@ | ||
| 236 | 236 | const char *zTail; |
| 237 | 237 | sqlite3_stmt *pStmt; |
| 238 | 238 | int rc; |
| 239 | 239 | |
| 240 | 240 | /* First make sure the SQL is a single query command by verifying that |
| 241 | - ** the first token is "SELECT" and that there are no unquoted semicolons. | |
| 241 | + ** the first token is "SELECT" or "WITH" and that there are no unquoted | |
| 242 | + ** semicolons. | |
| 242 | 243 | */ |
| 243 | 244 | for(i=0; fossil_isspace(zSql[i]); i++){} |
| 244 | 245 | if( fossil_strnicmp(&zSql[i], "select", 6)!=0 |
| 245 | 246 | && fossil_strnicmp(&zSql[i], "with", 4)!=0 ){ |
| 246 | - return mprintf("The SQL must be a SELECT statement"); | |
| 247 | + return mprintf("The SQL must be a SELECT or WITH statement"); | |
| 247 | 248 | } |
| 248 | 249 | for(i=0; zSql[i]; i++){ |
| 249 | 250 | if( zSql[i]==';' ){ |
| 250 | 251 | int bad; |
| 251 | 252 | int c = zSql[i+1]; |
| 252 | 253 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -236,16 +236,17 @@ | |
| 236 | const char *zTail; |
| 237 | sqlite3_stmt *pStmt; |
| 238 | int rc; |
| 239 | |
| 240 | /* First make sure the SQL is a single query command by verifying that |
| 241 | ** the first token is "SELECT" and that there are no unquoted semicolons. |
| 242 | */ |
| 243 | for(i=0; fossil_isspace(zSql[i]); i++){} |
| 244 | if( fossil_strnicmp(&zSql[i], "select", 6)!=0 |
| 245 | && fossil_strnicmp(&zSql[i], "with", 4)!=0 ){ |
| 246 | return mprintf("The SQL must be a SELECT statement"); |
| 247 | } |
| 248 | for(i=0; zSql[i]; i++){ |
| 249 | if( zSql[i]==';' ){ |
| 250 | int bad; |
| 251 | int c = zSql[i+1]; |
| 252 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -236,16 +236,17 @@ | |
| 236 | const char *zTail; |
| 237 | sqlite3_stmt *pStmt; |
| 238 | int rc; |
| 239 | |
| 240 | /* First make sure the SQL is a single query command by verifying that |
| 241 | ** the first token is "SELECT" or "WITH" and that there are no unquoted |
| 242 | ** semicolons. |
| 243 | */ |
| 244 | for(i=0; fossil_isspace(zSql[i]); i++){} |
| 245 | if( fossil_strnicmp(&zSql[i], "select", 6)!=0 |
| 246 | && fossil_strnicmp(&zSql[i], "with", 4)!=0 ){ |
| 247 | return mprintf("The SQL must be a SELECT or WITH statement"); |
| 248 | } |
| 249 | for(i=0; zSql[i]; i++){ |
| 250 | if( zSql[i]==';' ){ |
| 251 | int bad; |
| 252 | int c = zSql[i+1]; |
| 253 |