/ Check-in [fea7ade6]
Login

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

Overview
Comment:Improved context for error_log message coming from sqlite3_prepare().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fea7ade649ae72303078782f7bc510e0a17f082ffde10e769f1aeb1cf37b5554
User & Date: drh 2018-06-21 23:53:54
Context
2018-06-30
20:15
Merge implementation of SQL window functions from the exp-window-functions into trunk. check-in: 17198a12 user: dan tags: trunk
2018-06-26
20:19
Merge latest trunk changes. check-in: d9f814b4 user: dan tags: exp-window-functions
2018-06-21
23:53
Improved context for error_log message coming from sqlite3_prepare(). check-in: fea7ade6 user: drh tags: trunk
23:43
Improved context for error_log message coming from sqlite3_prepare(). Leaf check-in: 64df1189 user: drh tags: ieee754
2018-06-19
11:15
Minor change to the input grammar to make the parser tables slightly smaller. check-in: 320fa69e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/tokenize.c.

   545    545         sqlite3Parser(pEngine, tokenType, pParse->sLastToken);
   546    546         lastTokenParsed = tokenType;
   547    547         zSql += n;
   548    548         if( pParse->rc!=SQLITE_OK || db->mallocFailed ) break;
   549    549       }
   550    550     }
   551    551     assert( nErr==0 );
   552         -  pParse->zTail = zSql;
   553    552   #ifdef YYTRACKMAXSTACKDEPTH
   554    553     sqlite3_mutex_enter(sqlite3MallocMutex());
   555    554     sqlite3StatusHighwater(SQLITE_STATUS_PARSER_STACK,
   556    555         sqlite3ParserStackPeak(pEngine)
   557    556     );
   558    557     sqlite3_mutex_leave(sqlite3MallocMutex());
   559    558   #endif /* YYDEBUG */
................................................................................
   567    566     }
   568    567     if( pParse->rc!=SQLITE_OK && pParse->rc!=SQLITE_DONE && pParse->zErrMsg==0 ){
   569    568       pParse->zErrMsg = sqlite3MPrintf(db, "%s", sqlite3ErrStr(pParse->rc));
   570    569     }
   571    570     assert( pzErrMsg!=0 );
   572    571     if( pParse->zErrMsg ){
   573    572       *pzErrMsg = pParse->zErrMsg;
   574         -    sqlite3_log(pParse->rc, "%s", *pzErrMsg);
          573  +    sqlite3_log(pParse->rc, "%s in \"%s\"", 
          574  +                *pzErrMsg, pParse->zTail);
   575    575       pParse->zErrMsg = 0;
   576    576       nErr++;
   577    577     }
          578  +  pParse->zTail = zSql;
   578    579     if( pParse->pVdbe && pParse->nErr>0 && pParse->nested==0 ){
   579    580       sqlite3VdbeDelete(pParse->pVdbe);
   580    581       pParse->pVdbe = 0;
   581    582     }
   582    583   #ifndef SQLITE_OMIT_SHARED_CACHE
   583    584     if( pParse->nested==0 ){
   584    585       sqlite3DbFree(db, pParse->aTableLock);