/ Check-in [4df62a55]
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:Fix a bug in EXPLAIN growing out of the new Mem implementation. (CVS 4790)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4df62a55d6fc92c3d0a416c9c03d86d76478feb6
User & Date: drh 2008-02-14 23:44:14
Context
2008-02-15
14:33
Do not apply the query flattening optimization when the outer query is an aggregate and the inner query contains an ORDER BY clause. Ticket #2943. (CVS 4791) check-in: 6d33cbd9 user: drh tags: trunk
2008-02-14
23:44
Fix a bug in EXPLAIN growing out of the new Mem implementation. (CVS 4790) check-in: 4df62a55 user: drh tags: trunk
23:26
Add the experimental mem5.c memory allocator. Allocate the content part of cache pages separately from the header. (See check-ins (4495) and (4409)). (CVS 4789) check-in: 669ece8c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/vdbeaux.c.

   847    847         }
   848    848         pMem->flags = MEM_Dyn|MEM_Str|MEM_Term;
   849    849         pMem->n = sprintf(pMem->z, "%.2x", pOp->p5);   /* P5 */
   850    850         pMem->type = SQLITE_TEXT;
   851    851         pMem->enc = SQLITE_UTF8;
   852    852         pMem++;
   853    853     
   854         -      pMem->flags = MEM_Null;                       /* Comment */
   855    854   #ifdef SQLITE_DEBUG
   856    855         if( pOp->zComment ){
   857    856           pMem->flags = MEM_Str|MEM_Term;
   858    857           pMem->z = pOp->zComment;
   859    858           pMem->n = strlen(pMem->z);
   860    859           pMem->enc = SQLITE_UTF8;
          860  +      }else
          861  +#endif
          862  +      {
          863  +        pMem->flags = MEM_Null;                       /* Comment */
          864  +        pMem->type = SQLITE_NULL;
   861    865         }
   862         -#endif
   863    866       }
   864    867   
   865    868       p->nResColumn = 8 - 5*(p->explain-1);
   866    869       p->rc = SQLITE_OK;
   867    870       rc = SQLITE_ROW;
   868    871     }
   869    872     return rc;