1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Add a missing mutex around calls to clear the KeyInfo cache when closing

a database connection.

FossilOrigin-Name: 7047ce32a234484b8ba15311e6560aa74ff692c9
This commit is contained in:
drh
2014-12-08 18:08:45 +00:00
parent 8f1eb8a1cb
commit b88c7b550c
3 changed files with 11 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
C Avoid\saccessing\sa\ssingle\suninitialized\sbyte\swhen\smoving\sa\srare\s3-byte\scell\sfrom\san\sinternal\spage\sto\sa\sleaf.\sThis\swas\snot\sactually\scausing\sa\sproblem,\sjust\sa\svalgrind\swarning.
D 2014-12-06T14:56:49.956
C Add\sa\smissing\smutex\saround\scalls\sto\sclear\sthe\sKeyInfo\scache\swhen\sclosing\na\sdatabase\sconnection.
D 2014-12-08T18:08:45.076
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 6c4f961fa91d0b4fa121946a19f9e5eac2f2f809
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -195,7 +195,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e
F src/lempar.c 7274c97d24bb46631e504332ccd3bd1b37841770
F src/loadext.c de741e66e5ddc1598d904d7289239696e40ed994
F src/main.c e50203613fb77e2f28deb51425ee52b3879e85f8
F src/main.c c04c232ad484ca82b5757e564d9c4da6fdeaae55
F src/malloc.c 740db54387204c9a2eb67c6d98e68b08e9ef4eab
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c faf615aafd8be74a71494dfa027c113ea5c6615f
@@ -1225,7 +1225,8 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P dd1dd4451f468599f7a0c2f7b5ee6125db3bb152
R fd0e43f358120e3c011052c6be23c038
U dan
Z 22968e22e0931f64edb1c44af2aed6b9
P 6aeece19a235344be2537e66a3fe08b1febfb5a0
Q +3ddc7e4c7778a6708856776471ded65f78825487
R 1221a1e2e1d9363391aee656884338b7
U drh
Z 22afcb22dd16de39e36b3c393f026fe6

View File

@@ -1 +1 @@
6aeece19a235344be2537e66a3fe08b1febfb5a0
7047ce32a234484b8ba15311e6560aa74ff692c9

View File

@@ -1034,11 +1034,13 @@ void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
if( pDb->pBt ){
if( pDb->pSchema ){
/* Must clear the KeyInfo cache. See ticket [e4a18565a36884b00edf] */
sqlite3BtreeEnter(pDb->pBt);
for(i=sqliteHashFirst(&pDb->pSchema->idxHash); i; i=sqliteHashNext(i)){
Index *pIdx = sqliteHashData(i);
sqlite3KeyInfoUnref(pIdx->pKeyInfo);
pIdx->pKeyInfo = 0;
}
sqlite3BtreeLeave(pDb->pBt);
}
sqlite3BtreeClose(pDb->pBt);
pDb->pBt = 0;