rogerbinns / apsw

Another Python SQLite wrapper
https://rogerbinns.github.io/apsw/
Other
733 stars 97 forks source link

Make statement cache recycle bin be part of per Connection StatementCache and not separate, also check hash algorithm #505

Closed rogerbinns closed 6 months ago

rogerbinns commented 9 months ago

apsw_sc_recycle_bin is currently a static variable used across all connections. It should become a per Connection property of StatementCache instead. That will also allow the removal of statementcache_fini

447 found using the length as the hash wasn't very good. SQLite uses two different approaches - a general add and multiply in strhash in src/hash.c, and a shift left by 3, xor in hash and xor byte as in fts3StrHash in ext/fts3/fts3_hash.c