1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Make sure cached KeyInfo objects are only valid for a single database

connection.  Clear all cached KeyInfo objects on any collating sequence 
change.

FossilOrigin-Name: 55eea1782aead6a6aaf93f14d85486f8fd2209ad
This commit is contained in:
drh
2013-11-07 14:09:39 +00:00
parent 2ec2fb2269
commit 41e13e1268
6 changed files with 59 additions and 25 deletions

View File

@@ -828,9 +828,8 @@ KeyInfo *sqlite3KeyInfoAlloc(sqlite3 *db, int N, int X){
void sqlite3KeyInfoUnref(KeyInfo *p){
if( p ){
assert( p->nRef>0 );
assert( p->db==0 || p->db->pnBytesFreed==0 );
p->nRef--;
if( p->nRef==0 ) sqlite3DbFree(p->db, p);
if( p->nRef==0 ) sqlite3_free(p);
}
}