/ Check-in [7d2b80c7]
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:When checking indices for xfer compatibility, compare collating sequences by string, not by pointer. (CVS 6590)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7d2b80c7addc2d03d49647da9c6df9113f01349d
User & Date: drh 2009-05-02 00:28:20
Context
2009-05-02
07:36
Do not reset the cursor before seeking it in sqlite3BtreeInsert(). This speeds up INSERT operations that use auto-generated rowid values. (CVS 6591) check-in: 20c4acc2 user: danielk1977 tags: trunk
00:28
When checking indices for xfer compatibility, compare collating sequences by string, not by pointer. (CVS 6590) check-in: 7d2b80c7 user: drh tags: trunk
2009-05-01
21:13
Record within the Token structure itself whether or not the token has been dequoted. This steals one bit from the length of a token and thus limits the size of tokens to 1GiB. (CVS 6589) check-in: 12bcb03d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/insert.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains C code routines that are called by the parser
    13     13   ** to handle INSERT statements in SQLite.
    14     14   **
    15         -** $Id: insert.c,v 1.263 2009/05/01 15:17:48 drh Exp $
           15  +** $Id: insert.c,v 1.264 2009/05/02 00:28:20 drh Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   /*
    20     20   ** Generate code that will open a table for reading.
    21     21   */
    22     22   void sqlite3OpenTable(
................................................................................
  1485   1485     for(i=0; i<pSrc->nColumn; i++){
  1486   1486       if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){
  1487   1487         return 0;   /* Different columns indexed */
  1488   1488       }
  1489   1489       if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){
  1490   1490         return 0;   /* Different sort orders */
  1491   1491       }
  1492         -    if( pSrc->azColl[i]!=pDest->azColl[i] ){
         1492  +    if( !xferCompatibleCollation(pSrc->azColl[i],pDest->azColl[i]) ){
  1493   1493         return 0;   /* Different collating sequences */
  1494   1494       }
  1495   1495     }
  1496   1496   
  1497   1497     /* If no test above fails then the indices must be compatible */
  1498   1498     return 1;
  1499   1499   }