Fossil

Check-in [9a07b24935]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix comment and error-message
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9a07b24935c6c4bda2c5a63b00a466a60563b711
User & Date: jan.nijtmans 2015-01-23 14:31:24.139
Context
2015-01-23
17:13
Add new commands: test-var-list, test-var-get, and test-var-set. The original motivation was to make it easier to insert "css", "header", and "footer" values that people send in, but these commands seem useful for other kinds of experimentation. The are "test-*" commands because they are not intended to be accessed by ordinary users. check-in: 1e21daceca user: drh tags: trunk
14:31
Fix comment and error-message check-in: 9a07b24935 user: jan.nijtmans tags: trunk
14:03
Make the now() SQL function available in the "fossil sql" command. check-in: 0134654db6 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/report.c.
234
235
236
237
238
239
240
241

242
243
244
245
246
247
248
249
250
251
252
253
  int i;
  char *zErr = 0;
  const char *zTail;
  sqlite3_stmt *pStmt;
  int rc;

  /* First make sure the SQL is a single query command by verifying that
  ** the first token is "SELECT" and that there are no unquoted semicolons.

  */
  for(i=0; fossil_isspace(zSql[i]); i++){}
  if( fossil_strnicmp(&zSql[i], "select", 6)!=0
      && fossil_strnicmp(&zSql[i], "with", 4)!=0 ){
    return mprintf("The SQL must be a SELECT statement");
  }
  for(i=0; zSql[i]; i++){
    if( zSql[i]==';' ){
      int bad;
      int c = zSql[i+1];
      zSql[i+1] = 0;
      bad = sqlite3_complete(zSql);







|
>




|







234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
  int i;
  char *zErr = 0;
  const char *zTail;
  sqlite3_stmt *pStmt;
  int rc;

  /* First make sure the SQL is a single query command by verifying that
  ** the first token is "SELECT" or "WITH" and that there are no unquoted
  ** semicolons.
  */
  for(i=0; fossil_isspace(zSql[i]); i++){}
  if( fossil_strnicmp(&zSql[i], "select", 6)!=0
      && fossil_strnicmp(&zSql[i], "with", 4)!=0 ){
    return mprintf("The SQL must be a SELECT or WITH statement");
  }
  for(i=0; zSql[i]; i++){
    if( zSql[i]==';' ){
      int bad;
      int c = zSql[i+1];
      zSql[i+1] = 0;
      bad = sqlite3_complete(zSql);