Commit Graph

9730 Commits

Author SHA1 Message Date
mistachkin
1b904bf766 Make sure the EXTERN macro is properly defined when building targets that require it (e.g. on MinGW).
FossilOrigin-Name: 88ad2f23c5036cbb4a69b73ce5792bd5c33a9177
2012-01-14 03:34:24 +00:00
drh
b04f3c1525 In the multiplexor routine that determines the size of an overflow file,
return 0 and leave the error code unchanges if there were prior errors.
This prevents some I/O errors from going unreported in nx-devkit tests.

FossilOrigin-Name: 6da0821a4717253221b25fb22e05cd9c13492f3d
2012-01-14 00:42:40 +00:00
drh
710869dd17 Fix documentation typos. No changes to code.
FossilOrigin-Name: 0b857613e2415a59e61df2181ff33aa12bed987e
2012-01-13 16:48:07 +00:00
drh
68bd4aa21d Add the -uri option to the usage comment that is printed by the "sqlite3"
TCL command when an unknown command-line option is supplied.

FossilOrigin-Name: 7987e285786161b1513ab77694d79e95fc76b0e5
2012-01-13 16:16:10 +00:00
drh
065dfe692a Update the documentation for the sqlite3_uri_*() routines to make it clear
that there argument must be a database filename passed into xOpen().
No changes to code.

FossilOrigin-Name: 08230a3a8c88f275bfc0ba72d3fea3260f24fc63
2012-01-13 15:50:02 +00:00
dan
983371d999 Fix backup2.test so that it passes on OpenBSD (which produces a slightly different error message in one case).
FossilOrigin-Name: 227cfe11c4a1c095ccad76116dc4a68cccc5e8f0
2012-01-13 15:21:07 +00:00
dan
961e4ca413 Do not throw an error from within test_journal.c if a database file size is not an integer multiple of the page-size.
FossilOrigin-Name: 3f4899a923f06d48edf6eeeb1c52b01958779efc
2012-01-13 14:50:29 +00:00
dan
6b4e9a849b Omit test file zerodamage.test from the inmemory_journal permutation.
FossilOrigin-Name: 0c0051b1a548591180e4b02f2e74a1a8a63318a3
2012-01-13 10:51:52 +00:00
dan
9d69c5d1b1 Fix test case issues related to errors in file-controls and the PSOW flag.
FossilOrigin-Name: 5afbcd49f92e13d1654c1486e19d7e1bb4d3b024
2012-01-13 10:04:10 +00:00
dan
5d8341a9e9 Fix issues in test cases so that they work with DEFAULT_AUTOVACUUM defined. And with a small default cache-size.
FossilOrigin-Name: a298465c3919c331b9d8b60351c42b96d2efacdc
2012-01-12 16:41:30 +00:00
dan
6c2688c8d4 Fix typos in a testcase() macro introduced by the previous commit.
FossilOrigin-Name: 0467742fd6ef33dfe4df66e5046f075fe8e0260d
2012-01-12 15:05:03 +00:00
dan
bb246c4da0 Remove some assert() statements that can fail with corrupt databases.
FossilOrigin-Name: 7654ae71bd26ae5d713935624d2b6cb8d2e4633f
2012-01-12 14:25:55 +00:00
drh
a71a98df88 Remove code made unreachable by the enhancement of the previous check-in.
FossilOrigin-Name: 9e31a275ef494ea8713a1d60a15b84157e57c3ff
2012-01-11 16:16:08 +00:00
drh
935de7e81a Make the pager less vulnerable to problems caused by shifting sector sizes
when rolling back a hot journal.

FossilOrigin-Name: 629108c8e5376f989cd66e11437949a54c33a5b8
2012-01-11 15:47:42 +00:00
dan
72cd90ac44 Fix the sqlite3_quota_file() function in test_quota.c so that it adds the second nul-terminator to all file names that will be passed to a VFS xOpen method.
FossilOrigin-Name: 3013f9a67cc6097c14e40a6155c1401f51f4da78
2012-01-11 11:20:42 +00:00
mistachkin
e290919ae2 Prevent winOpenSharedMemory from masking the real return code from its call to winOpen. Also, add asserts to check the double-zero termination of database file names.
FossilOrigin-Name: 93a65776dc8f496485e206a5eab11eeba579b5da
2012-01-11 01:01:02 +00:00
drh
69578ac481 Make sure filenames handed to the VFS by the fake_big_file test procedure
are double-zero terminated.

FossilOrigin-Name: d0a868607e8f46941ece9f9d7b8ba220a7fb4e2b
2012-01-11 00:38:51 +00:00
drh
c02a43afae Only require double-zero terminators on database filenames, not any every
files supplied to the xOpen method.  This backs out [2544f233f1].  Also
refactor the fillInUnixFile() routine in os_unix.c to reduce the number
of parameters.

FossilOrigin-Name: cb774b26e13745cfad0d76a71e47466d703e0007
2012-01-10 23:18:38 +00:00
drh
c02372ce6f Refactor sqlite3OsFileControlNoFail() into sqlite3FileControlHint().
FossilOrigin-Name: 722735a4f316630c907149f08d3d7dccc0facd9a
2012-01-10 17:59:59 +00:00
dan
04333f9b3e Avoid passing strings with a single nul-terminator (two are required) to the VFS xOpen() method from within the code that checks to see if a master-journal file may be safely deleted.
FossilOrigin-Name: 2544f233f1041a42bbdbb5413d2bc92b2a2e0397
2012-01-10 17:28:10 +00:00
dan
6f2f19a154 Add function sqlite3OsFileControlNoFail(), which is the same as sqlite3OsFileControl() except that it does not simulate OOM errors. This saves adding calls to the BenignMalloc() functions around each of the invocations of sqliteOsFileControl() that ignore the return code.
FossilOrigin-Name: af59b182d797642e5ec3ddf291cf62662a136bd1
2012-01-10 16:56:39 +00:00
drh
2bfe5b316c Check the return code from sqlite3OsFileControl() in sqlite3BtreeCopyFile()
and report any errors that it generates.

FossilOrigin-Name: 7f852ac6435f1c9e25b07f816cca5ba40484579e
2012-01-10 16:40:50 +00:00
drh
92c45cf0fe Remove the BenignMalloc() from around the call to FCNTL_OVERWRITE. Add
new ones around sqlite3OsDelete().  Fix an assert that causes problems for
the nx-devkit.

FossilOrigin-Name: 38bc4236d5a9d9f22a525bf9308d90cd4d9ce5a4
2012-01-10 00:24:59 +00:00
drh
3cb2f6e60e Cosmetic changes to lemon. No changes to core functionality nor impact on
SQLite.

FossilOrigin-Name: 393fc78a18004c839d889de2a25ec046ad6f13fc
2012-01-09 14:19:05 +00:00
drh
ec0c765d9e Make sure the multiplexor does not create unnecessary overflow files.
FossilOrigin-Name: 1238619756c0c26e43d3c1c873cbdeca22ce9d61
2012-01-09 13:41:59 +00:00
dan
730f85a34e Have test_multiplex.c add a second nul-terminator byte to the strings that it passes to the xOpen method of the underlying VFS, in case that VFS passes the string to sqlite3_uri_parameter() or similar.
FossilOrigin-Name: 12f5b8c9c9a15bd9e6aabdc708d4e869ff918e76
2012-01-09 11:37:34 +00:00
drh
45d29309a7 Fix typos in commands. Combine the ExpandBlob and expandBlob macros into one.
FossilOrigin-Name: fc9179e154751b51ddef429600d30a89d4a098bd
2012-01-08 22:18:33 +00:00
drh
d522620a7d Make sure the shared-memory filename sythesized by os_win.c is
double-zero terminated, so that it can be used with
sqlite3_uri_parameter().

FossilOrigin-Name: 429380f99c59ca10de18638ce6f9ec7c47082999
2012-01-08 12:32:09 +00:00
mistachkin
0547e2ff7b Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name: 9612bcd648c7654050ddb2f955a28cbc527a8c2e
2012-01-08 00:54:02 +00:00
drh
7dd1ac600e Fix a bug in lemon in computation of which non-terminals can generate an
empty string.  This bug and the fix make absolutely no difference for the
grammar used by SQLite, but it can make a difference when lemon is used
in other grammars.

FossilOrigin-Name: ce32775b232da894343f62deefaf19b0ec484636
2012-01-07 15:17:18 +00:00
drh
60e4a74879 Add missing finish_test to the end of the zerodamage.test module. Disable
the zerodamage module if virtual tables are omitted from the build.

FossilOrigin-Name: d2a5685b5e282488df382fc210e4f0d786259658
2012-01-06 13:58:04 +00:00
drh
c91663499e Combine various boolean variables in the BtShared structure into a single
boolean vector.  Also make performance improvement simplifications to
sqlite3BtreeMovetoUnpacked().

FossilOrigin-Name: 119493318e0ad4c2858fe1484b0d71669bd81531
2012-01-05 23:32:06 +00:00
drh
9cb5a0d989 Make sure the name of the shared memory file has two zero-terminators in the
UNIX VFS, so that sqlite3_uri_parameter() will work correctly on that name.

FossilOrigin-Name: 3d088ba5e36c0b6bccc86986f8fa9a22b340c297
2012-01-05 21:19:54 +00:00
drh
e025d9a096 Fix an incorrect assert() on the sqlite3FileSuffix3() function.
FossilOrigin-Name: 24db54bd49ed91c74a9797faca02df2d39553240
2012-01-05 18:33:40 +00:00
drh
e349519f1e Change the unix VFS so that it ignores all but the least-significant bit
of the syncDir flag to xDelete.  Add an assert to prove that the core only
ever uses that one bit.

FossilOrigin-Name: e75fd3b27423272b988921ac0e272f9600818b8c
2012-01-05 16:07:30 +00:00
drh
e0711b47b1 Ensure 8-byte alignment of Index.aiRowEst[] elements even if the size of
an Index object is not a multiple of 8 bytes.

FossilOrigin-Name: 1378f905d37544701776d38987fe7a312b255983
2012-01-05 12:38:02 +00:00
drh
bce51350d6 Remove the SQLITE_FCNTL_SYNC_OMITTED cases from the unix and windows VFSes
as they are no longer needed because of check-in [fd3822f1f2].

FossilOrigin-Name: 7cf568a101cda20ab6005bd250154b7f6960193a
2012-01-05 11:43:10 +00:00
drh
e4c88c0c38 Fix typos and comments and make minor changes to a few function names,
as suggested by readership.

FossilOrigin-Name: e9d05cbb7676cbda83f1b3b71447404d7edde898
2012-01-04 12:57:45 +00:00
drh
52bcde0e2d Make sure filenames passed into sqlite3OsOpen() always have the extra
zero-terminators needed by sqlite3_uri_parameter().

FossilOrigin-Name: d73e93cfdc9441ade77b796dcdcf6eeb753cb398
2012-01-03 14:50:45 +00:00
drh
8942d4125e Remove the code that attempts to find the sector size from the OS and
hardcode the xSectorSize methods of the unix and windows VFSes to return
SQLITE_DEFAULT_SECTOR_SIZE, which is now set to 4096 unless overridden.

FossilOrigin-Name: 03d8362cd2cadab8e1cc5b18a3194152f2bd0a84
2012-01-02 18:20:14 +00:00
drh
a69085cf5f Change page quantities in pcache1.c to unsigned.
FossilOrigin-Name: da52e6e8b490508bc1ee4700aa45a79f398363da
2012-01-02 18:00:55 +00:00
drh
2f32fbae31 Remove an incorrect assert() in btree.c.
FossilOrigin-Name: c1691d998a03fee3bef137ccf2e8ca45acac2df4
2012-01-02 16:38:57 +00:00
drh
5dc2bcda7e Make sure large negative arguments to PRAGMA cache_size do not cause
32-bit signed integer overflow.  Also correct a requirements mark.

FossilOrigin-Name: 17c30634a71051158f8d37fd51b3c2a125ad8bd2
2012-01-02 15:45:12 +00:00
dan
aa584af088 Have SQLITE_FCNTL_SYNC_OMITTED use the normal method of returning an error code.
FossilOrigin-Name: fd3822f1f2e6ea181f663e99bfe788d8404176ee
2012-01-02 14:50:12 +00:00
drh
7d39e17eef Fix the build so that it works when SQLITE_ENABLE_8_3_NAMES=1.
FossilOrigin-Name: d9761f15a175724c6c28a52335c979304737b188
2012-01-02 12:41:53 +00:00
drh
20e226d979 Tweaks to improve testability.
FossilOrigin-Name: e3a929e43180f41095cc2cd00c6b0781856a4474
2012-01-01 13:58:53 +00:00
drh
b8a45bbdb8 Fix typos in comments. No changes to code.
FossilOrigin-Name: 6827338ecbe43e28da88d919851ebffde9f6d398
2011-12-31 21:51:55 +00:00
dan
23a3de398e Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_OVERWRITE call in backup.c.
FossilOrigin-Name: 3e0833dbb736a1aca08d17941d6d33901b15a03b
2011-12-31 10:18:00 +00:00
dan
b3ce3d6d92 Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_SIZE_HINT call in pager.c.
FossilOrigin-Name: c17a3f5e5d72187c06b598ef071d43ef89328e19
2011-12-30 18:16:02 +00:00
drh
50cc5c2789 Fix a typo in the documentation for PCACHE2. No changes to code.
FossilOrigin-Name: 46e7903ab993b08251c87239bd4a7320e6781cee
2011-12-30 16:16:56 +00:00