/ Check-in [0ea05a0e]
Login

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

Overview
Comment:Window functions that can abort should indicate this, so that if they are used in DML statement, a statement journal will be used.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:0ea05a0eb96acb860d8af2e788e29a5ae3b161e7892ab62f1ff2f3e722c0dcb6
User & Date: drh 2019-01-27 02:41:34
Context
2019-01-27
02:45
New test cases form dbsqlfuzz check-in: 9cf8ebd1 user: drh tags: trunk
02:41
Window functions that can abort should indicate this, so that if they are used in DML statement, a statement journal will be used. check-in: 0ea05a0e user: drh tags: trunk
01:11
Update fuzzcheck so that with the --load-dbsql options it screens its inputs to ensure that they are valid dbsqlfuzz cases. Add new dbsqlfuzz finds to the test/fuzzdata8.db database. check-in: 004f7d9b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

   634    634     sIter.v = v;
   635    635   
   636    636     while( (pOp = opIterNext(&sIter))!=0 ){
   637    637       int opcode = pOp->opcode;
   638    638       if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename 
   639    639        || opcode==OP_VDestroy
   640    640        || ((opcode==OP_Halt || opcode==OP_HaltIfNull) 
   641         -      && ((pOp->p1&0xff)==SQLITE_CONSTRAINT && pOp->p2==OE_Abort))
          641  +      && ((pOp->p1)!=SQLITE_OK && pOp->p2==OE_Abort))
   642    642       ){
   643    643         hasAbort = 1;
   644    644         break;
   645    645       }
   646    646       if( opcode==OP_CreateBtree && pOp->p3==BTREE_INTKEY ) hasCreateTable = 1;
   647    647       if( opcode==OP_InitCoroutine ) hasInitCoroutine = 1;
   648    648   #ifndef SQLITE_OMIT_FOREIGN_KEY

Changes to src/window.c.

  1071   1071     VdbeCoverageIf(v, eCond==0);
  1072   1072     VdbeCoverageIf(v, eCond==1);
  1073   1073     VdbeCoverageIf(v, eCond==2);
  1074   1074     sqlite3VdbeAddOp3(v, aOp[eCond], regZero, sqlite3VdbeCurrentAddr(v)+2, reg);
  1075   1075     VdbeCoverageNeverNullIf(v, eCond==0);
  1076   1076     VdbeCoverageNeverNullIf(v, eCond==1);
  1077   1077     VdbeCoverageNeverNullIf(v, eCond==2);
         1078  +  sqlite3MayAbort(pParse);
  1078   1079     sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_ERROR, OE_Abort);
  1079   1080     sqlite3VdbeAppendP4(v, (void*)azErr[eCond], P4_STATIC);
  1080   1081     sqlite3ReleaseTempReg(pParse, regZero);
  1081   1082   }
  1082   1083   
  1083   1084   /*
  1084   1085   ** Return the number of arguments passed to the window-function associated