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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user