/ Check-in [3f3b0f68]
Login

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

Overview
Comment:Remove unnecessary parser error count increments. Let the sqlite3ErrorMsg() take care of doing that.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3f3b0f683af2fbee83811536f6bef770ff919385
User & Date: drh 2015-04-17 18:22:53
Context
2015-04-17
18:52
Always resolve symbols in all ORDER BY clauses of a compound-SELECT, even illegal ORDER BY clauses. check-in: 6c39ef73 user: drh tags: trunk
18:22
Remove unnecessary parser error count increments. Let the sqlite3ErrorMsg() take care of doing that. check-in: 3f3b0f68 user: drh tags: trunk
16:12
Remove an ALWAYS() that turns out to be false when there is a semantic error on a compound SELECT. check-in: ad67a67c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/attach.c.

   328    328     sName.pParse = pParse;
   329    329   
   330    330     if( 
   331    331         SQLITE_OK!=(rc = resolveAttachExpr(&sName, pFilename)) ||
   332    332         SQLITE_OK!=(rc = resolveAttachExpr(&sName, pDbname)) ||
   333    333         SQLITE_OK!=(rc = resolveAttachExpr(&sName, pKey))
   334    334     ){
   335         -    pParse->nErr++;
   336    335       goto attach_end;
   337    336     }
   338    337   
   339    338   #ifndef SQLITE_OMIT_AUTHORIZATION
   340    339     if( pAuthArg ){
   341    340       char *zAuthArg;
   342    341       if( pAuthArg->op==TK_STRING ){

Changes to src/build.c.

   759    759   ){
   760    760     int iDb;                    /* Database holding the object */
   761    761     sqlite3 *db = pParse->db;
   762    762   
   763    763     if( ALWAYS(pName2!=0) && pName2->n>0 ){
   764    764       if( db->init.busy ) {
   765    765         sqlite3ErrorMsg(pParse, "corrupt database");
   766         -      pParse->nErr++;
   767    766         return -1;
   768    767       }
   769    768       *pUnqual = pName2;
   770    769       iDb = sqlite3FindDb(db, pName1);
   771    770       if( iDb<0 ){
   772    771         sqlite3ErrorMsg(pParse, "unknown database %T", pName1);
   773         -      pParse->nErr++;
   774    772         return -1;
   775    773       }
   776    774     }else{
   777    775       assert( db->init.iDb==0 || db->init.busy );
   778    776       iDb = db->init.iDb;
   779    777       *pUnqual = pName1;
   780    778     }

Changes to src/trigger.c.

   189    189       }
   190    190       goto trigger_cleanup;
   191    191     }
   192    192   
   193    193     /* Do not create a trigger on a system table */
   194    194     if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
   195    195       sqlite3ErrorMsg(pParse, "cannot create trigger on system table");
   196         -    pParse->nErr++;
   197    196       goto trigger_cleanup;
   198    197     }
   199    198   
   200    199     /* INSTEAD of triggers are only for views and views only support INSTEAD
   201    200     ** of triggers.
   202    201     */
   203    202     if( pTab->pSelect && tr_tm!=TK_INSTEAD ){

Changes to test/table.test.

   267    267       DROP TABLE IF EXISTS sqlite_stat1;
   268    268       DROP TABLE IF EXISTS sqlite_stat2;
   269    269       DROP TABLE IF EXISTS sqlite_stat3;
   270    270       DROP TABLE IF EXISTS sqlite_stat4;
   271    271       SELECT name FROM sqlite_master WHERE name GLOB 'sqlite_stat*';
   272    272     }
   273    273   } {}
          274  +
          275  +do_test table-5.2.2 {
          276  +  db close
          277  +  forcedelete test.db
          278  +  sqlite3 db test.db
          279  +  db eval {
          280  +    CREATE TABLE t0(a,b);
          281  +    CREATE INDEX t ON t0(a);
          282  +    PRAGMA writable_schema=ON;
          283  +    UPDATE sqlite_master SET sql='CREATE TABLE a.b(a UNIQUE';
          284  +    BEGIN;
          285  +    CREATE TABLE t1(x);
          286  +    ROLLBACK;
          287  +    DROP TABLE IF EXISTS t99;
          288  +  }
          289  +} {}
          290  +db close
          291  +forcedelete test.db
          292  +sqlite3 db test.db
   274    293   
   275    294   # Make sure an EXPLAIN does not really create a new table
   276    295   #
   277    296   do_test table-5.3 {
   278    297     ifcapable {explain} {
   279    298       execsql {EXPLAIN CREATE TABLE test1(f1 int)}
   280    299     }