diff options
| author | 2024-12-08 12:35:39 +0100 | |
|---|---|---|
| committer | 2024-12-08 12:35:39 +0100 | |
| commit | 73a8a8ec2b52c48df87f92fd6463945b2950a95d (patch) | |
| tree | c46ed75a868fd4caabdf267bd154ba5882148973 | |
| parent | Merge branch 'fuzzing' (diff) | |
| download | zig-sqlite-73a8a8ec2b52c48df87f92fd6463945b2950a95d.tar.gz zig-sqlite-73a8a8ec2b52c48df87f92fd6463945b2950a95d.tar.xz zig-sqlite-73a8a8ec2b52c48df87f92fd6463945b2950a95d.zip | |
remove the fuzz directory since it's not used anymore
| -rw-r--r-- | fuzz/LICENSE.apache2 | 201 | ||||
| -rw-r--r-- | fuzz/README.md | 56 | ||||
| -rw-r--r-- | fuzz/inputs/empty_string_crash | bin | 35 -> 0 bytes | |||
| -rw-r--r-- | fuzz/inputs/schema.sql | 1 | ||||
| -rw-r--r-- | fuzz/main.zig | 75 | ||||
| -rw-r--r-- | fuzz/sql.dict | 285 |
6 files changed, 0 insertions, 618 deletions
diff --git a/fuzz/LICENSE.apache2 b/fuzz/LICENSE.apache2 deleted file mode 100644 index 8dada3e..0000000 --- a/fuzz/LICENSE.apache2 +++ /dev/null | |||
| @@ -1,201 +0,0 @@ | |||
| 1 | Apache License | ||
| 2 | Version 2.0, January 2004 | ||
| 3 | http://www.apache.org/licenses/ | ||
| 4 | |||
| 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||
| 6 | |||
| 7 | 1. Definitions. | ||
| 8 | |||
| 9 | "License" shall mean the terms and conditions for use, reproduction, | ||
| 10 | and distribution as defined by Sections 1 through 9 of this document. | ||
| 11 | |||
| 12 | "Licensor" shall mean the copyright owner or entity authorized by | ||
| 13 | the copyright owner that is granting the License. | ||
| 14 | |||
| 15 | "Legal Entity" shall mean the union of the acting entity and all | ||
| 16 | other entities that control, are controlled by, or are under common | ||
| 17 | control with that entity. For the purposes of this definition, | ||
| 18 | "control" means (i) the power, direct or indirect, to cause the | ||
| 19 | direction or management of such entity, whether by contract or | ||
| 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the | ||
| 21 | outstanding shares, or (iii) beneficial ownership of such entity. | ||
| 22 | |||
| 23 | "You" (or "Your") shall mean an individual or Legal Entity | ||
| 24 | exercising permissions granted by this License. | ||
| 25 | |||
| 26 | "Source" form shall mean the preferred form for making modifications, | ||
| 27 | including but not limited to software source code, documentation | ||
| 28 | source, and configuration files. | ||
| 29 | |||
| 30 | "Object" form shall mean any form resulting from mechanical | ||
| 31 | transformation or translation of a Source form, including but | ||
| 32 | not limited to compiled object code, generated documentation, | ||
| 33 | and conversions to other media types. | ||
| 34 | |||
| 35 | "Work" shall mean the work of authorship, whether in Source or | ||
| 36 | Object form, made available under the License, as indicated by a | ||
| 37 | copyright notice that is included in or attached to the work | ||
| 38 | (an example is provided in the Appendix below). | ||
| 39 | |||
| 40 | "Derivative Works" shall mean any work, whether in Source or Object | ||
| 41 | form, that is based on (or derived from) the Work and for which the | ||
| 42 | editorial revisions, annotations, elaborations, or other modifications | ||
| 43 | represent, as a whole, an original work of authorship. For the purposes | ||
| 44 | of this License, Derivative Works shall not include works that remain | ||
| 45 | separable from, or merely link (or bind by name) to the interfaces of, | ||
| 46 | the Work and Derivative Works thereof. | ||
| 47 | |||
| 48 | "Contribution" shall mean any work of authorship, including | ||
| 49 | the original version of the Work and any modifications or additions | ||
| 50 | to that Work or Derivative Works thereof, that is intentionally | ||
| 51 | submitted to Licensor for inclusion in the Work by the copyright owner | ||
| 52 | or by an individual or Legal Entity authorized to submit on behalf of | ||
| 53 | the copyright owner. For the purposes of this definition, "submitted" | ||
| 54 | means any form of electronic, verbal, or written communication sent | ||
| 55 | to the Licensor or its representatives, including but not limited to | ||
| 56 | communication on electronic mailing lists, source code control systems, | ||
| 57 | and issue tracking systems that are managed by, or on behalf of, the | ||
| 58 | Licensor for the purpose of discussing and improving the Work, but | ||
| 59 | excluding communication that is conspicuously marked or otherwise | ||
| 60 | designated in writing by the copyright owner as "Not a Contribution." | ||
| 61 | |||
| 62 | "Contributor" shall mean Licensor and any individual or Legal Entity | ||
| 63 | on behalf of whom a Contribution has been received by Licensor and | ||
| 64 | subsequently incorporated within the Work. | ||
| 65 | |||
| 66 | 2. Grant of Copyright License. Subject to the terms and conditions of | ||
| 67 | this License, each Contributor hereby grants to You a perpetual, | ||
| 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
| 69 | copyright license to reproduce, prepare Derivative Works of, | ||
| 70 | publicly display, publicly perform, sublicense, and distribute the | ||
| 71 | Work and such Derivative Works in Source or Object form. | ||
| 72 | |||
| 73 | 3. Grant of Patent License. Subject to the terms and conditions of | ||
| 74 | this License, each Contributor hereby grants to You a perpetual, | ||
| 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
| 76 | (except as stated in this section) patent license to make, have made, | ||
| 77 | use, offer to sell, sell, import, and otherwise transfer the Work, | ||
| 78 | where such license applies only to those patent claims licensable | ||
| 79 | by such Contributor that are necessarily infringed by their | ||
| 80 | Contribution(s) alone or by combination of their Contribution(s) | ||
| 81 | with the Work to which such Contribution(s) was submitted. If You | ||
| 82 | institute patent litigation against any entity (including a | ||
| 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work | ||
| 84 | or a Contribution incorporated within the Work constitutes direct | ||
| 85 | or contributory patent infringement, then any patent licenses | ||
| 86 | granted to You under this License for that Work shall terminate | ||
| 87 | as of the date such litigation is filed. | ||
| 88 | |||
| 89 | 4. Redistribution. You may reproduce and distribute copies of the | ||
| 90 | Work or Derivative Works thereof in any medium, with or without | ||
| 91 | modifications, and in Source or Object form, provided that You | ||
| 92 | meet the following conditions: | ||
| 93 | |||
| 94 | (a) You must give any other recipients of the Work or | ||
| 95 | Derivative Works a copy of this License; and | ||
| 96 | |||
| 97 | (b) You must cause any modified files to carry prominent notices | ||
| 98 | stating that You changed the files; and | ||
| 99 | |||
| 100 | (c) You must retain, in the Source form of any Derivative Works | ||
| 101 | that You distribute, all copyright, patent, trademark, and | ||
| 102 | attribution notices from the Source form of the Work, | ||
| 103 | excluding those notices that do not pertain to any part of | ||
| 104 | the Derivative Works; and | ||
| 105 | |||
| 106 | (d) If the Work includes a "NOTICE" text file as part of its | ||
| 107 | distribution, then any Derivative Works that You distribute must | ||
| 108 | include a readable copy of the attribution notices contained | ||
| 109 | within such NOTICE file, excluding those notices that do not | ||
| 110 | pertain to any part of the Derivative Works, in at least one | ||
| 111 | of the following places: within a NOTICE text file distributed | ||
| 112 | as part of the Derivative Works; within the Source form or | ||
| 113 | documentation, if provided along with the Derivative Works; or, | ||
| 114 | within a display generated by the Derivative Works, if and | ||
| 115 | wherever such third-party notices normally appear. The contents | ||
| 116 | of the NOTICE file are for informational purposes only and | ||
| 117 | do not modify the License. You may add Your own attribution | ||
| 118 | notices within Derivative Works that You distribute, alongside | ||
| 119 | or as an addendum to the NOTICE text from the Work, provided | ||
| 120 | that such additional attribution notices cannot be construed | ||
| 121 | as modifying the License. | ||
| 122 | |||
| 123 | You may add Your own copyright statement to Your modifications and | ||
| 124 | may provide additional or different license terms and conditions | ||
| 125 | for use, reproduction, or distribution of Your modifications, or | ||
| 126 | for any such Derivative Works as a whole, provided Your use, | ||
| 127 | reproduction, and distribution of the Work otherwise complies with | ||
| 128 | the conditions stated in this License. | ||
| 129 | |||
| 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, | ||
| 131 | any Contribution intentionally submitted for inclusion in the Work | ||
| 132 | by You to the Licensor shall be under the terms and conditions of | ||
| 133 | this License, without any additional terms or conditions. | ||
| 134 | Notwithstanding the above, nothing herein shall supersede or modify | ||
| 135 | the terms of any separate license agreement you may have executed | ||
| 136 | with Licensor regarding such Contributions. | ||
| 137 | |||
| 138 | 6. Trademarks. This License does not grant permission to use the trade | ||
| 139 | names, trademarks, service marks, or product names of the Licensor, | ||
| 140 | except as required for reasonable and customary use in describing the | ||
| 141 | origin of the Work and reproducing the content of the NOTICE file. | ||
| 142 | |||
| 143 | 7. Disclaimer of Warranty. Unless required by applicable law or | ||
| 144 | agreed to in writing, Licensor provides the Work (and each | ||
| 145 | Contributor provides its Contributions) on an "AS IS" BASIS, | ||
| 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
| 147 | implied, including, without limitation, any warranties or conditions | ||
| 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A | ||
| 149 | PARTICULAR PURPOSE. You are solely responsible for determining the | ||
| 150 | appropriateness of using or redistributing the Work and assume any | ||
| 151 | risks associated with Your exercise of permissions under this License. | ||
| 152 | |||
| 153 | 8. Limitation of Liability. In no event and under no legal theory, | ||
| 154 | whether in tort (including negligence), contract, or otherwise, | ||
| 155 | unless required by applicable law (such as deliberate and grossly | ||
| 156 | negligent acts) or agreed to in writing, shall any Contributor be | ||
| 157 | liable to You for damages, including any direct, indirect, special, | ||
| 158 | incidental, or consequential damages of any character arising as a | ||
| 159 | result of this License or out of the use or inability to use the | ||
| 160 | Work (including but not limited to damages for loss of goodwill, | ||
| 161 | work stoppage, computer failure or malfunction, or any and all | ||
| 162 | other commercial damages or losses), even if such Contributor | ||
| 163 | has been advised of the possibility of such damages. | ||
| 164 | |||
| 165 | 9. Accepting Warranty or Additional Liability. While redistributing | ||
| 166 | the Work or Derivative Works thereof, You may choose to offer, | ||
| 167 | and charge a fee for, acceptance of support, warranty, indemnity, | ||
| 168 | or other liability obligations and/or rights consistent with this | ||
| 169 | License. However, in accepting such obligations, You may act only | ||
| 170 | on Your own behalf and on Your sole responsibility, not on behalf | ||
| 171 | of any other Contributor, and only if You agree to indemnify, | ||
| 172 | defend, and hold each Contributor harmless for any liability | ||
| 173 | incurred by, or claims asserted against, such Contributor by reason | ||
| 174 | of your accepting any such warranty or additional liability. | ||
| 175 | |||
| 176 | END OF TERMS AND CONDITIONS | ||
| 177 | |||
| 178 | APPENDIX: How to apply the Apache License to your work. | ||
| 179 | |||
| 180 | To apply the Apache License to your work, attach the following | ||
| 181 | boilerplate notice, with the fields enclosed by brackets "{}" | ||
| 182 | replaced with your own identifying information. (Don't include | ||
| 183 | the brackets!) The text should be enclosed in the appropriate | ||
| 184 | comment syntax for the file format. We also recommend that a | ||
| 185 | file or class name and description of purpose be included on the | ||
| 186 | same "printed page" as the copyright notice for easier | ||
| 187 | identification within third-party archives. | ||
| 188 | |||
| 189 | Copyright {yyyy} {name of copyright owner} | ||
| 190 | |||
| 191 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 192 | you may not use this file except in compliance with the License. | ||
| 193 | You may obtain a copy of the License at | ||
| 194 | |||
| 195 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 196 | |||
| 197 | Unless required by applicable law or agreed to in writing, software | ||
| 198 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 200 | See the License for the specific language governing permissions and | ||
| 201 | limitations under the License. | ||
diff --git a/fuzz/README.md b/fuzz/README.md deleted file mode 100644 index 53f4b93..0000000 --- a/fuzz/README.md +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | # fuzz testing | ||
| 2 | |||
| 3 | This repository contains a binary used for fuzz testing. | ||
| 4 | |||
| 5 | # Acknowledgments | ||
| 6 | |||
| 7 | The fuzz setup with AFL++ comes from [Ryan Liptak's](https://www.ryanliptak.com/blog/fuzzing-zig-code/) blog post. See [this example repo](https://github.com/squeek502/zig-fuzzing-example) too. | ||
| 8 | |||
| 9 | # Prerequisites | ||
| 10 | |||
| 11 | To build the fuzz binary we need the `afl-clang-lto` binary in the system path. | ||
| 12 | The recommended way to get that is to [install AFL++](https://github.com/AFLplusplus/AFLplusplus/blob/stable/docs/INSTALL.md). | ||
| 13 | |||
| 14 | If you don't want to install it system-wide you can also do this instead: | ||
| 15 | ``` | ||
| 16 | make PREFIX=$HOME/local install | ||
| 17 | ``` | ||
| 18 | then make sure that `$HOME/local/bin` is in your system path. | ||
| 19 | |||
| 20 | If you installed LLVM from source as described in the [Zig wiki](https://github.com/ziglang/zig/wiki/How-to-build-LLVM,-libclang,-and-liblld-from-source#posix), do this instead: | ||
| 21 | ``` | ||
| 22 | LLVM_CONFIG=$HOME/local/llvm15-release/bin/llvm-config make PREFIX=$HOME/local install | ||
| 23 | ``` | ||
| 24 | |||
| 25 | # Build and run | ||
| 26 | |||
| 27 | Once AFL++ is installed, build the fuzz binary: | ||
| 28 | ``` | ||
| 29 | $ zig build fuzz | ||
| 30 | ``` | ||
| 31 | |||
| 32 | Finally to run the fuzzer do this: | ||
| 33 | ``` | ||
| 34 | $ afl-fuzz -i - -o fuzz/outputs -- ./zig-out/bin/fuzz | ||
| 35 | ``` | ||
| 36 | |||
| 37 | Note that `afl-fuzz` might complain about core dumps being sent to an external utility (usually systemd). | ||
| 38 | |||
| 39 | You'll have to do this as root: | ||
| 40 | ``` | ||
| 41 | # echo core > /proc/sys/kernel/core_pattern | ||
| 42 | ``` | ||
| 43 | |||
| 44 | `afl-fuzz` might also complain about the scaling governor, setting `AFL_SKIP_CPUFREQ` as suggested is good enough: | ||
| 45 | ``` | ||
| 46 | $ AFL_SKIP_CPUFREQ=1 afl-fuzz -i - -o fuzz/outputs -- ./zig-out/bin/fuzz | ||
| 47 | ``` | ||
| 48 | |||
| 49 | # Debugging a crash | ||
| 50 | |||
| 51 | If `afl-fuzz` finds a crash it will be added to `fuzz/outputs/default/crashes.XYZ`. | ||
| 52 | |||
| 53 | To debug the crash you can run the fuzz binary and giving it the content of the crash via stdin, for example: | ||
| 54 | ``` | ||
| 55 | $ ./zig-out/bin/fuzz < 'fuzz/outputs/default/crashes.2021-12-31-12:43:12/id:000000,sig:06,src:000004,time:210548,execs:1011599,op:havoc,rep:2' | ||
| 56 | ``` | ||
diff --git a/fuzz/inputs/empty_string_crash b/fuzz/inputs/empty_string_crash deleted file mode 100644 index b45e29b..0000000 --- a/fuzz/inputs/empty_string_crash +++ /dev/null | |||
| Binary files differ | |||
diff --git a/fuzz/inputs/schema.sql b/fuzz/inputs/schema.sql deleted file mode 100644 index 85a5643..0000000 --- a/fuzz/inputs/schema.sql +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | CREATE TABLE foobar(user integer primary key, name text, data blob); | ||
diff --git a/fuzz/main.zig b/fuzz/main.zig deleted file mode 100644 index 496409c..0000000 --- a/fuzz/main.zig +++ /dev/null | |||
| @@ -1,75 +0,0 @@ | |||
| 1 | const std = @import("std"); | ||
| 2 | const sqlite = @import("sqlite"); | ||
| 3 | |||
| 4 | pub export fn main() callconv(.C) void { | ||
| 5 | zigMain() catch unreachable; | ||
| 6 | } | ||
| 7 | |||
| 8 | pub fn zigMain() !void { | ||
| 9 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | ||
| 10 | defer std.debug.assert(gpa.deinit() == .ok); | ||
| 11 | const allocator = gpa.allocator(); | ||
| 12 | |||
| 13 | // Read the data from stdin | ||
| 14 | const stdin = std.io.getStdIn(); | ||
| 15 | const data = try stdin.readToEndAlloc(allocator, std.math.maxInt(usize)); | ||
| 16 | defer allocator.free(data); | ||
| 17 | |||
| 18 | var db = try sqlite.Db.init(.{ | ||
| 19 | .mode = .Memory, | ||
| 20 | .open_flags = .{ | ||
| 21 | .write = true, | ||
| 22 | .create = true, | ||
| 23 | }, | ||
| 24 | }); | ||
| 25 | defer db.deinit(); | ||
| 26 | |||
| 27 | try db.exec("CREATE TABLE test(id integer primary key, name text, data blob)", .{}, .{}); | ||
| 28 | |||
| 29 | db.execDynamic(data, .{}, .{}) catch |err| switch (err) { | ||
| 30 | error.SQLiteError => return, | ||
| 31 | error.ExecReturnedData => return, | ||
| 32 | else => return err, | ||
| 33 | }; | ||
| 34 | |||
| 35 | db.execDynamic( | ||
| 36 | "INSERT INTO test(name, data) VALUES($name, $data)", | ||
| 37 | .{}, | ||
| 38 | .{ | ||
| 39 | .name = data, | ||
| 40 | .data = data, | ||
| 41 | }, | ||
| 42 | ) catch |err| switch (err) { | ||
| 43 | error.SQLiteError => return, | ||
| 44 | else => return err, | ||
| 45 | }; | ||
| 46 | |||
| 47 | var stmt = db.prepareDynamic("SELECT name, data FROM test") catch |err| switch (err) { | ||
| 48 | error.SQLiteError => return, | ||
| 49 | else => return err, | ||
| 50 | }; | ||
| 51 | defer stmt.deinit(); | ||
| 52 | |||
| 53 | var rows_arena = std.heap.ArenaAllocator.init(allocator); | ||
| 54 | defer rows_arena.deinit(); | ||
| 55 | |||
| 56 | const row_opt = stmt.oneAlloc( | ||
| 57 | struct { | ||
| 58 | name: sqlite.Text, | ||
| 59 | data: sqlite.Blob, | ||
| 60 | }, | ||
| 61 | rows_arena.allocator(), | ||
| 62 | .{}, | ||
| 63 | .{}, | ||
| 64 | ) catch |err| switch (err) { | ||
| 65 | error.SQLiteError => return, | ||
| 66 | else => return err, | ||
| 67 | }; | ||
| 68 | |||
| 69 | if (row_opt) |row| { | ||
| 70 | if (!std.mem.eql(u8, row.name.data, data)) return error.InvalidNameField; | ||
| 71 | if (!std.mem.eql(u8, row.data.data, data)) return error.InvalidDataField; | ||
| 72 | } else { | ||
| 73 | return error.NoRowsFound; | ||
| 74 | } | ||
| 75 | } | ||
diff --git a/fuzz/sql.dict b/fuzz/sql.dict deleted file mode 100644 index 7121062..0000000 --- a/fuzz/sql.dict +++ /dev/null | |||
| @@ -1,285 +0,0 @@ | |||
| 1 | # Taken from https://github.com/google/oss-fuzz/blob/f64134b0b3c2b27a4283e55581d41d83d3c3a64f/projects/sqlite3/sql.dict | ||
| 2 | # This code is licensed under the Apache License 2.0, which you can find in the file LICENSE.apache2 | ||
| 3 | # This code is Copyright Google. | ||
| 4 | # | ||
| 5 | # AFL dictionary for SQL | ||
| 6 | # ---------------------- | ||
| 7 | # | ||
| 8 | # Modeled based on SQLite documentation, contains some number of SQLite | ||
| 9 | # extensions. Other dialects of SQL may benefit from customized dictionaries. | ||
| 10 | # | ||
| 11 | # If you append @1 to the file name when loading this dictionary, afl-fuzz | ||
| 12 | # will also additionally load a selection of pragma keywords that are very | ||
| 13 | # specific to SQLite (and are probably less interesting from the security | ||
| 14 | # standpoint, because they are usually not allowed in non-privileged | ||
| 15 | # contexts). | ||
| 16 | # | ||
| 17 | # Created by Michal Zalewski <lcamtuf@google.com> | ||
| 18 | # | ||
| 19 | |||
| 20 | function_abs=" abs(1)" | ||
| 21 | function_avg=" avg(1)" | ||
| 22 | function_changes=" changes()" | ||
| 23 | function_char=" char(1)" | ||
| 24 | function_coalesce=" coalesce(1,1)" | ||
| 25 | function_count=" count(1)" | ||
| 26 | function_date=" date(1,1,1)" | ||
| 27 | function_datetime=" datetime(1,1,1)" | ||
| 28 | function_decimal=" decimal(1,1)" | ||
| 29 | function_glob=" glob(1,1)" | ||
| 30 | function_group_concat=" group_concat(1,1)" | ||
| 31 | function_hex=" hex(1)" | ||
| 32 | function_ifnull=" ifnull(1,1)" | ||
| 33 | function_instr=" instr(1,1)" | ||
| 34 | function_julianday=" julianday(1,1,1)" | ||
| 35 | function_last_insert_rowid=" last_insert_rowid()" | ||
| 36 | function_length=" length(1)" | ||
| 37 | function_like=" like(1,1)" | ||
| 38 | function_likelihood=" likelihood(1,1)" | ||
| 39 | function_likely=" likely(1)" | ||
| 40 | function_load_extension=" load_extension(1,1)" | ||
| 41 | function_lower=" lower(1)" | ||
| 42 | function_ltrim=" ltrim(1,1)" | ||
| 43 | function_max=" max(1,1)" | ||
| 44 | function_min=" min(1,1)" | ||
| 45 | function_nullif=" nullif(1,1)" | ||
| 46 | function_printf=" printf(1,1)" | ||
| 47 | function_quote=" quote(1)" | ||
| 48 | function_random=" random()" | ||
| 49 | function_randomblob=" randomblob(1)" | ||
| 50 | function_replace=" replace(1,1,1)" | ||
| 51 | function_round=" round(1,1)" | ||
| 52 | function_rtrim=" rtrim(1,1)" | ||
| 53 | function_soundex=" soundex(1)" | ||
| 54 | function_sqlite_compileoption_get=" sqlite_compileoption_get(1)" | ||
| 55 | function_sqlite_compileoption_used=" sqlite_compileoption_used(1)" | ||
| 56 | function_sqlite_source_id=" sqlite_source_id()" | ||
| 57 | function_sqlite_version=" sqlite_version()" | ||
| 58 | function_strftime=" strftime(1,1,1,1)" | ||
| 59 | function_substr=" substr(1,1,1)" | ||
| 60 | function_sum=" sum(1)" | ||
| 61 | function_time=" time(1,1,1)" | ||
| 62 | function_total=" total(1)" | ||
| 63 | function_total_changes=" total_changes()" | ||
| 64 | function_trim=" trim(1,1)" | ||
| 65 | function_typeof=" typeof(1)" | ||
| 66 | function_unicode=" unicode(1)" | ||
| 67 | function_unlikely=" unlikely(1)" | ||
| 68 | function_upper=" upper(1)" | ||
| 69 | function_varchar=" varchar(1)" | ||
| 70 | function_zeroblob=" zeroblob(1)" | ||
| 71 | |||
| 72 | keyword_ABORT="ABORT" | ||
| 73 | keyword_ACTION="ACTION" | ||
| 74 | keyword_ADD="ADD" | ||
| 75 | keyword_AFTER="AFTER" | ||
| 76 | keyword_ALL="ALL" | ||
| 77 | keyword_ALTER="ALTER" | ||
| 78 | keyword_ANALYZE="ANALYZE" | ||
| 79 | keyword_AND="AND" | ||
| 80 | keyword_AS="AS" | ||
| 81 | keyword_ASC="ASC" | ||
| 82 | keyword_ATTACH="ATTACH" | ||
| 83 | keyword_AUTOINCREMENT="AUTOINCREMENT" | ||
| 84 | keyword_BEFORE="BEFORE" | ||
| 85 | keyword_BEGIN="BEGIN" | ||
| 86 | keyword_BETWEEN="BETWEEN" | ||
| 87 | keyword_BY="BY" | ||
| 88 | keyword_CASCADE="CASCADE" | ||
| 89 | keyword_CASE="CASE" | ||
| 90 | keyword_CAST="CAST" | ||
| 91 | keyword_CHECK="CHECK" | ||
| 92 | keyword_COLLATE="COLLATE" | ||
| 93 | keyword_COLUMN="COLUMN" | ||
| 94 | keyword_COMMIT="COMMIT" | ||
| 95 | keyword_CONFLICT="CONFLICT" | ||
| 96 | keyword_CONSTRAINT="CONSTRAINT" | ||
| 97 | keyword_CREATE="CREATE" | ||
| 98 | keyword_CROSS="CROSS" | ||
| 99 | keyword_CURRENT_DATE="CURRENT_DATE" | ||
| 100 | keyword_CURRENT_TIME="CURRENT_TIME" | ||
| 101 | keyword_CURRENT_TIMESTAMP="CURRENT_TIMESTAMP" | ||
| 102 | keyword_DATABASE="DATABASE" | ||
| 103 | keyword_DEFAULT="DEFAULT" | ||
| 104 | keyword_DEFERRABLE="DEFERRABLE" | ||
| 105 | keyword_DEFERRED="DEFERRED" | ||
| 106 | keyword_DELETE="DELETE" | ||
| 107 | keyword_DESC="DESC" | ||
| 108 | keyword_DETACH="DETACH" | ||
| 109 | keyword_DISTINCT="DISTINCT" | ||
| 110 | keyword_DROP="DROP" | ||
| 111 | keyword_EACH="EACH" | ||
| 112 | keyword_ELSE="ELSE" | ||
| 113 | keyword_END="END" | ||
| 114 | keyword_ESCAPE="ESCAPE" | ||
| 115 | keyword_EXCEPT="EXCEPT" | ||
| 116 | keyword_EXCLUSIVE="EXCLUSIVE" | ||
| 117 | keyword_EXISTS="EXISTS" | ||
| 118 | keyword_EXPLAIN="EXPLAIN" | ||
| 119 | keyword_FAIL="FAIL" | ||
| 120 | keyword_FOR="FOR" | ||
| 121 | keyword_FOREIGN="FOREIGN" | ||
| 122 | keyword_FROM="FROM" | ||
| 123 | keyword_FULL="FULL" | ||
| 124 | keyword_GLOB="GLOB" | ||
| 125 | keyword_GROUP="GROUP" | ||
| 126 | keyword_HAVING="HAVING" | ||
| 127 | keyword_IF="IF" | ||
| 128 | keyword_IGNORE="IGNORE" | ||
| 129 | keyword_IMMEDIATE="IMMEDIATE" | ||
| 130 | keyword_IN="IN" | ||
| 131 | keyword_INDEX="INDEX" | ||
| 132 | keyword_INDEXED="INDEXED" | ||
| 133 | keyword_INITIALLY="INITIALLY" | ||
| 134 | keyword_INNER="INNER" | ||
| 135 | keyword_INSERT="INSERT" | ||
| 136 | keyword_INSTEAD="INSTEAD" | ||
| 137 | keyword_INTERSECT="INTERSECT" | ||
| 138 | keyword_INTO="INTO" | ||
| 139 | keyword_IS="IS" | ||
| 140 | keyword_ISNULL="ISNULL" | ||
| 141 | keyword_JOIN="JOIN" | ||
| 142 | keyword_KEY="KEY" | ||
| 143 | keyword_LEFT="LEFT" | ||
| 144 | keyword_LIKE="LIKE" | ||
| 145 | keyword_LIMIT="LIMIT" | ||
| 146 | keyword_MATCH="MATCH" | ||
| 147 | keyword_NATURAL="NATURAL" | ||
| 148 | keyword_NO="NO" | ||
| 149 | keyword_NOT="NOT" | ||
| 150 | keyword_NOTNULL="NOTNULL" | ||
| 151 | keyword_NULL="NULL" | ||
| 152 | keyword_OF="OF" | ||
| 153 | keyword_OFFSET="OFFSET" | ||
| 154 | keyword_ON="ON" | ||
| 155 | keyword_OR="OR" | ||
| 156 | keyword_ORDER="ORDER" | ||
| 157 | keyword_OUTER="OUTER" | ||
| 158 | keyword_PLAN="PLAN" | ||
| 159 | keyword_PRAGMA="PRAGMA" | ||
| 160 | keyword_PRIMARY="PRIMARY" | ||
| 161 | keyword_QUERY="QUERY" | ||
| 162 | keyword_RAISE="RAISE" | ||
| 163 | keyword_RECURSIVE="RECURSIVE" | ||
| 164 | keyword_REFERENCES="REFERENCES" | ||
| 165 | #keyword_REGEXP="REGEXP" | ||
| 166 | keyword_REINDEX="REINDEX" | ||
| 167 | keyword_RELEASE="RELEASE" | ||
| 168 | keyword_RENAME="RENAME" | ||
| 169 | keyword_REPLACE="REPLACE" | ||
| 170 | keyword_RESTRICT="RESTRICT" | ||
| 171 | keyword_RIGHT="RIGHT" | ||
| 172 | keyword_ROLLBACK="ROLLBACK" | ||
| 173 | keyword_ROW="ROW" | ||
| 174 | keyword_SAVEPOINT="SAVEPOINT" | ||
| 175 | keyword_SELECT="SELECT" | ||
| 176 | keyword_SET="SET" | ||
| 177 | keyword_TABLE="TABLE" | ||
| 178 | keyword_TEMP="TEMP" | ||
| 179 | keyword_TEMPORARY="TEMPORARY" | ||
| 180 | keyword_THEN="THEN" | ||
| 181 | keyword_TO="TO" | ||
| 182 | keyword_TRANSACTION="TRANSACTION" | ||
| 183 | keyword_TRIGGER="TRIGGER" | ||
| 184 | keyword_UNION="UNION" | ||
| 185 | keyword_UNIQUE="UNIQUE" | ||
| 186 | keyword_UPDATE="UPDATE" | ||
| 187 | keyword_USING="USING" | ||
| 188 | keyword_VACUUM="VACUUM" | ||
| 189 | keyword_VALUES="VALUES" | ||
| 190 | keyword_VIEW="VIEW" | ||
| 191 | keyword_VIRTUAL="VIRTUAL" | ||
| 192 | keyword_WHEN="WHEN" | ||
| 193 | keyword_WHERE="WHERE" | ||
| 194 | keyword_WITH="WITH" | ||
| 195 | keyword_WITHOUT="WITHOUT" | ||
| 196 | |||
| 197 | operator_concat=" || " | ||
| 198 | operator_ebove_eq=" >=" | ||
| 199 | |||
| 200 | snippet_1eq1=" 1=1" | ||
| 201 | snippet_at=" @1" | ||
| 202 | snippet_backticks=" `a`" | ||
| 203 | snippet_blob=" blob" | ||
| 204 | snippet_brackets=" [a]" | ||
| 205 | snippet_colon=" :1" | ||
| 206 | snippet_comment=" /* */" | ||
| 207 | snippet_date="2001-01-01" | ||
| 208 | snippet_dollar=" $1" | ||
| 209 | snippet_dotref=" a.b" | ||
| 210 | snippet_fmtY="%Y" | ||
| 211 | snippet_int=" int" | ||
| 212 | snippet_neg1=" -1" | ||
| 213 | snippet_pair=" a,b" | ||
| 214 | snippet_parentheses=" (1)" | ||
| 215 | snippet_plus2days="+2 days" | ||
| 216 | snippet_qmark=" ?1" | ||
| 217 | snippet_semicolon=" ;" | ||
| 218 | snippet_star=" *" | ||
| 219 | snippet_string_pair=" \"a\",\"b\"" | ||
| 220 | |||
| 221 | string_dbl_q=" \"a\"" | ||
| 222 | string_escaped_q=" 'a''b'" | ||
| 223 | string_single_q=" 'a'" | ||
| 224 | |||
| 225 | pragma_application_id@1=" application_id" | ||
| 226 | pragma_auto_vacuum@1=" auto_vacuum" | ||
| 227 | pragma_automatic_index@1=" automatic_index" | ||
| 228 | pragma_busy_timeout@1=" busy_timeout" | ||
| 229 | pragma_cache_size@1=" cache_size" | ||
| 230 | pragma_cache_spill@1=" cache_spill" | ||
| 231 | pragma_case_sensitive_like@1=" case_sensitive_like" | ||
| 232 | pragma_checkpoint_fullfsync@1=" checkpoint_fullfsync" | ||
| 233 | pragma_collation_list@1=" collation_list" | ||
| 234 | pragma_compile_options@1=" compile_options" | ||
| 235 | pragma_count_changes@1=" count_changes" | ||
| 236 | pragma_data_store_directory@1=" data_store_directory" | ||
| 237 | pragma_database_list@1=" database_list" | ||
| 238 | pragma_default_cache_size@1=" default_cache_size" | ||
| 239 | pragma_defer_foreign_keys@1=" defer_foreign_keys" | ||
| 240 | pragma_empty_result_callbacks@1=" empty_result_callbacks" | ||
| 241 | pragma_encoding@1=" encoding" | ||
| 242 | pragma_foreign_key_check@1=" foreign_key_check" | ||
| 243 | pragma_foreign_key_list@1=" foreign_key_list" | ||
| 244 | pragma_foreign_keys@1=" foreign_keys" | ||
| 245 | pragma_freelist_count@1=" freelist_count" | ||
| 246 | pragma_full_column_names@1=" full_column_names" | ||
| 247 | pragma_fullfsync@1=" fullfsync" | ||
| 248 | pragma_ignore_check_constraints@1=" ignore_check_constraints" | ||
| 249 | pragma_incremental_vacuum@1=" incremental_vacuum" | ||
| 250 | pragma_index_info@1=" index_info" | ||
| 251 | pragma_index_list@1=" index_list" | ||
| 252 | pragma_integrity_check@1=" integrity_check" | ||
| 253 | pragma_journal_mode@1=" journal_mode" | ||
| 254 | pragma_journal_size_limit@1=" journal_size_limit" | ||
| 255 | pragma_legacy_file_format@1=" legacy_file_format" | ||
| 256 | pragma_locking_mode@1=" locking_mode" | ||
| 257 | pragma_max_page_count@1=" max_page_count" | ||
| 258 | pragma_mmap_size@1=" mmap_size" | ||
| 259 | pragma_page_count@1=" page_count" | ||
| 260 | pragma_page_size@1=" page_size" | ||
| 261 | pragma_parser_trace@1=" parser_trace" | ||
| 262 | pragma_query_only@1=" query_only" | ||
| 263 | pragma_quick_check@1=" quick_check" | ||
| 264 | pragma_read_uncommitted@1=" read_uncommitted" | ||
| 265 | pragma_recursive_triggers@1=" recursive_triggers" | ||
| 266 | pragma_reverse_unordered_selects@1=" reverse_unordered_selects" | ||
| 267 | pragma_schema_version@1=" schema_version" | ||
| 268 | pragma_secure_delete@1=" secure_delete" | ||
| 269 | pragma_short_column_names@1=" short_column_names" | ||
| 270 | pragma_shrink_memory@1=" shrink_memory" | ||
| 271 | pragma_soft_heap_limit@1=" soft_heap_limit" | ||
| 272 | pragma_stats@1=" stats" | ||
| 273 | pragma_synchronous@1=" synchronous" | ||
| 274 | pragma_table_info@1=" table_info" | ||
| 275 | pragma_temp_store@1=" temp_store" | ||
| 276 | pragma_temp_store_directory@1=" temp_store_directory" | ||
| 277 | pragma_threads@1=" threads" | ||
| 278 | pragma_user_version@1=" user_version" | ||
| 279 | pragma_vdbe_addoptrace@1=" vdbe_addoptrace" | ||
| 280 | pragma_vdbe_debug@1=" vdbe_debug" | ||
| 281 | pragma_vdbe_listing@1=" vdbe_listing" | ||
| 282 | pragma_vdbe_trace@1=" vdbe_trace" | ||
| 283 | pragma_wal_autocheckpoint@1=" wal_autocheckpoint" | ||
| 284 | pragma_wal_checkpoint@1=" wal_checkpoint" | ||
| 285 | pragma_writable_schema@1=" writable_schema" | ||