Commit Graph

16144 Commits

Author SHA1 Message Date
drh 6c96358601 Remove an obsolete comment from the pager. No code changes.
FossilOrigin-Name: 36f97ca8874a03ac8699f44fe0da95b0be507cc7
2016-04-25 19:28:34 +00:00
drh 835f22deda Fix some unreachable branches in the pager.
FossilOrigin-Name: 3ae44770fdecc40c8097f1de0b504f36585a2232
2016-04-25 19:20:56 +00:00
drh dc7adf20bb Merge bug fix from trunk.
FossilOrigin-Name: a905d5e08de3f3c60b667d840b5995911372647d
2016-04-25 15:03:49 +00:00
drh b1ec87afdb When checking for the WHERE-clause push-down optimization, verify that
all terms of the compound inner SELECT are non-aggregate, not just the
last term.  Fix for ticket [f7f8c97e97597].

FossilOrigin-Name: ec215f94ac9748c0acd82af0cc9e7a92249462f9
2016-04-25 02:20:10 +00:00
mistachkin 1de86ca17f Fix a typo in the Makefile.
FossilOrigin-Name: d0a579b35105810821bbfec6b50ecfebac7a17ee
2016-04-25 01:43:24 +00:00
drh d456e92ce0 Merge the temporary directory search algorithm fix from trunk.
FossilOrigin-Name: 9b8fec60d8e576cd09e1d075a59bfad1c6169d7a
2016-04-23 21:16:55 +00:00
drh 23ee893752 Fix the fix to the temporary directory search algorithm so that it continues
to return "." as a fallback if that directory has the correct permissions.

FossilOrigin-Name: b38fe522cfc971b37ca04e7b63a92bbb6e0b01e1
2016-04-23 20:59:23 +00:00
drh 7ff5d522bf Merge the latest trunk changes.
FossilOrigin-Name: 84da122dd6e70ed603fea781dca204ae2f668c53
2016-04-23 19:55:59 +00:00
dan 2d36f065e2 Fix a problem with mixing temp-files and mmap-mode.
FossilOrigin-Name: c80c5c62b2e2c5e47e0839f8e2d5b6341ca4a249
2016-04-23 17:24:16 +00:00
dan 6572c16ae1 Fix some problems to do with temp-file databases and recovering from IO and SQLITE_FULL errors.
FossilOrigin-Name: 3d61da4a76af8c9c2a293df085f3ed5a7bb447df
2016-04-23 14:55:28 +00:00
drh 7694e06461 Change the temporary directory search algorithm on unix so that directories
with only -wx permission are allowed.  And do not allow "." to be returned if
it lacks -wx permission.

FossilOrigin-Name: 67985761aa93fb613b87d340e75371fa55b0f778
2016-04-21 23:37:24 +00:00
dan 83b74f29c5 Add the sqlite3rbu_vacuum() API, to create an RBU handle that can be used to rebuild a database in the same way as the VACUUM command.
FossilOrigin-Name: bd4a6f8313eb71399a7141ebf7f2617d7b1464c3
2016-04-21 18:13:37 +00:00
dan b7a208686a If a call to sqlite3rbu_close() on an rbu handle opened by sqlite3rbu_vacuum() returns other than SQLITE_OK, delete the contents of the rbu_state table. This ensures that if an RBU vacuum operation either completes successfully or encounters an error, the next call to sqlite3rbu_vacuum() with the same parameters starts a new RBU vacuum operation.
FossilOrigin-Name: 6e4ac704f51bdd1e0b16814f6a45ab29f26400ee
2016-04-21 16:44:38 +00:00
dan 2e8bfb67d4 Fix a problem in rbu vacuum on tables with a large sqlite_master table.
FossilOrigin-Name: 23eac52e987996afe8db847921aef434cebd25b5
2016-04-21 15:26:26 +00:00
drh 6bcfe8b61f Add a function prototype in order to fix a compiler warning.
FossilOrigin-Name: 49aec9718d61c9f12aed96f530128666c3b01c81
2016-04-21 15:24:46 +00:00
drh 518aca114f Merge updates from trunk.
FossilOrigin-Name: cc28106e5c196c0a9678fbbd06f6afd49271a8e8
2016-04-21 15:03:37 +00:00
drh 26f7977c53 Add the SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION method for enabling
sqlite3_load_extension() while leaving the load_extension() SQL function
disabled.

FossilOrigin-Name: c4f165c460c4244ed434107feac005efa3c386cf
2016-04-21 02:27:56 +00:00
drh f602a16123 Test cases for SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION.
FossilOrigin-Name: debafa5efd37ac60e030d0963ce8e7c4f51a0f10
2016-04-21 01:58:21 +00:00
drh 191dd06195 Revert sqlite3_enable_load_extension() to its original long-standing behavior.
Add SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION which will enable only the C-API and
leave the SQL function disabled.

FossilOrigin-Name: b2ae5bfa32e608625bd177907596df3dbc2212e1
2016-04-21 01:30:09 +00:00
dan 94d49697b5 Add a documentation comment for sqlite3rbu_vacuum() to sqlite3rbu.h.
FossilOrigin-Name: da5c753ddac3cbfdf03710a82f5fd9fa2e29e819
2016-04-20 20:08:58 +00:00
drh cdce61e133 When an error occurs while transitioning out of WAL mode, make sure the
locking state is not left at EXCLUSIVE.

FossilOrigin-Name: 3340f086510b08ce5b42a8781f1df51bf7c27701
2016-04-20 19:30:47 +00:00
drh 333f80562b Fix a locking race condition in Windows 10 that can occur when two or more
processes attempt to recover the same hot journal at the same time.

FossilOrigin-Name: 38a4e9d92887898b779493c71e4500f777a4e2e7
2016-04-20 18:31:27 +00:00
dan 132dde5cdf Add fault injection tests for rbu vacuum. Fix some problems revealed by the same.
FossilOrigin-Name: f042fdd1ea7febec7228e51efc2b0281805e196a
2016-04-20 17:47:52 +00:00
drh 1a55dedf7b <b>API Change:</b> Modify sqlite3_enable_load_extension() so that it only
enables/disables the load_extension() SQL function, and leaves the C-APIs
enabled at all times.  In this way, applications can enable extension loading
for the C interface without having to expose that capability to the SQL.

FossilOrigin-Name: edb454e45ae008e051e2f48d704a855b0c3e4be9
2016-04-20 00:30:05 +00:00
dan 1aea63032a Updates to ensure the values of PRAGMA settings like "page_size", "auto_vacuum", "user_version" and "application_id" are not lost when a database is RBU vacuumed.
FossilOrigin-Name: 74ffea76b8c9ddd7699ce6ca77dce005bd7922ac
2016-04-19 19:27:09 +00:00
dan 46f0035b48 When an RBU vacuum is started on a db identified using a URI filename, pass the same URI parameters when creating the new version of the db. This ensures that RBU vacuum works with password protected databases.
FossilOrigin-Name: ca021ba88106500f347ed65199a4832bc9eb5ef8
2016-04-19 17:11:05 +00:00
dan bff4b6367c Detect attempts to use rbu vacuum on a wal mode database (not allowed). And attempts to write to a database in the middle of an rbu vacuum (which prevents the vacuum from resuming).
FossilOrigin-Name: 00b2f4b09ffca5156e43c4db2bfe0b2c979c49b0
2016-04-19 16:20:24 +00:00
dan 58e3812988 Another fix to rbu vacuum for a zipvfs case.
FossilOrigin-Name: 29407d70e44ad9ea5ddaf1011d0e212b602a3ddf
2016-04-18 21:00:01 +00:00
dan beccf1d16f Fix some zipvfs related problems in RBU vacuum.
FossilOrigin-Name: d76f4aaa4caab713460421bd27365a82ac986c20
2016-04-18 18:18:18 +00:00
drh a6dddd9bde Remove quotes from identifiers used as datatype names in a CREATE TABLE
statement.  Fix for ticket [7d7525cb01b68]

FossilOrigin-Name: eba27d4d17a76884292667d570d542e580ee3e77
2016-04-18 15:46:14 +00:00
drh 2c03652b45 Merge recent trunk changes.
FossilOrigin-Name: d9768de502e34da42f3ad955947c23da50f57bce
2016-04-18 13:36:17 +00:00
drh b5895e50f9 sqlite3PCachePerecentDirty() should return 0 if the pcache is empty.
FossilOrigin-Name: 85f3d80eb7319754792eef76996b2c740a2b0073
2016-04-18 13:30:50 +00:00
drh f9986d90d1 The last parameter to pread64() and pwrite64() should be off64_t, not off_t.
FossilOrigin-Name: 3a7d72986fabe9434ff5bd02c93169314f072b23
2016-04-18 13:09:55 +00:00
dan 303a094466 Add the -vacuum switch to the "rbu" demonstration program.
FossilOrigin-Name: 9a0078a538c7e73a009960347b8953c5af99fefd
2016-04-18 09:17:05 +00:00
dan 2bb5f4478e Changes so that rbu vacuum works with zipvfs databases.
FossilOrigin-Name: bae7f875f476f6e01112751cb404fef42ba0a01c
2016-04-16 19:02:53 +00:00
dan 977cbe78b3 Avoid creating any extra files ("<target>-vacuum") when running an RBU vacuum. Ensure that the OAL file created is "<target>-oal", not "<target>-vacuum-oal".
FossilOrigin-Name: dc19aacc7e99213edca9bb57b5c11a8a1ac99113
2016-04-16 17:53:14 +00:00
dan ee65eea4af Fix a couple of assert() statements that were failing with OOM error tests.
FossilOrigin-Name: 8eb3d7d8360530f364bbbebac53e1f0e6753d924
2016-04-16 15:03:20 +00:00
dan f89157653a Add the experimental sqlite3rbu_vacuum() API function. For opening an RBU handle that rebuilds a database from scratch.
FossilOrigin-Name: 0216b48f28042ad86711e00802c2da8ce9be3044
2016-04-15 20:46:41 +00:00
drh eacd29d484 CLI enhancement: Add the ".eqp full" option, that shows both the EXPLAIN
QUERY PLAN and the EXPLAIN output for each command run.  Also disable
any ".wheretrace" and ".selecttrace" when showing EQP output.

FossilOrigin-Name: 3e217d6265ecd16db783bed7ce1d9d0f9c4828bb
2016-04-15 15:03:27 +00:00
dan 5313f2e12e In the ICU extension toupper() and tolower() SQL functions, avoid calling u_strToUpper() or u_strToLower() a second time if the buffer passed to the first invocation turns out to be large enough.
FossilOrigin-Name: d23e581351fb8eea28e7b13b3dcadfc817c3a05f
2016-04-14 17:29:13 +00:00
drh 497116007e Add the SF_HasAgg constant (currently unused). Also enhance the comments on
many other constant definitions to detail constraints on their values.

FossilOrigin-Name: 7b7a69d098f7581a43b818c251717c2450b797de
2016-04-14 16:40:13 +00:00
dan fc26f7cfed Correctly interpret negative "PRAGMA cache_size" values when determining the cache-size used for sorting large amounts of data (i.e. the functionality in vdbesort.c).
FossilOrigin-Name: 79147dca87cfd7eb62d57baa3b70fa2a8542232a
2016-04-14 15:44:37 +00:00
drh 7111c93c40 Add some missing testcase() macros to the pushDownWhereTerms() routine.
FossilOrigin-Name: 67d7f79c5e5be41a18817c802b5c4d349e3a83a4
2016-04-14 15:38:33 +00:00
drh f1b5ff73cb Rename WhereInfo.pResultSet to pDistinctSet to more accurately reflect what
it represents.

FossilOrigin-Name: 5317961411695e107e8cefdeaba62280429979ca
2016-04-14 13:35:26 +00:00
drh 8f2ce91462 Since the return value of sqlite3OsClose() is always ignored, we might as
well make it "void" instead of "int", and thereby save 50 bytes in the
compiled binary.

FossilOrigin-Name: 7ee570e7a9a2159a8c0d41805c00f91ca0de00e3
2016-04-14 13:16:58 +00:00
drh 7512cb47e8 Additional ".selecttrace" debugging output when the query is transformed from a
DISTINCT into a GROUP BY.

FossilOrigin-Name: 5a46914510af4d5557b299db65c68d5df1070766
2016-04-14 13:06:49 +00:00
drh 07d683fdbc Fix compiler warnings by removing surplus local variables in the schema
pretty-printer logic of the command-line shell.

FossilOrigin-Name: 55a62483b9121a8b373d038a26fdebc4308661f6
2016-04-13 21:00:36 +00:00
drh 1454b26c17 Merge enhancements from trunk via tempfiles-lazy-open.
FossilOrigin-Name: ae16310c4e9a9b7e94874bd912fc6a4324cfaa2b
2016-04-13 19:20:23 +00:00
dan 0f52455a35 On commit, flush dirty temp-file pages only if the file is already open and 25% or more of the cache is dirty.
FossilOrigin-Name: f6babf2920340f25815c0a3c58de1e902c2f5542
2016-04-13 16:52:11 +00:00
drh 8ca7b177bb Merge enhancements from trunk.
FossilOrigin-Name: e2edd34e79af906e7069e3e837730b12de0b73fe
2016-04-13 16:02:28 +00:00