SQLite

Check-in [503ba172e4]
Login

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

Overview
Comment:Avoid unnecessary calls to sqlite3GetCollSeq() for a small performance gain.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 503ba172e4c32e288abf006fc5cb53fd2b0313c4ee4c526c2d9c4c21b7178f2d
User & Date: drh 2017-07-06 02:49:26.430
Context
2017-07-06
03:06
Small size reduction in findCollSeqEntry(). (check-in: 55ecd30304 user: drh tags: trunk)
02:49
Avoid unnecessary calls to sqlite3GetCollSeq() for a small performance gain. (check-in: 503ba172e4 user: drh tags: trunk)
01:28
Slightly more compact implementation of the byte-code generator for the COMMIT and ROLLBACK commands. (check-in: 4da663d986 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/callback.c.
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
**
** If required, this routine calls the 'collation needed' callback to
** request a definition of the collating sequence. If this doesn't work, 
** an equivalent collating sequence that uses a text encoding different
** from the main database is substituted, if one is available.
*/
int sqlite3CheckCollSeq(Parse *pParse, CollSeq *pColl){
  if( pColl ){
    const char *zName = pColl->zName;
    sqlite3 *db = pParse->db;
    CollSeq *p = sqlite3GetCollSeq(pParse, ENC(db), pColl, zName);
    if( !p ){
      return SQLITE_ERROR;
    }
    assert( p==pColl );







|







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
**
** If required, this routine calls the 'collation needed' callback to
** request a definition of the collating sequence. If this doesn't work, 
** an equivalent collating sequence that uses a text encoding different
** from the main database is substituted, if one is available.
*/
int sqlite3CheckCollSeq(Parse *pParse, CollSeq *pColl){
  if( pColl && pColl->xCmp==0 ){
    const char *zName = pColl->zName;
    sqlite3 *db = pParse->db;
    CollSeq *p = sqlite3GetCollSeq(pParse, ENC(db), pColl, zName);
    if( !p ){
      return SQLITE_ERROR;
    }
    assert( p==pColl );