Commit Graph

109 Commits

Author SHA1 Message Date
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
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
drh
c2df4d6adb Recognize certain standard datatypes ("INT", "INTEGER", "REAL", "TEXT", and
"BLOB") and if a column has one of those datatypes, store the type part of
the bit-field information in the Column structure to save space.

FossilOrigin-Name: d2da62a9df63036b02dadca3798de9e623c2680b3ef0c37d2b18bb88693afd7f
2021-07-30 23:30:30 +00:00
drh
a01fda7113 Disable a redundant test case that uses a very large stack, and hence
is unable to run with -fsanitize=undefined,address.

FossilOrigin-Name: 3c63f68e12af36e9fd9a3dd4daec9402e75e80bcd819d39c0215a427fd0d7803
2020-01-18 19:07:00 +00:00
drh
2eeca2046e Performance improvements and test cases added. Allow "PRAGMA trusted_schema=ON"
FossilOrigin-Name: 30882ca80f6c51f6bb7b2692c1ac3f19a7c61a23aa8730be79aec0ae3ef08d54
2020-01-08 20:37:45 +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
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
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
drh
3ec8665e22 Replace sqlite3_memdb_config() with sqlite3_deserialize(). Remove the
"db memdb" command from the TCL interface, replacing it with "db serialize"
and "db deserialize".

FossilOrigin-Name: 2f6e9df9f0c5a9e5b1acb99cfa9486850cc1822d35b0989e779a7a10f3b1f1ac
2018-01-03 19:03:31 +00:00
drh
4dcac40e3d Simplify the "sqlite3" command in the TCL interface. The filename is now
optional.  There is a new --memdb option with an argument that is the blob
to which the database content should be initialized.

FossilOrigin-Name: 47398ae77236a92f6b9345aa397361b6df127a9a2895c0771d506b0be10822b9
2018-01-03 13:20:02 +00:00
drh
af38cdbc08 Add the -withoutnulls option to the "db eval" method in the TCL interface.
FossilOrigin-Name: 18f0616e15684ca327fb10a1d133331af1d3b75f609498982290f6ad69fcaced
2017-06-26 21:08:32 +00:00
drh
0e15d921d9 Merge fixes from trunk. Fix the tclsqlite.test script.
FossilOrigin-Name: d2b1fa55e8809ffc25a25f256349b8d08beadab5
2016-07-15 02:55:51 +00:00
drh
edc4024b9d Fix the "onecolumn" and "exists" methods of the TCL interface so that they
work in combination with the "profile" callback.

FossilOrigin-Name: d362ba157f993fc74a590cf15a9a2fa589278dd7
2016-06-13 12:34:38 +00:00
drh
47e1842e5b Merge all recent enhancements from trunk.
FossilOrigin-Name: 6a7ee04b0ddac36a87d5ed2ac89a53e537f4d5a3
2016-03-16 01:16:30 +00:00
drh
7da56b4f65 Many more test cases fixed. Only a few remain.
FossilOrigin-Name: 99b9d7eef68fd6d5c9eecb5fbe3dfe002c1ca4a8
2016-03-14 18:34:42 +00:00
drh
099006de44 Merge all recent trunk enhancements into the sessions branch.
FossilOrigin-Name: 1d1c57c3566d86cd44f146688b620131b3b57e52
2015-03-17 18:54:10 +00:00
dan
3df3059252 Extra tests for commit [0f250957].
FossilOrigin-Name: 5aa522dcb9bfa18d49683f7cc889516984e2bcd2
2015-03-13 08:31:54 +00:00
drh
d1102b1ec7 Merge the latest trunk changes, especially the ORDER BY optimizer enhancements
but also other fixes, onto the sessions branch.

FossilOrigin-Name: f1fbb8c5bfa84e84e0b8e2872d83b06a0c0d5acc
2012-10-09 14:58:15 +00:00
drh
c45e67162d Fix the TCL interface so that SQL functions implemented in TCL honor the
"nullvalue" setting.  Also remove from the TCL interface some unused 
legacy UTF8 translation code left over from SQLite2.

FossilOrigin-Name: c1f10a2643179ec58f3879764e9e89676d4b5f91
2012-10-03 11:02:33 +00:00
drh
c4645dacfb Merge the latest trunk changes (especially "PRAGMA busy_timeout" and the
ORDER BY query planner optimizations) into the sessions branch.

FossilOrigin-Name: 6ca8eae1f89d19ee23cbc3a869d85b57d29b4a7d
2012-09-28 13:05:48 +00:00
mistachkin
1c9ee26837 Correct two duplicated test names.
FossilOrigin-Name: ced49974a969f11e5ebe2280bd7eec20b059e501
2012-09-10 23:44:12 +00:00
dan
af49af7f9e Update sessions branch with latest changes from trunk.
FossilOrigin-Name: 01c84fd391a0ca1f5245c7eff0644d0cc6cff86b
2012-01-14 13:50:12 +00:00
drh
68bd4aa21d Add the -uri option to the usage comment that is printed by the "sqlite3"
TCL command when an unknown command-line option is supplied.

FossilOrigin-Name: 7987e285786161b1513ab77694d79e95fc76b0e5
2012-01-13 16:16:10 +00:00
drh
7cca2e6259 Merge the latest trunk changes into the sessions branch.
FossilOrigin-Name: eb036d6f81e15bac013316bf5b1b2ba3e0bd4605
2011-08-26 19:20:47 +00:00
dan
d5f12cd54d Ensure that the Tcl "db onecolumn" command returns an empty string if the SELECT statement returns zero rows.
FossilOrigin-Name: 928bcaf0f00a408e2f6c1d85dfab214457f52ad5
2011-08-18 17:47:57 +00:00
dan
6566ebe1b6 Remove the sqlite3_transaction_hook() API.
FossilOrigin-Name: b0015a1cfe63c924ee5f250aa08460522882009b
2011-03-16 09:49:14 +00:00
dan
21e8d0126d Add the experimental sqlite3_transaction_hook() API.
FossilOrigin-Name: 093d8cd8e2f3a6af5d40cf810e396f4919eb5cef
2011-03-03 20:05:59 +00:00
dan
46c47d4677 Add the experimental sqlite3_preupdate_hook() API.
FossilOrigin-Name: 6145d7b89f83500318713779c60f79a7ab2098ba
2011-03-01 18:42:07 +00:00
dan
430e74cd9b Change all.test, quick.test and permutations.test so that they use a separate interpreter for each test file.
FossilOrigin-Name: 7c33eb5a5add8fe76dd412ecab5b6ff8cd78a98d
2010-06-07 17:47:26 +00:00
drh
833bf968e3 Rename the sqlite3_log_hook() to sqlite3_wal_hook(). Added comments to
wal.h.

FossilOrigin-Name: bbc385111b19071e20fe963fab814262c815b3e9
2010-04-28 14:42:19 +00:00
dan
8d22a17411 Add the sqlite3_log_hook() interface for scheduling checkpoints.
FossilOrigin-Name: 9bda601455705475075e33bfa85687bce34b15ff
2010-04-19 18:03:51 +00:00
drh
a2c8a95b1c Update the TCL wrapper to provide a non-NULL objProc pointer to the
Tcl_NRCreateCommand() interface.  The TCL gurus say this is needed to
support legacy TCL extensions.

FossilOrigin-Name: 1b3cfa01dd7fb9a48f0008f5afd974db61c30cff
2009-10-13 18:38:34 +00:00
danielk1977
404ca07578 Add the sqlite3_unlock_notify() API. (CVS 6348)
FossilOrigin-Name: b649a6cc5bfefddd6a04b1183647d2923e0a0daa
2009-03-16 13:19:36 +00:00
drh
dc2c491525 Add "backup" and "restore" methods to the TCL interfaces and test cases
to exercise those methods. (CVS 6260)

FossilOrigin-Name: e420a3cedc7ee086a77cd719f6b9fb85415eb5f3
2009-02-04 22:46:47 +00:00
danielk1977
cd38d520d1 Modify the (transaction) method of the tcl interface to use savepoints. This makes nested calls to (transaction) work more intuitively. (CVS 6101)
FossilOrigin-Name: f047758de9b499866aa4ddf16011498b12a7b963
2009-01-02 17:33:46 +00:00
drh
073e7b1ca3 Minor cleanup of the new "status" command on the TCL bindings. (CVS 5783)
FossilOrigin-Name: ec01bd72ee875df179c680c1a40304d2f807fe38
2008-10-09 14:45:25 +00:00
drh
e3602be8fd Calling sqlite3_create_function with nArg==(-1) does not override prior
calls on the same function name with nArg>=0.  Ticket #3345.  Add the
new -argcount option to the "function" method in the TCL interface. (CVS 5684)

FossilOrigin-Name: 5aa5b8044a14f59559c1839dc0799b0d2f990809
2008-09-09 12:31:33 +00:00
drh
039963ad33 Add support for SQLITE_OPEN_FULLMUTEX. (CVS 5669)
FossilOrigin-Name: f2f361a5e2fb81fb0f99e83ecf8bae9a750723b1
2008-09-03 00:43:15 +00:00
danielk1977
7a1d17f1d7 Modify tclsqlite.test so that it works reliably with tcl 8.5.4. (CVS 5640)
FossilOrigin-Name: 790d329f5d18d361a5d6d34f46c269f8b4057cd9
2008-08-29 15:54:56 +00:00
drh
df81a25abe Fix obscure permutation test problems. (CVS 5611)
FossilOrigin-Name: aa92a1bec3d6bbcc59680ba13fed51ada9249d4c
2008-08-25 19:09:01 +00:00
danielk1977
9a6284c1bb Add the SQLITE_OPEN_NOMUTEX flag. Used for opening connections that are not protected by an internal mutex. (CVS 5387)
FossilOrigin-Name: 7e58b78712420b3bd4320192a58d89eb71eecc9c
2008-07-10 17:52:49 +00:00
drh
d65e530b7c Changes to test scripts to accommodate different architectures and different
versions of Tcl. (CVS 5057)

FossilOrigin-Name: 8eb2c07c520c12c2cd4610596dbec451c8275e95
2008-04-28 13:02:57 +00:00
danielk1977
191fadcf23 Fix an error message in the tcl interface. (CVS 4503)
FossilOrigin-Name: 2449e08069ef830f119203c4a3737d6756e73c63
2007-10-23 08:17:48 +00:00
danielk1977
4152e677b8 Fixes for compilation/testing when the various OMIT macros are defined. (CVS 4423)
FossilOrigin-Name: c8405b15c074c94dab5e33272cf1471f458d11df
2007-09-12 17:01:45 +00:00
danielk1977
95c8a54c7d Fix for registration of non-default vfs objects. (CVS 4360)
FossilOrigin-Name: 5f48fb95c26a713b3259ee49fd444108030376dc
2007-09-01 06:51:27 +00:00
drh
3570ad93d8 Convert the TCL interface to use sqlite3_open_v2 (CVS 4352)
FossilOrigin-Name: 3434b7a9213f210498f43cb5094a0f3f5c25b957
2007-08-31 14:31:44 +00:00