| OLD | NEW |
| 1 | 1 |
| 2 This directory contains source code for the SQLite "ICU" extension, an | 2 This directory contains source code for the SQLite "ICU" extension, an |
| 3 integration of the "International Components for Unicode" library with | 3 integration of the "International Components for Unicode" library with |
| 4 SQLite. Documentation follows. | 4 SQLite. Documentation follows. |
| 5 | 5 |
| 6 1. Features | 6 1. Features |
| 7 | 7 |
| 8 1.1 SQL Scalars upper() and lower() | 8 1.1 SQL Scalars upper() and lower() |
| 9 1.2 Unicode Aware LIKE Operator | 9 1.2 Unicode Aware LIKE Operator |
| 10 1.3 ICU Collation Sequences | 10 1.3 ICU Collation Sequences |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 pragma. If this pragma is used before the ICU extension is loaded, | 132 pragma. If this pragma is used before the ICU extension is loaded, |
| 133 then the pragma has no effect. If the pragma is used after the ICU | 133 then the pragma has no effect. If the pragma is used after the ICU |
| 134 extension is loaded, then SQLite ignores the ICU implementation and | 134 extension is loaded, then SQLite ignores the ICU implementation and |
| 135 always uses the built-in LIKE operator. | 135 always uses the built-in LIKE operator. |
| 136 | 136 |
| 137 The ICU extension LIKE operator is always case insensitive. | 137 The ICU extension LIKE operator is always case insensitive. |
| 138 | 138 |
| 139 3.2 The SQLITE_MAX_LIKE_PATTERN_LENGTH Macro | 139 3.2 The SQLITE_MAX_LIKE_PATTERN_LENGTH Macro |
| 140 | 140 |
| 141 Passing very long patterns to the built-in SQLite LIKE operator can | 141 Passing very long patterns to the built-in SQLite LIKE operator can |
| 142 cause a stack overflow. To curb this problem, SQLite defines the | 142 cause excessive CPU usage. To curb this problem, SQLite defines the |
| 143 SQLITE_MAX_LIKE_PATTERN_LENGTH macro as the maximum length of a | 143 SQLITE_MAX_LIKE_PATTERN_LENGTH macro as the maximum length of a |
| 144 pattern in bytes (irrespective of encoding). The default value is | 144 pattern in bytes (irrespective of encoding). The default value is |
| 145 defined in internal header file "limits.h". | 145 defined in internal header file "limits.h". |
| 146 | 146 |
| 147 The ICU extension LIKE implementation suffers from the same | 147 The ICU extension LIKE implementation suffers from the same |
| 148 problem and uses the same solution. However, since the ICU extension | 148 problem and uses the same solution. However, since the ICU extension |
| 149 code does not include the SQLite file "limits.h", modifying | 149 code does not include the SQLite file "limits.h", modifying |
| 150 the default value therein does not affect the ICU extension. | 150 the default value therein does not affect the ICU extension. |
| 151 The default value of SQLITE_MAX_LIKE_PATTERN_LENGTH used by | 151 The default value of SQLITE_MAX_LIKE_PATTERN_LENGTH used by |
| 152 the ICU extension LIKE operator is 50000, defined in source | 152 the ICU extension LIKE operator is 50000, defined in source |
| 153 file "icu.c". | 153 file "icu.c". |
| 154 | 154 |
| 155 3.3 Collation Sequence Security Issue | 155 3.3 Collation Sequence Security Issue |
| 156 | 156 |
| 157 Internally, SQLite assumes that indices stored in database files | 157 Internally, SQLite assumes that indices stored in database files |
| 158 are sorted according to the collation sequence indicated by the | 158 are sorted according to the collation sequence indicated by the |
| 159 SQL schema. Changing the definition of a collation sequence after | 159 SQL schema. Changing the definition of a collation sequence after |
| 160 an index has been built is therefore equivalent to database | 160 an index has been built is therefore equivalent to database |
| 161 corruption. The SQLite library is not very well tested under | 161 corruption. The SQLite library is not very well tested under |
| 162 these conditions, and may contain potential buffer overruns | 162 these conditions, and may contain potential buffer overruns |
| 163 or other programming errors that could be exploited by a malicious | 163 or other programming errors that could be exploited by a malicious |
| 164 programmer. | 164 programmer. |
| 165 | 165 |
| 166 If the ICU extension is used in an environment where potentially | 166 If the ICU extension is used in an environment where potentially |
| 167 malicious users may execute arbitrary SQL (i.e. gears), they | 167 malicious users may execute arbitrary SQL (i.e. gears), they |
| 168 should be prevented from invoking the icu_load_collation() function, | 168 should be prevented from invoking the icu_load_collation() function, |
| 169 possibly using the authorisation callback. | 169 possibly using the authorisation callback. |
| 170 | |
| OLD | NEW |