1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-04-26 11:28:58 +03:00

239 Commits

Author SHA1 Message Date
dan
3cc89d9567 Fix problems in the sessions module causing it to produce spurious SQLITE_NOMEM errors when handling SQL text or blob values zero bytes in size.
FossilOrigin-Name: b9459d5980c6249a5c1bc5ea72cb4f3b1ba0e433
2015-04-08 16:43:31 +00:00
dan
cf8e91442d Add experimental API sqlite3session_diff().
FossilOrigin-Name: c4340b2ea2115ad97dcac036f9034e132ab789e5
2015-04-08 16:01:12 +00:00
dan
abae0c4f1d Fix a problem causing sqlite3changeset_concat() to fail to detect attempts to concatenate patchsets which changesets.
FossilOrigin-Name: 236704a9d1551a50a55bd6e0b6473191a7a7dd21
2014-10-15 20:02:21 +00:00
drh
f1a08ad88d Change the names of the stream interface APIs to be of the form
"_strm" instead of "_str".  In other words, added an "m" to the end, to
try to make it clear that we are talking about a "stream" and not a "string.

FossilOrigin-Name: 1f44bfdc237ee6304f4aa56e5c5d1c0d74fcc944
2014-09-27 20:45:48 +00:00
dan
f05ac11214 Fix a segfault in the sessions module that could follow an OOM.
FossilOrigin-Name: 09985fa6b60a0bf38e23bbccd4d8e1d1cbf66124
2014-09-27 18:18:32 +00:00
dan
e8fa8c9649 Fix a segfault in the streaming API functions triggered by a very long table name.
FossilOrigin-Name: d2642543eed54da1ac0f757d43dd4d72482eb752
2014-09-27 16:33:09 +00:00
dan
16228167c2 Improve sessions module documentation and comments. Fix some other code issues.
FossilOrigin-Name: bfc8bd80f8b225cebc66478448510ce84223ae7d
2014-09-27 12:26:18 +00:00
dan
fa29ecc4ed Fix a problem with concatenating patchsets containing DELETE and INSERT operations on the same row.
FossilOrigin-Name: 4d8537eafb40e3687abc057ba26a1f7014f2c2d9
2014-09-26 10:52:21 +00:00
dan
cbf6d2d2aa Add streaming version of sqlite3changeset_concat().
FossilOrigin-Name: 88eb6656bdb047a104837a2e15e7fe18c0a7a159
2014-09-25 20:43:28 +00:00
dan
fa122adac1 Add streaming version of sqlite3changeset_invert() to sessions module.
FossilOrigin-Name: 8ded6a46794c7bff1c8b790c662ba7e92f576380
2014-09-25 14:54:20 +00:00
dan
4757c65866 Add streaming version of sqlite3changeset_apply(). Tests and fixes for the same and sqlite3changeset_start_str().
FossilOrigin-Name: b917fc146876f764442de08d5ec36e5b4cf5ab52
2014-09-24 17:13:20 +00:00
dan
ef7a630496 Begin adding 'streaming' APIs to sessions module. This is a work in progress.
FossilOrigin-Name: 3c7d3d950bbf5f5ed3696ebc61c77ca48bafe2b5
2014-09-23 20:39:55 +00:00
drh
2967e0cc9c Improved response to error conditions in the ".session" shell command and
in the "changeset" command-line program.

FossilOrigin-Name: b69f7dd1f35846c3bb9f4f160d50c4f03796f887
2014-08-19 00:26:17 +00:00
drh
f5ab08c779 Fix a harmless compiler warning in the sessionAppendDelete() function.
FossilOrigin-Name: 1324d08d0c639378cf1b03bd6410db81947747ac
2014-08-18 20:14:30 +00:00
drh
5f77b89ecd Add the "changeset" command-line tool for analyzing and manipulating
changesets in files on disk.  Add the ".session" command to the command-line
tool.

FossilOrigin-Name: 31addb627fdbaeb908e0611ad82f6db7537428ea
2014-08-18 20:08:25 +00:00
drh
03168cacd5 A reasonably complete implementation of the "changeset" command-line tool
and the ".sessions" command in the command-line shell.

FossilOrigin-Name: 7b12f1f9c012f33d376242920583807b014b3287
2014-08-18 20:01:31 +00:00
drh
3a67b0453e Add the "changeset" command-line utility for getting an ASCII dump of
change sets.

FossilOrigin-Name: 55bb3544a6b474c04853270067a35ca4b0079f52
2014-08-18 17:56:31 +00:00
dan
082c96dffa Add miscellaneous test cases to improve coverage of sessions module.
FossilOrigin-Name: 0fac6cfffe628ea02c78ebad065307309ec9eaa1
2014-08-18 16:03:46 +00:00
dan
2e934cd40c Add tests for sessions module.
FossilOrigin-Name: 82fdb1975f5b29a751089a8582713372999ae56e
2014-08-18 08:42:36 +00:00
dan
a71d2371d0 Fix some missing and out-of-date comments in the sessions module.
FossilOrigin-Name: 05c1d9149b27c68e2654ed28491722927d2176f5
2014-08-16 19:01:00 +00:00
dan
64277f4a70 Fixes for the sqlite3changeset_concat() API regarding patchsets.
FossilOrigin-Name: dccb34859508eac8146ae5b19c447673d04be3b0
2014-08-16 16:47:55 +00:00
dan
73b3c05590 Begin adding the sqlite3session_patchset() API to the sessions extension. This is an interim commit.
FossilOrigin-Name: 60a4565a8c44762a002cd02979317df5ca47e899
2014-08-15 20:15:49 +00:00
drh
87778c7f96 Fix a harmless compiler warning in the sessions test harness.
FossilOrigin-Name: d389e20ab07a76d0c4be3801265977fa977a4394
2014-03-06 15:01:11 +00:00
drh
b7bc8c9849 Enhance the test harness for the sessions interface so that it does not
use SQLite operations that can encounter an OOM error in places where it
is unable to report an OOM error back up to the test script.

FossilOrigin-Name: bc0e661033b78f27866932244e6204985ae39000
2014-03-06 14:53:25 +00:00
drh
5671ef69ec Sync the latest trunk changes, and in particular the STAT4 IS NOT NULL fix.
FossilOrigin-Name: b006792695d23980e1923b21915d5c1138ecf29d
2014-02-11 04:30:29 +00:00
drh
fba5765b57 Fix two test cases (due to changes in the formatting of constraint errors)
so that all tests now pass.

FossilOrigin-Name: 129e2b69178147d04ee27fce66c17b39f8654da3
2013-11-11 23:02:10 +00:00
dan
7531a5a378 Add the sqlite3session_table_filter API to the sessions extension.
FossilOrigin-Name: b7e4dd889d37c8f57c2d3c7900e802f644aac3ea
2013-08-23 17:43:32 +00:00
drh
07001c45a1 Remove the undocumented sqlite3_foreign_key_check() API and replace it with
sqlite3_db_status(db, SQLITE_DBSTATUS_DEFERRED_FKS, ...).  Add test cases
for the new functionality.

FossilOrigin-Name: d39e65fe702a2e11477f2d996f77404f45763368
2013-07-11 13:49:59 +00:00
dan
bded90b487 Fix a bug preventing some FK constraint checking from being deferred until the end of changeset application.
FossilOrigin-Name: 1452defb8cfcc489230314dd1e0425feba46c49d
2013-07-04 15:22:53 +00:00
dan
cb3e4b797e Experimental change to the handling of foreign key constraint violations when applying a changeset: all foreign keys, immediate and deferred, are deferred until the end of the transaction (or sub-transaction) opened by the sqlite3changeset_apply(). A single call to the conflict-handler (if any) is made if any FK constraint violations are still present in the database at this point. The conflict-handler may choose to rollback the changeset, or to apply it, constraint violations and all.
FossilOrigin-Name: 1d44e5d3c2b1dc958442f9114a960b256e002ed3
2013-07-03 19:53:05 +00:00
dan
35e2858e98 Fixes for the sessions module so that it works with sqlite3_extended_error_codes() set.
FossilOrigin-Name: c2972b6aed23f6c76a289534de9ea4732a48f40e
2013-07-02 20:23:40 +00:00
drh
644abec3a4 Merge trunk changes into the sessions branch.
FossilOrigin-Name: 512f8a1ef8c4cf50723cfc4a78b7370dc37358d9
2013-05-09 23:40:58 +00:00
drh
1ffe7c7fab Also export the sqlite3changeset interfaces in the amalgamated version of
the sessions extension.

FossilOrigin-Name: 5b399f2bc43612c52ea2289001d852d7ba6f9750
2013-03-19 17:10:10 +00:00
drh
40eaa08620 Update the sessionfault-9.1 and -9.2 tests to account for the change in
version 3.7.11 in which a pending statement no longer blocks ROLLBACK but
instead causes the next call on that statement to return SQLITE_ABORT.

FossilOrigin-Name: fae9eb197fcef726fd2c7c701afe6805fc008cf9
2012-09-28 12:55:56 +00:00
dan
964cbd469b Fix errors in a comment in sqlite3session.c. No changes to code.
FossilOrigin-Name: d5f4c4c0bf0d488db11c6ab0d26ca3554a57d0ff
2011-07-26 17:53:53 +00:00
dan
1e556c3fe5 Fix a test case in sessionfault.test. No changes to code.
FossilOrigin-Name: dc6ecacd7724089a0387e69a0fd5cdbfdd2023f8
2011-07-26 15:57:56 +00:00
dan
cfec7eee20 Fix a problem causing sqlite3changeset_invert() to effectively drop UPDATE changes.
FossilOrigin-Name: bb3e65d9724dcecdc54b4c9fb0448f95d14495ff
2011-07-26 15:50:36 +00:00
dan
ff53032641 Fix the sqlite3session_isempty() method so that it returns, as documented, non-zero when no changes have been recorded by the session object.
FossilOrigin-Name: d04e0fd82a15aee963e35830caf8159b4b6ccd87
2011-07-18 15:22:56 +00:00
dan
a93166e030 Fix error in a comment in sqlite3session.h. No changes to code.
FossilOrigin-Name: 70c84e50209722a61d66fd737e42d49275745b62
2011-07-16 18:35:53 +00:00
dan
b69ec3482a Note in the documentation that when iterating through a changeset, all changes to a single table are grouped together. Also add the sqlite3session_isempty() function.
FossilOrigin-Name: 364f3b820a26f9b15cf74a0222ed5e302becc54f
2011-07-16 18:05:07 +00:00
dan
4f52804206 Add a few casts required by 64-bit VS2010 to the sessions code.
FossilOrigin-Name: 5ac4a06111b5fad5f58c20ef5d2b65aeb23e105a
2011-07-15 19:11:32 +00:00
dan
40368988da Add the xFilter callback to the sqlite3changeset_apply() function. This callback allows the application to accept or reject changes on a per-table basis when applying a changeset.
FossilOrigin-Name: 282474c42f24f0e66c69b576b72ef8ce764d49e2
2011-07-13 15:21:02 +00:00
dan
e437ca5ec0 Modifications so that the sessions extension works with blob handles.
FossilOrigin-Name: 82ac16c4f873d3bd7c22f36ba7b974b4903a2d50
2011-07-11 19:45:38 +00:00
dan
77fc1d5bb4 Fix further missing comments and other minor issues in the session module code.
FossilOrigin-Name: 99f0f35092b0b78b7016b21c242da263ab64b77b
2011-04-18 15:47:08 +00:00
dan
798693b2b1 Fix some missing comments and other issues with session module code.
FossilOrigin-Name: 20d7c280235201e519f296372f269e7cecda24da
2011-04-18 12:05:03 +00:00
dan
80fe2d9310 Further coverage tests for the session module.
FossilOrigin-Name: 69a01c708bf044eacf21a8951fe9e7d9fb4332c5
2011-04-18 07:36:27 +00:00
dan
6734007d75 Improve test coverage of session module.
FossilOrigin-Name: f46d4b641d613c39a80b12106e6a6ac0efc8be83
2011-04-16 19:23:10 +00:00
dan
b08a1efae5 Improve coverage of session module.
FossilOrigin-Name: 3dfd1d63bddfa9bd9018eb00bee1d496379630b5
2011-04-15 19:18:57 +00:00
dan
1756ae10e1 Add tests and fixes for OOM handling in sqlite3changeset_concat().
FossilOrigin-Name: df0b2d21dcd81679e55b24866f97568019932983
2011-04-15 16:03:32 +00:00
dan
f29123b572 Have sqlite3changeset_concat() return SQLITE_SCHEMA if an attempt is made to concatenate changesets based on incompatible database schemas.
FossilOrigin-Name: 343b64517d244b75097e38342dc273eb5a52915b
2011-04-15 15:04:31 +00:00