OLD | NEW |
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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 do_execsql_test like-13.2 { | 973 do_execsql_test like-13.2 { |
974 SELECT char(0x4d) LIKE char(0x306d); | 974 SELECT char(0x4d) LIKE char(0x306d); |
975 } {0} | 975 } {0} |
976 do_execsql_test like-13.3 { | 976 do_execsql_test like-13.3 { |
977 SELECT char(0x304d) LIKE char(0x6d); | 977 SELECT char(0x304d) LIKE char(0x6d); |
978 } {0} | 978 } {0} |
979 do_execsql_test like-13.4 { | 979 do_execsql_test like-13.4 { |
980 SELECT char(0x4d) LIKE char(0x6d); | 980 SELECT char(0x4d) LIKE char(0x6d); |
981 } {1} | 981 } {1} |
982 | 982 |
983 | 983 # Performance testing for patterns with many wildcards. These LIKE and GLOB |
| 984 # patterns were quite slow with SQLite 3.15.2 and earlier. |
| 985 # |
| 986 do_test like-14.1 { |
| 987 set x [lindex [time { |
| 988 db one {SELECT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz'GLOB'*a*a*a*a*a*a*a*a*y'} |
| 989 }] 0] |
| 990 puts -nonewline " ($x ms - want less than 1000) " |
| 991 expr {$x<1000} |
| 992 } {1} |
| 993 ifcapable !icu { |
| 994 do_test like-14.2 { |
| 995 set x [lindex [time { |
| 996 db one {SELECT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz'LIKE'%a%a%a%a%a%a%a%a%y'} |
| 997 }] 0] |
| 998 puts -nonewline " ($x ms - want less than 1000) " |
| 999 expr {$x<1000} |
| 1000 } {1} |
| 1001 } |
984 | 1002 |
985 finish_test | 1003 finish_test |
OLD | NEW |