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

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

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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
« no previous file with comments | « third_party/sqlite/src/test/fts3join.test ('k') | third_party/sqlite/src/test/fts3offsets.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2010 November 02 1 # 2010 November 02
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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 set M [list] 517 set M [list]
518 foreach {a b} $L { 518 foreach {a b} $L {
519 lappend M [expr ($a ? 1 : 0) + ($b ? 2 : 0)] 519 lappend M [expr ($a ? 1 : 0) + ($b ? 2 : 0)]
520 } 520 }
521 lappend r2 $M 521 lappend r2 $M
522 } 522 }
523 523
524 do_execsql_test 11.1.$tn.2 { 524 do_execsql_test 11.1.$tn.2 {
525 SELECT rowid, mit(matchinfo(tt, 'b')) FROM tt WHERE tt MATCH $expr 525 SELECT rowid, mit(matchinfo(tt, 'b')) FROM tt WHERE tt MATCH $expr
526 } $r2 526 } $r2
527 breakpoint
528 527
529 do_execsql_test 11.1.$tn.2 { 528 do_execsql_test 11.1.$tn.2 {
530 SELECT rowid, mit(matchinfo(tt, 'b')) FROM tt WHERE tt MATCH $expr 529 SELECT rowid, mit(matchinfo(tt, 'b')) FROM tt WHERE tt MATCH $expr
531 } $r2 530 } $r2
532 } 531 }
533 set sqlite_fts3_enable_parentheses 0 532 set sqlite_fts3_enable_parentheses 0
534 533
535 #--------------------------------------------------------------------------- 534 #---------------------------------------------------------------------------
536 # Test the 'b' matchinfo flag 535 # Test the 'b' matchinfo flag
537 # 536 #
538 set sqlite_fts3_enable_parentheses 1 537 set sqlite_fts3_enable_parentheses 1
539 reset_db 538 reset_db
540 db func mit mit 539 db func mit mit
541 540
542 do_test 12.0 { 541 do_test 12.0 {
543 set cols [list] 542 set cols [list]
544 for {set i 0} {$i < 50} {incr i} { lappend cols "c$i" } 543 for {set i 0} {$i < 50} {incr i} { lappend cols "c$i" }
545 execsql "CREATE VIRTUAL TABLE tt USING fts3([join $cols ,])" 544 execsql "CREATE VIRTUAL TABLE tt USING fts3([join $cols ,])"
546 } {} 545 } {}
547 546
548 do_execsql_test 12.1 { 547 do_execsql_test 12.1 {
549 INSERT INTO tt (rowid, c4, c45) VALUES(1, 'abc', 'abc'); 548 INSERT INTO tt (rowid, c4, c45) VALUES(1, 'abc', 'abc');
550 SELECT mit(matchinfo(tt, 'b')) FROM tt WHERE tt MATCH 'abc'; 549 SELECT mit(matchinfo(tt, 'b')) FROM tt WHERE tt MATCH 'abc';
551 } [list [list [expr 1<<4] [expr 1<<(45-32)]]] 550 } [list [list [expr 1<<4] [expr 1<<(45-32)]]]
552 551
553 set sqlite_fts3_enable_parentheses 0 552 set sqlite_fts3_enable_parentheses 0
554 finish_test 553 finish_test
555
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/fts3join.test ('k') | third_party/sqlite/src/test/fts3offsets.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698