Commit Graph

543 Commits

Author SHA1 Message Date
drh 96a206fa10 Improved ability to generate stand-alone program using TCL and SQLite by
compiling with -DTCLSH_INIT_PROC=name to cause the TCL interpreter to be
initialized using procedure name().  Both sqlite3_analyzer and testfixture
are now built this way.

FossilOrigin-Name: d65d1f297ddb07b799ff5b2e560575fc59a6fa74c752269cc85ab84348fb7da4
2017-10-13 20:14:06 +00:00
drh 903b23022d Add the tcl/mkccode.tcl script used to construct a single C-language source
fiel for programs that combine C-code, SQLite, and TCL.  Use this script to
construct the sqlite3_analyzer program.

FossilOrigin-Name: 298a3fddec459c4fd2b840bd363239dc627f1dda90e2d5e478846cb895a8ad82
2017-10-13 18:58:55 +00:00
drh 1df6470d35 When compiling with SQLITE_TEST, extra options are available on the
"DB version" command for controlling the internal state of the SqliteDb
object, for testing purposes.

FossilOrigin-Name: bf86478d9c6b899d6441e80cf9d17b58731e5d354e31b11f0d58a798f6fab896
2017-10-13 15:56:26 +00:00
drh c318f730a4 Move some test logic out of tclsqlite.c and into auxiliary test_*.c files.
This is a work in progress.

FossilOrigin-Name: 95b7687fed75b32a62a0c62d397f4f543bf40095e13c22e15938d5dcfd71fcdf
2017-10-13 15:06:06 +00:00
drh 88dd668942 Add the sqlite_dbpage virtual table (enabled using SQLITE_ENABLE_DBPAGE_VTAB).
Make that virtual table and dbstat available to the command-line shell.

FossilOrigin-Name: eaeeb09d4aa1dbccdd2488af8461e2a8c8a53d92c63fd56330be041ad72a9e4a
2017-10-12 20:37:20 +00:00
drh aa62d2e48f The src/shell.c file is now generated from src/shell.c.in, so remove shell.c
from version control and update the makefiles to build it automatically.

FossilOrigin-Name: 36acc0a97fdcc6f54f29c68c4e131702f69c3e59e58237ff4e5c647928699956
2017-10-12 13:47:48 +00:00
drh ca5cf1229b Enable sqlite_dbpage and dbstat virtual tables in the shell, by default.
FossilOrigin-Name: 01bf856c424c20b464f26973720bf5dcd3e89509c5b02c3625d4828f0385d3db
2017-10-11 17:13:29 +00:00
drh a43c8c8a60 Initial implementation of the "sqlite_dbpage" virtual table. Currently
it is read-only and has a place-holder xBestIndex.

FossilOrigin-Name: c2c1d656e3f52465192c2a697a976cd1837ccc4e10708a2377cff8bf6eaa7d49
2017-10-11 13:48:11 +00:00
dan 460f1fa55c Add extension "mmapwarm.c". Provides function sqlite3_mmap_warm(), used to
"warm up" the memory mapping used by SQLite in mmap mode to access db file
content.

FossilOrigin-Name: d4a30b91f9aad93510baead8c04ee51b82c98763be5a224ed4873298214c963a
2017-09-18 16:28:56 +00:00
drh f39e0ed4de Add the "mksourceid" program to the build process. That program changes
the SQLITE_SOURCE_ID if the source tree has been modified in any way.

FossilOrigin-Name: d4c05e04f7e1325a3260808ee17252876f678e78bf0cf6569a18a52ff674bd7a
2017-08-22 19:19:00 +00:00
dan d8ecefa5ab Add the "unionvtab" virtual table extension in ext/misc/unionvtab.c.
FossilOrigin-Name: 62a86aa6c0519cf1fa232169122d3d6ae8d2f66b20530fb934a82a15712bd2f0
2017-07-15 20:48:30 +00:00
dan 380c7ce460 Tweak Makefile.in so that testfixture can be built with the
--disable-amalgamation configure switch.

FossilOrigin-Name: 394c6f4f4376bc3d7796ea4157ba2ae230b0ca950774eff127ae6ef8a7b08602
2017-07-14 19:12:26 +00:00
drh c6603af755 Rename the "stmts" virtual table to just "stmt" without the final "s".
FossilOrigin-Name: adfdb80105c46ac42b71132c80a91dbd5b1c9ff241fb4fbb5d04641a88898d90
2017-06-29 14:33:51 +00:00
drh c79983312f Add the stmts virtual table to testfixture builds. Add new compile-time
options SQLITE_ENABLE_QPSG and SQLITE_ENABLE_STMTSVTAB to ctime.c

FossilOrigin-Name: 60c628293a1d8a1505e1a36dbd01b1f62bcfd7915e144044c92385423cbf8e07
2017-06-29 13:41:59 +00:00
drh f00f530b7d Build the "stmts" virtual table into the amalgamation. It is active only
when compiled using SQLITE_ENABLE_STMTSVTAB.  That option is supplied to the
command-line shell.

FossilOrigin-Name: 0ff057d86e42e518fda22bfbf5f1977ab6bd0a74a9211ff259ee7e8a7ce98b58
2017-06-28 15:47:29 +00:00
drh 59d705ab80 Fix the Makefile.in so that it builds the ossshell test program correctly.
FossilOrigin-Name: 36f5602ec9fb8e404c5250e18b1db877ac7bee643918b94afd51808134ea7900
2017-03-17 14:15:06 +00:00
drh 688633cb9e Infrastructure for an extension C-library to implement sqlite3_db_dump() and
a corresponding "dbdump" command-line utility - both of which do the same
work as the ".dump" command of the CLI.

FossilOrigin-Name: 74c5ace498f72d7f5495203678bedd0bc540211131a4e4db7b62115d5322a288
2017-03-13 19:26:34 +00:00
drh a6bf20b587 Fix an error in the SQLITE_MAX_MEMORY implementation resulting from a bad
merge.  Update the OSSFuzz interface so that it times out after running
the byte-code engine for 10 seconds.

FossilOrigin-Name: f8560c60d10c0365b33342ab05b5a953987b0471
2017-03-10 17:03:11 +00:00
drh fb546afb4d Remove the test/dbselftest.c program. In its place, add the ".selftest"
command to the CLI.  The new CLI version is .selftest is slightly different
in that it uses SHA3 hashing instead of SHA1, so the new is subtly 
incompatible with the old.

FossilOrigin-Name: f4fcd46f08ba59d2a3e772cad98383129f648386
2017-03-09 22:00:33 +00:00
drh b9e9bc1de6 Add the initial version of the "dbselftest" utility program.
FossilOrigin-Name: 1fcac8365e0f7bcfd55442d718da6626c864d45a
2017-02-07 17:36:12 +00:00
drh d1b2566b07 Document the --mmap option in the --help screen for kvtest. Enhance kvtest so
that numeric arguments can have suffixes like "K" or "M".  Add kvtest to the
unix makefiles.

FossilOrigin-Name: 175bda87288c7ce15b163316159f53a60822ccad
2017-01-23 19:11:38 +00:00
drh 6918e2f9b2 Enhance fuzzershell.c to read and execute SQL commands in the autoexec table
of the database under test.  Add the dbfuzz.c test program combining selected
features of fuzzershell.c and fuzzcheck.c.

FossilOrigin-Name: ef6e071a62cd79a0edbbef9f41ca9482540e5cb8
2016-12-17 20:27:22 +00:00
drh 5ed7de09b0 Fix the configure makefile to align it with the manual makefile. Unsaved
changes from the previous check-in.

FossilOrigin-Name: 00a184b65f73f361e1728fea06529f746fab66b5
2016-12-14 11:39:52 +00:00
drh c06e54345c Adjust the unix makefiles so that "make test" runs fuzzcheck prior to even
attempting to build the other test programs.

FossilOrigin-Name: bb48f7a55945da4cee369bae0809037900fcaac7
2016-12-14 11:23:51 +00:00
drh c9c81dc6d7 Add the remember(V,PTR) extension function which copies an SQL value into
an application variable.

FossilOrigin-Name: d2d30914d81022d7d4e1670caf9326524520deaf
2016-11-30 16:54:52 +00:00
drh 362b66f051 Enhance fuzzcheck.c to accept database-specific configuration parameters in
the option CONFIG table.  Add the fuzzdata5.db fuzz database containing
test cases from OSS-FUZZ.

FossilOrigin-Name: a71fad4538311ede111815d221d9eb8d9018092b
2016-11-14 18:27:41 +00:00
dan 000f95b1ba Add new file test_delete.c, containing test code for deleting an sqlite database.
FossilOrigin-Name: fb0b95e9405a3180d13c6318409af361e9df7632
2016-09-09 20:00:40 +00:00
drh 6bada27205 Prototype for the remember(V,PTR) extension function.
FossilOrigin-Name: f0942c362f45ca1e986e142dbdd3ad957626dfb1
2016-08-09 21:08:42 +00:00
drh cc15313cc9 Add the experimental SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION compile-time option.
When enabled, the "unknown function" error is suppressed for EXPLAIN and
a no-op function named "unknown()" is substituted.  This facilitiates using
the command-line shell to analyze queries from applications that contain
many application-defined functions that are not normally available to the
shell.

FossilOrigin-Name: b7f30a9ff20d580fdaecdcf2b644d09ad6c2575e
2016-08-04 12:35:17 +00:00
drh 2e3f87ae84 Change the name of the intarray() extension to carray() and give it an
optional third parameter that specifies the datatype as one of 'int32',
'int64', 'double', or 'char*'.  'int32' is the default.

FossilOrigin-Name: a204ba99db34b356acb259189158a32d2df25da0
2016-07-03 02:35:47 +00:00
drh 4841624ab9 Add a prototype intarray($PTR,$N) table valued function.
FossilOrigin-Name: 233b33382dc70de45f90b6dfdb5785f20b21489e
2016-06-29 05:00:30 +00:00
drh be11ade7cf Fix the Makefile.in to avoid unnecessary recompiles of sqlite3.c.
FossilOrigin-Name: 67c39e16442d9359b24d60d5f97bd66c19eff16a
2016-06-24 02:50:44 +00:00
drh 290fcaa2d1 An initial attempt at a "dbhash" command-line utility.
FossilOrigin-Name: 2247649ca215c06205b33b2250eb809baf39263a
2016-06-08 01:03:05 +00:00
drh 35db31b24b Add the CSV extension to the test fixture. Fix a memory leak in the CSV
extension.  Add test cases for the CSV extension, including one that uses
a WITHOUT ROWID virtual table participating in the OR optimization.

FossilOrigin-Name: 95f483e86e30ae68108904400e18ed41d389446b
2016-06-02 23:13:21 +00:00
drh da110bfece Initial check-in of the "scrub.exe" utility program prototype. Not yet
fully functional.  In particular, no scrubbing is done.

FossilOrigin-Name: bdf2ec77d1542d4e9b68218f558710a3efc15823
2016-05-05 17:15:23 +00:00
drh 5e18d40200 Turn the session extension off by default. Enable using --enable-session on
configure scripts, or using the SESSION=1 argument to nmake on Windows.

FossilOrigin-Name: e462cde2a50c39cc2f8d8624aada19280b8226eb
2016-05-03 13:14:18 +00:00
drh b283a0cde9 Fix the "checksymbols" target in Makefile.in to be able to deal with the
sqlite3changegroup family of interfaces.

FossilOrigin-Name: d819bfbd46dc7f065d2a3ab0ef9f8322d8394e11
2016-04-26 13:13:53 +00:00
mistachkin 1de86ca17f Fix a typo in the Makefile.
FossilOrigin-Name: d0a579b35105810821bbfec6b50ecfebac7a17ee
2016-04-25 01:43:24 +00:00
mistachkin 18a1549322 Remove superfluous directories from the Makefile clean targets.
FossilOrigin-Name: 0bf9926c7a7865694edd48535777248e73d86bbf
2016-04-05 19:46:10 +00:00
drh c5c67abb9a Merge the virtual table query planner enhancement, the RTREE cost estimate
fix, and the statement journal spill delay enhancement from trunk.

FossilOrigin-Name: 17fd8f3cf0ec565e08403dc8e10a1cffc2bbe165
2016-03-07 17:49:17 +00:00
drh c2f18adde5 Remove the unused journal.c source file (its function have been subsumed into
memjournal.c).  Refactor some of the names in memjournal.c.  No functional
changes.

FossilOrigin-Name: 5f2a262d3f6b1531001326faf1d3b3d92c20a30a
2016-03-05 15:35:09 +00:00
drh 2606aca80f Merge recent enhancements from trunk. Default page size is 4096. Writes
to statement journals are avoided.

FossilOrigin-Name: 456df3365e2df60e34762f2024bb551538b3f72b
2016-03-04 16:42:43 +00:00
drh 9878fefd6f Change the default page size for new database files to 4096 (from 1024).
Except, when building the testfixture, preserve the legacy page size.
Also fix a comment on SQLITE_MAX_ATTACHED.

FossilOrigin-Name: 2e8a9ca9d3d6efddc31f01074d14acae56568c37
2016-03-04 03:43:10 +00:00
drh ddebf16f1f Add the test_bestindex.c file to Makefile.in and Makefile.msc so that
"make test" will work again.

FossilOrigin-Name: 6ec6b6a97e62be1abe1e349b5bc04c6f5ae88968
2016-03-04 02:59:35 +00:00
drh dbc49161c0 Allow the left-hand side of IN operators on virtual tables to have the
aConstraintUsage[].omit flag clear.

FossilOrigin-Name: 1622623cbbfc4325c53d731aba78ca9c382ec612
2016-03-02 03:28:07 +00:00
drh d8b7d6e44c Merge the changes for the 3.11.0 release candidate from trunk.
FossilOrigin-Name: 4d7a802e73ef0352f840bc8d74c560afb7666ff7
2016-02-13 14:07:56 +00:00
drh 07f76568da Add the new "snapshot-tarball" target to the unix makefiles, for building
a tarball similar to "amalgamation-tarball" but named by the SHA1 hash of
the current check-out rather than by the version number.

FossilOrigin-Name: 4f360b2ae78b3d4ccfe6c40ac6b27a00fc70cf23
2016-02-09 22:39:39 +00:00
drh 74cf74ab7f Fix the top-level makefiles to always include SQLITE_ENABLE_EXPLAIN_COMMENTS
when building the shell.  Still need to fix main.mk and the
amalgamation tarball.

FossilOrigin-Name: 992282399cd2d1fc52ff5a1a4bff59f30b62899a
2016-02-09 17:12:22 +00:00
drh 1a606f8246 Merge enhancements and fixes from trunk.
FossilOrigin-Name: f040a5bb62f3473fba6450c97c68f538d1df21ef
2016-02-09 15:44:18 +00:00
mistachkin 27b6997e9c Fix harmless compiler warning in 'srcck1' tool and add it to the clean targets.
FossilOrigin-Name: 852a529a8b112049f67a3126f677c06ae4a22d73
2016-02-07 20:39:27 +00:00