Commit Graph

625 Commits

Author SHA1 Message Date
drh
a4bfd7fde8 Add support for the SQLITE_DEFAULT_FOREIGN_KEYS compile-time option.
FossilOrigin-Name: c959945ab7129b67eb2364befb9bf5cc88a8b0bf
2010-12-09 19:15:17 +00:00
drh
3eb0811457 Add the SQLITE_FCNTL_FILE_POINTER verb to sqlite3_file_control().
FossilOrigin-Name: 4425b0645d0afebe3172201012d501c6992daa38
2010-11-19 14:37:49 +00:00
drh
88404c2a7d Make sure the sqlite3_create_collation() interfaces always return an error
code if they fail.  Ticket [a04e42a3fcacaffa3133436].

FossilOrigin-Name: 6464276ec1c0951a6edc59eb402ca3dd49629a18
2010-10-11 17:58:21 +00:00
drh
f759bb83d4 Further updates to the sqlite3_pcache_methods documentation, plus the addition
of a few evidence marks related to pcache.

FossilOrigin-Name: 34edb54bb03ad4e54f2e4de12d767e6fa8822ba4
2010-09-09 18:25:34 +00:00
drh
4e93f5bf90 Revised documentation for sqlite3_limit(). Added some evidence marks and
assert() statements to verify sqlite3_limit() behavior.

FossilOrigin-Name: 883b9b7441593200def05d8a482bc92d3dc0e96b
2010-09-07 14:59:15 +00:00
drh
9dd55f5187 Fix a discrepancy between the documented behavior of SQLITE_DBCONFIG_LOOKASIDE
and what it actually does.  Also add evidence marks on the DBCONFIG_LOOKASIDE
implementation.

FossilOrigin-Name: f483be441323e1cb91516964cd6ab0edecad4366
2010-09-03 03:32:46 +00:00
shaneh
bd2aaf9ab1 Fix some compiler warnings under MSVC.
FossilOrigin-Name: afdc82a99eba260aed8ae2cca4bcec629f384098
2010-09-01 02:38:21 +00:00
drh
9f129f467e Add evidence mark comments to source code. Add additional information to the
documentation of sqlite3_release_memory().  Fix a minor inefficiency in mem1.c
that was discovered while writing requirements tests.

FossilOrigin-Name: 53b0c03fd33d2d8141fd386de5493fec64456042
2010-08-31 15:27:32 +00:00
drh
75c014c321 Remove the sqlite3BtreeFactor() wrapper routine. All modules now call
sqlite3BtreeOpen() directly.

FossilOrigin-Name: 0900e35348f4b9bf327d6ae2884c4ddbb6345d8d
2010-08-30 15:02:28 +00:00
dan
9508daa929 Add code to allow user-defined searches of r-tree tables. Still largely untested.
FossilOrigin-Name: 782ca3b716ee1ecb0dfb5ab6f21dfd73d41758e4
2010-08-28 18:58:00 +00:00
drh
7b19facf56 Make sqlite3_create_function() a special case of sqlite3_create_function_v2()
in order reduce the number of code paths and simplify testing.

FossilOrigin-Name: 4758d86d57aaafc058c98c8b485eae24e6547588
2010-08-27 18:44:54 +00:00
dan
d2199f0f8d Add the sqlite3_create_function_v2() API, a version of create_function that allows a destructor to be specified.
FossilOrigin-Name: 9a724dfbe822c77e76721abe3443c9cb018bb2e2
2010-08-27 17:48:52 +00:00
drh
badc980afa Refactor the implementation of the scratch memory allocator. Add the
SQLITE_TESTCTRL_SCRATCHMALLOC interface to facilitate testing.

FossilOrigin-Name: a3475ddfbe4526e6e0b334fd1376ee7c31508b80
2010-08-27 17:16:44 +00:00
drh
357b5f97be Change sqlite3_open_v2() to return SQLITE_MISUSE if the combination of bits
in the flags parameter is invalid.  The documentation says the behavior in 
this situation is undefined - the documentation is unaltered by this code 
change.

FossilOrigin-Name: 5e8101c5122336844ea920e6fbdace23e35b931f
2010-08-24 18:07:57 +00:00
dan
a550f2decd In shared-cache mode, do not allow one connection to checkpoint a database while a second connection is reading or writing the same shared-cache.
FossilOrigin-Name: e75b52d156905ce16bedb94f65c01a4640bdfa75
2010-08-02 10:47:05 +00:00
drh
4d9a7bf990 Remote the SQLITE_OMIT_GLOBALRECOVER macro - it is subsumed by
SQLITE_OMIT_DEPRECATED.  Add support to sqlite3_compileoption_used()
for SQLITE_OMIT_WAL.

FossilOrigin-Name: 21a2db908b9eeb7477fc9d8b2b54482db93cd76f
2010-07-07 01:52:31 +00:00
drh
75e876be30 Include the SOURCE_ID value in the log messages output for corruption, misuse,
and CANTOPEN errors.

FossilOrigin-Name: 1727a81fed65bebfea43e0bda271584096d82785
2010-06-23 17:59:51 +00:00
drh
23e35723a7 Add the SQLITE_TESTCTRL_PGHDRSZ verb for sqlite3_test_control() used to get
the size of pcache headers for testing purposes.

FossilOrigin-Name: 5d694f04fecf47ca325e108d463c24f42def55d5
2010-06-10 14:07:40 +00:00
dan
0dc7b74fbe Add an English language error message to corresponding to SQLITE_PROTOCOL. "locking protocol".
FossilOrigin-Name: ca327e32cfe1633f2c9d3f058e411f108aaa2b3c
2010-06-04 15:59:58 +00:00
drh
f83dc1ef3f Remove global variables when compiled with SQLITE_OMIT_WSD
FossilOrigin-Name: dd10a547f10364058025c48b28d8fd240bf46aff
2010-06-03 12:09:52 +00:00
drh
f53303573a OOM errors during an auto-checkpoint are benign.
FossilOrigin-Name: 3d252ce5d0d843e4e65beed672598e65c5745129
2010-05-24 20:27:44 +00:00
drh
5def0843f1 Change the behavior of the sqlite3_wal_hook() callback. It should now return
SQLITE_OK or an error code and the error code is propagated back up the 
stack.  If a checkpoint is desired, the callback should invoke
sqlite3_wal_callback() itself.

FossilOrigin-Name: 1b14195e05fe5551992a39246ec3bcf6a33bbfac
2010-05-05 20:00:25 +00:00
dan
af0cfd366a Have sqlite3_wal_checkpoint() handle a zero-length string in the same way as a NULL pointer. Fix "PRAGMA wal_checkpoint" so that it checkpoints all attached databases.
FossilOrigin-Name: 7fecd21f45b9ce773ffbcef6c84066474e8cd01c
2010-05-03 15:58:50 +00:00
dan
6fcff07f6a If the sqlite3_wal_checkpoint() API is passed a NULL pointer in place of a database name, attempt to checkpoint all attached databases.
FossilOrigin-Name: 27a5c09ce8a35039d844d08cfe5698e8b438abfe
2010-05-03 14:05:43 +00:00
drh
b033d8b9dc Make sure the mutex is held while calling sqlite3ApiExit() in
sqlite3_wal_checkpoint().  Other cleanup of WAL logic.

FossilOrigin-Name: 11a85b821abff1ecb7ec8c37bc7783be9fc4ea6d
2010-05-03 13:37:30 +00:00
dan
87c1fe1b69 Have sqlite3_wal_checkpoint() populate the database handle error message and error code (as returned by sqlite3_errmsg() and sqlite3_errcode()).
FossilOrigin-Name: ff234cf574c7ae384ab1ebc79b2171ef0541bc91
2010-05-03 12:14:15 +00:00
dan
5a299f9134 Add the "PRAGMA wal_autocheckpoint" command. Rename "PRAGMA checkpoint" to "PRAGMA wal_checkpoint".
FossilOrigin-Name: 714e5947264571386f966aa8fcdd5607b5832238
2010-05-03 11:05:08 +00:00
dan
586b9c8a94 Add the sqlite3_wal_checkpoint() and sqlite3_wal_autocheckpoint() APIs.
FossilOrigin-Name: 9803196dec85e3aa4105cc477e9cfe98d370e486
2010-05-03 08:04:49 +00:00
dan
5cf53537a8 Support compile-time option SQLITE_OMIT_WAL, for building without WAL support.
FossilOrigin-Name: 9b230c43dfa112e3e1589f9775926807bd36b36e
2010-05-01 16:40:20 +00:00
drh
7ed91f2344 Refactor wal.c to use the VFS. This check-in compiles and links and works
ok as long as you leave WAL turned off, but WAL does not work.

FossilOrigin-Name: 62db5fa3b61be885b2d94e9b9ce3877b2c588350
2010-04-29 22:34:07 +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
c633908199 Wrap all automatic index changes inside SQLITE_OMIT_AUTOMATIC_INDEX. Add
the automatic_index PRAGMA to turn it on and off.

FossilOrigin-Name: a811a47fbe4f757a7ab575ae5a0f65177a3f07c0
2010-04-07 16:54:58 +00:00
dan
b7dca7d733 Modify the vdbe so that the comparison operator opcodes do not modify the data type of operands. Fix for [aa92c76cd4].
FossilOrigin-Name: 8858042fa1449516a2c7dbb991dca3eb6c5794cb
2010-03-05 16:32:12 +00:00
drh
af46dc12f7 Add testcase() macros beside each sqlite3_log() call to make sure it is
tested with both logging enable and disabled.

FossilOrigin-Name: 1168763d2cd96acfa0488198e8bc82f0c4fa35a3
2010-02-24 21:44:07 +00:00
drh
380083ce18 Merge the compile-time option introspection interfaces into the trunk.
FossilOrigin-Name: 9f429434c0404f03a3e5c6741b769afe98a5c6c9
2010-02-23 20:32:15 +00:00
drh
413c3d36a2 Continuing improvements to error reporting and the sqlite3_log() routine.
FossilOrigin-Name: edea3bb740ddd096a46e00678b59d465bb1e2903
2010-02-23 20:11:56 +00:00
shaneh
dc97a8cdc1 Refactored compile time option diagnostic support to use strings identifiers instead of bitmask.
FossilOrigin-Name: 76a0294ab4208a0858a13bab0858e1bc1448b651
2010-02-23 20:08:35 +00:00
drh
9978c97ec5 Remove the obsolete sqlite3SafetyOn() mechanism. Add additional logging
output for CORRUPT, and CANTOPEN errors.

FossilOrigin-Name: 7c4cca6d1a23a6d1591b62f58c3716a944969947
2010-02-23 17:36:32 +00:00
shaneh
ca07b9df47 Removed checking of some compile options from the sqlite3_compileopts() API.
FossilOrigin-Name: 833da702ff9bd99d62640756d80e094256efff5c
2010-02-23 05:17:51 +00:00
shaneh
bdea6d1368 Test new api to report which options (defines) were used to compile SQLite.
FossilOrigin-Name: 84c9756993caf82710a0905ed1987d144bc764fd
2010-02-23 04:19:54 +00:00
drh
3f28070109 Add a new, experimental logging interface designed to aid in debugging of
deeply embedded projects that use SQLite.

FossilOrigin-Name: 103321e37ae46eacfad4e127d13477ad5dd02bab
2010-02-18 18:45:09 +00:00
drh
855787a1b3 Fix a bug in the new sqlite3_test_control case of the previous check-in.
FossilOrigin-Name: 3b77701bc854997346e9cc33fe64d00d4b6332bd
2010-01-02 03:46:43 +00:00
drh
0e857739c4 Add a new sqlite3_test_control() verb that facilitates testing that all
keywords are shown in the documentation.  (Two keywords were found to
be missing while testing the change.)

FossilOrigin-Name: d3cdc4b12be7f1ed2249ad210482200868956d12
2010-01-02 03:21:35 +00:00
drh
07096f68ae Move the query flattener turn-off from a pragma to an sqlite3_test_control()
call.  Make provisions (not yet implemented) to turn off other optimizers
using the same call.

FossilOrigin-Name: 4a97c623f4e190134de4b2ca406e311034a74797
2009-12-22 23:52:32 +00:00
drh
d68eee04b4 Extensive edits to the comments in the sqlite.h.in source file to identify
testable statements of truth about the C-language interface.

FossilOrigin-Name: ea884e1ed8dba1aa0f3cf68fc71923954983f6c6
2009-12-11 03:44:18 +00:00
drh
1860e3f98f Remove "const" from parameter of sqlite3BtreeFactory() to avoid a compiler
warning.

FossilOrigin-Name: eb7a544fe49d1626bacecfe53ddc03fe082e3243
2009-11-04 13:30:01 +00:00
drh
75f8d8be1a All SQLITE_MAX_VARIABLE_NUMBER to exceed 32767. The sizes of some structures
increase when the compile-time parameter is configured this way.

FossilOrigin-Name: 16a24b4485420bdf30d3c8e22cfbaf008e07df02
2009-11-03 01:22:07 +00:00
dan
937d0dea4f Add the experimental sqlite3_reoptimize() API.
FossilOrigin-Name: 9bd6f3d8864d422fe42074688b191915b27ad8ea
2009-10-15 18:35:38 +00:00
dan
1da40a381f Check in implementation of foreign key constraints.
FossilOrigin-Name: d5d399811876391642937edeb9e8434dd9e356f5
2009-09-19 17:00:31 +00:00