/ Check-in [76246d9f]
Login

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

Overview
Comment:Make sure the KeyInfo object attached to a transient table used for sorting records the sqlite3 object used for memory allocation, so that memory allocation failures on UTF16 to UTF8 conversion can be recorded. (CVS 5987)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:76246d9f0d4e995f6be6fbd1fa2bcabc1b9566ae
User & Date: drh 2008-12-06 16:10:42
Context
2008-12-06
16:46
Make sure a memory allocation error did not prevent UTF16 to UTF8 conversion prior to doing a string comparison. (CVS 5988) check-in: 9d061e20 user: drh tags: trunk
16:10
Make sure the KeyInfo object attached to a transient table used for sorting records the sqlite3 object used for memory allocation, so that memory allocation failures on UTF16 to UTF8 conversion can be recorded. (CVS 5987) check-in: 76246d9f user: drh tags: trunk
14:34
Mark the hash table enlargement in pcache1.c as a benign-failure malloc. (CVS 5986) check-in: 5c0fe63a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
754
755
756
757
758
759
760

761
762
763
764
765
766
767
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.489 2008/12/05 00:00:07 drh Exp $
*/
#include "sqliteInt.h"


/*
** Delete all the content of a Select structure but do not deallocate
** the select structure itself.
................................................................................

  nExpr = pList->nExpr;
  pInfo = sqlite3DbMallocZero(db, sizeof(*pInfo) + nExpr*(sizeof(CollSeq*)+1) );
  if( pInfo ){
    pInfo->aSortOrder = (u8*)&pInfo->aColl[nExpr];
    pInfo->nField = nExpr;
    pInfo->enc = ENC(db);

    for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
      CollSeq *pColl;
      pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
      if( !pColl ){
        pColl = db->pDfltColl;
      }
      pInfo->aColl[i] = pColl;







|







 







>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.490 2008/12/06 16:10:42 drh Exp $
*/
#include "sqliteInt.h"


/*
** Delete all the content of a Select structure but do not deallocate
** the select structure itself.
................................................................................

  nExpr = pList->nExpr;
  pInfo = sqlite3DbMallocZero(db, sizeof(*pInfo) + nExpr*(sizeof(CollSeq*)+1) );
  if( pInfo ){
    pInfo->aSortOrder = (u8*)&pInfo->aColl[nExpr];
    pInfo->nField = nExpr;
    pInfo->enc = ENC(db);
    pInfo->db = db;
    for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
      CollSeq *pColl;
      pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
      if( !pColl ){
        pColl = db->pDfltColl;
      }
      pInfo->aColl[i] = pColl;