1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

In the typeof() optimization in OP_Column, expand the size of the bogus buffer

provided for data so that it is big enough to cover the increased number of
bytes displayed during register tracing from check-in [54553bf16fabd72d].
This is the correct fix for ticket [bbd55a97e66ff50d], though the earlier one
does not hurt and is useful to retain.

FossilOrigin-Name: e1154c39ba0f8caec70d330e6d5bec745c93ec9a7eafedb3e3730fadc8b8277c
This commit is contained in:
drh
2020-01-06 20:48:45 +00:00
parent 5ca06329c9
commit cbae3f8c7d
4 changed files with 12 additions and 13 deletions

View File

@@ -2831,10 +2831,11 @@ case OP_Column: {
**
** Although sqlite3VdbeSerialGet() may read at most 8 bytes from the
** buffer passed to it, debugging function VdbeMemPrettyPrint() may
** read up to 16. So 16 bytes of bogus content is supplied.
** read more. Use the global constant sqlite3CtypeMap[] as the array,
** as that array is 256 bytes long (plenty for VdbeMemPrettyPrint())
** and it begins with a bunch of zeros.
*/
static u8 aZero[16]; /* This is the bogus content */
sqlite3VdbeSerialGet(aZero, t, pDest);
sqlite3VdbeSerialGet((u8*)sqlite3CtypeMap, t, pDest);
}else{
rc = sqlite3VdbeMemFromBtree(pC->uc.pCursor, aOffset[p2], len, pDest);
if( rc!=SQLITE_OK ) goto abort_due_to_error;