Commit Graph

72 Commits

Author SHA1 Message Date
dan
dd009f839c Fix a performance problem in sqlite3session_diff().
FossilOrigin-Name: ea400eca314d81761fe5c0e329b906c045f0dfe4
2015-04-23 14:40:17 +00:00
dan
10dc553c13 Hold the database mutex for the duration of sqlite3session_diff().
FossilOrigin-Name: 6f33050115562833c43da3c99dd37aeb0bf966b6
2015-04-17 11:31:08 +00:00
drh
92f283c0d4 Fix a stray backslash character in a printf format string in
sessionDiffFindModified()

FossilOrigin-Name: abb192a1d79388d4717f459b91e34f9c035935f2
2015-04-16 13:52:03 +00:00
drh
df3c171881 Merge all recent trunk enhancements into the sessions branch.
FossilOrigin-Name: 5f14f34f072921e229bc20a5185c0cdb3f464c04
2015-04-12 01:33:37 +00:00
dan
58bd114a6f Merge the sessions-diff branch with this one.
FossilOrigin-Name: 805baa57e5d2e97dccddc08eb72f2564df4802e8
2015-04-11 17:09:36 +00:00
dan
730bb805a8 Updates to comments describing the changeset and patchset formats.
FossilOrigin-Name: 5342f721e878b52f207731ea57411f3669ae3f3f
2015-04-09 19:19:22 +00:00
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
f5ab08c779 Fix a harmless compiler warning in the sessionAppendDelete() function.
FossilOrigin-Name: 1324d08d0c639378cf1b03bd6410db81947747ac
2014-08-18 20:14:30 +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
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
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
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
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
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
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
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
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
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
dan
6cda207f5f Add further tests for the sqlite3changeset_concat() function. Also fixes.
FossilOrigin-Name: 1fc3f15d88c160b45642b46d1d54c591af058ba2
2011-04-14 18:01:41 +00:00
dan
5d607a6e06 Start adding the sqlite3changeset_concat() function to the session module.
FossilOrigin-Name: 8927b2260b8d84f53776cb29e1d2fa41b6b0de0e
2011-04-14 11:16:21 +00:00
drh
cfdbde214b Fix VC++ compiler warnings.
FossilOrigin-Name: 7b7c8d366c51e89aefc6efc9dcffe3f62c7e1d25
2011-04-06 23:39:28 +00:00
dan
5d8a298495 If the sessions module is being built as part of the amalgamation, do not try to include sqliteInt.h and vdbeInt.h.
FossilOrigin-Name: f87bfe6e12093e5958b658a49d3766fb29562cbb
2011-04-01 15:30:39 +00:00
drh
9b1c62d416 Add the SQLITE_ENABLE_PREUPDATE_HOOK compile-time option.
FossilOrigin-Name: 6634521461e6acff7cc778590e62d57831f9230d
2011-03-30 21:04:43 +00:00
dan
e5754eec26 Improve coverage of session module a bit more.
FossilOrigin-Name: 4255a9f609c4fd43582a0874143eabe211199726
2011-03-25 19:06:09 +00:00
dan
f51e5f6c99 Improve coverage of session module code.
FossilOrigin-Name: 666123c8d07be87d477e67b1cebef2b0fba5b4bc
2011-03-25 10:52:01 +00:00
dan
a9605b9125 Fix handling of schema changes mid-session.
FossilOrigin-Name: 76d2d2ad3b2a5171393b7894f35f463ff284e53b
2011-03-24 16:53:57 +00:00