/ Check-in [29d6ceb3]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Avoid an unnecessary call to sqlite3XPrintf() in the code generator, for a performance improvement.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 29d6ceb3838394d902e248d1eab627625a857dccb5ed0bb66161a13fafc500c8
User & Date: drh 2017-06-28 00:55:50
Context
2017-06-28
01:12
Minor code simplification in the ALTER TABLE logic. check-in: bfc4e7f3 user: drh tags: trunk
00:55
Avoid an unnecessary call to sqlite3XPrintf() in the code generator, for a performance improvement. check-in: 29d6ceb3 user: drh tags: trunk
2017-06-27
23:36
Add SQLITE_DBCONFIG_ENABLE_QPSG that forces the query planner stability guarantee. This is the fix for ticket [b9f010107724c] check-in: b82efd2a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

  4181   4181       sqlite3XPrintf(&errMsg, "index '%q'", pIdx->zName);
  4182   4182     }else{
  4183   4183       for(j=0; j<pIdx->nKeyCol; j++){
  4184   4184         char *zCol;
  4185   4185         assert( pIdx->aiColumn[j]>=0 );
  4186   4186         zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
  4187   4187         if( j ) sqlite3StrAccumAppend(&errMsg, ", ", 2);
  4188         -      sqlite3XPrintf(&errMsg, "%s.%s", pTab->zName, zCol);
         4188  +      sqlite3StrAccumAppendAll(&errMsg, pTab->zName);
         4189  +      sqlite3StrAccumAppend(&errMsg, ".", 1);
         4190  +      sqlite3StrAccumAppendAll(&errMsg, zCol);
  4189   4191       }
  4190   4192     }
  4191   4193     zErr = sqlite3StrAccumFinish(&errMsg);
  4192   4194     sqlite3HaltConstraint(pParse, 
  4193   4195       IsPrimaryKeyIndex(pIdx) ? SQLITE_CONSTRAINT_PRIMARYKEY 
  4194   4196                               : SQLITE_CONSTRAINT_UNIQUE,
  4195   4197       onError, zErr, P4_DYNAMIC, P5_ConstraintUnique);