/ Check-in [81baf67c]
Login

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

Overview
Comment:The "PRAGMA noop_update" command now requires SQLITE_ENABLE_NOOP_UPDATE and no longer requires SQLITE_DEBUG.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent-pnu
Files: files | file ages | folders
SHA3-256:81baf67c4493468e4feb2f4990bf82d59804ce4f3149252c0e1e8c43f90d6bc1
User & Date: drh 2017-11-01 18:48:54
Context
2017-11-01
19:30
Fix the SQLITE_NoopUpdate #define so that it occurs under the correct conditions. check-in: bdf791f9 user: drh tags: begin-concurrent-pnu
18:48
The "PRAGMA noop_update" command now requires SQLITE_ENABLE_NOOP_UPDATE and no longer requires SQLITE_DEBUG. check-in: 81baf67c user: drh tags: begin-concurrent-pnu
2017-09-12
20:09
Add the highly-experimental "PRAGMA noop_update=TRUE" command. check-in: afe45271 user: drh tags: begin-concurrent-pnu
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.h.

   438    438     /* ePragFlg:  */ PragFlg_Result0,
   439    439     /* ColNames:  */ 31, 1,
   440    440     /* iArg:      */ 0 },
   441    441   #endif
   442    442   #endif
   443    443   #endif
   444    444   #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
   445         -#if defined(SQLITE_DEBUG)
          445  +#if defined(SQLITE_ENABLE_NOOP_UPDATE)
   446    446    {/* zName:     */ "noop_update",
   447    447     /* ePragTyp:  */ PragTyp_FLAG,
   448    448     /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,
   449    449     /* ColNames:  */ 0, 0,
   450    450     /* iArg:      */ SQLITE_NoopUpdate },
   451    451   #endif
   452    452   #endif

Changes to src/update.c.

   219    219     ** of the UPDATE statement.  Also find the column index
   220    220     ** for each column to be updated in the pChanges array.  For each
   221    221     ** column to be updated, make sure we have authorization to change
   222    222     ** that column.
   223    223     */
   224    224     chngRowid = chngPk = 0;
   225    225     for(i=0; i<pChanges->nExpr; i++){
   226         -#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_FLAG_PRAGMAS)
          226  +#if defined(SQLITE_ENABLE_NOOP_UPDATE) && !defined(SQLITE_OMIT_FLAG_PRAGMAS)
   227    227       if( db->flags & SQLITE_NoopUpdate ){
   228    228         Token x;
   229    229         sqlite3ExprDelete(db, pChanges->a[i].pExpr);
   230    230         x.z = pChanges->a[i].zName;
   231    231         x.n = sqlite3Strlen30(x.z);
   232    232         pChanges->a[i].pExpr =
   233    233            sqlite3PExpr(pParse, TK_UPLUS, sqlite3ExprAlloc(db, TK_ID, &x, 0), 0);

Changes to tool/mkpragmatab.tcl.

   112    112     IF:   !defined(SQLITE_OMIT_FLAG_PRAGMAS)
   113    113     IF:   defined(SQLITE_DEBUG)
   114    114   
   115    115     NAME: noop_update
   116    116     TYPE: FLAG
   117    117     ARG:  SQLITE_NoopUpdate
   118    118     IF:   !defined(SQLITE_OMIT_FLAG_PRAGMAS)
   119         -  IF:   defined(SQLITE_DEBUG)
          119  +  IF:   defined(SQLITE_ENABLE_NOOP_UPDATE)
   120    120   
   121    121     NAME: ignore_check_constraints
   122    122     TYPE: FLAG
   123    123     ARG:  SQLITE_IgnoreChecks
   124    124     IF:   !defined(SQLITE_OMIT_FLAG_PRAGMAS)
   125    125     IF:   !defined(SQLITE_OMIT_CHECK)
   126    126