SQLite

Check-in [d2f9230c5c]
Login

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

Overview
Comment:Make sure the sqlite3_result_pointer() interface does not leave a VM register in an inconsistent state. Fix for ticket [7486aa54b968e9b5]. Test cases are in TH3.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d2f9230c5c7ad6166e7d2b649f77960fa58b1cb583e529a43882753ab348413c
User & Date: drh 2017-08-24 13:55:46.912
Context
2017-08-24
15:43
Fixes to documentation about SQLITE_OPEN_URI. (check-in: 7ec72314d6 user: drh tags: trunk)
14:04
Make sure the sqlite3_result_pointer() interface does not leave a VM register in an inconsistent state. Fix for ticket [7486aa54b968e9b5]. Test cases are in TH3. (check-in: abc7adfda2 user: drh tags: branch-3.20)
13:55
Make sure the sqlite3_result_pointer() interface does not leave a VM register in an inconsistent state. Fix for ticket [7486aa54b968e9b5]. Test cases are in TH3. (check-in: d2f9230c5c user: drh tags: trunk)
2017-08-23
23:09
Performance optimization to pageFindSlot() in the b-tree layer. (check-in: 59560d079f user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeapi.c.
394
395
396
397
398
399
400
401

402
403
404
405
406
407
408
  sqlite3_context *pCtx,
  void *pPtr,
  const char *zPType,
  void (*xDestructor)(void*)
){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  sqlite3VdbeMemSetNull(pOut);

  sqlite3VdbeMemSetPointer(pOut, pPtr, zPType, xDestructor);
}
void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  pOut->eSubtype = eSubtype & 0xff;
  pOut->flags |= MEM_Subtype;







|
>







394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
  sqlite3_context *pCtx,
  void *pPtr,
  const char *zPType,
  void (*xDestructor)(void*)
){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  sqlite3VdbeMemRelease(pOut);
  pOut->flags = MEM_Null;
  sqlite3VdbeMemSetPointer(pOut, pPtr, zPType, xDestructor);
}
void sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
  Mem *pOut = pCtx->pOut;
  assert( sqlite3_mutex_held(pOut->db->mutex) );
  pOut->eSubtype = eSubtype & 0xff;
  pOut->flags |= MEM_Subtype;