1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-20 08:47:46 +03:00

490 Commits

Author SHA1 Message Date
jan.nijtmans
1f3207a52a Fix for forum-post [/forum/forumpost/b5fde3596c|b5fde3596c]. Also fix encoding issue for non-ASCII characters.
Also includes a fix from Stephan Beal, about a missing <stdint.h> include.

FossilOrigin-Name: e60198001e12f85a5d6504ce72226dfceb8666fe5ec649237fa23ae20e8aa32d
2025-03-27 17:30:49 +00:00
stephan
e34ad2b0b3 tclsqlite3 patch from Christian Werner: replace FILE handles with TCL channels for the db copy command.
FossilOrigin-Name: ea1f7f8de4abb80fe41a115c9f601ff27cd728493640c6d47d868913feec28dc
2025-03-04 21:25:18 +00:00
stephan
3ce81095f9 Minor doc typo fixes via [forum:65bd941da8|forum post 65bd941da8].
FossilOrigin-Name: 6f6a03e93cf58eaee79603de0b28ad34c872fb4b4b7d9c4e7fe35c698b27618a
2025-03-04 06:29:03 +00:00
drh
8bffd498ea Remove an unused parameter from an internal-use subroutine in the TCL interface.
FossilOrigin-Name: a700692b39e24f5ca9ea6f879d413e20c2ad2b85f62c867407dafe111f13d931
2025-01-30 16:07:51 +00:00
drh
000e39e9a8 Improvements to the TCL interface for Tcl9 as suggested by Jan Nijtmans.
FossilOrigin-Name: d76c5db866de2732b68401a4c3e39acddc7a99bed965160c1796477c062b478a
2025-01-30 16:00:28 +00:00
drh
d0db5edf61 Use Tcl_GetString() instead of Tcl_GetCharLength() to test for a zero-length
string in the TCL interface, since that is much more efficient.

FossilOrigin-Name: a8d9dcfd23fbfcd887e451382836c1e88215984cc01e00be11387dbf4ab26fd8
2025-01-21 11:10:16 +00:00
drh
fd11e5c082 Improvements to [14b38ae6ab86a314] so that the Tcl interface is better able
to work with boolean values in both Tcl86 and Tcl90.

FossilOrigin-Name: 4e85343d6107a46682b549667410c296d7f4d17e3ac04ded7357afcbbfbe3e6d
2025-01-07 16:36:47 +00:00
drh
4717d573e4 Make the TCL extension aware of the booleanString type within TCL.
FossilOrigin-Name: 14b38ae6ab86a314a63ca9513850b43fcc670864f94d03a2706eff469980da88
2025-01-07 12:14:32 +00:00
drh
e53393250a Fix a typo in the previous check-in.
FossilOrigin-Name: 7d41885e85b0e2ef28bac34d663af07c35b21ee3e8b14481d2371f623bce681d
2025-01-07 11:54:43 +00:00
drh
4a6896379f Minor fixes to tclsqlite.c to promote portability.
FossilOrigin-Name: dd934f032fa6fc790a951006512e3ed76a5f2930858932918eafdbe3ceec4620
2025-01-07 00:17:54 +00:00
drh
e57527c14f Make the TCL interface more rebust against very large strings coming
out of TCL9.

FossilOrigin-Name: e2bae4143afd07de1ae55a6d2606a3b541a5b94568aa41f6a96e5d1245471653
2024-12-09 20:46:36 +00:00
drh
8ff67df7ac Fix another issue in argument expansion on Windows for tclsqlite3.c in
interpreter mode.  Problem introduced by check-in [9b87ea219bce5689] and
unfixed by [cd942dce148c9d8f].

FossilOrigin-Name: 0fe1622cec95b7ebecc127ee57a08113d3da1dadbe72c03a13d6751b3043e50f
2024-11-22 17:41:00 +00:00
drh
18689b8fb2 Fix argument expansion in sqlite-tclsh on Windows such that if an argument
does not match a filename even after glob expansion, it is appended to the
argument list verbatim.

FossilOrigin-Name: cd942dce148c9d8f5a94cee61923aad8d1b732b807e004005f78323be30c02e7
2024-11-16 17:39:34 +00:00
drh
bc4df6079c Remove the never-used and never-documented and long-ago deprecated
user-authentication feature option.

FossilOrigin-Name: 3a3f7bf4307c27e56546e51da06ecc9a262cdf155fda2dd359aa2326d207a147
2024-10-28 17:27:15 +00:00
drh
76e48f4d66 Do not typedef Tcl_Size if it is already #defined.
FossilOrigin-Name: 53491688cf622ca317b3ff56156e601c2bdfffc94e4fe471ca82d5ba1d9e875f
2024-10-22 16:19:14 +00:00
drh
17408fbbd8 An improved method for statically linking sqlite3_analyzer.exe using Tcl9.
Enable wildcard expansion of arguments to testfiture on Windows.

FossilOrigin-Name: 9b87ea219bce5689a69efac31063b9b11928e59124c0d36194715ff7faa5129d
2024-10-11 17:02:37 +00:00
drh
7b179a3098 For compatibility, allow the TCL interfact to continue working with TCL 8.5.
FossilOrigin-Name: 69346e9d4704e8fd82cbb3359913191e05cb38ee591baf97dcfe321db0ea085e
2024-10-10 10:33:31 +00:00
drh
50bb0aaa2c Changes to the TCL extension and how it is built, suggested by Jan Nijtmans.
FossilOrigin-Name: 9c0690193200551a3218c576b19eaf40e330dc252d67b430204ff44495e4793e
2024-10-09 13:19:21 +00:00
drh
bb99e73ef5 Simplification the ./configure script. Carry Makefile CFLAGS and OPTS through
into builttclext.tcl.  Fix a bug in tclsqlite.c introduced by the previous
check-in.

FossilOrigin-Name: 72a80aa0abb121a23f8cc1eb1af04ba06c733a7a40c06f1fe9e62f2a0a26ca6e
2024-08-01 23:30:29 +00:00
drh
58c5a95c07 Add the tclextension-list makefile target. The the makefile running on Mac.
FossilOrigin-Name: 2f667cc8e54167342e17e63e1a017388365ebf4cd379f9c16c12e4603b34a326
2024-08-01 23:00:37 +00:00
drh
5addf9f111 Make the #include section of tclsqlite.c the same as tclsqlite.h.
FossilOrigin-Name: 2afadbeb124d6d7bb81d473379269014ebd8601f98f231e2218f54350a2e5fd3
2024-07-31 22:25:25 +00:00
drh
e388fc7367 Fixes to tclsqlite.c to facilitate TEA installs.
FossilOrigin-Name: 7157c3c910565c9385a028793a0c0106c5064ab6a8a6efbe29dd1f1cdb2bd48d
2024-07-31 10:59:19 +00:00
drh
a28a784ef4 More adjustments to the incrblob channel: Apparently you need to wait
until the close2Proc is called with a flag of 0 before actually shutting
down the channel.

FossilOrigin-Name: fa549a5507b5f805b469b4360c11155aa9d22043f01f6d9428bf44d0f2351eb0
2024-07-30 18:49:20 +00:00
drh
1c2ad465c6 Tcl_ChannelType implementations for Tcl9 apparently require that
wideSeekProc be implemented.  Also adjust minor test script issues for
fts5 tests so that they can be run sequentially and so that they do not
depend on the specific floating point output formats generated by Tcl.

FossilOrigin-Name: 19fda979c5dc1a385ed3f8ab8df34388c1acfc7ff951fe1b183a79186bd20cdb
2024-07-30 18:15:59 +00:00
drh
1631c64f78 Fix the incrblob channel so that partial close works with Tcl9.
FossilOrigin-Name: d54ec2de78c2aed12be643e59a30b6827fe4728a0ab6504dd64ee9116e5f885a
2024-07-30 16:51:51 +00:00
drh
064b681e9b First attempt at getting the build to work with Tcl 9.0.
FossilOrigin-Name: 6e5bb48a74d63fb8c30528f0005d1763cd2dbb882abf86baf1565721e6bfcf84
2024-07-30 15:49:02 +00:00
drh
8e5cef7bca Fix harmless compiler warnings that show up on 32-bit RaspberryPI builds.
FossilOrigin-Name: bc4d20f362925e4ce5c79f0d7a27a8e9bbac92525bd4cea2ae983798e3f8c37d
2023-06-17 15:42:44 +00:00
larrybr
bc91738e66 Add a C-source spell-checking facility. make misspell (on Nix)
FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
2023-06-07 08:40:31 +00:00
drh
2fc9dc9330 Fix sqlite3_prepare() so that it only invokes the progress handler on every
N-th call to sqlite3ProgressCheck(), where N is the progress handler step
count.  Also fix faulty asserts exposed by the ability to interrupt in the
middle of sqlite3_prepare().

FossilOrigin-Name: 05461651599bb490ac6cfd893645dabab9cccedc6adcce15aee2487b2ea6027a
2023-01-12 19:51:49 +00:00
dan
f74f4ed5b5 Fix a minor problem in the Tcl "incrblob" command. This does not affect the SQLite core.
FossilOrigin-Name: e96feccc21d9b858f076960e029b615809243d0cc3f95db75180feb01887451f
2022-06-01 14:32:05 +00:00
drh
be4e3c88f5 Make the sqlite3_error_offset() interface accessible from TCL using the
new "erroroffset" method on the sqlite3 object.

FossilOrigin-Name: 3454a1222bedefba527af98c0284ed0bfbd28dd941885d9a0ac9a44aea2fc8ec
2022-02-16 15:11:01 +00:00
drh
7907d372bc Fix a compiler warning in the dbserialize method of the TCL interface.
FossilOrigin-Name: ba71d030fef4cd4251dc882acc6897dbf9aaba498652900c491b082add87404f
2021-11-23 12:59:25 +00:00
drh
5e90794b67 Minor tweaks to the way auxiliary tools are built, to make it easier to
customize the builds without having to alter the code.

FossilOrigin-Name: 90b06b6f42918852cfb15258be462c6bed260c6a618b86fa9084bac72fa2f58f
2021-11-18 20:56:59 +00:00
dan
bea28c73a3 Add a reference counter to a structure used internally by the Tcl interface so that it does not segfault if the database connection is closed from any of the various callback scripts that may be invoked.
FossilOrigin-Name: e54a33ce56432b23947583d34cf12fc64a55bbc49eb77c7f33cff5926df51070
2021-09-16 14:17:14 +00:00
dan
2c7188732d Add the sqlite3_changes64() and sqlite3_total_changes64() API functions.
FossilOrigin-Name: 48fdec22c966003f5577e0bf52906ef90df11e4e395723a646304e67ed976f37
2021-06-22 18:32:05 +00:00
drh
8d889afc0d Enable the sqlite3_serialize() and sqlite3_deserialize() interfaces by
default.  Omit the SQLITE_ENABLE_DESERIALIZE option and replace it with
the SQLITE_OMIT_DESERIALIZE option.

FossilOrigin-Name: 6df3b03e00b1143be8fed3a39a58ce81063020275aa1ac13d87c84f1ceda6e27
2021-05-08 17:18:23 +00:00
mistachkin
a8e41ecaca Enhancements to long-path support in the Win32 VFS.
FossilOrigin-Name: 0119d96decd344ae711388ac8475b92464a6d018ecf73862170f137410036dac
2020-05-15 01:18:07 +00:00
drh
b48c0d59fa Simplify the code by removing the unsupported and undocumented
SQLITE_HAS_CODEC compile-time option

FossilOrigin-Name: 5a877221ce90e7523059353a68650c5fdd28ed032807afc2f10afbfbf864bdfe
2020-02-07 01:12:53 +00:00
drh
76a1fce53b In the TCL interface, add the ability to change the
SQLITE_DBCONFIG_TRUSTED_SCHEMA setting using the "db config" method.

FossilOrigin-Name: 1accfa8cf05856b03cecab7a2cd0c0337842a0003cfbec207b6f0acdd93e8f15
2020-01-18 22:20:14 +00:00
drh
15f3eacfc0 Provide the -innocuous option to the "db func" method in the TCL interface.
FossilOrigin-Name: 0138652b6c2f21fd67e59a23a396a5b9d6a16ee9b44701cddfc49b23fddfce5b
2020-01-08 15:44:10 +00:00
drh
0933aad72c Add support for SQLITE_OPEN_NOFOLLOW.
FossilOrigin-Name: cb79c828496a703f1410f61458ebc1e15a92a63412b36f51945b2b5a32ec6e88
2019-11-18 17:46:38 +00:00
drh
217ca657d8 The SQLITE_DIRECTONLY flag, when added to sqlite3_create_function() prevents
the function from being used inside a trigger or view.

FossilOrigin-Name: de767376987f7668b0770c4920f1532e341b5a27f797d69c0f5e92b87d036170
2019-08-17 00:53:29 +00:00
drh
4043cfef75 Fix harmless compiler warnings in the TCL interface.
FossilOrigin-Name: f17e72291f197a92b3e15e054271b997d45211a5a31ca4ea6c7fbb33026d5f1f
2019-08-15 23:11:42 +00:00
drh
11d88e68ab Add the SQLITE_DBCONFIG_ENABLE_VIEW option, together with a "db config"
command in the TCL interface that can access that option as well as all the
other sqlite3_db_config() boolean options.

FossilOrigin-Name: 61b4bccd2984f4c2cf50f58ef08677588e57aa7e079af07473b2e188d9ce4f52
2019-08-15 21:27:20 +00:00
drh
42d2fce7f5 Provide the SQLITE_DIRECTONLY flag for app-defined functions that prohibits
the use of those functions within triggers or views.

FossilOrigin-Name: fc745845d8d76adc165575e2192f4176e3c28e614c72571d56f4011560499fe1
2019-08-15 20:04:09 +00:00
drh
c06ede105d Add the new "bind_fallback" method to the "sqlite3" object in the TCL
interface.

FossilOrigin-Name: c7f70b6d96338dba201e005104e7f7148c1a8cd767ab05e35b44617c4c797bc5
2019-02-28 17:29:19 +00:00
dan
89d249364e Add the "-returntype" option to the "db function" Tcl method.
FossilOrigin-Name: 789a492b68c353e2b763d67d399722b7ab61bfe09b472466df2821f65cab1be9
2019-02-27 16:38:19 +00:00
drh
6ca644818b Enhancements to deserialize: (1) Add the SQLITE_FCNTL_SIZE_LIMIT file control
to set a maximum size for an in-memory database, defaulting to 
SQLITE_MEMDB_DEFAULT_MAXSIZE or 1GiB.  (2) Honor the SQLITE_DESERIALIZE_READONLY
flag. (3) Enhance the TCL interface to support -maxsize N and -readonly BOOLEAN.
(4) Add the --maxsize option to the ".open" command and on the command-line for
the CLI.

FossilOrigin-Name: 30f08d58882819a69e353bcc1b6b349664bbfbe00aa1c115ba44a9fd899fcc5b
2019-01-22 16:06:20 +00:00
drh
c6727c8342 Fix the "sqlite3" command in the TCL interface so that it correctly returns
an error if invoked with no arguments.

FossilOrigin-Name: 2034fa8089676132b5e2f71bdebf1af9ca141da2e173920c6e84fb974ab0f022
2018-09-19 15:08:21 +00:00
mistachkin
1e8487db29 In the Win32 VFS, when truncating a file, unmap it first.
FossilOrigin-Name: 21510a66dce4d0843ccfe20f092a01f5a52563ef244a94f1d5d2563305cab925
2018-07-22 06:25:35 +00:00