drh
756440febc
Corrections to the xRead method for databases in the os_kv.c VFS so that it
...
correctly reads the header, and thus avoids unnecessary cache flushes. This
changes also includes an optimization to the header read logic.
FossilOrigin-Name: ef54961ce69fddb4cfeeff0860288de2858a6f7a5aa396691e8e99933eb9af54
2022-09-16 15:19:04 +00:00
drh
84e5076787
Fix os_kv.c so that it uses SQLITE_FCNTL_SYNC and hence
...
works even with PRAGMA synchronous=OFF.
FossilOrigin-Name: 21915af560b111aeeaee751790356151a5f063c2fc703dd4b35b22dc393409fb
2022-09-16 11:37:01 +00:00
stephan
d22cfa8c80
Pull the src/os_kv.c part of [13839759f8f4] into the kv-vfs branch.
...
FossilOrigin-Name: e334449912d5176e355d02024a07ed867741f71c9d10ce6744ca800414bf3eeb
2022-09-16 01:08:06 +00:00
stephan
5fd8f27bfb
Remove an extraneous key-copy op in the EM_JS impl of kvstorageDelete().
...
FossilOrigin-Name: 1c5aeee45564c14e7e2e7730f3f52106339ea3148fb5aa786fa767a35db46f51
2022-09-12 20:21:34 +00:00
drh
b126ec18b6
Fix the <sys/time.h> include in os_kv.c.
...
FossilOrigin-Name: 878cc93e779c3857adc711f212520f007256274fcd3f6f3d72c754a937fcd198
2022-09-12 19:33:20 +00:00
drh
d8bb0b5ae6
Add a gettimeofday()-based implementation of xCurrentTimeInt64() to os_kv.c.
...
FossilOrigin-Name: e393ed650ef124143f84e9d787fb996e308dd7af6b8f50df72a6f085b67bf9c3
2022-09-12 19:29:34 +00:00
drh
bb19512438
Fix a debugging/testing edit in the previous check-in.
...
FossilOrigin-Name: 6fc8d34c0ae1f8277544be741f2f0835fad8e475d35bd24573224ccc1699b8bd
2022-09-12 18:10:41 +00:00
drh
6acd7b0a75
Faster text decoder for kv_os.c.
...
FossilOrigin-Name: 3354a2edb762d70ccc31d4d25f81b70e644d76e01cb1e81d2e97b5414d809d30
2022-09-12 17:44:35 +00:00
drh
1ad51ffe21
Fix uninitialized variable in rollback-journal processing in os_kv.c
...
FossilOrigin-Name: e49682c5eac91958f143e639c5656ca54560d14f5805d514bf4aa0c206e63844
2022-09-12 15:59:35 +00:00
stephan
2811759d5e
Resolve missing kvvfs JS test: sqlite3_initialize() must be called by the client in this build. Add basic sanity test of kvvfs using sessionStorage().
...
FossilOrigin-Name: 250a935aeb94d3fadec0d3fe22de85de4e658e2fdb3be3aa9a8bbc8f7b7d8414
2022-09-12 13:05:54 +00:00
drh
6b013afb88
Fix the amalgamation so that it builds with the standard unix backend again.
...
FossilOrigin-Name: 0adf158f4e5791339988185cc29347c75056b062e0db65b5999fdfa1f433c1ed
2022-09-12 12:41:07 +00:00
stephan
ad5125a624
Initial build of kvvfs in wasm. It loads but cannot find the VFS for as-yet-unknown reasons (sqlite3 shell works fine), and most APIs throw "null function or function signature mismatch" from deep within wasm, presumably as a side effect of the "missing" VFS.
...
FossilOrigin-Name: 1a2f24a0bdfc6eaae478916b8f4f9c6b63ead9964534fc2951fb4e995ffe61f1
2022-09-12 12:39:28 +00:00
drh
c6c9c6aad0
Improved comments in os_kv.c. Better names for the key/value name spaces.
...
FossilOrigin-Name: 8e1652a3856765c9146cc2a7e3b598a2dc7dc84c556b35eab9a35184514384b9
2022-09-10 18:38:21 +00:00
drh
7585f49a0a
Move the vfskv.c extension to src/os_kv.c and make it part of the amalgamation,
...
activated if and only if SQLITE_OS_KV is true.
FossilOrigin-Name: f6632e69c2ec1a7ddc4e51f3567e3bc082ee94a6dd51fdafdc0c3bf386a32d4c
2022-09-10 18:20:59 +00:00
drh
25f62508f5
Database must be named either "local" or "session". Each has a distinct
...
namespace.
FossilOrigin-Name: c8e41279294ea7c2f041c7d4cbbd85fce47d55f2f56180ca837316f7dfd75237
2022-09-09 16:16:33 +00:00
drh
f7377d5763
Separate sqlite3_io_methods objects for database files and journals.
...
FossilOrigin-Name: 74fbf6c2a97729e481d5562344e960d0c237aeb1f07240262d32a24fb1f4b5a3
2022-09-09 14:22:41 +00:00
drh
126976c9f8
Simple reading and writing now works.
...
FossilOrigin-Name: 00845ac9ef2616e90f5f6a20da3dd040fa8bdcfe73f72fe9c06039561150a82d
2022-09-09 11:41:54 +00:00
drh
7cd81af3a9
Compiles and loads as an extension. Starts to run but quickly hits issues.
...
FossilOrigin-Name: 2e38726f46918b28b5c638967f960a20afd3fe84ad245f3bea39a1d64980435b
2022-09-08 17:12:12 +00:00
drh
e3485ee996
Compiles without error, but untested.
...
FossilOrigin-Name: a329939c32e33d8d00066ba3d4327f07cca1b4e67de0b8d85f1e7f98afe40954
2022-09-08 16:27:50 +00:00
drh
cb94132d9f
Code snapshot. Completely untested. Probably does not compile.
...
FossilOrigin-Name: 51e267696d25f2f83b5bb847d5254ab15573ef1a16ea3d7dd8279c73c0bee539
2022-09-08 15:48:01 +00:00
drh
59ece7e106
Non-working code towards a VFS for text key/value storage.
...
FossilOrigin-Name: f9c89ee8d5ef46342bea78fa8d4da058d9ea628183ec985642bbda1cdfeacd5f
2022-09-07 17:29:22 +00:00
drh
2e440a0801
Add the tool/omittest-msvc.tcl script that will try to build using MSVC
...
using various compile-time options, to ensure that the compile-time options
all build without errors.
FossilOrigin-Name: 6b00ecb59fd303f7985902c35a46db9e729201d4beaedea46596b728d9e4b1c8
2022-09-05 22:54:36 +00:00
drh
0c4517a61a
Get the tool/omittest-msvc.tcl script working.
...
FossilOrigin-Name: 82b89f8a074858a81d841dfc26436e8d39ce4907b8f989eba4d848db16758303
2022-09-05 22:53:24 +00:00
drh
4c8404e555
Add a prototype for a script, similar to tool/omittest.tcl, that is designed
...
to test builds using MSVC to ensure they work with various OMIT options.
FossilOrigin-Name: b1e37a0bd31fa9f8e58c2859a80c23a682b4702eefab2c55b243f1e21d475d6c
2022-09-05 20:42:01 +00:00
drh
6e440ab3de
Fix the windows build so that it works with -DSQLITE_OMIT_AUTOINIT.
...
FossilOrigin-Name: f74a5ea8c986dc33d3afcda169c38abbe55728c56716cf9991a5e2ef7fc4917a
2022-09-05 18:17:03 +00:00
dan
ad617b4d6d
Ensure the Pager.journalOff variable is zeroed if an error occurs while writing the initial header to the journal file.
...
FossilOrigin-Name: da7af290960ab8a04a1f55cdc5eeac36b47fa194edf67f0a05daa4b7f2a4071c
2022-09-02 21:19:24 +00:00
drh
173b418e60
Fix an assert() associated with the dbsqlfuzz error at [8372468bb5d8922c].
...
FossilOrigin-Name: 54251f81ebc43839cc97f91d2df4c320c1b96b5690cc11ce45b60c087c9becd6
2022-09-02 17:25:25 +00:00
drh
5fc3a8a32f
If sqlite3PcacheMove() really performs a swap, then be sure to renumber the
...
second page.
FossilOrigin-Name: 81cff9f1955874aade55daa94263f58f06d966bd51ad558755f92777069a7347
2022-09-02 15:09:55 +00:00
drh
4e9bf5ace3
Enhance the pcache1 implementation so that during an xRekey operation if
...
another page already exists at the destination, that other page gets moved
to the source key.
FossilOrigin-Name: aadd38f99a3e5abcf9bef49f4367752f163cc79500a28f812bb71969d7de419c
2022-09-02 14:29:54 +00:00
drh
e04c9f4b33
Mutex protect access to the sqlite3_test_directory and sqlite3_data_directory
...
global variables. See
[forum:/forumpost/719a11e1314d1c70|forum thread 719a11e1314d1c70].
FossilOrigin-Name: 8e6ad3a3e942a326cf16432e16d6596c7206c05b6f45cd0ff3a9b836bcfc9deb
2022-09-02 11:45:26 +00:00
drh
fee6431392
Improved mutex protection of the sqlite3_temp_directory and
...
sqlite3_data_directory global variables.
FossilOrigin-Name: ebbe9634d6dde9e097f61fb98a79111e46de422b7bbbd9ed3af7b6f22aacf5ec
2022-09-02 11:12:16 +00:00
drh
18a3a48db1
Experimental changes to put sqlite3_temp_directory behind a mutex.
...
FossilOrigin-Name: 5ee3515fbb88bf1ae5f8b507844f82dcc429380b6ebeab9b09b52b25ee60a60d
2022-09-02 00:36:16 +00:00
drh
44132244fa
Defer deleting a transient SELECT statement associated with a flattening
...
of one arm of a compound SELECT until after the parse has completed.
FossilOrigin-Name: 1c4157c71cd1e062a9c2c79787d17e34e340f28ce1e40573851dfe174f5da7d7
2022-09-01 13:51:09 +00:00
drh
a3fc683c80
In the query planner, add a heuristic that will reduce the cost of a full
...
table scan for a materialized view or subquery if the full scan is the
outer-most loop. This is shown to speed up some queries.
FossilOrigin-Name: 609fbb94b8f01d6792e5941ab23ce041313d359f6788c4dde6b1ca749ab49137
2022-09-01 10:29:02 +00:00
drh
9c3a114ca0
Enhance the b-tree page sorting code to ensure that sqlite3PagerRekey() never
...
overloads a page number and uses only the PENDING_BYTE page for temporary
storage.
FossilOrigin-Name: 5007742886bd20de20be3973737cf46b010359911615eb3da69cd262bd9a2435
2022-08-31 15:04:42 +00:00
drh
78d15f097a
Improved comments in pcache1.c. No changes to code.
...
FossilOrigin-Name: dd017bb1b3e31c7692d29dc4865d6bda871e429978c8738a39160d0114e5bf9b
2022-08-30 16:54:41 +00:00
drh
4d28830861
Any function call can abort. Take this into account when deciding if a DML
...
statement needs a statement journal. See
[forum:/forumpost/9b9e4716c0d7bbd1|forum thread 9b9e4716c0d7bbd1] for more
information.
FossilOrigin-Name: 5c95ae6c9b93b9bcf698bb1cad93b2da2e28121b35e7c539b1ddc0ef2de33cfe
2022-08-30 00:11:51 +00:00
drh
f0f025b340
More assert() statements in the page cache.
...
FossilOrigin-Name: 7c96a56c0d1de966844da6c5a84c0cd6066130a10724797ce6f228a9182d9b85
2022-08-27 16:11:00 +00:00
drh
f6e3e31625
Ensure that every pcache page always has either the PGHDR_DIRTY or the
...
PGHDR_CLEAN bit set, even during transient page reshuffling during btree
balancing.
FossilOrigin-Name: e67f03c166277951725c194674c84da61c152a5820aa6df55a726f7dda838e92
2022-08-27 14:43:34 +00:00
drh
23593f8e99
Ensure that sqlite3_prepare() inputs always have a semicolon terminator in
...
speedtest1.
FossilOrigin-Name: c72756b0f2db30c622f00f43be9245d50e36049bd7740ee6332164f0c48f9c3d
2022-08-25 19:29:35 +00:00
drh
09cb5eb5ac
Add the --script option to speedtest1.
...
FossilOrigin-Name: 1c87d7c58d5aec83f9e2ae3771a81aa17cfae0cf06169025a5db085e2d5749f9
2022-08-25 19:19:25 +00:00
dan
aa07b36dd5
Remove a NEVER() macro for a condition that is actually reachable following an OOM. dbsqlfuzz crash-6ef3cd3b18ccc5de86120950a0498641acd90a33.txt.
...
FossilOrigin-Name: b573e2cffa5fedc893ed30e76e47022b3617ac5583e1eb486afa810b2514c419
2022-08-25 13:32:55 +00:00
drh
7383f5a7d9
Add a mutex to the sqlite3_db_config() interface so that it is threadsafe
...
when two or more threads call it on the same database connection at the same
time.
FossilOrigin-Name: 459ad8846ee1ee2d3b277a291c47121692bdf477e779b06e77be8338f62237a6
2022-08-24 17:59:00 +00:00
dan
2ce2b779bb
Fix an inefficiency in the ".dump" command when outputing large blob literals.
...
FossilOrigin-Name: c055d05dbdfd4643d5052c6e6a736c78651fdfcd78f15f791af903df3814832d
2022-08-24 11:51:31 +00:00
drh
e5928b17ca
Change the names of the Vdbe.pVNext and Vdbe.ppVPrev fields to make them
...
unique. Change to ppVPrev to save a few bytes and a few CPU cycles.
FossilOrigin-Name: 34b8ea31877ae8b40729d37b3f51ae7e15f38be841881ea4a37c9c8f0a52896d
2022-08-23 20:11:01 +00:00
drh
35908b167f
Enhance assert() statements to enforce tighter bounds on the P5 operand of
...
the OP_Next and OP_Prev opcodes.
FossilOrigin-Name: 4e0a07fc6f96e6e7726506b7a5ee942461c1381501f253893fa94d76023b634f
2022-08-23 17:51:39 +00:00
stephan
f7415736d1
Add mksourceid binary to the clean rules and $(TESTPROGS) to distclean.
...
FossilOrigin-Name: ae3e82f5a3332bea261aca6a0dd02063cf7056c023204cc10f1ae18d75249f91
2022-08-23 16:55:19 +00:00
drh
376860ba88
Performance enhancement for sqlite3DbFree().
...
FossilOrigin-Name: c296a9d958ec360fc8d217363348b4918d665bccb3c4f27503a2dcef7db49052
2022-08-22 15:18:37 +00:00
drh
41ce47c4f4
Add the new internal interface sqlite3DbNNFreeNN(db,ptr) where both the
...
db and ptr parameters are guaranteed to be non-NULL. Use this where
appropriate to save more than 2 million CPU cycles on the standard
performance test.
FossilOrigin-Name: e5eaa80e81fdf86f2875a912b880272b8d099b82b08e945a7988c5dd0fe9d6b5
2022-08-22 02:00:26 +00:00
drh
05cb948bf7
Merge the test case for dbsqlfuzz 18fe4e257be7fa3ecfb0424ab7427e41e97ef9e3
...
assertion fault, which is fixed with the previous check-in.
FossilOrigin-Name: 2d13ec086e96a5446462ce0f689c40c8196e740cd693f5967bfe9eb961f03463
2022-08-20 19:45:41 +00:00