Commit Graph

18105 Commits

Author SHA1 Message Date
drh 0357713225 Add the pointer-type parameter to sqlite3_bind_pointer(),
sqlite3_result_pointer(), and sqlite3_value_pointer().  The pointer type is
a static string that must match (according to strcmp()) or else the pointer
is passed as a NULL.  This is a security measure to prevent crossing pointers
between different extensions.

FossilOrigin-Name: e1196567fcbc313657836262ed9f71668b1c47f26e4bc57c7880ff40079d66cc
2017-07-17 12:27:43 +00:00
drh 9a541c0361 Improve the sqlite3_result_pointer() interface so that it cannot be faked
using sqlite3_result_null() and sqlite3_result_subtype().

FossilOrigin-Name: c13264d5ef0470fb24e09f7bc12f19be3b77eab06d41f55607b38dddb532a132
2017-07-17 11:39:46 +00:00
drh ae3ec3f920 Add an experimental "pointer type" parameter to sqlite3_bind_pointer(),
sqlite3_result_pointer(), and sqlite3_value_pointer().  The pointer type is
a string that must compare equal using strcmp() or else the pointer comes
through as a NULL.

FossilOrigin-Name: 211cce04e97d2e325a6ea3e99738fc71115d673dc13daeffb03ac3140deb11de
2017-07-17 00:40:19 +00:00
dan d8ecefa5ab Add the "unionvtab" virtual table extension in ext/misc/unionvtab.c.
FossilOrigin-Name: 62a86aa6c0519cf1fa232169122d3d6ae8d2f66b20530fb934a82a15712bd2f0
2017-07-15 20:48:30 +00:00
drh fe8eadc94d Merge the fix for ticket [a4e06e75a9ab61a12] from trunk.
FossilOrigin-Name: b64d64c84484162d1822430036ba0483365a39ef4cf82cd6a7b9436d9e9f50c8
2017-07-15 20:44:33 +00:00
drh 3963e584b4 Fix a register allocation problem in PRAGMA integrity_check that caused
the same register to be used for two different purposes on the first
ATTACHed database if the schema for the ATTACHed database was noticable
more complex than the schema for the first database.
Fix for ticket [a4e06e75a9ab61a1].

FossilOrigin-Name: 253945d480b052bfe311888022b5eb0be91c8c80cda05036e58207d57520262c
2017-07-15 20:33:19 +00:00
drh e7c6f97b1d Fix a missing \n at the end of a comment causing a line to be too long.
No code changes.

FossilOrigin-Name: 687bd478710eb827e041533eea67115464f5a0de767bb6cfdbe36a0d3c597fa1
2017-07-15 20:25:22 +00:00
drh a4e54e868e Enhance the showstat4 utility program to show the full precision of
floating point values in sqlite_stat4 tables.

FossilOrigin-Name: 5ec37c62f65b2870dcd7a906912da787367f3912a96b6f3536355fad65903575
2017-07-15 17:57:31 +00:00
drh a4d770cf60 Minor change to one of the command-line shell test scripts to make that
script compatible with Tcl 8.5.

FossilOrigin-Name: 47cf83a0682b7b3219cf255457f5fbe05f3c1f46be42f6bbab33b78a57a252f6
2017-07-15 13:49:56 +00:00
drh 13c6fc5c6c First release candidate for version 3.20.0.
FossilOrigin-Name: 035a86ec3e4abd2173bfd0d8666ec86bd85af414cb791e68e6334447ecd35b84
2017-07-15 13:35:17 +00:00
dan cb0d3ba862 Fix another minor problem in test file like.test.
FossilOrigin-Name: 0953e74612358f48a9c9e3772876b514bc79784f277497121c59302a3106110c
2017-07-15 08:02:10 +00:00
dan a50b309187 Fix test problems causing the "prepare" permutation test to fail.
FossilOrigin-Name: b61cc5a0f9f2c2d2175ad30fc3fa4cb2086dbb948d5a5cc538ac43b871bb5221
2017-07-15 06:35:15 +00:00
dan 04ed43d64d Fix test problems with stmtvtab1.test under some permutations.
FossilOrigin-Name: ad6699d476b93131887e30475517764e281647f94df4a8248e2b88f1f14da91d
2017-07-14 20:53:21 +00:00
drh 858205d8bd Fix a typo in a comment used to generate documentation. No code changes.
FossilOrigin-Name: 65f9f29c58f61646d700eee6610ce85b572306f0ce2f19bebfd37632523019e5
2017-07-14 19:52:47 +00:00
drh 749e4a9fd1 Identify requirements text in the SQLITE_DBCONFIG_ENABLE_QPSG documentation.
Add some implementation marks for SQLITE_DBCONFIG_MAINDBNAME requirements.
No code changes.

FossilOrigin-Name: ab165dcf35ae7385c9366853ce5648294bf5dc9aa9ffe1af84243e6fac3472fc
2017-07-14 19:47:32 +00:00
drh 3cef364966 Add requirements marks for some of the new features in the 3.20 release.
FossilOrigin-Name: 264238671379306b14d62a6ddaefd2a20acd34ca77276b6ce872253160fe0146
2017-07-14 19:22:08 +00:00
dan 380c7ce460 Tweak Makefile.in so that testfixture can be built with the
--disable-amalgamation configure switch.

FossilOrigin-Name: 394c6f4f4376bc3d7796ea4157ba2ae230b0ca950774eff127ae6ef8a7b08602
2017-07-14 19:12:26 +00:00
dan 0e6b83088f Modify mkopcodeh.tcl so that it can handle "same as" opcodes with values
larger than the total number of opcodes.

FossilOrigin-Name: 1eb56fe0305f0841b14865b7560add3da529b211328f5fa171b9628418a6ed49
2017-07-14 17:50:11 +00:00
drh c9fb27bfa8 In the LSM1 virtual table, dequote the filename before opening the file.
FossilOrigin-Name: 6ed4ef03ff6f22ae83a14facc48ce594911d7d7b37446436b68af3a822578fae
2017-07-14 15:57:56 +00:00
mistachkin 59541d70a8 Changes to the LSM1 Tcl tests to make things work on Win32.
FossilOrigin-Name: 7dc5e70ef1faa0b51a04abdfe1ee2f9ea5c2d0f99ea8ef6260b9de02500cf8b2
2017-07-14 15:45:27 +00:00
drh a199ffca58 Include a hint in the header comment of the LSM1 makefile about how to
set the LSMOPTS variable.

FossilOrigin-Name: b5e3b264814cde9572130b70fc0d21ccebc2d7f5f0e7db50b6395cb63723383e
2017-07-14 15:42:11 +00:00
drh aa15168983 Update the Makefile for LSM1 so that the LSMOPTS can be set prior to
including the Makefile, in order to add platform arguments such as -fPIC.

FossilOrigin-Name: fe319bcd7f85e9997babdb024ab350514524f5901903600fa9780bdcd1805098
2017-07-14 15:32:11 +00:00
drh 3eddffd8bb Fix a typo in the header comment to the remember extension. No code changes.
FossilOrigin-Name: 604b9664f4dd6e8d188b5c57407edbbe0639345f8d30bf2d19016f8324934840
2017-07-14 15:18:51 +00:00
drh e83b847b75 Change the name of the STMT virtual table to SQLITE_STMT. Also remove the
first column of that virtual table, which was a pointer leak.

FossilOrigin-Name: 1bc4e93407b7894b0271fbde3720930dcaadda6070e871d9719c4e8dc65b915f
2017-07-14 15:14:21 +00:00
drh 923260c865 Minor updates to requirements marks and documention. No changes to code.
FossilOrigin-Name: 8f6dd5e2907d6df230fcbceadd226496bcc35a33c117da58215f7d333c1cc7b8
2017-07-14 13:24:31 +00:00
dan 4b8035e69b Add very simple tcl tests for the lsm1 extension.
FossilOrigin-Name: 5e0a97930b08fff1c3a29f5c8b2962b856e3302209228c0e71b9f1a1bd2a4be3
2017-07-14 11:40:48 +00:00
drh 17ca22616b Minor tweaks to documentation. No code changes.
FossilOrigin-Name: d8cd0434f3451e27aefe38a1a9efdc4dfded2ea33baf25d82814c89264f3afff
2017-07-14 04:16:03 +00:00
drh 968d8715fd Fix harmless compiler warnings in the readline tab-completion logic of the
command-line shell.

FossilOrigin-Name: 271ca4acfcff448cf863045595d2c2616decd13b6015d7db481c91e2ad5bb92a
2017-07-14 00:28:28 +00:00
drh 33b46eeb35 Improved documentation for the new sqlite3_bind_pointer() interface and its
cousins.

FossilOrigin-Name: 889968bdbf1c258238cb68d82f059e16366c4a40c2d541dd4a1811ab72e693cb
2017-07-13 22:39:15 +00:00
drh 4ba5f33f39 Improvements to the documentation for SQLITE_PREPARE_PERSISTENT.
No code changes.

FossilOrigin-Name: 265778142485882f39edfb5756175b2675c1993f0d6395dabbcbbb3767c6ec77
2017-07-13 22:03:34 +00:00
drh 06aecf0954 Fix documentation typo. No changes to code.
FossilOrigin-Name: 9319f7b71f68c9dc64c22c60b90650955b72f6bd9852d5ea86fa96a5c6fede37
2017-07-13 20:11:52 +00:00
drh c9407508b1 Update header comments on the carray() and remember() extensions to bring
out the fact that the pointer arguments must be bound using
sqlite3_bind_pointer().

FossilOrigin-Name: 55f5396576d186f310cb0fa66fbdb8ea68c18a3d0fe5de4b395ea03c7aa04c9e
2017-07-13 19:11:13 +00:00
drh 96b10030e9 Add new interfaces sqlite3_bind_pointer(), sqlite3_result_pointer(), and
sqlite3_value_pointer() used to safely move pointer values through SQL without
exposing underlying memory address information.

FossilOrigin-Name: 72de49f204277191f62601cce70d5013ec30b564a01063f1e841019c78ae6c77
2017-07-13 18:09:36 +00:00
drh 4c997c6e75 Fix an incorrect type signature for the loadable extension pointer
for sqlite3_result_pointer().

FossilOrigin-Name: 0bd7875bd9948836a14061275eb8ddac627f562a49f59f400ec98c00e2be82c5
2017-07-13 17:56:52 +00:00
drh 5587d86ddd Add the three new pointer interfaces to the loadable extension mechanism.
Update sqlite3_value_subtype() documentation to remove the statement about
it not being used internally.

FossilOrigin-Name: e5a518038fcb23376d2b17d4d70648320bc5540c5bd8b164201044ebe1ce45c5
2017-07-13 17:54:12 +00:00
drh d43748aa98 Update the FTS3 extension to use sqlite3_result_pointer() and
sqlite3_value_pointer() for passing FTS3 cursor objects from the table
into functions such as snippet().

FossilOrigin-Name: 0fa2e170e5e078d155c98b212ade36bd8424502ae07f2d82ebf77a76f57586ba
2017-07-13 17:48:14 +00:00
drh 3fb406083a Merge the latest changes from trunk.
FossilOrigin-Name: a54be6e041a9185787a22b86603dcb0654e5e4af71225b556d1b6279f8520ad8
2017-07-13 17:34:46 +00:00
drh 0c2433003d Smaller and faster implementation for vdbeFreeOpArray() and freeP4().
FossilOrigin-Name: 0c80593520d30958231be41fc443209eb39e0b3ee0e66308c3ef3a0f4cb8ea66
2017-07-12 20:43:23 +00:00
drh 7ccf95dbab Fix harmless compiler warnings about incomplete structure initializers.
FossilOrigin-Name: 604c11d1a39f09e47b6fcee0f8b1c1054f9dbbc7b2c1cf93312aeaa4b7095018
2017-07-12 18:05:54 +00:00
drh 980a89e630 Remove unnecessary EP_Leaf settings on the Expr object.
FossilOrigin-Name: f951c8b71b2369da62a329c792af5e3d3087bbe020f38c68ca1d0a594b904c08
2017-07-12 17:26:44 +00:00
drh 971ecd7eaa The EP_Resolved flag on the Expr object is not required for correctness nor
performance, so remove it.

FossilOrigin-Name: 54f55d3b7973e326541a81bfb2e752a2f6618e4fec9a3631b95f28e12e9c6e34
2017-07-12 17:08:24 +00:00
drh ec360a8d01 Clarification and simplification and result column naming logic.
FossilOrigin-Name: 68824a439b76a4cca05609a02de7abdc42bd1d26afbfcd047b90001c610d3c56
2017-07-12 14:10:19 +00:00
dan 47ebd4cadd Fix a problem in an lsmtest test case caused by writing data in "text" mode
instead of "binary".

FossilOrigin-Name: 3e56a79ad8754e6da3181883154fa1c8b227a8d16c9b2a3eba925371595ae1f9
2017-07-12 14:03:13 +00:00
drh f0f44b79c9 Compile cleanly with SQLITE_OMIT_UTF16.
FossilOrigin-Name: 783100b801703577e35ec12fe7623e1797e49699f3b8deb0694ef061a142b844
2017-07-12 12:19:33 +00:00
dan 1cd523cf0f In lsm, attempt to unmap the database file before truncating it when
disconnecting. A mapped file may not be truncated on win32.

FossilOrigin-Name: 39069941e98605bc8c7c736819781761760ee2b83363471ceb6f19e5eb06b13a
2017-07-11 20:36:35 +00:00
dan 416b8694fa Simplify the way in which the database file is truncated when the last
connection disconnects. Also ignore the error code from the xTruncate call -
as truncating a database file is always optional.

FossilOrigin-Name: b0a49d90fc91acca1306cf6145adc83acd368686768b7eb4a3b27515b3237396
2017-07-11 19:55:38 +00:00
drh 8999798e60 Fix harmless compiler warnings in the core.
FossilOrigin-Name: 55e93f256018757e5e1cb3b10ef48abf5914e7687419eae58b00998a37061261
2017-07-11 18:11:33 +00:00
mistachkin ba334bb20d Make win32GetTimeOfDay() in the lsm1 test code more portable.
FossilOrigin-Name: 2fe3a84330063378ca9fc5bfc8efe486c52d50b5c40be4f402a4f2318be69436
2017-07-11 17:54:27 +00:00
drh db3e0456d2 Enabled the new sqlite3_prepare_v3() and sqlite3_prepare16_v3() interfaces
for loadable extensions.

FossilOrigin-Name: b9debd626a68c4bc0e5fdeb8d15a991cfe6f62f9586eda76c07a1c18e498e3c2
2017-07-11 17:28:27 +00:00
mistachkin b7bfc3b12d Fix a whitespace alignment issue in lsm1.
FossilOrigin-Name: a8e651e0e52b016c3939df3ee23b4981f1a8841c7ddd2981c1ef391feb559a5e
2017-07-11 17:06:42 +00:00