aboutsummaryrefslogtreecommitdiff
path: root/src/pragma.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-11-06 19:59:23 +0000
committerdrh <drh@noemail.net>2013-11-06 19:59:23 +0000
commit2ec2fb22691de00e3da209a77bfac13c446a9cd4 (patch)
tree830583df7f15ab65a14718994973e1113622f551 /src/pragma.c
parent93889d9335b48edb943424331269b1d47a0c70ab (diff)
downloadsqlite-2ec2fb22691de00e3da209a77bfac13c446a9cd4.tar.gz
sqlite-2ec2fb22691de00e3da209a77bfac13c446a9cd4.zip
Reference count the KeyInfo object. Cache a copy of an appropriate KeyInfo
for each index in the Index object, and reuse that one copy as much as possible. FossilOrigin-Name: defd5205a7cc3543cdd18f906f568e943b8b3a2c
Diffstat (limited to 'src/pragma.c')
-rw-r--r--src/pragma.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pragma.c b/src/pragma.c
index 948d96056..9211a2cb0 100644
--- a/src/pragma.c
+++ b/src/pragma.c
@@ -1680,9 +1680,8 @@ void sqlite3Pragma(
if( pIdx==0 ){
sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);
}else{
- KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
sqlite3VdbeAddOp3(v, OP_OpenRead, i, pIdx->tnum, iDb);
- sqlite3VdbeChangeP4(v, -1, (char*)pKey, P4_KEYINFO_HANDOFF);
+ sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
}
}else{
k = 0;