Fossil SCM
Reconcile a test in the FTS search with its original intent in [196dfedf7fc]; reported in [forum:fa13ae06d|forum post fa13ae06d].
Commit
e88211628b529e08fc5f0c647fc789cbc5713065cc3f2d456c1d95451caed7d8
Parent
4d9ede80bec62b6…
1 file changed
+1
-1
+1
-1
| --- src/search.c | ||
| +++ src/search.c | ||
| @@ -926,11 +926,11 @@ | ||
| 926 | 926 | static const char *zSnippetCall; |
| 927 | 927 | if( srchFlags==0 ) return; |
| 928 | 928 | sqlite3_create_function(g.db, "rank", 1, SQLITE_UTF8|SQLITE_INNOCUOUS, 0, |
| 929 | 929 | search_rank_sqlfunc, 0, 0); |
| 930 | 930 | for(i=0; zPat[i]; i++){ |
| 931 | - if( (zPat[i]&0x80)!=0 || !fossil_isalnum(zPat[i]) ) zPat[i] = ' '; | |
| 931 | + if( (zPat[i]&0x80)==0 && !fossil_isalnum(zPat[i]) ) zPat[i] = ' '; | |
| 932 | 932 | } |
| 933 | 933 | blob_init(&sql, 0, 0); |
| 934 | 934 | if( search_index_type(0)==4 ){ |
| 935 | 935 | /* If this repo is still using the legacy FTS4 search index, then |
| 936 | 936 | ** the snippet() function is slightly different */ |
| 937 | 937 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -926,11 +926,11 @@ | |
| 926 | static const char *zSnippetCall; |
| 927 | if( srchFlags==0 ) return; |
| 928 | sqlite3_create_function(g.db, "rank", 1, SQLITE_UTF8|SQLITE_INNOCUOUS, 0, |
| 929 | search_rank_sqlfunc, 0, 0); |
| 930 | for(i=0; zPat[i]; i++){ |
| 931 | if( (zPat[i]&0x80)!=0 || !fossil_isalnum(zPat[i]) ) zPat[i] = ' '; |
| 932 | } |
| 933 | blob_init(&sql, 0, 0); |
| 934 | if( search_index_type(0)==4 ){ |
| 935 | /* If this repo is still using the legacy FTS4 search index, then |
| 936 | ** the snippet() function is slightly different */ |
| 937 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -926,11 +926,11 @@ | |
| 926 | static const char *zSnippetCall; |
| 927 | if( srchFlags==0 ) return; |
| 928 | sqlite3_create_function(g.db, "rank", 1, SQLITE_UTF8|SQLITE_INNOCUOUS, 0, |
| 929 | search_rank_sqlfunc, 0, 0); |
| 930 | for(i=0; zPat[i]; i++){ |
| 931 | if( (zPat[i]&0x80)==0 && !fossil_isalnum(zPat[i]) ) zPat[i] = ' '; |
| 932 | } |
| 933 | blob_init(&sql, 0, 0); |
| 934 | if( search_index_type(0)==4 ){ |
| 935 | /* If this repo is still using the legacy FTS4 search index, then |
| 936 | ** the snippet() function is slightly different */ |
| 937 |