]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix asserts in hash.c so that zero-length symbols can be used. (CVS 6563)
authordrh <drh@noemail.net>
Tue, 28 Apr 2009 17:33:16 +0000 (17:33 +0000)
committerdrh <drh@noemail.net>
Tue, 28 Apr 2009 17:33:16 +0000 (17:33 +0000)
FossilOrigin-Name: fe9f00aa369051beee09ab3d1a2e046a1f679a40

manifest
manifest.uuid
src/hash.c

index b81cc47588db28eadf7d2829aba2ffc38ba53909..f60ce6a593c222a3e63d335567b28f9e1de57f74 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C When\stesting\swith\sTEMP_STORE=3\sand\sthe\stest\spcache,\sonly\srun\s20\siterations\sin\strans.test.\sOtherwise\sthe\stest\spcache\sruns\sout\sof\smemory.\s(CVS\s6562)
-D 2009-04-28T16:37:59
+C Fix\sasserts\sin\shash.c\sso\sthat\szero-length\ssymbols\scan\sbe\sused.\s(CVS\s6563)
+D 2009-04-28T17:33:16
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -118,7 +118,7 @@ F src/expr.c dd763d6dc8f8329e895440d436c28aa7b5b3595e
 F src/fault.c dc88c821842157460750d2d61a8a8b4197d047ff
 F src/func.c f667fe886309707c7178542073bb0ced00a9fae7
 F src/global.c 448419c44ce0701104c2121b0e06919b44514c0c
-F src/hash.c 407e5ca13cab32db529e2c364463a2512fb4d554
+F src/hash.c 0caea57f020226903cd8591125732e1e19f17f14
 F src/hash.h 457e230c3b2bd3c56742824d43b16618ff30d7c0
 F src/hwtime.h 4a1d45f4cae1f402ea19686acf24acf4f0cb53cb
 F src/insert.c 71286d081a919a27ef22eaeccbe2718f93dc6aa9
@@ -725,7 +725,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P fcf70bb8b8ab7682d46fa7e75338dfd8ecf472a3
-R f022dd20d2d20a410af92f00ba03cb0e
-U danielk1977
-Z 16e75750ddeb2e6afa65f477ae899bec
+P 0799b729a7fe50ee935ac3bd9f95118288d33f6e
+R ed47ef3fdd770523aeb817c8583bd54b
+U drh
+Z ccfe377a65ebed82e5d5b10e09019e6e
index de31e5da073852c1e6dee4b33b8af16871629bc7..1d8bb32331f31c1eab8d3880cd396be7b964068b 100644 (file)
@@ -1 +1 @@
-0799b729a7fe50ee935ac3bd9f95118288d33f6e
\ No newline at end of file
+fe9f00aa369051beee09ab3d1a2e046a1f679a40
\ No newline at end of file
index 9d9be94e748bb17c08478a849c62635f6eb021f6..8be6dab346383b3303efc4f29078ee131dcaf1f0 100644 (file)
@@ -12,7 +12,7 @@
 ** This is the implementation of generic hash-tables
 ** used in SQLite.
 **
-** $Id: hash.c,v 1.35 2009/04/28 15:43:45 drh Exp $
+** $Id: hash.c,v 1.36 2009/04/28 17:33:16 drh Exp $
 */
 #include "sqliteInt.h"
 #include <assert.h>
@@ -63,7 +63,7 @@ void sqlite3HashClear(Hash *pH){
 static unsigned int strHash(const void *pKey, int nKey){
   const char *z = (const char *)pKey;
   int h = 0;
-  assert( nKey>0 );
+  assert( nKey>=0 );
   while( nKey > 0  ){
     h = (h<<3) ^ h ^ sqlite3UpperToLower[(unsigned char)*z++];
     nKey--;
@@ -222,7 +222,7 @@ void *sqlite3HashFind(const Hash *pH, const void *pKey, int nKey){
 
   assert( pH!=0 );
   assert( pKey!=0 );
-  assert( nKey>0 );
+  assert( nKey>=0 );
   if( pH->ht ){
     h = strHash(pKey, nKey) % pH->htsize;
   }else{
@@ -254,7 +254,7 @@ void *sqlite3HashInsert(Hash *pH, const void *pKey, int nKey, void *data){
 
   assert( pH!=0 );
   assert( pKey!=0 );
-  assert( nKey>0 );
+  assert( nKey>=0 );
   if( pH->htsize ){
     h = strHash(pKey, nKey) % pH->htsize;
   }else{