aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeapi.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-06-04 20:37:10 +0000
committerdrh <drh@noemail.net>2016-06-04 20:37:10 +0000
commita7c90c42eaf1badd141ca21bd64669e03de9830c (patch)
tree3a75a6da20c897d85ae393b4a6e6655acf006782 /src/vdbeapi.c
parentf94fdd832cc7f7ec1764af518edf746cba6a3687 (diff)
downloadsqlite-a7c90c42eaf1badd141ca21bd64669e03de9830c.tar.gz
sqlite-a7c90c42eaf1badd141ca21bd64669e03de9830c.zip
Change the sqlite3BtreeKeySize() interface into sqlite3BtreeIntegerKey() and
make it only work for table btrees. Change sqlite3BtreeDataSize() into sqlite3BtreePayloadSize() and make it work for all btrees. Combine sqlite3BtreeDataFetch() and sqlite3BtreeKeyFetch() into a single sqlite3BtreePayloadFetch() routine. These changes seem to make the b-tree interface more rational and they reduce both binary size and CPU usage. FossilOrigin-Name: bef35e18dd19732f7859287b097feeb593e5900f
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r--src/vdbeapi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 1feecb3e1..83718eae3 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -1650,8 +1650,7 @@ int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppValue){
u32 nRec;
u8 *aRec;
- rc = sqlite3BtreeDataSize(p->pCsr->uc.pCursor, &nRec);
- if( rc!=SQLITE_OK ) goto preupdate_old_out;
+ nRec = sqlite3BtreePayloadSize(p->pCsr->uc.pCursor);
aRec = sqlite3DbMallocRaw(db, nRec);
if( !aRec ) goto preupdate_old_out;
rc = sqlite3BtreeData(p->pCsr->uc.pCursor, 0, nRec, aRec);