Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: third_party/sqlite/src/test/fts3query.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # 2009 December 20 1 # 2009 December 20
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DROP TABLE IF EXISTS t1; 111 DROP TABLE IF EXISTS t1;
112 CREATE TABLE t1(number INTEGER PRIMARY KEY, date); 112 CREATE TABLE t1(number INTEGER PRIMARY KEY, date);
113 CREATE INDEX i1 ON t1(date); 113 CREATE INDEX i1 ON t1(date);
114 CREATE VIRTUAL TABLE ft USING fts3(title); 114 CREATE VIRTUAL TABLE ft USING fts3(title);
115 CREATE TABLE bt(title); 115 CREATE TABLE bt(title);
116 } 116 }
117 } {} 117 } {}
118 do_eqp_test fts3query-4.2 { 118 do_eqp_test fts3query-4.2 {
119 SELECT t1.number FROM t1, ft WHERE t1.number=ft.rowid ORDER BY t1.date 119 SELECT t1.number FROM t1, ft WHERE t1.number=ft.rowid ORDER BY t1.date
120 } { 120 } {
121 0 0 0 {SCAN TABLE t1 USING COVERING INDEX i1 (~1000000 rows)} 121 0 0 0 {SCAN TABLE t1 USING COVERING INDEX i1}
122 0 1 1 {SCAN TABLE ft VIRTUAL TABLE INDEX 1: (~0 rows)} 122 0 1 1 {SCAN TABLE ft VIRTUAL TABLE INDEX 1:}
123 } 123 }
124 do_eqp_test fts3query-4.3 { 124 do_eqp_test fts3query-4.3 {
125 SELECT t1.number FROM ft, t1 WHERE t1.number=ft.rowid ORDER BY t1.date 125 SELECT t1.number FROM ft, t1 WHERE t1.number=ft.rowid ORDER BY t1.date
126 } { 126 } {
127 0 0 1 {SCAN TABLE t1 USING COVERING INDEX i1 (~1000000 rows)} 127 0 0 1 {SCAN TABLE t1 USING COVERING INDEX i1}
128 0 1 0 {SCAN TABLE ft VIRTUAL TABLE INDEX 1: (~0 rows)} 128 0 1 0 {SCAN TABLE ft VIRTUAL TABLE INDEX 1:}
129 } 129 }
130 do_eqp_test fts3query-4.4 { 130 do_eqp_test fts3query-4.4 {
131 SELECT t1.number FROM t1, bt WHERE t1.number=bt.rowid ORDER BY t1.date 131 SELECT t1.number FROM t1, bt WHERE t1.number=bt.rowid ORDER BY t1.date
132 } { 132 } {
133 0 0 0 {SCAN TABLE t1 USING COVERING INDEX i1 (~1000000 rows)} 133 0 0 0 {SCAN TABLE t1 USING COVERING INDEX i1}
134 0 1 1 {SEARCH TABLE bt USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)} 134 0 1 1 {SEARCH TABLE bt USING INTEGER PRIMARY KEY (rowid=?)}
135 } 135 }
136 do_eqp_test fts3query-4.5 { 136 do_eqp_test fts3query-4.5 {
137 SELECT t1.number FROM bt, t1 WHERE t1.number=bt.rowid ORDER BY t1.date 137 SELECT t1.number FROM bt, t1 WHERE t1.number=bt.rowid ORDER BY t1.date
138 } { 138 } {
139 0 0 1 {SCAN TABLE t1 USING COVERING INDEX i1 (~1000000 rows)} 139 0 0 1 {SCAN TABLE t1 USING COVERING INDEX i1}
140 0 1 0 {SEARCH TABLE bt USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)} 140 0 1 0 {SEARCH TABLE bt USING INTEGER PRIMARY KEY (rowid=?)}
141 } 141 }
142 142
143 143
144 # Test that calling matchinfo() with the wrong number of arguments, or with 144 # Test that calling matchinfo() with the wrong number of arguments, or with
145 # an invalid argument returns an error. 145 # an invalid argument returns an error.
146 # 146 #
147 do_execsql_test 5.1 { 147 do_execsql_test 5.1 {
148 CREATE VIRTUAL TABLE t2 USING FTS4; 148 CREATE VIRTUAL TABLE t2 USING FTS4;
149 INSERT INTO t2 VALUES('it was the first time in history'); 149 INSERT INTO t2 VALUES('it was the first time in history');
150 } 150 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 6 "SELECT snippet(t3, 'XXX', 'YYY', 'ZZZ', 0) FROM t3 WHERE t3 MATCH 'gestures '" 204 6 "SELECT snippet(t3, 'XXX', 'YYY', 'ZZZ', 0) FROM t3 WHERE t3 MATCH 'gestures '"
205 {{no XXXgesturesYYY}} 205 {{no XXXgesturesYYY}}
206 206
207 7 "SELECT snippet(t3, 'XXX', 'YYY', 'ZZZ', 1, 5) FROM t3 WHERE t3 MATCH 'gestu res'" 207 7 "SELECT snippet(t3, 'XXX', 'YYY', 'ZZZ', 1, 5) FROM t3 WHERE t3 MATCH 'gestu res'"
208 {{ZZZthe hand XXXgesturesYYY (called beatsZZZ}} 208 {{ZZZthe hand XXXgesturesYYY (called beatsZZZ}}
209 } 209 }
210 210
211 211
212 finish_test 212 finish_test
213
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698