SQLite

Check-in [138783b5]
Login

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

Overview
Comment:Fix a C99-ism and a harmless compiler warning.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 138783b553602a055b3efdeac5947cf5ccd76b5d
User & Date: drh 2015-10-26 14:54:32
Context
2015-10-26
18:51
Merge in all trunk changes prior to the BTREE_FORDELETE enhancement. (check-in: 53d5a4ad user: drh tags: cursor-hints)
17:50
Provide the BTREE_FORDELETE flag to sqlite3BtreeCursor() if the cursor will be used only for deletions and seeking. (check-in: 871b1c78 user: drh tags: trunk)
14:54
Fix a C99-ism and a harmless compiler warning. (check-in: 138783b5 user: drh tags: trunk)
14:41
When compiling with SQLITE_HAS_CODEC, honor the hexkey= query parameter on URI pathnames in sqlite3_open_v2(). (check-in: e0ce3fc0 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/mem1.c.

167
168
169
170
171
172
173
174
175

176
177
178

179
180
181
182
183
184
185
}

/*
** Report the allocated size of a prior return from xMalloc()
** or xRealloc().
*/
static int sqlite3MemSize(void *pPrior){
  assert( pPrior!=0 );
#ifdef SQLITE_MALLOCSIZE

  return (int)SQLITE_MALLOCSIZE(pPrior);
#else
  sqlite3_int64 *p;

  p = (sqlite3_int64*)pPrior;
  p--;
  return (int)p[0];
#endif
}

/*







<

>



>







167
168
169
170
171
172
173

174
175
176
177
178
179
180
181
182
183
184
185
186
}

/*
** Report the allocated size of a prior return from xMalloc()
** or xRealloc().
*/
static int sqlite3MemSize(void *pPrior){

#ifdef SQLITE_MALLOCSIZE
  assert( pPrior!=0 );
  return (int)SQLITE_MALLOCSIZE(pPrior);
#else
  sqlite3_int64 *p;
  assert( pPrior!=0 );
  p = (sqlite3_int64*)pPrior;
  p--;
  return (int)p[0];
#endif
}

/*

Changes to src/where.c.

623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
  char *zNotUsed;             /* Extra space on the end of pIdx */
  Bitmask idxCols;            /* Bitmap of columns used for indexing */
  Bitmask extraCols;          /* Bitmap of additional columns */
  u8 sentWarning = 0;         /* True if a warnning has been issued */
  Expr *pPartial = 0;         /* Partial Index Expression */
  int iContinue = 0;          /* Jump here to skip excluded rows */
  struct SrcList_item *pTabItem;  /* FROM clause term being indexed */
  int addrCounter;            /* Address where integer counter is initialized */
  int regBase;                /* Array of registers where record is assembled */

  /* Generate code to skip over the creation and initialization of the
  ** transient index on 2nd and subsequent iterations of the loop. */
  v = pParse->pVdbe;
  assert( v!=0 );
  addrInit = sqlite3CodeOnce(pParse); VdbeCoverage(v);







|







623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
  char *zNotUsed;             /* Extra space on the end of pIdx */
  Bitmask idxCols;            /* Bitmap of columns used for indexing */
  Bitmask extraCols;          /* Bitmap of additional columns */
  u8 sentWarning = 0;         /* True if a warnning has been issued */
  Expr *pPartial = 0;         /* Partial Index Expression */
  int iContinue = 0;          /* Jump here to skip excluded rows */
  struct SrcList_item *pTabItem;  /* FROM clause term being indexed */
  int addrCounter = 0;        /* Address where integer counter is initialized */
  int regBase;                /* Array of registers where record is assembled */

  /* Generate code to skip over the creation and initialization of the
  ** transient index on 2nd and subsequent iterations of the loop. */
  v = pParse->pVdbe;
  assert( v!=0 );
  addrInit = sqlite3CodeOnce(pParse); VdbeCoverage(v);