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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/json103.test ('k') | third_party/sqlite/src/test/like3.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 # 2005 August 13 1 # 2005 August 13
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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 do_test like-10.3 { 738 do_test like-10.3 {
739 count { 739 count {
740 SELECT a FROM t10 WHERE d LIKE '12%' ORDER BY +a; 740 SELECT a FROM t10 WHERE d LIKE '12%' ORDER BY +a;
741 } 741 }
742 } {12 123 scan 5 like 6} 742 } {12 123 scan 5 like 6}
743 do_test like-10.4 { 743 do_test like-10.4 {
744 count { 744 count {
745 SELECT a FROM t10 WHERE e LIKE '12%' ORDER BY +a; 745 SELECT a FROM t10 WHERE e LIKE '12%' ORDER BY +a;
746 } 746 }
747 } {12 123 scan 5 like 6} 747 } {12 123 scan 5 like 6}
748 do_test like-10.5 { 748 ifcapable like_match_blobs {
749 count { 749 do_test like-10.5a {
750 SELECT a FROM t10 WHERE f LIKE '12%' ORDER BY +a; 750 count {
751 } 751 SELECT a FROM t10 WHERE f LIKE '12%' ORDER BY +a;
752 } {12 123 scan 3 like 0} 752 }
753 } {12 123 scan 4 like 0}
754 } else {
755 do_test like-10.5b {
756 count {
757 SELECT a FROM t10 WHERE f LIKE '12%' ORDER BY +a;
758 }
759 } {12 123 scan 3 like 0}
760 }
753 do_test like-10.6 { 761 do_test like-10.6 {
754 count { 762 count {
755 SELECT a FROM t10 WHERE a LIKE '12%' ORDER BY +a; 763 SELECT a FROM t10 WHERE a LIKE '12%' ORDER BY +a;
756 } 764 }
757 } {12 123 scan 5 like 6} 765 } {12 123 scan 5 like 6}
758 do_test like-10.10 { 766 do_test like-10.10 {
759 execsql { 767 execsql {
760 CREATE TABLE t10b( 768 CREATE TABLE t10b(
761 a INTEGER PRIMARY KEY, 769 a INTEGER PRIMARY KEY,
762 b INTEGER UNIQUE, 770 b INTEGER UNIQUE,
(...skipping 16 matching lines...) Expand all
779 do_test like-10.12 { 787 do_test like-10.12 {
780 count { 788 count {
781 SELECT a FROM t10b WHERE d GLOB '12*' ORDER BY +a; 789 SELECT a FROM t10b WHERE d GLOB '12*' ORDER BY +a;
782 } 790 }
783 } {12 123 scan 5 like 6} 791 } {12 123 scan 5 like 6}
784 do_test like-10.13 { 792 do_test like-10.13 {
785 count { 793 count {
786 SELECT a FROM t10b WHERE e GLOB '12*' ORDER BY +a; 794 SELECT a FROM t10b WHERE e GLOB '12*' ORDER BY +a;
787 } 795 }
788 } {12 123 scan 5 like 6} 796 } {12 123 scan 5 like 6}
789 do_test like-10.14 { 797 ifcapable like_match_blobs {
790 count { 798 do_test like-10.14 {
791 SELECT a FROM t10b WHERE f GLOB '12*' ORDER BY +a; 799 count {
792 } 800 SELECT a FROM t10b WHERE f GLOB '12*' ORDER BY +a;
793 } {12 123 scan 3 like 0} 801 }
802 } {12 123 scan 4 like 0}
803 } else {
804 do_test like-10.14 {
805 count {
806 SELECT a FROM t10b WHERE f GLOB '12*' ORDER BY +a;
807 }
808 } {12 123 scan 3 like 0}
809 }
794 do_test like-10.15 { 810 do_test like-10.15 {
795 count { 811 count {
796 SELECT a FROM t10b WHERE a GLOB '12*' ORDER BY +a; 812 SELECT a FROM t10b WHERE a GLOB '12*' ORDER BY +a;
797 } 813 }
798 } {12 123 scan 5 like 6} 814 } {12 123 scan 5 like 6}
799 } 815 }
800 816
801 # LIKE and GLOB where the default collating sequence is not appropriate 817 # LIKE and GLOB where the default collating sequence is not appropriate
802 # but an index with the appropriate collating sequence exists. 818 # but an index with the appropriate collating sequence exists.
803 # 819 #
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 } {/SCAN/} 957 } {/SCAN/}
942 do_execsql_test like-12.15 { 958 do_execsql_test like-12.15 {
943 EXPLAIN QUERY PLAN 959 EXPLAIN QUERY PLAN
944 SELECT id FROM t12nc WHERE x LIKE 'abc%' COLLATE binary ORDER BY +id; 960 SELECT id FROM t12nc WHERE x LIKE 'abc%' COLLATE binary ORDER BY +id;
945 } {/SEARCH/} 961 } {/SEARCH/}
946 do_execsql_test like-12.16 { 962 do_execsql_test like-12.16 {
947 EXPLAIN QUERY PLAN 963 EXPLAIN QUERY PLAN
948 SELECT id FROM t12b WHERE x LIKE 'abc%' COLLATE binary ORDER BY +id; 964 SELECT id FROM t12b WHERE x LIKE 'abc%' COLLATE binary ORDER BY +id;
949 } {/SCAN/} 965 } {/SCAN/}
950 966
967 # Ticket [https://www.sqlite.org/src/tktview/80369eddd5c94d49f7fbbcf5]
968 # 2016-01-20
969 #
970 do_execsql_test like-13.1 {
971 SELECT char(0x304d) LIKE char(0x306d);
972 } {0}
973 do_execsql_test like-13.2 {
974 SELECT char(0x4d) LIKE char(0x306d);
975 } {0}
976 do_execsql_test like-13.3 {
977 SELECT char(0x304d) LIKE char(0x6d);
978 } {0}
979 do_execsql_test like-13.4 {
980 SELECT char(0x4d) LIKE char(0x6d);
981 } {1}
982
983
951 984
952 finish_test 985 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/json103.test ('k') | third_party/sqlite/src/test/like3.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698