aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-11-20 13:33:56 +0000
committerdrh <drh@noemail.net>2015-11-20 13:33:56 +0000
commit5f7dacb443434559c2e5eee22cb451cec6aa60f4 (patch)
treedfea376675912d3865c51ea8162157271259ed59 /src
parent7977fa3ab291bd0ec6bdbb21c93ef8c37f7fed4b (diff)
downloadsqlite-5f7dacb443434559c2e5eee22cb451cec6aa60f4.tar.gz
sqlite-5f7dacb443434559c2e5eee22cb451cec6aa60f4.zip
In the OP_Column opcode, only test the btree payload size for exceeding the
string length limit if the payload does not fit on a single page. FossilOrigin-Name: 35c7f6cba6febf2480de01fca9d61b8065bf1c12
Diffstat (limited to 'src')
-rw-r--r--src/vdbe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vdbe.c b/src/vdbe.c
index d13655d9c..5be906c67 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -2427,12 +2427,11 @@ case OP_Column: {
assert( avail<=65536 ); /* Maximum page size is 64KiB */
if( pC->payloadSize <= (u32)avail ){
pC->szRow = pC->payloadSize;
+ }else if( pC->payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
+ goto too_big;
}else{
pC->szRow = avail;
}
- if( pC->payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
- goto too_big;
- }
}
pC->cacheStatus = p->cacheCtr;
pC->iHdrOffset = getVarint32(pC->aRow, offset);