/
auroraos
/
mirror_sqlite
ОбзорДокументацияВойти
/
auroraos
/
mirror_sqlite
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©
mirror_sqlite/
tool/
..
win

When using Visual Studio 2013, add the appropriate MaxPlatformVersion attribute to the VSIX SDK manifest.

12 лет назад
GetFile.cs

Minor enhancements to the TclKit download tool.

7 лет назад
GetTclKit.bat

Minor updates to the Windows batch tools.

4 года назад
Replace.cs

Support generating the '.def' file using the autoconf Makefile for MSVC.

10 лет назад
build-all-msvc.bat

Remove #ifdefs intended to make SQLite compatible with Windows RT. WinRT was short-lived and has been discontinued for a long time.

8 месяцев назад
build-shell.sh

Move the vfstrace extension out of src/ over into ext/misc/ where it belongs. Make it part of the standard build for the CLI. Bring some of the vfstrace output up-to-date.

2 года назад
buildtclext.tcl

Tweak 'make tclextension' to pass on any --with-icu-config build flags so that it can link with the various ICU libs. This works for me but needs testing on a wider selection of systems before being moved to trunk. Intended to resolve [forum:92a88de4b88929fe|forum post 92a88de4b88929fe].

4 месяца назад
cg_anno.tcl

Tweak the tool/cg_anno.tcl script so that it can run on systems without /usr/bin/tclsh.

7 лет назад
checkSpacing.c

Change the checkSpacing utility program to ignore whitespace at end-of-line unless the --wseol option is used.

14 лет назад
cktclsh.sh

The Makefile distinguishes between tcl8.4 and tcl8.5. Some makefile targets require tcl8.5, but others (ex: "sqlite3.c", "shell.c", and "sqlite3") require only tcl8.4.

3 года назад
cp.tcl

Fix the new tool/cp.tcl so that it works with older TCL versions, such as jimtcl.

2 года назад
custom.txt

An assortment of comment typo fixes discovered by aspell. Add several new words to tool/custom.txt. No code changes.

2 года назад
dbhash.c

Extend the refactoring into extensions. Clean up stray newlines.

6 лет назад
dbtotxt.c

Add the --raw option to the dbtotxt command-line tool, for debugging.

2 месяца назад
dbtotxt.md

Add the "dbtotxt" utility program and the ability to read "dbtotxt" output as a deserialized input database in the CLI, using the --hexdb option to the ".open" command.

8 лет назад
emcc.sh.in

Correct a typo in tool/emcc.sh.in which could cause all of the configure-time work to locate the emcc binary to go unused. Reported in [forum:feb325cdde5b6f37|forum post feb325cdde5b6f37].

2 года назад
enlargedb.c

Add the "enlargedb" utility program used to construct very large database files for testing.

6 лет назад
extract-sqlite3h.tcl

Add a script to tool/ that will extract the sqlite3.h header file from an sqlite3.c amalgamation.

7 лет назад
extract.c

Add command-line utilities "offsets.c" and "extract.c" for use in low-level analyzsis of database files.

15 лет назад
fast_vacuum.c

Extend the refactoring into extensions. Clean up stray newlines.

6 лет назад
fragck.tcl

For Windows VFS, modified xGetLastError() to call FormatMessage() with the FORMAT_MESSAGE_IGNORE_INSERTS option. Additionally updated to ensure strings are returned as UTF8. Ticket 39c85e8a4e.

17 лет назад
fuzzershell.c

Ensure that all fields of static sqlite3_module objects are explicitly initialized, in order to hush-up nuisance compiler warnings.

3 года назад
genfkey.README

Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.

год назад
genfkey.test

Add the SQLITE_DEFAULT_DEFENSIVE compile-time option. Fix up test cases so that they work with DEFENSIVE enabled.

8 лет назад
getlock.c

Add the "getlock" utility for determining if a database file (on unix) is currently locked.

15 лет назад
index_usage.c

Extend the refactoring into extensions. Clean up stray newlines.

6 лет назад
lemon.c

Fix an uninitialized var use reported in [forum:88561a4a1e|forum post 88561a4a1e].

7 месяцев назад
lempar.c

Minor doc typo fixes contributed by BrickViking.

4 месяца назад
libvers.c

Add the libvers.c tool in the tool/ subdirectory.

10 лет назад
loadfts.c

Add pedantic OOM detection logic to some disused diagnostic and test code. No changes to any deliverables.

9 месяцев назад
logest.c

Fix harmless compiler warnings seen with MSVC.

5 лет назад
max-limits.c

New compile-time option SQLITE_MAX_SCHEMA and runtime limit option SQLITE_LIMIT_SCHEMA that put an upper bound on the number of objects in a database schema. Current default is 10 million.

месяц назад
merge-test.tcl

Add the merge-test.tcl script to ease verification of LTS branches.

5 лет назад
mkamalzip.tcl

Update the makefile so that it puts the amalgamation files in a subdirectory in the amalgamation-zip. [forum:/forumpost/b8dd1941e1|Forum post b8dd1941e1].

2 года назад
mkautoconfamal.sh

Include the latest Makefile.msc changes and the new "make.bat" script in the amalgamation tarballs.

8 месяцев назад
mkccode.tcl

Update the docs in tool/mkccode.tcl to reflect that it's more generic than it was when the docs were written. Change the shebang line to use /bin/env tclsh instead of a hard-coded tclsh path.

год назад
mkcombo.tcl

New build product "tclsqlite-ex.c" is the tclsqlite.c file with QRF added. This is now used whereever tclsqlite.c was used. Hence QRF is now in the testfixture and in the tclextension. The sqlite3 method is "format". That method is currently just a non-functional stub.

9 месяцев назад
mkctimec.tcl

New compile-time option SQLITE_MAX_SCHEMA and runtime limit option SQLITE_LIMIT_SCHEMA that put an upper bound on the number of objects in a database schema. Current default is 10 million.

месяц назад
mkfptab.c

Include the float-point table generator utility in the tools directory.

5 месяцев назад
mkkeywordhash.c

Improvement implementation of the previous check-in: runs faster.

8 месяцев назад
mkmsvcmin.tcl

First attempt at getting the build to work with Tcl 9.0.

2 года назад
mkopcodec.tcl

Minor tweaks to various TCL build scripts so that they work even for TCL 8.4, which is obsolete, but is also all that is available for some legacy platforms.

5 лет назад
mkopcodeh.tcl

Add new assert() statements, which if they had existed three years ago, would have detected the code generator problem fixed by the previous check-in.

2 года назад
mkopts.tcl

Replace the sqlite3_memdb_ptr() interface with the more general sqlite3_serialize() interface.

9 лет назад
mkpragmatab.tcl

Strive to make sorts stable in the mkpragmatab.tcl build script, so that we get consistent amalgamations regardless of platform. [forum:/forumpost/c9914addebf3da51|Forum thread c9914addebf3da51].

год назад
mkshellc.tcl

Harmless typo fixes in shell.c

8 месяцев назад
mksourceid.c

Remove an asm() block from build tool mksourceid.c, as it causes build failures on some systems and performance is not important at build-time.

7 лет назад
mksqlite3c-noext.tcl

Upstream JimTCL patch and minor tcl script tweaks to support (fconfigure -translation binary) for better cross-platform build portability.

2 года назад
mksqlite3c.tcl

Were we to choose to integrate the carray() table-valued function into the amalgamation, that integration might look something like this.

10 месяцев назад
mksqlite3h.tcl

Fix a minor problem with building sqlite3.c without manifest.tags.

10 месяцев назад
mksqlite3internalh.tcl

Approximately 50 typo fixes, spanning the whole tree, contributed via [forum:006c8fa165083ac3|forum post 006c8fa165083ac3] and individually checked for correctness. Affects only code comments, docs, and a single line of debug output in a test app.

год назад
mksrczip.tcl

Add the convenience makefile target (unix-only) "src-archives" that builds the various tarballs and ZIP archives that go on the download page. This is intended to make it easier and less error prone to put up new "draft" download pages for testing.

2 года назад
mktoolzip.tcl

Add the snapshot-zip makefile targets for both Windows and Posix.

год назад
mkvsix.tcl

First attempt at getting the build to work with Tcl 9.0.

2 года назад
mkwinarm64ec.tcl

Minor bug fixes in the script added by the previous check-in

год назад
offsets.c

Extend the refactoring into extensions. Clean up stray newlines.

6 лет назад
omittest-msvc.tcl

Get the tool/omittest-msvc.tcl script working.

4 года назад
omittest.tcl

Rename SQLITE_ENABLE_MULTITHREADED_CHECKS to SQLITE_THREAD_MISUSE_WARNINGS. Run test cases with that option. Also add the SQLITE_THREAD_MISUSE_ABORT option.

6 месяцев назад
opcodesum.tcl

Add a simple TCL script for summing cachegrind information for each VDBE opcdoe.

10 лет назад
pagesig.c

Move the vfstrace extension out of src/ over into ext/misc/ where it belongs. Make it part of the standard build for the CLI. Bring some of the vfstrace output up-to-date.

2 года назад
renumber-win-thunk.tcl

In the Windows OS interface, use CreateFileMappingFromApp() and MapViewOfFilFromApp() if SQLITE_OS_WINRT is defined.

3 месяца назад
replace.tcl

First attempt at getting the build to work with Tcl 9.0.

2 года назад
restore_jrnl.tcl

First attempt at getting the build to work with Tcl 9.0.

2 года назад
rollback-test.c

Add a simple test program to aid in verifying that journals are cross-platform.

15 лет назад
showdb.c

Correction to date/time computations associated with the timestamp-vfs.

6 месяцев назад
showjournal.c

Fix harmless compiler warnings.

11 лет назад
showlocks.c

Update the showlocks utility program so that it functions on files with a huge number of locks without overflowing the stack.

6 лет назад
showshm.c

Add the showshm utility program for printing out the shm header in a human-readable format.

9 лет назад
showstat4.c

Add pedantic OOM detection logic to some disused diagnostic and test code. No changes to any deliverables.

9 месяцев назад
showtmlog.c

Correction to date/time computations associated with the timestamp-vfs.

6 месяцев назад
showwal.c

Fix minor problems with the "showwal" utility program. Add a missing header to the zipfile.c extension.

3 года назад
soak1.tcl

Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.

год назад
spaceanal.tcl

Close the db as sqlite3_analyzer exits. (See [forum:af384c2315d9718a|forum post, "sqlite3_analyzer not closing WAL-mode db cleanly" ].)

2 года назад
spellsift.tcl

Add a C-source spell-checking facility. make misspell (on Nix)

3 года назад
split-sqlite3c.tcl

Slight change to tool/split-sqlite3c.tcl to make it compatible with jimsh

год назад
sqldiff.c

Harden code that processes Fossil Deltas against OOM and maliciously malformed delta blobs. [bugs:/info/2026-06-10T07:01:00Z|Bug 2026-06-10T07:01:00Z] and [bugs:/info/2026-06-10T07:06:43Z|Bug 2026-06-10T07:06:43Z].

2 месяца назад
sqlite3_analyzer.c.in

Merge trunk into the cygwin-fixes branch.

год назад
sqlite3_rsync.c

In the sqlite3_rsync utility program, fix three defects identified by [bugs:/info/e2dfadf51209f12b|Bug e2dfadf51209f12b].

месяц назад
sqltclsh.c.in

The new "format" method in the TCL interface is now partially functional.

9 месяцев назад
sqltclsh.tcl

Modify the sqltclsh startup script to look for a properly formatted SQLAR at the end of the executable. Fix the CLI so that it automatically links against appendvfs and so that the --append command-line option works.

9 лет назад
src-verify.c

Remove stray tab characters from source files.

год назад
srcck1.c

Remove unnecessary "www." prefixes on domain names in URLs.

год назад
srctree-check.tcl

Remove tea version check from tool/srctree-check.tcl, as it's obsoleted by [be265559].

год назад
stack_usage.tcl

Add the stack_usage.tcl script for analyzing the output of objdump on the amalgamation and estimating the sizes of stack frames on each function.

14 лет назад
stripccomments.c

Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.

год назад
symbols-mingw.sh

Adjust the symbols.sh script for STAT3. Add the symbols-mingw.sh script for testing on windows with MinGW.

15 лет назад
symbols.sh

Update tool/symbols.sh to ignore symbols from sessions and rebaser and to not try to compile with ICU which is not available on all platforms.

7 лет назад
tclConfigShToMake.sh

Perform some makefile acrobatics to get the tclConfig.sh state applied for static makefiles.

2 года назад
varint.c

Add the "varint.c" utility program in the tool directory.

12 лет назад
vdbe-compress.tcl

Work around a minor JimTCL regexp incompatibility in tool/vdbe-compress.tcl. Summary: it thinks that backslash-escaped octal values are back-references, which it does not like.

2 года назад
vdbe_profile.tcl

Add TOTAL rows to the output generated by tool/vdbe_profile.tcl.

4 года назад
version-info.c

Add info from the SQLITE_SCM_... macros to tool/version-info.c's --json output, prompted by [forum:0c513ae3fca7d55c|forum post 0c513ae3fc].

10 месяцев назад
warnings-clang.sh

Fix the "snapshot-tarball" makefile target, which was broken by the shell.c change of check-in [36acc0a9].

9 лет назад
warnings.sh

Continue enforcing the legacy declaration-before-statement C-language rule, since some downstream still uses it.

5 месяцев назад
winmain.c

Add missing free() to winmain.c

7 месяцев назад
genfkey.README
 
OVERVIEW
 
The SQLite library is capable of parsing SQL foreign key constraints
supplied as part of CREATE TABLE statements, but it does not actually
implement them. However, most of the features of foreign keys may be
implemented using SQL triggers, which SQLite does support. This text
file describes a feature of the SQLite shell tool (sqlite3) that
extracts foreign key definitions from an existing SQLite database and
creates the set of CREATE TRIGGER statements required to implement
the foreign key constraints.
 
CAPABILITIES
 
An SQL foreign key is a constraint that requires that each row in
the "child" table corresponds to a row in the "parent" table. For
example, the following schema:
 
CREATE TABLE parent(a, b, c, PRIMARY KEY(a, b));
CREATE TABLE child(d, e, f, FOREIGN KEY(d, e) REFERENCES parent(a, b));
 
implies that for each row in table "child", there must be a row in
"parent" for which the expression (child.d==parent.a AND child.e==parent.b)
is true. The columns in the parent table are required to be either the
primary key columns or subject to a UNIQUE constraint. There is no such
requirement for the columns of the child table.
 
At this time, all foreign keys are implemented as if they were
"MATCH NONE", even if the declaration specified "MATCH PARTIAL" or
"MATCH FULL". "MATCH NONE" means that if any of the key columns in
the child table are NULL, then there is no requirement for a corresponding
row in the parent table. So, taking this into account, the expression that
must be true for every row of the child table in the above example is
actually:
 
(child.d IS NULL) OR
(child.e IS NULL) OR
(child.d==parent.a AND child.e==parent.b)
 
Attempting to insert or update a row in the child table so that the
affected row violates this constraint results in an exception being
thrown.
 
The effect of attempting to delete or update a row in the parent table
so that the constraint becomes untrue for one or more rows in the child
table depends on the "ON DELETE" or "ON UPDATE" actions specified as
part of the foreign key definition, respectively. Three different actions
are supported: "RESTRICT" (the default), "CASCADE" and "SET NULL". SQLite
will also parse the "SET DEFAULT" action, but this is not implemented
and "RESTRICT" is used instead.
 
RESTRICT: Attempting to update or delete a row in the parent table so
that the constraint becomes untrue for one or more rows in
the child table is not allowed. An exception is thrown.
 
CASCADE: Instead of throwing an exception, all corresponding child table
rows are either deleted (if the parent row is being deleted)
or updated to match the new parent key values (if the parent
row is being updated).
 
SET NULL: Instead of throwing an exception, the foreign key fields of
all corresponding child table rows are set to NULL.
 
LIMITATIONS
 
Apart from those limitations described above:
 
* Implicit mapping to composite primary keys is not supported. If
a parent table has a composite primary key, then any child table
that refers to it must explicitly map each column. For example, given
the following definition of table "parent":
 
CREATE TABLE parent(a, b, c, PRIMARY KEY(a, b));
 
only the first of the following two definitions of table "child"
is supported:
 
CREATE TABLE child(d, e, f, FOREIGN KEY(d, e) REFERENCES parent(a, b));
CREATE TABLE child(d, e, f, FOREIGN KEY(d, e) REFERENCES parent);
 
An implicit reference to a composite primary key is detected as an
error when the program is run (see below).
 
* SQLite does not support recursive triggers, and therefore this program
does not support recursive CASCADE or SET NULL foreign key
relationships. If the parent and the child tables of a CASCADE or
SET NULL foreign key are the same table, the generated triggers will
malfunction. This is also true if the recursive foreign key constraint
is indirect (for example if table A references table B which references
table A with a CASCADE or SET NULL foreign key constraint).
 
Recursive CASCADE or SET NULL foreign key relationships are *not*
detected as errors when the program is run. Buyer beware.
 
USAGE
 
The functionality is accessed through an sqlite3 shell tool "dot-command":
 
.genfkey ?--no-drop? ?--ignore-errors? ?--exec?
 
When this command is run, it first checks the schema of the open SQLite
database for foreign key related errors or inconsistencies. For example,
a foreign key that refers to a parent table that does not exist, or
a foreign key that refers to columns in a parent table that are not
guaranteed to be unique. If such errors are found and the --ignore-errors
option was not present, a message for each one is printed to stderr and
no further processing takes place.
 
If errors are found and the --ignore-errors option is passed, then
no error messages are printed. No "CREATE TRIGGER" statements are generated
for foreign-key definitions that contained errors, they are silently
ignored by subsequent processing.
 
All triggers generated by this command have names that match the pattern
"genfkey*". Unless the --no-drop option is specified, then the program
also generates a "DROP TRIGGER" statement for each trigger that exists
in the database with a name that matches this pattern. This allows the
program to be used to upgrade a database schema for which foreign key
triggers have already been installed (i.e. after new tables are created
or existing tables dropped).
 
Finally, a series of SQL trigger definitions (CREATE TRIGGER statements)
that implement the foreign key constraints found in the database schema are
generated.
 
If the --exec option was passed, then all generated SQL is immediately
executed on the database. Otherwise, the generated SQL strings are output
in the same way as the results of SELECT queries are. Normally, this means
they will be printed to stdout, but this can be configured using other
dot-commands (i.e. ".output").
 
The simplest way to activate the foreign key definitions in a database
is simply to open it using the shell tool and enter the command
".genfkey --exec":
 
sqlite> .genfkey --exec