/ Check-in [3576973f]
Login

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

Overview
Comment:Fix the error message generator for illegal token errors so that it does not leak memory if it immediately follows another erroneous SQL statement.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3576973f8b88b6109fbefdebfa53468ffa137009
User & Date: drh 2015-04-15 07:57:27
Context
2015-04-15
08:20
Fix a problem causing an assert() to fail if a snippet containing 0 tokens was requested from fts3. check-in: eafd0a1e user: dan tags: trunk
07:57
Fix the error message generator for illegal token errors so that it does not leak memory if it immediately follows another erroneous SQL statement. check-in: 3576973f user: drh tags: trunk
07:34
Remove an incorrect ALWAYS() from the automatic index generator. check-in: eeb4bd06 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/tokenize.c.

426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
          sqlite3ErrorMsg(pParse, "interrupt");
          pParse->rc = SQLITE_INTERRUPT;
          goto abort_parse;
        }
        break;
      }
      case TK_ILLEGAL: {
        sqlite3DbFree(db, *pzErrMsg);
        *pzErrMsg = sqlite3MPrintf(db, "unrecognized token: \"%T\"",
                        &pParse->sLastToken);
        nErr++;
        goto abort_parse;
      }
      case TK_SEMI: {
        pParse->zTail = &zSql[i];
        /* Fall thru into the default case */
      }
      default: {







<
|

<







426
427
428
429
430
431
432

433
434

435
436
437
438
439
440
441
          sqlite3ErrorMsg(pParse, "interrupt");
          pParse->rc = SQLITE_INTERRUPT;
          goto abort_parse;
        }
        break;
      }
      case TK_ILLEGAL: {

        sqlite3ErrorMsg(pParse, "unrecognized token: \"%T\"",
                        &pParse->sLastToken);

        goto abort_parse;
      }
      case TK_SEMI: {
        pParse->zTail = &zSql[i];
        /* Fall thru into the default case */
      }
      default: {