]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a bug in the phonetic-hash routine in spellfix1: Even if the first character...
authordan <dan@noemail.net>
Mon, 16 Jul 2012 14:52:49 +0000 (14:52 +0000)
committerdan <dan@noemail.net>
Mon, 16 Jul 2012 14:52:49 +0000 (14:52 +0000)
FossilOrigin-Name: 6333b42dd292e8e567c3fce1c371d6f58021af88

manifest
manifest.uuid
src/test_spellfix.c

index 010cecc7bb996efe466246a4293a28b7ce085873..24bbafdb5b2569e2532e9c1df8ea7ab1cb0fed5b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Merge\strunk\schanges.
-D 2012-07-16T10:25:54.662
+C Fix\sa\sbug\sin\sthe\sphonetic-hash\sroutine\sin\sspellfix1:\sEven\sif\sthe\sfirst\scharacter\sof\sa\sword\sis\sdeemed\sto\sbe\s"silent",\sdo\snot\sapply\sthe\sspecial\shandling\sintended\sfor\sthe\sfirst\scharacter\sof\seach\sword\sto\sthe\ssecond.
+D 2012-07-16T14:52:49.791
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 8f6d858bf3df9978ba43df19985146a1173025e4
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -221,7 +221,7 @@ F src/test_quota.h 8761e463b25e75ebc078bd67d70e39b9c817a0cb
 F src/test_rtree.c aba603c949766c4193f1068b91c787f57274e0d9
 F src/test_schema.c 8c06ef9ddb240c7a0fcd31bc221a6a2aade58bf0
 F src/test_server.c 2f99eb2837dfa06a4aacf24af24c6affdf66a84f
-F src/test_spellfix.c 1c900928dad9b71c0fdcbdda9e2f52234f283660
+F src/test_spellfix.c 1b31d1ea6404dab6353eb2b07871344940c4469d
 F src/test_stat.c d1569c7a4839f13e80187e2c26b2ab4da2d03935
 F src/test_superlock.c 2b97936ca127d13962c3605dbc9a4ef269c424cd
 F src/test_syscall.c a992d8c80ea91fbf21fb2dd570db40e77dd7e6ae
@@ -1005,7 +1005,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P f24b9d87f6b0e8b4d26669d5c1191f9280ba14a3 4353e40b74f577f224f190c429bfe03cf6a5c6d6
-R 41982e9e09fbd84544b16a8024815a54
+P 90df64ab803001819b3ebbb41d596aedbd9961b1
+R 6fff5cd40b7efe568d75dafae19dd7da
 U dan
-Z df39f17a0a50d7df733c6d4551aaf8e2
+Z 85a8e8a94773032ba7ff59559399f217
index e3850d5fefdc4551c3fb6a8cf0b0acdfa67eb7a0..d7199d204ab7401005474aa7b3d391c29a6de7b8 100644 (file)
@@ -1 +1 @@
-90df64ab803001819b3ebbb41d596aedbd9961b1
\ No newline at end of file
+6333b42dd292e8e567c3fce1c371d6f58021af88
\ No newline at end of file
index d80ce8f013d78ab34982105d89cb95868c71815c..84d42417b120f3b15df2468cf70a4137aa122c60 100644 (file)
@@ -479,6 +479,7 @@ static unsigned char *phoneticHash(const unsigned char *zIn, int nIn){
     c = aClass[c&0x7f];
     if( c==CCLASS_SPACE ) continue;
     if( c==CCLASS_OTHER && cPrev!=CCLASS_DIGIT ) continue;
+    aClass = midClass;
     if( c==CCLASS_VOWEL && (cPrevX==CCLASS_R || cPrevX==CCLASS_L) ){
        continue; /* No vowels beside L or R */ 
     }
@@ -488,8 +489,6 @@ static unsigned char *phoneticHash(const unsigned char *zIn, int nIn){
     cPrev = c;
     if( c==CCLASS_SILENT ) continue;
     cPrevX = c;
-    if( c==CCLASS_SPACE ) continue;
-    aClass = midClass;
     c = className[c];
     if( c!=zOut[nOut-1] ) zOut[nOut++] = c;
   }