SQLite

Check-in [81baf67c44]
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
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.596
Context
2017-11-01
19:30
Fix the SQLITE_NoopUpdate #define so that it occurs under the correct conditions. (check-in: bdf791f9f7 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: 81baf67c44 user: drh tags: begin-concurrent-pnu)
2017-09-12
20:09
Add the highly-experimental "PRAGMA noop_update=TRUE" command. (check-in: afe45271b9 user: drh tags: begin-concurrent-pnu)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/pragma.h.
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
  /* ePragFlg:  */ PragFlg_Result0,
  /* ColNames:  */ 31, 1,
  /* iArg:      */ 0 },
#endif
#endif
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if defined(SQLITE_DEBUG)
 {/* zName:     */ "noop_update",
  /* ePragTyp:  */ PragTyp_FLAG,
  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,
  /* ColNames:  */ 0, 0,
  /* iArg:      */ SQLITE_NoopUpdate },
#endif
#endif







|







438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
  /* ePragFlg:  */ PragFlg_Result0,
  /* ColNames:  */ 31, 1,
  /* iArg:      */ 0 },
#endif
#endif
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if defined(SQLITE_ENABLE_NOOP_UPDATE)
 {/* zName:     */ "noop_update",
  /* ePragTyp:  */ PragTyp_FLAG,
  /* ePragFlg:  */ PragFlg_Result0|PragFlg_NoColumns1,
  /* ColNames:  */ 0, 0,
  /* iArg:      */ SQLITE_NoopUpdate },
#endif
#endif
Changes to src/update.c.
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
  ** of the UPDATE statement.  Also find the column index
  ** for each column to be updated in the pChanges array.  For each
  ** column to be updated, make sure we have authorization to change
  ** that column.
  */
  chngRowid = chngPk = 0;
  for(i=0; i<pChanges->nExpr; i++){
#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_FLAG_PRAGMAS)
    if( db->flags & SQLITE_NoopUpdate ){
      Token x;
      sqlite3ExprDelete(db, pChanges->a[i].pExpr);
      x.z = pChanges->a[i].zName;
      x.n = sqlite3Strlen30(x.z);
      pChanges->a[i].pExpr =
         sqlite3PExpr(pParse, TK_UPLUS, sqlite3ExprAlloc(db, TK_ID, &x, 0), 0);







|







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

  NAME: noop_update
  TYPE: FLAG
  ARG:  SQLITE_NoopUpdate
  IF:   !defined(SQLITE_OMIT_FLAG_PRAGMAS)
  IF:   defined(SQLITE_DEBUG)

  NAME: ignore_check_constraints
  TYPE: FLAG
  ARG:  SQLITE_IgnoreChecks
  IF:   !defined(SQLITE_OMIT_FLAG_PRAGMAS)
  IF:   !defined(SQLITE_OMIT_CHECK)








|







112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
  IF:   !defined(SQLITE_OMIT_FLAG_PRAGMAS)
  IF:   defined(SQLITE_DEBUG)

  NAME: noop_update
  TYPE: FLAG
  ARG:  SQLITE_NoopUpdate
  IF:   !defined(SQLITE_OMIT_FLAG_PRAGMAS)
  IF:   defined(SQLITE_ENABLE_NOOP_UPDATE)

  NAME: ignore_check_constraints
  TYPE: FLAG
  ARG:  SQLITE_IgnoreChecks
  IF:   !defined(SQLITE_OMIT_FLAG_PRAGMAS)
  IF:   !defined(SQLITE_OMIT_CHECK)