stephan
ec8298fbd1
More SQLTester docs. Add --verbosity command to help zoom in on script areas while debugging. Spice up test-start/end output with some emoji.
...
FossilOrigin-Name: 8dd08021496f504c23945ecc2bbe1e4a13109fdd03457ca6269b4cb1cc4cd04c
2023-08-10 10:34:50 +00:00
stephan
63fb588d30
Give DbException the option of closing the db to simplify error handling in one case.
...
FossilOrigin-Name: 908c9a44505422a3a15bef3a174d8b931863bc9c74485311a0e62cfec30087bd
2023-08-10 05:25:13 +00:00
stephan
6a61a19f9a
Initial version of REQUIRED_PROPERTIES support for SQLTester, with TEMPSTORE_(FILE/MEM) and RECURSIVE_TRIGGERS options.
...
FossilOrigin-Name: 48d16c9d2fe5f54b09004b4f09759c4e2ad247ae84130feb557951e32f48976a
2023-08-10 05:14:22 +00:00
stephan
f703dfa381
Generic cleanups and fixes in SQLTester.
...
FossilOrigin-Name: fc5d3cc30d2b96da42ea10dfb39f1631ff93b8384514fffd641b343df51da2a6
2023-08-10 04:24:12 +00:00
stephan
eda67031de
Change the SQLite3Jni API annotations to use SOURCE retention (used only at compile-time).
...
FossilOrigin-Name: 3c3fea6bf284721ac376e2ab5a757cf30245dd39264aaf98a8d6cd5575484275
2023-08-10 02:09:12 +00:00
stephan
0c6df29cba
Move all of the SQLTester code into a single file, since it's only got 1 public class. Remove 'public' from many methods which don't need it. Add more documentation to it.
...
FossilOrigin-Name: 2815d676951abdab674c374fd903486ea5796f8ee4cb338d41f19693419f8471
2023-08-10 01:44:48 +00:00
stephan
2a91065145
Defer static JNI-side init of SQLTester until main() is called so that its auto-extensions do not leak over to clients of the main library.
...
FossilOrigin-Name: e461fdd53bd3212bee24ec5f5d5c234011ab30f3f67e115de9f85fdb760e3848
2023-08-10 01:19:40 +00:00
stephan
58c2ca4483
Merge trunk into jni branch.
...
FossilOrigin-Name: 52fa6f78414c41073431c166550806bb8a835bd38cfc1236c9363784c78b81b9
2023-08-10 01:05:28 +00:00
stephan
50a17a1b3a
Treat all args to --glob as a single glob.
...
FossilOrigin-Name: 4737bd345732e34cabbf90821e007d3027e68d6583c2e05e1e8bf5920373a6dc
2023-08-10 01:03:19 +00:00
stephan
3a0e45d0af
Remove --print's ability to read ahead.
...
FossilOrigin-Name: 15cfee972bcbd857d18ea626c9a9da64b2a445516946f3dd83c75a4f6b8a92fa
2023-08-10 00:58:48 +00:00
stephan
84c1a7b49f
Replace the SQLTester infrastructure with a line-oriented, non-regex-heavy parser. Add --column-names command.
...
FossilOrigin-Name: 88863908ee2059c2d18a095cbd91f41674c7b0d0a8864ec21715a5317054df4d
2023-08-10 00:34:38 +00:00
stephan
e35a703b76
Port the SQLTester 'v1' commands to the 'v2' evaluation bits. Still TODO is swapping out v1 with these separate impls.
...
FossilOrigin-Name: 0cf57e5b0f90779e450e9db1ca009610df5e6f4487337d49017636bde3bb02d6
2023-08-09 23:47:14 +00:00
stephan
35af4c5ff1
Correct REQUIRED_PROPERTIES handling to not fail if there are no properties.
...
FossilOrigin-Name: 7a19bef4f572a90fb7896b9360f9c72b052955ca9b0549be870b2b245c1f1b2b
2023-08-09 22:30:10 +00:00
stephan
bef0369ff4
More for the SQLTester rework. Can read input and dispatch commands, but only --print is currently implemented.
...
FossilOrigin-Name: 4fa2ad33edbcef393dd98dbf90586ad8f32ec0beab02f197c8038a44be86c314
2023-08-09 22:18:22 +00:00
stephan
e41c09ac8c
Initial sketches of a line-by-line parser for SQLTester to overcome its compatibility shortcomings. Far from complete.
...
FossilOrigin-Name: 43534cd042499c1bef44ca5c4a8305a710d99e70e8b0adce6df50c6a1f0402b9
2023-08-09 19:51:39 +00:00
stephan
e0fb44090b
Adapt TestScript to skip REQUIRED_PROPERTIES, per [7a07863e082664da], and improve a couple of adject reasons-for-skipping messages.
...
FossilOrigin-Name: f937097e9b22a6c78c242cbf00c71bdc57f04b1b9a15ae24058bc2813c99688c
2023-08-09 18:25:50 +00:00
drh
7f66a3eeb2
Add an extra constraint to the test-script-interpreter.md spec.
...
FossilOrigin-Name: 7a07863e082664da2efcf4ecd36785d2583abbda12526cdb643cf1aa0568292e
2023-08-09 17:47:34 +00:00
stephan
16e620e07f
SQLTester --result command: do not double-{}-wrap error messages and do not throw on db error.
...
FossilOrigin-Name: f7be20f5a62f8970f957e5c3a1d1c6536995df5c078dbac34a44f09682e43945
2023-08-09 17:23:52 +00:00
stephan
5d2a618340
Move the test command body's trim() back into the TestScript class (to simplify Command-level code) but do it after double-verbose has had the chance to emit it as-is (so that debug output is not mangled by the trim).
...
FossilOrigin-Name: f15ecb68f7ca129478336b462508d2c40ea052b4040facefdbc67b13e6aea99d
2023-08-09 17:04:58 +00:00
stephan
583fc5b963
Tweak the SQLTester --verbose and double-verbose output a bit for legibility.
...
FossilOrigin-Name: 46b79afaafda40cb1f920cc96600adf11e8c688184c9559a08eb86776ccf3663
2023-08-09 16:56:42 +00:00
stephan
589857b965
Strip --oom commands from SQLTester input since (A) we can't currently do anything with them and (B) they can appear as body content of --testcase commands and the current parser cannot deal with that. If --verbose is provided once, emit the name and args of each command as it's run. If --verbose is used twice or more, also emit the command's body text, if any.
...
FossilOrigin-Name: 0770e8467d4bb9490d9ed6e8a20766ffee7049cc3667db6d036c13fccbb6f3ab
2023-08-09 16:29:07 +00:00
stephan
bd87174bae
Update the definition of "special characters" for the SQLTester and correct the code to match it.
...
FossilOrigin-Name: 217f6e0c9c09c576b09ea59fce085a53d1a133927046102b4d00fd58109efc93
2023-08-09 16:03:12 +00:00
stephan
65c7226e31
Extend TestScript to be able to report why it should be skipped. Expand the test-skipping rules to account for the current spec doc. Add the {} empty-string case to the spec doc.
...
FossilOrigin-Name: 4fcc8cb0cc2bbc0da71bdb99dacfdec54814af4c0e4c37619bad6a8e5fa62937
2023-08-09 15:46:55 +00:00
stephan
5b400552be
Add a test for the --null command.
...
FossilOrigin-Name: 83ac815debcc75dac1fbbdc17736f5e33fb675fdab0bf649367592a0d18074e4
2023-08-09 14:47:01 +00:00
stephan
aa6b35cc80
Extend SQLTester glob support with '#'.
...
FossilOrigin-Name: 756ef83f45b69d9f78965ef1171d36477a32f938fe179e59b95f32f07849c0e5
2023-08-09 14:43:54 +00:00
stephan
4340f27e17
Implement the SQLTester's result escaping rules.
...
FossilOrigin-Name: 61bb950873a1ec45a71b15a0ab5128a50417c4ecdd7d5bd9add0c18afcbadf34
2023-08-09 14:24:22 +00:00
stephan
5158a9a9a7
Add --json and --json-block SQLTester commands.
...
FossilOrigin-Name: 478129d901824e675d86494044f73c313532e9f80e7ee6f425474df8237a82f5
2023-08-09 13:51:50 +00:00
stephan
ff6b15fbb2
Add SQLTester --tableresult command.
...
FossilOrigin-Name: 8c5b6d893df4a4e82c6d8e07507fc160b11412ede4bb903ff4e3f5ffa59a9cb9
2023-08-09 13:16:10 +00:00
stephan
aec9aa9289
Clean up the SQLTester output a bit by using the module name, instead of filename, where appropriate.
...
FossilOrigin-Name: 5323e4fd254274cc527af7536c622b786394599c68eca2da6c7fc641727dbdb2
2023-08-09 12:05:17 +00:00
stephan
283e87146c
Document SQLTester's --print command and add some argument validation to it.
...
FossilOrigin-Name: ab9c945bb0b4210b3f47e6341f150f8a7cc45f9e4e4c2247e91d2528ed4772a6
2023-08-09 11:10:48 +00:00
stephan
e6c29da777
Rework how SQLTester's Command objects are dispatched and how TestScript stores its command entries.
...
FossilOrigin-Name: f929f1f7f70181813f74562614f3f2aa29e65590560e3fce1677b8b176e3c6de
2023-08-09 11:05:43 +00:00
stephan
23a35c2145
Some minor tweaks in SQLTester in prep for larger refactoring.
...
FossilOrigin-Name: 1d93f93ac9708839e62d2f1b489adc5d47ff290c2d5aef4dd56be4e1e46c81b2
2023-08-09 09:56:37 +00:00
stephan
41f9449016
Remove the current-statement tracking from the JNI internals because it will break down in the face of client-side mixed-mode native/java code, e.g. in cases like SQLTester. This makes tracing of sqlite3_stmt a micron slower but also reliably correct.
...
FossilOrigin-Name: 4c0ec89dca00a9199d1e36768c034aa5eff03b13b5e015cf580f160dc4f141ad
2023-08-08 22:10:27 +00:00
stephan
78fc4ae4d9
Adapt JNI build to be buildable with or without SQLTester.
...
FossilOrigin-Name: adae7d78692af73e770a9cc0a4264ab32ecc18a5c0deb64f3c1e790d959bab43
2023-08-08 21:22:56 +00:00
stephan
c783fd36dc
Add SQLTester dup() and dup_count() UDFs. Correct arg handling of the --run command.
...
FossilOrigin-Name: 0dba3073f44685a51a5db7ff8886295fe04dfd43f69cbf53ad3d5afce741076b
2023-08-08 21:05:39 +00:00
stephan
4d3aa08f67
Correct --result arg count check and add infrastructure to let us add custom C-side behavior to SQLTester via an auto extension.
...
FossilOrigin-Name: bb8321702eea52fa9d42987a4b053b32d8eba15580a39d7831cd8d6f1ceb62bf
2023-08-08 20:41:29 +00:00
stephan
c15dce9f92
If SQLTester now treats a no-args --result as comparing against an empty string.
...
FossilOrigin-Name: 49005ca5cc191c52279bc7fdb45d95eeb6f8e344f78ce9dbd97aac814bc21202
2023-08-08 20:15:42 +00:00
stephan
af825cd50b
Add glob/notglob commands to SQLTester and complete the interrupted-midway impls of the strglob() and strlike() JNI bindings.
...
FossilOrigin-Name: 4ba98ec0bf24c31cce498031cb3727e09f928f54ec13c76fec50e439e0f2ba15
2023-08-08 20:02:10 +00:00
stephan
746bb422ea
When SQLTester hits an unknown command, emit a warning and skip the rest of that script instead of aborting the whole run, per /chat discussion. Reduce verbosity a bit.
...
FossilOrigin-Name: 3e78d22d04e6ac2606bfc5ce250a4c3b39a2062e14011ca0a8a0a85491efbfde
2023-08-08 19:20:12 +00:00
drh
80c438613a
Minor cleanups in sqlite3Int.h. By reordering some fields in the Parse
...
object, it packs more tightly and uses less memory and less CPU to
initialize.
FossilOrigin-Name: aa6de539c09faa320b68c63659e602107145c4263fa680d5b40fe4d7d7ac4534
2023-08-08 17:36:03 +00:00
drh
73cdbeb632
Fix an issue in the amalgamation generator in which it was not correctly
...
expanding the SQLite version in the header comment.
FossilOrigin-Name: 293f6191e9b328cb8a8d3fff0f7bd5a6f5390b5ff090497a170c791b6ea22917
2023-08-08 16:53:12 +00:00
stephan
bff14ecfcc
Correct the spacing output of multi-select SQL blocks for SQLTester --result.
...
FossilOrigin-Name: 8d98645a9e524b30f7faa1cffd8f09e7aab3c25ac7b08dd6884141dfe9cdb0d3
2023-08-08 14:58:00 +00:00
drh
358c531e9b
Updates to the test script interpreter spec: Rather than failing immediately
...
upon encountering an incompatibility, simply abandon the rest of that particular
input file.
FossilOrigin-Name: d2c99b96f4b61561c3fa34947ca7bfd2cd214b1913aff7ba64b7b897a574fea3
2023-08-08 14:49:16 +00:00
stephan
671757f4d4
A number of baby steps for SQLTester.java. It can now handle basic --result cases.
...
FossilOrigin-Name: 0404f688f6a22b6bbe009de1bee3341ca00e19e2cc32081265cf151876dc032f
2023-08-08 14:40:47 +00:00
drh
aa29140637
Add a few words of clarification on how the SQLite Test Script Interpreter
...
should be initialized to start each test script.
FossilOrigin-Name: 3aa2b5a5cadb214dc64a3db412b7dfdd805abd8681b61da857b886cba3b937b5
2023-08-08 14:25:47 +00:00
stephan
5f4e94722b
Correct JNI sqlite3_prepare() to emit a null stmt handle when the C counterpart succeeds but results in a NULL pointer.
...
FossilOrigin-Name: 94628f88b5cc82832f0ca2b00fd5346bfe99323097c6e659c5ac818c4e31d3e9
2023-08-08 13:05:12 +00:00
stephan
405dffd591
Implement the new/open/close SQLTester commands.
...
FossilOrigin-Name: dc823bf00f78e7cd626329220c42c46da12d565e3273a08eda5fb512c1d807c6
2023-08-08 11:46:46 +00:00
stephan
ec9b37b33e
Add a JNI-layer sqlite3.toString() for debugging.
...
FossilOrigin-Name: 456691649aa2a7672d5d110acdde92426a9d34552863db3e0c86b73d9c5d9aac
2023-08-08 11:46:26 +00:00
stephan
c693bd59f7
Bind sqlite3_strlike/strglob() to JNI.
...
FossilOrigin-Name: eb5440f71be32812f6310756b8e30958002e8e8e41a7eb16f081058ff733b47c
2023-08-08 10:58:16 +00:00
stephan
aeae7904a5
SQLTester: add print command and improve argument error reporting infrastructure.
...
FossilOrigin-Name: 1b6e84f6aa5c7626a308b5e8efe5c3d83ec8e7eaa803f047576b7c65333c2d44
2023-08-08 09:45:33 +00:00