1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00
Commit Graph

14444 Commits

Author SHA1 Message Date
dan
efa363b84c Improve the performance of the .recover command.
FossilOrigin-Name: a50768314d10d743a0cc013b434b516f0763e0a6c5b79655d8fefde7de53e869
2019-04-24 20:48:55 +00:00
mistachkin
8e7e517b68 Correction to the #if in the previous check-in.
FossilOrigin-Name: 30dc05ac12910d318a737f8d7a0e895e5c42ff4c53472aeebc89f052eac05deb
2019-04-24 04:53:01 +00:00
mistachkin
49b0572302 Fix for 8-byte alignment asserts that can trigger in some circumstances with 32-bit MSVC.
FossilOrigin-Name: 4c02832e0c4351ced9d2391f09ee071c65a74b85a0509bf58f045afeb166f48c
2019-04-24 00:37:11 +00:00
drh
29e780068b Make no atttempt to generate VDBE code for VACUUM after a syntax error.
FossilOrigin-Name: 930842470da27d72650033ef2c1df413e70f7c40eb46f91027b35f5ee156af38
2019-04-23 22:00:39 +00:00
dan
b182588c8e Have ".recover" handle "\r" and "\n" in the same way as ".dump".
FossilOrigin-Name: f95f0f02ab6c6cf45f25b613c7ab57f68249689d0a9eddf4c9518ddf0edad365
2019-04-23 20:48:32 +00:00
dan
38f9c7194d Fixes for the ".recover" shell command.
FossilOrigin-Name: 8dcc1d89d955bf58c80a8c30a37960f0cf95719953951a92626cc332cc75ec60
2019-04-23 18:03:02 +00:00
drh
3ea557e0e7 Changes to the --hexdb decoder option in the shell (and also in the TCL
test code) so that it works on systems where sscanf() does not recognize
"%hhx" as wanting to delivery results into a character-size variable.

FossilOrigin-Name: 4258e42d92b0113ba59f407197fc24f21734900e5b02952deed07818be3e3e5d
2019-04-23 15:30:58 +00:00
mistachkin
d5ddecb2f0 Minor simplification of NULL value handling for STAT4.
FossilOrigin-Name: 69bad9257f8db6a2a761bdd298d972eb48d4f845ec11dedc802ba3bafb979915
2019-04-23 15:08:11 +00:00
drh
f4b331535d Improvement on the previous check-in. Parse.rc is less reliable than
Parse.nErr for detecting SQLITE_TOOBIG errors.

FossilOrigin-Name: 8d478cfb92fdeb87591403fe1713b290fee309a38b71abee0002012935d1db98
2019-04-23 12:30:15 +00:00
dan
b40af49d73 Enhance the ".recover" command. Fix a problem with overflow pages in dbdata.c.
FossilOrigin-Name: f193ca587f9e4f925f4f2343b0b07053bd6f93dd87fc6f8f41cf4479e90cf562
2019-04-22 20:52:12 +00:00
drh
2b13cd99d3 Early detection of SQLITE_TOOBIG when processing nested queries.
FossilOrigin-Name: 5d85d80ef8b216639244c6f4e6a2c0050af3cf9c3998f372bae4a19c0430f2fd
2019-04-22 20:05:54 +00:00
dan
a9a5465eb4 Fix an assert() that may be false for corrupt databases.
FossilOrigin-Name: b2ce5ed175cb5029ac07392ae371c86eeec23c74624aad007dee51cf359f3eeb
2019-04-22 11:47:40 +00:00
dan
68cb86ef23 Add the ".recovery" command to the shell tool. For recovering the maximum amount data from corrupt databases. Still needs work.
FossilOrigin-Name: 7461d2e120f2149315ddac2676d51d7445bcdb8e97543effd9c30603517ef9da
2019-04-20 20:57:28 +00:00
drh
1d2d71a02c Mark a single branch as no longer reachable.
FossilOrigin-Name: 4f35b3b78a461b0617a5cd04f60d2ab277bcc7c994dae463851a3cb5d041a723
2019-04-19 23:05:56 +00:00
drh
17180fca9d Improved optimization of the AND and OR operators.
FossilOrigin-Name: 0fbd154eb419b57b9c064c1f47346835d6324388b966b73f8a0122de065f08b1
2019-04-19 17:26:19 +00:00
dan
65455fc682 Fix a problem with renaming a table that starts with "sqlite". Fix for ticket [f00d7b65].
FossilOrigin-Name: a2ead8aa4517b63cda7bf84464326e9cb5e228224caa603568c0e04ea44e6588
2019-04-19 16:34:22 +00:00
drh
ad31727fc6 Use macros to determine if an expression is always true or always false.
FossilOrigin-Name: 6de980a09c3a7adf71f2c9a63a242673b5e1f246e8ee071b26844275f0dad0fc
2019-04-19 16:21:51 +00:00
drh
d5c851c1cb Streamline the processing of the AND operator. Slightly smaller and faster.
FossilOrigin-Name: 7713996aa99ce6dd35b5a2db74dd26658fb8d9817169b2a7531cdef6edb41403
2019-04-19 13:38:34 +00:00
mistachkin
7a3e50dc97 Minor simplification of NULL value handling for STAT4.
FossilOrigin-Name: 5718a9d5fc3fdfc89db869501c81fda39b3ec5c7e11fa0038fc258e316f5d8a1
2019-04-18 19:21:19 +00:00
drh
680f0fe32a Small performance and size optimization in sqlite3WalFindFrame().
FossilOrigin-Name: 03f2e78899fad99b0a0951b3a408268276954d4cd785389ed9a0192c9217f6fe
2019-04-17 21:12:05 +00:00
drh
e551b51472 Fix a typo in the CLI help output for the ".dump" command.
FossilOrigin-Name: 57638248de147efe8d663b3ae1389f590c7b2b7225ecfe295699d68c2893cd09
2019-04-17 13:58:07 +00:00
drh
698c86f40d Small performance improvement on the variable-length integer decoder:
sqlite3GetVarint().

FossilOrigin-Name: 5df2bf62fcd4dfdaa195062dddbd5ce5420bc239b2649ac8f547e0db34e7f0bb
2019-04-17 12:07:08 +00:00
drh
7e427337fe Faster and smaller implementation of sqlite3StrICmp().
FossilOrigin-Name: 7ac500fb5abfe1ad60f2ffdcc8fbe5ccc1c641bbeed53f00940e9ff78788e53d
2019-04-17 11:34:44 +00:00
dan
2eb2ca8391 Avoid a sanitizer error (pointer arithmatic overflow) in vdbesort.c.
FossilOrigin-Name: af61a2fc45a0fa1277d7453779238b77de4c298a9f60714b7dc62ddca5874f80
2019-04-16 11:21:13 +00:00
dan
112e174020 Avoid a sanitizer error in test1.c. Have releasetest.tcl/wapptest.tcl create a file called "makecommand.sh" that can be used to rerun a test from the command line.
FossilOrigin-Name: 4de4480ffdea1e923c4b964692ccde92d713c8b6c056bb04bddf1ff55ee891ec
2019-04-16 10:51:29 +00:00
dan
af4d50c4a1 Fix a bug in test module test_fs.c causing a segfault on OpenBSD.
FossilOrigin-Name: ee886600297c2a03d9d1d10db88d3d107b48e5d4de5e5d91b0ab16cc7c447ede
2019-04-15 19:17:50 +00:00
dan
46b341530e Fix a problem with the user-auth extension and deserializing in-memory databases.
FossilOrigin-Name: 09fa0b3c4adf7f81a777975762029ad43dbdc76b02dc32d2307e1c42465213c9
2019-04-15 15:41:33 +00:00
drh
07891f0294 Remove a stray tab from the source code.
FossilOrigin-Name: 0ada58e9303d53aba8bdc37abe5904aa40e91f80e247eb51cb1192387b0d661c
2019-04-14 00:40:29 +00:00
drh
d4de9f7b1e Fix an obsolete comment and other minor issues from code inspection.
FossilOrigin-Name: cd084427319394386844d6651479256a2fd57a412fccb79ba53172ce76693eb1
2019-04-14 00:34:20 +00:00
drh
f6ad201ac2 Fixes for harmless compiler warnings.
FossilOrigin-Name: c28c973ad6debd63f13e5d4d3da036f680baaec9d863eda039f2747db9f1cfd5
2019-04-13 14:07:57 +00:00
drh
0aa3231ff0 Enforce the SQLITE_LIMIT_COLUMN limit on virtual tables.
FossilOrigin-Name: 0b6ae032c28e7fe34d81d1769f6e2901addbd1b95cd9a255dcef274061fb0164
2019-04-13 04:01:12 +00:00
drh
0364f229cc Further refinement of the sqlite3VdbeMEmExpandBlob() fix of check-in
[df58774e994bd] to prevent a reference to an unused variable - problem
discovered by Valgrind.

FossilOrigin-Name: 09435b5700a2650816ad9ffa628be5fa19da62369c30329801feb5e840463c7e
2019-04-10 13:24:35 +00:00
drh
0e1a574875 Change the name of some internal testing interfaces to avoid a name
conflict in AIX.

FossilOrigin-Name: c1cae7e7f0a612508c8f82b334d9ebc423f443e99b13092d52e26b348c7cbc5e
2019-04-10 12:02:55 +00:00
drh
86ec1eddde Do not place arbitrary restrictions on the length of the failure message
for a uniqueness constraint.

FossilOrigin-Name: 037da798fa5510ba7c776831ebcd683a85dca28e25bc657ff17bb2b08c3d406e
2019-04-10 00:58:07 +00:00
drh
c3dcdba387 Improved reporting of SQLITE_TOOBIG errors while parsing.
FossilOrigin-Name: ea2d4b65e20e44e19219c821bf68e97ff3af1760b3b4762250d020ba2a5a6343
2019-04-09 21:32:46 +00:00
drh
25050f2620 Use an unsigned integer to count free pages in btree.c:freePage2().
FossilOrigin-Name: 8820408597341344b308277ce6ef41b47c7514d6c613520789b05ee52cbedae8
2019-04-09 01:26:31 +00:00
drh
427db2d245 Make the testcase() macro added in the previous check-in reachable for
testing.

FossilOrigin-Name: 80704a16f6dbbeacc65fa36a3623df10292a28aeacf9e2c1d2891258479e3b89
2019-04-07 18:21:12 +00:00
drh
7d683394f1 Fix a faulty assert() in the sqlite3VdbeMemExpandBlob() routine.
FossilOrigin-Name: df58774e994bd306b1a2e1f259e7e4408f01c5b1dc104673698168bbf8a63ce5
2019-04-07 18:04:57 +00:00
drh
7bbdc3c597 Remove some stale references to the addopcodes.tcl script from documentation.
FossilOrigin-Name: c0381b0bc90aa3c2415c4b3ac338cfe6d308bb5d4247bc6f2b6e919f549c254c
2019-04-05 21:17:11 +00:00
drh
f1722baaf8 Eliminate the tool/addopcodes.tcl script. The purpose of that script was to
keep the number of parser codes below 256 in order to save parser table space.
But we have long since blown through that ceiling so the addopcodes.tcl script
was just needless complexity. There is no longer any reason to keep it around.

FossilOrigin-Name: d272819298083ebbde57962a2938925b1aaa1caf03e48bb3ea26ad91e0461d84
2019-04-05 20:56:46 +00:00
drh
ce059e5219 Improved comment on the sqlite3FaultSim() function. No changes to code.
FossilOrigin-Name: 08b29672c552e5a6a3874746c6cc7025295e0e44dec43a1bfba3022acce849ff
2019-04-05 17:22:50 +00:00
dan
94c7ab5038 In the test_vfs.c VFS, if a Tcl xWrite script returns "SQLITE_OMIT", silently omit the write() call.
FossilOrigin-Name: 8b5a621e2ee3bb9d7d4f905217872e7e59153be9477aaa626cea287d56710b5b
2019-04-05 16:52:45 +00:00
drh
e3bd232e2d Add the ability to override the new corruption detection logic
of the previous checkin, in order to exercise downstream corruption
detection during testing.

FossilOrigin-Name: e859d3184606dd453b9fc4ee388922d7be4b61aad84a66ac82107935ffd56f3a
2019-04-05 16:38:12 +00:00
drh
86223e8d65 In the xfer-optimization, do early detection of when the source and destination
index share the same btree, to avoid a long delay prior to reporting the
database corruption.

FossilOrigin-Name: af1e5873d44d31466023ae145bdfc6b4191eb48b62e5752c6e683bcf571980e7
2019-04-05 15:44:55 +00:00
drh
4c81cada05 Fix a typo in the documentation for sqlite3_value_frombind(). Also add a new
hyperlink to that same documentation.  No code changes.

FossilOrigin-Name: bf3cd9364fdfc951feb04f78728eb8e0dae12b3dc5702a36bb6e69c0abab8864
2019-04-04 19:21:45 +00:00
drh
eacc8816dc Minor fixes to requirements marks.
FossilOrigin-Name: 02ebc60b9bbc1736f4989eb56f8d31ca97fe90c930841d10986c618381ceb8b4
2019-04-04 18:20:25 +00:00
drh
80ac9cb3c0 Correctly initialize the loadable extension thunk.
FossilOrigin-Name: 4fca46ded7873d4939d7c6bff363ded41667f2255a4ab624a1a24bebbae733eb
2019-04-04 17:39:54 +00:00
drh
677525756b Simplification of the recent VACUUM changes that make the code more like
what it was before the change.  Also, make the VACUUM command a no-inline
procedure to work around a performance regression.

FossilOrigin-Name: 9cac5ac145d62117c918539baaa8a3c124230e031842e35fa1ba59f658c99518
2019-04-04 15:25:52 +00:00
drh
4e61e88348 Only preserve rowid values for VACUUM INTO. Keep the legacy behavior of
renumbering rowids for ordinary VACUUM.

FossilOrigin-Name: 13a0ea6466b051ea5281865ed5285b8b5a99ec4307f400c5f7b03692723f1cd1
2019-04-04 14:00:23 +00:00
drh
b92d7d264e Add a defense-in-depth NEVER() test to the WAL cleanup code.
FossilOrigin-Name: 8d3af2010f4f652865f5c0d18e3bc793de05f8e75e75cc77786f61004b2ad28f
2019-04-03 17:48:10 +00:00