Просмотр исходного кода

Restoring authorship annotation for <igoroogle@yandex-team.ru>. Commit 2 of 2.

igoroogle 3 лет назад
Родитель
Сommit
d06e6190fa

+ 6 - 6
contrib/libs/sqlite3/LICENSE.md

@@ -1,6 +1,6 @@
-The author disclaims copyright to this source code.  In place of 
-a legal notice, here is a blessing: 
- 
-  *   May you do good and not evil. 
-  *   May you find forgiveness for yourself and forgive others. 
-  *   May you share freely, never taking more than you give. 
+The author disclaims copyright to this source code.  In place of
+a legal notice, here is a blessing:
+
+  *   May you do good and not evil.
+  *   May you find forgiveness for yourself and forgive others.
+  *   May you share freely, never taking more than you give.

+ 315 - 315
contrib/libs/sqlite3/README.md

@@ -1,327 +1,327 @@
-<h1 align="center">SQLite Source Repository</h1> 
- 
-This repository contains the complete source code for the  
-[SQLite database engine](https://sqlite.org/).  Some test scripts  
-are also included.  However, many other test scripts 
-and most of the documentation are managed separately. 
- 
-## Version Control 
- 
-SQLite sources are managed using the 
-[Fossil](https://www.fossil-scm.org/), a distributed version control system 
-that was specifically designed and written to support SQLite development. 
-The [Fossil repository](https://sqlite.org/src/timeline) contains the urtext. 
- 
-If you are reading this on GitHub or some other Git repository or service, 
-then you are looking at a mirror.  The names of check-ins and 
-other artifacts in a Git mirror are different from the official 
-names for those objects.  The offical names for check-ins are 
-found in a footer on the check-in comment for authorized mirrors. 
-The official check-in name can also be seen in the `manifest.uuid` file 
-in the root of the tree.  Always use the official name, not  the 
-Git-name, when communicating about an SQLite check-in. 
- 
-If you pulled your SQLite source code from a secondary source and want to 
-verify its integrity, there are hints on how to do that in the 
-[Verifying Code Authenticity](#vauth) section below. 
- 
-## Obtaining The Code 
- 
-If you do not want to use Fossil, you can download tarballs or ZIP 
-archives or [SQLite archives](https://sqlite.org/cli.html#sqlar) as follows: 
- 
-  *  Lastest trunk check-in as 
-     [Tarball](https://www.sqlite.org/src/tarball/sqlite.tar.gz), 
-     [ZIP-archive](https://www.sqlite.org/src/zip/sqlite.zip), or 
-     [SQLite-archive](https://www.sqlite.org/src/sqlar/sqlite.sqlar). 
- 
-  *  Latest release as 
-     [Tarball](https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release), 
-     [ZIP-archive](https://www.sqlite.org/src/zip/sqlite.zip?r=release), or 
-     [SQLite-archive](https://www.sqlite.org/src/sqlar/sqlite.sqlar?r=release). 
- 
-  *  For other check-ins, substitute an appropriate branch name or 
-     tag or hash prefix in place of "release" in the URLs of the previous 
-     bullet.  Or browse the [timeline](https://www.sqlite.org/src/timeline) 
-     to locate the check-in desired, click on its information page link, 
-     then click on the "Tarball" or "ZIP Archive" links on the information 
-     page. 
- 
-If you do want to use Fossil to check out the source tree,  
-first install Fossil version 2.0 or later. 
-(Source tarballs and precompiled binaries available 
-[here](https://www.fossil-scm.org/fossil/uv/download.html).  Fossil is 
-a stand-alone program.  To install, simply download or build the single  
-executable file and put that file someplace on your $PATH.) 
-Then run commands like this: 
- 
+<h1 align="center">SQLite Source Repository</h1>
+
+This repository contains the complete source code for the 
+[SQLite database engine](https://sqlite.org/).  Some test scripts 
+are also included.  However, many other test scripts
+and most of the documentation are managed separately.
+
+## Version Control
+
+SQLite sources are managed using the
+[Fossil](https://www.fossil-scm.org/), a distributed version control system
+that was specifically designed and written to support SQLite development.
+The [Fossil repository](https://sqlite.org/src/timeline) contains the urtext.
+
+If you are reading this on GitHub or some other Git repository or service,
+then you are looking at a mirror.  The names of check-ins and
+other artifacts in a Git mirror are different from the official
+names for those objects.  The offical names for check-ins are
+found in a footer on the check-in comment for authorized mirrors.
+The official check-in name can also be seen in the `manifest.uuid` file
+in the root of the tree.  Always use the official name, not  the
+Git-name, when communicating about an SQLite check-in.
+
+If you pulled your SQLite source code from a secondary source and want to
+verify its integrity, there are hints on how to do that in the
+[Verifying Code Authenticity](#vauth) section below.
+
+## Obtaining The Code
+
+If you do not want to use Fossil, you can download tarballs or ZIP
+archives or [SQLite archives](https://sqlite.org/cli.html#sqlar) as follows:
+
+  *  Lastest trunk check-in as
+     [Tarball](https://www.sqlite.org/src/tarball/sqlite.tar.gz),
+     [ZIP-archive](https://www.sqlite.org/src/zip/sqlite.zip), or
+     [SQLite-archive](https://www.sqlite.org/src/sqlar/sqlite.sqlar).
+
+  *  Latest release as
+     [Tarball](https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release),
+     [ZIP-archive](https://www.sqlite.org/src/zip/sqlite.zip?r=release), or
+     [SQLite-archive](https://www.sqlite.org/src/sqlar/sqlite.sqlar?r=release).
+
+  *  For other check-ins, substitute an appropriate branch name or
+     tag or hash prefix in place of "release" in the URLs of the previous
+     bullet.  Or browse the [timeline](https://www.sqlite.org/src/timeline)
+     to locate the check-in desired, click on its information page link,
+     then click on the "Tarball" or "ZIP Archive" links on the information
+     page.
+
+If you do want to use Fossil to check out the source tree, 
+first install Fossil version 2.0 or later.
+(Source tarballs and precompiled binaries available
+[here](https://www.fossil-scm.org/fossil/uv/download.html).  Fossil is
+a stand-alone program.  To install, simply download or build the single 
+executable file and put that file someplace on your $PATH.)
+Then run commands like this:
+
         mkdir -p ~/sqlite ~/Fossils
-        cd ~/sqlite 
+        cd ~/sqlite
         fossil clone https://www.sqlite.org/src ~/Fossils/sqlite.fossil
         fossil open ~/Fossils/sqlite.fossil
 
-After setting up a repository using the steps above, you can always 
-update to the lastest version using: 
- 
-        fossil update trunk   ;# latest trunk check-in 
-        fossil update release ;# latest official release 
- 
-Or type "fossil ui" to get a web-based user interface. 
- 
+After setting up a repository using the steps above, you can always
+update to the lastest version using:
+
+        fossil update trunk   ;# latest trunk check-in
+        fossil update release ;# latest official release
+
+Or type "fossil ui" to get a web-based user interface.
+
 ## Compiling for Unix-like systems
- 
-First create a directory in which to place 
-the build products.  It is recommended, but not required, that the 
-build directory be separate from the source directory.  Cd into the 
-build directory and then from the build directory run the configure 
-script found at the root of the source tree.  Then run "make". 
- 
-For example: 
- 
-        tar xzf sqlite.tar.gz    ;#  Unpack the source tree into "sqlite" 
-        mkdir bld                ;#  Build will occur in a sibling directory 
-        cd bld                   ;#  Change to the build directory 
-        ../sqlite/configure      ;#  Run the configure script 
-        make                     ;#  Run the makefile. 
-        make sqlite3.c           ;#  Build the "amalgamation" source file 
-        make test                ;#  Run some tests (requires Tcl) 
- 
-See the makefile for additional targets. 
- 
-The configure script uses autoconf 2.61 and libtool.  If the configure 
-script does not work out for you, there is a generic makefile named 
-"Makefile.linux-gcc" in the top directory of the source tree that you 
-can copy and edit to suit your needs.  Comments on the generic makefile 
-show what changes are needed. 
- 
+
+First create a directory in which to place
+the build products.  It is recommended, but not required, that the
+build directory be separate from the source directory.  Cd into the
+build directory and then from the build directory run the configure
+script found at the root of the source tree.  Then run "make".
+
+For example:
+
+        tar xzf sqlite.tar.gz    ;#  Unpack the source tree into "sqlite"
+        mkdir bld                ;#  Build will occur in a sibling directory
+        cd bld                   ;#  Change to the build directory
+        ../sqlite/configure      ;#  Run the configure script
+        make                     ;#  Run the makefile.
+        make sqlite3.c           ;#  Build the "amalgamation" source file
+        make test                ;#  Run some tests (requires Tcl)
+
+See the makefile for additional targets.
+
+The configure script uses autoconf 2.61 and libtool.  If the configure
+script does not work out for you, there is a generic makefile named
+"Makefile.linux-gcc" in the top directory of the source tree that you
+can copy and edit to suit your needs.  Comments on the generic makefile
+show what changes are needed.
+
 ## Using MSVC for Windows systems
- 
-On Windows, all applicable build products can be compiled with MSVC. 
-First open the command prompt window associated with the desired compiler 
-version (e.g. "Developer Command Prompt for VS2013").  Next, use NMAKE 
-with the provided "Makefile.msc" to build one of the supported targets. 
- 
+
+On Windows, all applicable build products can be compiled with MSVC.
+First open the command prompt window associated with the desired compiler
+version (e.g. "Developer Command Prompt for VS2013").  Next, use NMAKE
+with the provided "Makefile.msc" to build one of the supported targets.
+
 For example, from the parent directory of the source subtree named "sqlite":
- 
-        mkdir bld 
-        cd bld 
+
+        mkdir bld
+        cd bld
         nmake /f ..\sqlite\Makefile.msc TOP=..\sqlite
         nmake /f ..\sqlite\Makefile.msc sqlite3.c TOP=..\sqlite
         nmake /f ..\sqlite\Makefile.msc sqlite3.dll TOP=..\sqlite
         nmake /f ..\sqlite\Makefile.msc sqlite3.exe TOP=..\sqlite
         nmake /f ..\sqlite\Makefile.msc test TOP=..\sqlite
- 
-There are several build options that can be set via the NMAKE command 
-line.  For example, to build for WinRT, simply add "FOR_WINRT=1" argument 
-to the "sqlite3.dll" command line above.  When debugging into the SQLite 
-code, adding the "DEBUG=1" argument to one of the above command lines is 
-recommended. 
- 
-SQLite does not require [Tcl](http://www.tcl.tk/) to run, but a Tcl installation 
-is required by the makefiles (including those for MSVC).  SQLite contains 
-a lot of generated code and Tcl is used to do much of that code generation. 
- 
-## Source Code Tour 
- 
-Most of the core source files are in the **src/** subdirectory.  The 
-**src/** folder also contains files used to build the "testfixture" test 
-harness. The names of the source files used by "testfixture" all begin 
-with "test". 
-The **src/** also contains the "shell.c" file 
-which is the main program for the "sqlite3.exe" 
-[command-line shell](https://sqlite.org/cli.html) and 
-the "tclsqlite.c" file which implements the 
-[Tcl bindings](https://sqlite.org/tclsqlite.html) for SQLite. 
-(Historical note:  SQLite began as a Tcl 
-extension and only later escaped to the wild as an independent library.) 
- 
-Test scripts and programs are found in the **test/** subdirectory. 
-Addtional test code is found in other source repositories. 
-See [How SQLite Is Tested](http://www.sqlite.org/testing.html) for 
-additional information. 
- 
-The **ext/** subdirectory contains code for extensions.  The 
-Full-text search engine is in **ext/fts3**.  The R-Tree engine is in 
-**ext/rtree**.  The **ext/misc** subdirectory contains a number of 
-smaller, single-file extensions, such as a REGEXP operator. 
- 
-The **tool/** subdirectory contains various scripts and programs used 
-for building generated source code files or for testing or for generating 
-accessory programs such as "sqlite3_analyzer(.exe)". 
- 
-### Generated Source Code Files 
- 
-Several of the C-language source files used by SQLite are generated from 
-other sources rather than being typed in manually by a programmer.  This 
-section will summarize those automatically-generated files.  To create all 
-of the automatically-generated files, simply run "make target&#95;source". 
-The "target&#95;source" make target will create a subdirectory "tsrc/" and 
-fill it with all the source files needed to build SQLite, both 
-manually-edited files and automatically-generated files. 
- 
-The SQLite interface is defined by the **sqlite3.h** header file, which is 
-generated from src/sqlite.h.in, ./manifest.uuid, and ./VERSION.  The 
-[Tcl script](http://www.tcl.tk) at tool/mksqlite3h.tcl does the conversion. 
-The manifest.uuid file contains the SHA3 hash of the particular check-in 
-and is used to generate the SQLITE\_SOURCE\_ID macro.  The VERSION file 
-contains the current SQLite version number.  The sqlite3.h header is really 
-just a copy of src/sqlite.h.in with the source-id and version number inserted 
-at just the right spots. Note that comment text in the sqlite3.h file is 
-used to generate much of the SQLite API documentation.  The Tcl scripts 
-used to generate that documentation are in a separate source repository. 
- 
-The SQL language parser is **parse.c** which is generate from a grammar in 
-the src/parse.y file.  The conversion of "parse.y" into "parse.c" is done 
-by the [lemon](./doc/lemon.html) LALR(1) parser generator.  The source code 
-for lemon is at tool/lemon.c.  Lemon uses the tool/lempar.c file as a 
-template for generating its parser. 
-Lemon also generates the **parse.h** header file, at the same time it 
-generates parse.c. 
- 
-The **opcodes.h** header file contains macros that define the numbers 
-corresponding to opcodes in the "VDBE" virtual machine.  The opcodes.h 
-file is generated by the scanning the src/vdbe.c source file.  The 
-Tcl script at ./mkopcodeh.tcl does this scan and generates opcodes.h. 
-A second Tcl script, ./mkopcodec.tcl, then scans opcodes.h to generate 
-the **opcodes.c** source file, which contains a reverse mapping from 
-opcode-number to opcode-name that is used for EXPLAIN output. 
- 
-The **keywordhash.h** header file contains the definition of a hash table 
-that maps SQL language keywords (ex: "CREATE", "SELECT", "INDEX", etc.) into 
-the numeric codes used by the parse.c parser.  The keywordhash.h file is 
-generated by a C-language program at tool mkkeywordhash.c. 
- 
-The **pragma.h** header file contains various definitions used to parse 
-and implement the PRAGMA statements.  The header is generated by a 
-script **tool/mkpragmatab.tcl**. If you want to add a new PRAGMA, edit 
-the **tool/mkpragmatab.tcl** file to insert the information needed by the 
-parser for your new PRAGMA, then run the script to regenerate the 
-**pragma.h** header file. 
- 
-### The Amalgamation 
- 
-All of the individual C source code and header files (both manually-edited 
-and automatically-generated) can be combined into a single big source file 
-**sqlite3.c** called "the amalgamation".  The amalgamation is the recommended 
-way of using SQLite in a larger application.  Combining all individual 
-source code files into a single big source code file allows the C compiler 
-to perform more cross-procedure analysis and generate better code.  SQLite 
-runs about 5% faster when compiled from the amalgamation versus when compiled 
-from individual source files. 
- 
-The amalgamation is generated from the tool/mksqlite3c.tcl Tcl script. 
-First, all of the individual source files must be gathered into the tsrc/ 
-subdirectory (using the equivalent of "make target_source") then the 
-tool/mksqlite3c.tcl script is run to copy them all together in just the 
-right order while resolving internal "#include" references. 
- 
-The amalgamation source file is more than 200K lines long.  Some symbolic 
-debuggers (most notably MSVC) are unable to deal with files longer than 64K 
-lines.  To work around this, a separate Tcl script, tool/split-sqlite3c.tcl, 
-can be run on the amalgamation to break it up into a single small C file 
-called **sqlite3-all.c** that does #include on about seven other files 
-named **sqlite3-1.c**, **sqlite3-2.c**, ..., **sqlite3-7.c**.  In this way, 
-all of the source code is contained within a single translation unit so 
-that the compiler can do extra cross-procedure optimization, but no 
-individual source file exceeds 32K lines in length. 
- 
-## How It All Fits Together 
- 
-SQLite is modular in design. 
-See the [architectural description](http://www.sqlite.org/arch.html) 
-for details. Other documents that are useful in 
-(helping to understand how SQLite works include the 
-[file format](http://www.sqlite.org/fileformat2.html) description, 
-the [virtual machine](http://www.sqlite.org/opcode.html) that runs 
-prepared statements, the description of 
-[how transactions work](http://www.sqlite.org/atomiccommit.html), and 
-the [overview of the query planner](http://www.sqlite.org/optoverview.html). 
- 
-Years of effort have gone into optimizating SQLite, both 
-for small size and high performance.  And optimizations tend to result in 
-complex code.  So there is a lot of complexity in the current SQLite 
-implementation.  It will not be the easiest library in the world to hack. 
- 
-Key files: 
- 
-  *  **sqlite.h.in** - This file defines the public interface to the SQLite 
-     library.  Readers will need to be familiar with this interface before 
-     trying to understand how the library works internally. 
- 
-  *  **sqliteInt.h** - this header file defines many of the data objects 
-     used internally by SQLite.  In addition to "sqliteInt.h", some 
-     subsystems have their own header files. 
- 
-  *  **parse.y** - This file describes the LALR(1) grammar that SQLite uses 
-     to parse SQL statements, and the actions that are taken at each step 
-     in the parsing process. 
- 
-  *  **vdbe.c** - This file implements the virtual machine that runs 
-     prepared statements.  There are various helper files whose names 
-     begin with "vdbe".  The VDBE has access to the vdbeInt.h header file 
-     which defines internal data objects.  The rest of SQLite interacts 
-     with the VDBE through an interface defined by vdbe.h. 
- 
-  *  **where.c** - This file (together with its helper files named 
-     by "where*.c") analyzes the WHERE clause and generates 
-     virtual machine code to run queries efficiently.  This file is 
-     sometimes called the "query optimizer".  It has its own private 
-     header file, whereInt.h, that defines data objects used internally. 
- 
-  *  **btree.c** - This file contains the implementation of the B-Tree 
-     storage engine used by SQLite.  The interface to the rest of the system 
-     is defined by "btree.h".  The "btreeInt.h" header defines objects 
-     used internally by btree.c and not published to the rest of the system. 
- 
-  *  **pager.c** - This file contains the "pager" implementation, the 
-     module that implements transactions.  The "pager.h" header file 
-     defines the interface between pager.c and the rest of the system. 
- 
-  *  **os_unix.c** and **os_win.c** - These two files implement the interface 
-     between SQLite and the underlying operating system using the run-time 
-     pluggable VFS interface. 
- 
-  *  **shell.c.in** - This file is not part of the core SQLite library.  This 
-     is the file that, when linked against sqlite3.a, generates the 
-     "sqlite3.exe" command-line shell.  The "shell.c.in" file is transformed 
-     into "shell.c" as part of the build process. 
- 
-  *  **tclsqlite.c** - This file implements the Tcl bindings for SQLite.  It 
-     is not part of the core SQLite library.  But as most of the tests in this 
-     repository are written in Tcl, the Tcl language bindings are important. 
- 
-  *  **test*.c** - Files in the src/ folder that begin with "test" go into 
-     building the "testfixture.exe" program.  The testfixture.exe program is 
-     an enhanced Tcl shell.  The testfixture.exe program runs scripts in the 
-     test/ folder to validate the core SQLite code.  The testfixture program 
-     (and some other test programs too) is build and run when you type 
-     "make test". 
- 
-  *  **ext/misc/json1.c** - This file implements the various JSON functions 
-     that are build into SQLite. 
- 
-There are many other source files.  Each has a succinct header comment that 
-describes its purpose and role within the larger system. 
- 
-<a name="vauth"></a> 
-## Verifying Code Authenticity 
- 
-The `manifest` file at the root directory of the source tree 
-contains either a SHA3-256 hash (for newer files) or a SHA1 hash (for  
-older files) for every source file in the repository. 
-The SHA3-256 hash of the `manifest` 
-file itself is the official name of the version of the source tree that you 
-have. The `manifest.uuid` file should contain the SHA3-256 hash of the 
-`manifest` file. If all of the above hash comparisons are correct, then 
-you can be confident that your source tree is authentic and unadulterated. 
- 
-The format of the `manifest` file should be mostly self-explanatory, but 
-if you want details, they are available 
-[here](https://fossil-scm.org/fossil/doc/trunk/www/fileformat.wiki#manifest). 
- 
-## Contacts 
- 
-The main SQLite website is [http://www.sqlite.org/](http://www.sqlite.org/) 
-with geographically distributed backups at 
-[http://www2.sqlite.org/](http://www2.sqlite.org) and 
-[http://www3.sqlite.org/](http://www3.sqlite.org). 
+
+There are several build options that can be set via the NMAKE command
+line.  For example, to build for WinRT, simply add "FOR_WINRT=1" argument
+to the "sqlite3.dll" command line above.  When debugging into the SQLite
+code, adding the "DEBUG=1" argument to one of the above command lines is
+recommended.
+
+SQLite does not require [Tcl](http://www.tcl.tk/) to run, but a Tcl installation
+is required by the makefiles (including those for MSVC).  SQLite contains
+a lot of generated code and Tcl is used to do much of that code generation.
+
+## Source Code Tour
+
+Most of the core source files are in the **src/** subdirectory.  The
+**src/** folder also contains files used to build the "testfixture" test
+harness. The names of the source files used by "testfixture" all begin
+with "test".
+The **src/** also contains the "shell.c" file
+which is the main program for the "sqlite3.exe"
+[command-line shell](https://sqlite.org/cli.html) and
+the "tclsqlite.c" file which implements the
+[Tcl bindings](https://sqlite.org/tclsqlite.html) for SQLite.
+(Historical note:  SQLite began as a Tcl
+extension and only later escaped to the wild as an independent library.)
+
+Test scripts and programs are found in the **test/** subdirectory.
+Addtional test code is found in other source repositories.
+See [How SQLite Is Tested](http://www.sqlite.org/testing.html) for
+additional information.
+
+The **ext/** subdirectory contains code for extensions.  The
+Full-text search engine is in **ext/fts3**.  The R-Tree engine is in
+**ext/rtree**.  The **ext/misc** subdirectory contains a number of
+smaller, single-file extensions, such as a REGEXP operator.
+
+The **tool/** subdirectory contains various scripts and programs used
+for building generated source code files or for testing or for generating
+accessory programs such as "sqlite3_analyzer(.exe)".
+
+### Generated Source Code Files
+
+Several of the C-language source files used by SQLite are generated from
+other sources rather than being typed in manually by a programmer.  This
+section will summarize those automatically-generated files.  To create all
+of the automatically-generated files, simply run "make target&#95;source".
+The "target&#95;source" make target will create a subdirectory "tsrc/" and
+fill it with all the source files needed to build SQLite, both
+manually-edited files and automatically-generated files.
+
+The SQLite interface is defined by the **sqlite3.h** header file, which is
+generated from src/sqlite.h.in, ./manifest.uuid, and ./VERSION.  The
+[Tcl script](http://www.tcl.tk) at tool/mksqlite3h.tcl does the conversion.
+The manifest.uuid file contains the SHA3 hash of the particular check-in
+and is used to generate the SQLITE\_SOURCE\_ID macro.  The VERSION file
+contains the current SQLite version number.  The sqlite3.h header is really
+just a copy of src/sqlite.h.in with the source-id and version number inserted
+at just the right spots. Note that comment text in the sqlite3.h file is
+used to generate much of the SQLite API documentation.  The Tcl scripts
+used to generate that documentation are in a separate source repository.
+
+The SQL language parser is **parse.c** which is generate from a grammar in
+the src/parse.y file.  The conversion of "parse.y" into "parse.c" is done
+by the [lemon](./doc/lemon.html) LALR(1) parser generator.  The source code
+for lemon is at tool/lemon.c.  Lemon uses the tool/lempar.c file as a
+template for generating its parser.
+Lemon also generates the **parse.h** header file, at the same time it
+generates parse.c.
+
+The **opcodes.h** header file contains macros that define the numbers
+corresponding to opcodes in the "VDBE" virtual machine.  The opcodes.h
+file is generated by the scanning the src/vdbe.c source file.  The
+Tcl script at ./mkopcodeh.tcl does this scan and generates opcodes.h.
+A second Tcl script, ./mkopcodec.tcl, then scans opcodes.h to generate
+the **opcodes.c** source file, which contains a reverse mapping from
+opcode-number to opcode-name that is used for EXPLAIN output.
+
+The **keywordhash.h** header file contains the definition of a hash table
+that maps SQL language keywords (ex: "CREATE", "SELECT", "INDEX", etc.) into
+the numeric codes used by the parse.c parser.  The keywordhash.h file is
+generated by a C-language program at tool mkkeywordhash.c.
+
+The **pragma.h** header file contains various definitions used to parse
+and implement the PRAGMA statements.  The header is generated by a
+script **tool/mkpragmatab.tcl**. If you want to add a new PRAGMA, edit
+the **tool/mkpragmatab.tcl** file to insert the information needed by the
+parser for your new PRAGMA, then run the script to regenerate the
+**pragma.h** header file.
+
+### The Amalgamation
+
+All of the individual C source code and header files (both manually-edited
+and automatically-generated) can be combined into a single big source file
+**sqlite3.c** called "the amalgamation".  The amalgamation is the recommended
+way of using SQLite in a larger application.  Combining all individual
+source code files into a single big source code file allows the C compiler
+to perform more cross-procedure analysis and generate better code.  SQLite
+runs about 5% faster when compiled from the amalgamation versus when compiled
+from individual source files.
+
+The amalgamation is generated from the tool/mksqlite3c.tcl Tcl script.
+First, all of the individual source files must be gathered into the tsrc/
+subdirectory (using the equivalent of "make target_source") then the
+tool/mksqlite3c.tcl script is run to copy them all together in just the
+right order while resolving internal "#include" references.
+
+The amalgamation source file is more than 200K lines long.  Some symbolic
+debuggers (most notably MSVC) are unable to deal with files longer than 64K
+lines.  To work around this, a separate Tcl script, tool/split-sqlite3c.tcl,
+can be run on the amalgamation to break it up into a single small C file
+called **sqlite3-all.c** that does #include on about seven other files
+named **sqlite3-1.c**, **sqlite3-2.c**, ..., **sqlite3-7.c**.  In this way,
+all of the source code is contained within a single translation unit so
+that the compiler can do extra cross-procedure optimization, but no
+individual source file exceeds 32K lines in length.
+
+## How It All Fits Together
+
+SQLite is modular in design.
+See the [architectural description](http://www.sqlite.org/arch.html)
+for details. Other documents that are useful in
+(helping to understand how SQLite works include the
+[file format](http://www.sqlite.org/fileformat2.html) description,
+the [virtual machine](http://www.sqlite.org/opcode.html) that runs
+prepared statements, the description of
+[how transactions work](http://www.sqlite.org/atomiccommit.html), and
+the [overview of the query planner](http://www.sqlite.org/optoverview.html).
+
+Years of effort have gone into optimizating SQLite, both
+for small size and high performance.  And optimizations tend to result in
+complex code.  So there is a lot of complexity in the current SQLite
+implementation.  It will not be the easiest library in the world to hack.
+
+Key files:
+
+  *  **sqlite.h.in** - This file defines the public interface to the SQLite
+     library.  Readers will need to be familiar with this interface before
+     trying to understand how the library works internally.
+
+  *  **sqliteInt.h** - this header file defines many of the data objects
+     used internally by SQLite.  In addition to "sqliteInt.h", some
+     subsystems have their own header files.
+
+  *  **parse.y** - This file describes the LALR(1) grammar that SQLite uses
+     to parse SQL statements, and the actions that are taken at each step
+     in the parsing process.
+
+  *  **vdbe.c** - This file implements the virtual machine that runs
+     prepared statements.  There are various helper files whose names
+     begin with "vdbe".  The VDBE has access to the vdbeInt.h header file
+     which defines internal data objects.  The rest of SQLite interacts
+     with the VDBE through an interface defined by vdbe.h.
+
+  *  **where.c** - This file (together with its helper files named
+     by "where*.c") analyzes the WHERE clause and generates
+     virtual machine code to run queries efficiently.  This file is
+     sometimes called the "query optimizer".  It has its own private
+     header file, whereInt.h, that defines data objects used internally.
+
+  *  **btree.c** - This file contains the implementation of the B-Tree
+     storage engine used by SQLite.  The interface to the rest of the system
+     is defined by "btree.h".  The "btreeInt.h" header defines objects
+     used internally by btree.c and not published to the rest of the system.
+
+  *  **pager.c** - This file contains the "pager" implementation, the
+     module that implements transactions.  The "pager.h" header file
+     defines the interface between pager.c and the rest of the system.
+
+  *  **os_unix.c** and **os_win.c** - These two files implement the interface
+     between SQLite and the underlying operating system using the run-time
+     pluggable VFS interface.
+
+  *  **shell.c.in** - This file is not part of the core SQLite library.  This
+     is the file that, when linked against sqlite3.a, generates the
+     "sqlite3.exe" command-line shell.  The "shell.c.in" file is transformed
+     into "shell.c" as part of the build process.
+
+  *  **tclsqlite.c** - This file implements the Tcl bindings for SQLite.  It
+     is not part of the core SQLite library.  But as most of the tests in this
+     repository are written in Tcl, the Tcl language bindings are important.
+
+  *  **test*.c** - Files in the src/ folder that begin with "test" go into
+     building the "testfixture.exe" program.  The testfixture.exe program is
+     an enhanced Tcl shell.  The testfixture.exe program runs scripts in the
+     test/ folder to validate the core SQLite code.  The testfixture program
+     (and some other test programs too) is build and run when you type
+     "make test".
+
+  *  **ext/misc/json1.c** - This file implements the various JSON functions
+     that are build into SQLite.
+
+There are many other source files.  Each has a succinct header comment that
+describes its purpose and role within the larger system.
+
+<a name="vauth"></a>
+## Verifying Code Authenticity
+
+The `manifest` file at the root directory of the source tree
+contains either a SHA3-256 hash (for newer files) or a SHA1 hash (for 
+older files) for every source file in the repository.
+The SHA3-256 hash of the `manifest`
+file itself is the official name of the version of the source tree that you
+have. The `manifest.uuid` file should contain the SHA3-256 hash of the
+`manifest` file. If all of the above hash comparisons are correct, then
+you can be confident that your source tree is authentic and unadulterated.
+
+The format of the `manifest` file should be mostly self-explanatory, but
+if you want details, they are available
+[here](https://fossil-scm.org/fossil/doc/trunk/www/fileformat.wiki#manifest).
+
+## Contacts
+
+The main SQLite website is [http://www.sqlite.org/](http://www.sqlite.org/)
+with geographically distributed backups at
+[http://www2.sqlite.org/](http://www2.sqlite.org) and
+[http://www3.sqlite.org/](http://www3.sqlite.org).

+ 130 - 130
contrib/libs/sqlite3/config.h

@@ -1,132 +1,132 @@
-/* config.h.  Generated from config.h.in by configure.  */ 
-/* config.h.in.  Generated from configure.ac by autoheader.  */ 
- 
-/* Define to 1 if you have the <dlfcn.h> header file. */ 
-#define HAVE_DLFCN_H 1 
- 
-/* Define to 1 if you have the `fdatasync' function. */ 
-#define HAVE_FDATASYNC 1 
- 
-/* Define to 1 if you have the `gmtime_r' function. */ 
-#define HAVE_GMTIME_R 1 
- 
-/* Define to 1 if the system has the type `int16_t'. */ 
-#define HAVE_INT16_T 1 
- 
-/* Define to 1 if the system has the type `int32_t'. */ 
-#define HAVE_INT32_T 1 
- 
-/* Define to 1 if the system has the type `int64_t'. */ 
-#define HAVE_INT64_T 1 
- 
-/* Define to 1 if the system has the type `int8_t'. */ 
-#define HAVE_INT8_T 1 
- 
-/* Define to 1 if the system has the type `intptr_t'. */ 
-#define HAVE_INTPTR_T 1 
- 
-/* Define to 1 if you have the <inttypes.h> header file. */ 
-#define HAVE_INTTYPES_H 1 
- 
-/* Define to 1 if you have the `isnan' function. */ 
-#define HAVE_ISNAN 1 
- 
-/* Define to 1 if you have the `localtime_r' function. */ 
-#define HAVE_LOCALTIME_R 1 
- 
-/* Define to 1 if you have the `localtime_s' function. */ 
-/* #undef HAVE_LOCALTIME_S */ 
- 
-/* Define to 1 if you have the <malloc.h> header file. */ 
-#define HAVE_MALLOC_H 1 
- 
-/* Define to 1 if you have the `malloc_usable_size' function. */ 
-#define HAVE_MALLOC_USABLE_SIZE 1 
- 
-/* Define to 1 if you have the <memory.h> header file. */ 
-#define HAVE_MEMORY_H 1 
- 
-/* Define to 1 if you have the pread() function. */ 
-#define HAVE_PREAD 1 
- 
-/* Define to 1 if you have the pread64() function. */ 
-#define HAVE_PREAD64 1 
- 
-/* Define to 1 if you have the pwrite() function. */ 
-#define HAVE_PWRITE 1 
- 
-/* Define to 1 if you have the pwrite64() function. */ 
-#define HAVE_PWRITE64 1 
- 
-/* Define to 1 if you have the <stdint.h> header file. */ 
-#define HAVE_STDINT_H 1 
- 
-/* Define to 1 if you have the <stdlib.h> header file. */ 
-#define HAVE_STDLIB_H 1 
- 
-/* Define to 1 if you have the strchrnul() function */ 
-#define HAVE_STRCHRNUL 1 
- 
-/* Define to 1 if you have the <strings.h> header file. */ 
-#define HAVE_STRINGS_H 1 
- 
-/* Define to 1 if you have the <string.h> header file. */ 
-#define HAVE_STRING_H 1 
- 
-/* Define to 1 if you have the <sys/stat.h> header file. */ 
-#define HAVE_SYS_STAT_H 1 
- 
-/* Define to 1 if you have the <sys/types.h> header file. */ 
-#define HAVE_SYS_TYPES_H 1 
- 
-/* Define to 1 if the system has the type `uint16_t'. */ 
-#define HAVE_UINT16_T 1 
- 
-/* Define to 1 if the system has the type `uint32_t'. */ 
-#define HAVE_UINT32_T 1 
- 
-/* Define to 1 if the system has the type `uint64_t'. */ 
-#define HAVE_UINT64_T 1 
- 
-/* Define to 1 if the system has the type `uint8_t'. */ 
-#define HAVE_UINT8_T 1 
- 
-/* Define to 1 if the system has the type `uintptr_t'. */ 
-#define HAVE_UINTPTR_T 1 
- 
-/* Define to 1 if you have the <unistd.h> header file. */ 
-#define HAVE_UNISTD_H 1 
- 
-/* Define to 1 if you have the `usleep' function. */ 
-#define HAVE_USLEEP 1 
- 
-/* Define to 1 if you have the utime() library function. */ 
-#define HAVE_UTIME 1 
- 
-/* Define to the sub-directory in which libtool stores uninstalled libraries. 
-   */ 
-#define LT_OBJDIR ".libs/" 
- 
-/* Define to the address where bug reports for this package should be sent. */ 
-#define PACKAGE_BUGREPORT "" 
- 
-/* Define to the full name of this package. */ 
-#define PACKAGE_NAME "sqlite" 
- 
-/* Define to the full name and version of this package. */ 
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `fdatasync' function. */
+#define HAVE_FDATASYNC 1
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#define HAVE_GMTIME_R 1
+
+/* Define to 1 if the system has the type `int16_t'. */
+#define HAVE_INT16_T 1
+
+/* Define to 1 if the system has the type `int32_t'. */
+#define HAVE_INT32_T 1
+
+/* Define to 1 if the system has the type `int64_t'. */
+#define HAVE_INT64_T 1
+
+/* Define to 1 if the system has the type `int8_t'. */
+#define HAVE_INT8_T 1
+
+/* Define to 1 if the system has the type `intptr_t'. */
+#define HAVE_INTPTR_T 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isnan' function. */
+#define HAVE_ISNAN 1
+
+/* Define to 1 if you have the `localtime_r' function. */
+#define HAVE_LOCALTIME_R 1
+
+/* Define to 1 if you have the `localtime_s' function. */
+/* #undef HAVE_LOCALTIME_S */
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the `malloc_usable_size' function. */
+#define HAVE_MALLOC_USABLE_SIZE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the pread() function. */
+#define HAVE_PREAD 1
+
+/* Define to 1 if you have the pread64() function. */
+#define HAVE_PREAD64 1
+
+/* Define to 1 if you have the pwrite() function. */
+#define HAVE_PWRITE 1
+
+/* Define to 1 if you have the pwrite64() function. */
+#define HAVE_PWRITE64 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the strchrnul() function */
+#define HAVE_STRCHRNUL 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if the system has the type `uint16_t'. */
+#define HAVE_UINT16_T 1
+
+/* Define to 1 if the system has the type `uint32_t'. */
+#define HAVE_UINT32_T 1
+
+/* Define to 1 if the system has the type `uint64_t'. */
+#define HAVE_UINT64_T 1
+
+/* Define to 1 if the system has the type `uint8_t'. */
+#define HAVE_UINT8_T 1
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#define HAVE_UINTPTR_T 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `usleep' function. */
+#define HAVE_USLEEP 1
+
+/* Define to 1 if you have the utime() library function. */
+#define HAVE_UTIME 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "sqlite"
+
+/* Define to the full name and version of this package. */
 #define PACKAGE_STRING "sqlite 3.37.2"
- 
-/* Define to the one symbol short name of this package. */ 
-#define PACKAGE_TARNAME "sqlite" 
- 
-/* Define to the version of this package. */ 
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "sqlite"
+
+/* Define to the version of this package. */
 #define PACKAGE_VERSION "3.37.2"
- 
-/* Define to 1 if you have the ANSI C header files. */ 
-#define STDC_HEADERS 1 
- 
-/* Number of bits in a file offset, on hosts where this is settable. */ 
-/* #undef _FILE_OFFSET_BITS */ 
- 
-/* Define for large files, on AIX-style hosts. */ 
-/* #undef _LARGE_FILES */ 
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */

Разница между файлами не показана из-за своего большого размера
+ 341 - 341
contrib/libs/sqlite3/sqlite3.c


Разница между файлами не показана из-за своего большого размера
+ 336 - 336
contrib/libs/sqlite3/sqlite3.h


+ 49 - 49
contrib/libs/sqlite3/sqlite3ext.h

@@ -295,33 +295,33 @@ struct sqlite3_api_routines {
   int (*vtab_nochange)(sqlite3_context*);
   int (*value_nochange)(sqlite3_value*);
   const char *(*vtab_collation)(sqlite3_index_info*,int);
-  /* Version 3.24.0 and later */ 
-  int (*keyword_count)(void); 
-  int (*keyword_name)(int,const char**,int*); 
-  int (*keyword_check)(const char*,int); 
-  sqlite3_str *(*str_new)(sqlite3*); 
-  char *(*str_finish)(sqlite3_str*); 
-  void (*str_appendf)(sqlite3_str*, const char *zFormat, ...); 
-  void (*str_vappendf)(sqlite3_str*, const char *zFormat, va_list); 
-  void (*str_append)(sqlite3_str*, const char *zIn, int N); 
-  void (*str_appendall)(sqlite3_str*, const char *zIn); 
-  void (*str_appendchar)(sqlite3_str*, int N, char C); 
-  void (*str_reset)(sqlite3_str*); 
-  int (*str_errcode)(sqlite3_str*); 
-  int (*str_length)(sqlite3_str*); 
-  char *(*str_value)(sqlite3_str*); 
-  /* Version 3.25.0 and later */ 
-  int (*create_window_function)(sqlite3*,const char*,int,int,void*, 
-                            void (*xStep)(sqlite3_context*,int,sqlite3_value**), 
-                            void (*xFinal)(sqlite3_context*), 
-                            void (*xValue)(sqlite3_context*), 
-                            void (*xInv)(sqlite3_context*,int,sqlite3_value**), 
-                            void(*xDestroy)(void*)); 
-  /* Version 3.26.0 and later */ 
-  const char *(*normalized_sql)(sqlite3_stmt*); 
-  /* Version 3.28.0 and later */ 
-  int (*stmt_isexplain)(sqlite3_stmt*); 
-  int (*value_frombind)(sqlite3_value*); 
+  /* Version 3.24.0 and later */
+  int (*keyword_count)(void);
+  int (*keyword_name)(int,const char**,int*);
+  int (*keyword_check)(const char*,int);
+  sqlite3_str *(*str_new)(sqlite3*);
+  char *(*str_finish)(sqlite3_str*);
+  void (*str_appendf)(sqlite3_str*, const char *zFormat, ...);
+  void (*str_vappendf)(sqlite3_str*, const char *zFormat, va_list);
+  void (*str_append)(sqlite3_str*, const char *zIn, int N);
+  void (*str_appendall)(sqlite3_str*, const char *zIn);
+  void (*str_appendchar)(sqlite3_str*, int N, char C);
+  void (*str_reset)(sqlite3_str*);
+  int (*str_errcode)(sqlite3_str*);
+  int (*str_length)(sqlite3_str*);
+  char *(*str_value)(sqlite3_str*);
+  /* Version 3.25.0 and later */
+  int (*create_window_function)(sqlite3*,const char*,int,int,void*,
+                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+                            void (*xFinal)(sqlite3_context*),
+                            void (*xValue)(sqlite3_context*),
+                            void (*xInv)(sqlite3_context*,int,sqlite3_value**),
+                            void(*xDestroy)(void*));
+  /* Version 3.26.0 and later */
+  const char *(*normalized_sql)(sqlite3_stmt*);
+  /* Version 3.28.0 and later */
+  int (*stmt_isexplain)(sqlite3_stmt*);
+  int (*value_frombind)(sqlite3_value*);
   /* Version 3.30.0 and later */
   int (*drop_modules)(sqlite3*,const char**);
   /* Version 3.31.0 and later */
@@ -612,28 +612,28 @@ typedef int (*sqlite3_loadext_entry)(
 #define sqlite3_value_pointer          sqlite3_api->value_pointer
 /* Version 3.22.0 and later */
 #define sqlite3_vtab_nochange          sqlite3_api->vtab_nochange
-#define sqlite3_value_nochange         sqlite3_api->value_nochange 
-#define sqlite3_vtab_collation         sqlite3_api->vtab_collation 
-/* Version 3.24.0 and later */ 
-#define sqlite3_keyword_count          sqlite3_api->keyword_count 
-#define sqlite3_keyword_name           sqlite3_api->keyword_name 
-#define sqlite3_keyword_check          sqlite3_api->keyword_check 
-#define sqlite3_str_new                sqlite3_api->str_new 
-#define sqlite3_str_finish             sqlite3_api->str_finish 
-#define sqlite3_str_appendf            sqlite3_api->str_appendf 
-#define sqlite3_str_vappendf           sqlite3_api->str_vappendf 
-#define sqlite3_str_append             sqlite3_api->str_append 
-#define sqlite3_str_appendall          sqlite3_api->str_appendall 
-#define sqlite3_str_appendchar         sqlite3_api->str_appendchar 
-#define sqlite3_str_reset              sqlite3_api->str_reset 
-#define sqlite3_str_errcode            sqlite3_api->str_errcode 
-#define sqlite3_str_length             sqlite3_api->str_length 
-#define sqlite3_str_value              sqlite3_api->str_value 
-/* Version 3.25.0 and later */ 
-#define sqlite3_create_window_function sqlite3_api->create_window_function 
-/* Version 3.26.0 and later */ 
-#define sqlite3_normalized_sql         sqlite3_api->normalized_sql 
-/* Version 3.28.0 and later */ 
+#define sqlite3_value_nochange         sqlite3_api->value_nochange
+#define sqlite3_vtab_collation         sqlite3_api->vtab_collation
+/* Version 3.24.0 and later */
+#define sqlite3_keyword_count          sqlite3_api->keyword_count
+#define sqlite3_keyword_name           sqlite3_api->keyword_name
+#define sqlite3_keyword_check          sqlite3_api->keyword_check
+#define sqlite3_str_new                sqlite3_api->str_new
+#define sqlite3_str_finish             sqlite3_api->str_finish
+#define sqlite3_str_appendf            sqlite3_api->str_appendf
+#define sqlite3_str_vappendf           sqlite3_api->str_vappendf
+#define sqlite3_str_append             sqlite3_api->str_append
+#define sqlite3_str_appendall          sqlite3_api->str_appendall
+#define sqlite3_str_appendchar         sqlite3_api->str_appendchar
+#define sqlite3_str_reset              sqlite3_api->str_reset
+#define sqlite3_str_errcode            sqlite3_api->str_errcode
+#define sqlite3_str_length             sqlite3_api->str_length
+#define sqlite3_str_value              sqlite3_api->str_value
+/* Version 3.25.0 and later */
+#define sqlite3_create_window_function sqlite3_api->create_window_function
+/* Version 3.26.0 and later */
+#define sqlite3_normalized_sql         sqlite3_api->normalized_sql
+/* Version 3.28.0 and later */
 #define sqlite3_stmt_isexplain         sqlite3_api->stmt_isexplain
 #define sqlite3_value_frombind         sqlite3_api->value_frombind
 /* Version 3.30.0 and later */

+ 1 - 1
contrib/libs/sqlite3/test_multiplex.c

@@ -1220,7 +1220,7 @@ int sqlite3_multiplex_shutdown(int eForce){
 /***************************** Test Code ***********************************/
 #ifdef SQLITE_TEST
 #if defined(INCLUDE_SQLITE_TCL_H)
-#  error #include "sqlite_tcl.h" 
+#  error #include "sqlite_tcl.h"
 #else
 #  include "tcl.h"
 #  ifndef SQLITE_TCLAPI

+ 27 - 27
contrib/libs/sqlite3/ya.make

@@ -1,5 +1,5 @@
 # Generated by devtools/yamaker from nixpkgs 21.11.
- 
+
 LIBRARY()
 
 OWNER(
@@ -17,7 +17,7 @@ LICENSE(
 )
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
- 
+
 ADDINCL(
     contrib/libs/sqlite3
 )
@@ -26,31 +26,31 @@ NO_COMPILER_WARNINGS()
 
 NO_RUNTIME()
 
-CFLAGS( 
-    -DBUILD_sqlite 
-    -DHAVE_USLEEP 
-    -DSQLITE_ENABLE_COLUMN_METADATA 
-    -DSQLITE_ENABLE_DBSTAT_VTAB 
-    -DSQLITE_ENABLE_FTS3 
-    -DSQLITE_ENABLE_FTS3_PARENTHESIS 
-    -DSQLITE_ENABLE_FTS3_TOKENIZER 
-    -DSQLITE_ENABLE_FTS4 
-    -DSQLITE_ENABLE_FTS5 
-    -DSQLITE_ENABLE_JSON1 
+CFLAGS(
+    -DBUILD_sqlite
+    -DHAVE_USLEEP
+    -DSQLITE_ENABLE_COLUMN_METADATA
+    -DSQLITE_ENABLE_DBSTAT_VTAB
+    -DSQLITE_ENABLE_FTS3
+    -DSQLITE_ENABLE_FTS3_PARENTHESIS
+    -DSQLITE_ENABLE_FTS3_TOKENIZER
+    -DSQLITE_ENABLE_FTS4
+    -DSQLITE_ENABLE_FTS5
+    -DSQLITE_ENABLE_JSON1
     -DSQLITE_ENABLE_MATH_FUNCTIONS
-    -DSQLITE_ENABLE_RTREE 
-    -DSQLITE_ENABLE_STMT_SCANSTATUS 
-    -DSQLITE_ENABLE_UNLOCK_NOTIFY 
-    -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT 
-    -DSQLITE_HAVE_ZLIB=1 
-    -DSQLITE_MAX_EXPR_DEPTH=10000 
-    -DSQLITE_MAX_VARIABLE_NUMBER=250000 
-    -DSQLITE_SECURE_DELETE 
-    -DSQLITE_SOUNDEX 
-    -DSQLITE_TEMP_STORE=1 
-    -DSQLITE_THREADSAFE=1 
-) 
- 
+    -DSQLITE_ENABLE_RTREE
+    -DSQLITE_ENABLE_STMT_SCANSTATUS
+    -DSQLITE_ENABLE_UNLOCK_NOTIFY
+    -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+    -DSQLITE_HAVE_ZLIB=1
+    -DSQLITE_MAX_EXPR_DEPTH=10000
+    -DSQLITE_MAX_VARIABLE_NUMBER=250000
+    -DSQLITE_SECURE_DELETE
+    -DSQLITE_SOUNDEX
+    -DSQLITE_TEMP_STORE=1
+    -DSQLITE_THREADSAFE=1
+)
+
 IF (OS_WINDOWS)
     CFLAGS(
         -DSQLITE_OS_WIN
@@ -63,7 +63,7 @@ ENDIF()
 
 SRCS(
     sqlite3.c
-    test_multiplex.c 
+    test_multiplex.c
 )
 
 END()

Некоторые файлы не были показаны из-за большого количества измененных файлов