mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix a case in test_fuzzer.c causing transformations from the wrong ruleset to be applied in some cases.
FossilOrigin-Name: cb5f5ebc563b8d3e47bc30b6dbb374bb91efd3ef
This commit is contained in:
@ -64,7 +64,7 @@ do_test fuzzer1-1.7 {
|
||||
db eval {
|
||||
SELECT word, distance FROM f1 WHERE word MATCH 'abcde' AND ruleset=1
|
||||
}
|
||||
} {abcde 0 axcde 1 axcda 2 abcye 10 abcya 11 axcye 11 axcya 12 abcze 110 abcza 111 axcze 111 axcza 112}
|
||||
} {abcde 0 axcde 1 abcye 10 axcye 11 abcze 110 axcze 111}
|
||||
do_test fuzzer1-1.8 {
|
||||
db eval {
|
||||
SELECT word, distance FROM f1 WHERE word MATCH 'abcde' AND distance<100
|
||||
@ -90,16 +90,15 @@ do_test fuzzer1-1.11 {
|
||||
do_test fuzzer1-1.12 {
|
||||
db eval {
|
||||
SELECT word, distance FROM f1
|
||||
WHERE word MATCH 'abcde' AND distance<12 AND ruleset=1
|
||||
WHERE word MATCH 'abcde' AND distance<11 AND ruleset=1
|
||||
}
|
||||
} {abcde 0 axcde 1 axcda 2 abcye 10 abcya 11 axcye 11}
|
||||
} {abcde 0 axcde 1 abcye 10}
|
||||
do_test fuzzer1-1.13 {
|
||||
db eval {
|
||||
SELECT word, distance FROM f1
|
||||
WHERE word MATCH 'abcde' AND distance<=12 AND ruleset=1
|
||||
WHERE word MATCH 'abcde' AND distance<=11 AND ruleset=1
|
||||
}
|
||||
} {abcde 0 axcde 1 axcda 2 abcye 10 abcya 11 axcye 11 axcya 12}
|
||||
|
||||
} {abcde 0 axcde 1 abcye 10 axcye 11}
|
||||
|
||||
do_test fuzzer1-2.0 {
|
||||
execsql {
|
||||
@ -1437,4 +1436,12 @@ do_test fuzzer1-2.3 {
|
||||
} {{tyler finley} trailer taymouth steelewood tallia tallu talwyn thelema}
|
||||
|
||||
|
||||
do_execsql_test fuzzer1-3.1 {
|
||||
CREATE VIRTUAL TABLE temp.f3 USING fuzzer;
|
||||
CREATE TABLE f3(ruleset, cfrom, cto, cost);
|
||||
INSERT INTO f3(ruleset, cfrom, cto, cost) VALUES(0, 'x','y', 10);
|
||||
INSERT INTO f3(ruleset, cfrom, cto, cost) VALUES(1, 'a','b', 10);
|
||||
SELECT word FROM f3 WHERE word MATCH 'ax'
|
||||
} {ax ay}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user