Commit Graph

9825 Commits

Author SHA1 Message Date
mistachkin
287a48d67b When compiled for WinRT, avoid using MapViewOfFile and GetFileAttributes. Also, reset the private 'sleep' event handle when the VFS is cleaned up.
FossilOrigin-Name: 38df8fc1b49d55b61cb168a61134b4a314a62f21
2012-03-03 13:15:25 +00:00
mistachkin
62d1924fc5 When compiled for WinRT, avoid using the FORMAT_MESSAGE_ALLOCATE_BUFFER flag to FormatMessage (i.e. because LocalFree is unavailable).
FossilOrigin-Name: 9eb331be7e905d11d9075ce1596478b55a7f488b
2012-03-02 23:53:54 +00:00
mistachkin
2a5cfb31fd When running on Windows with an NT-based kernel, always use the LockFileEx/UnlockFileEx functions (with the correct flags).
FossilOrigin-Name: 3e7ba3ddb956056b8132ed383feed4f329c634e0
2012-03-02 22:38:49 +00:00
mistachkin
75b70a2087 Add new Win32 APIs used to the system call table. Add error handling code for SetFilePointerEx. Make sure the last error number is saved from the call to GetFileInformationByHandleEx.
FossilOrigin-Name: a782d2dc3cd4ef49ed46b361cdd331be846c3d50
2012-03-02 13:47:16 +00:00
drh
d52ee7298e Omit all ANSI APIs for winRT.
FossilOrigin-Name: cbf23b461f599d0b025c0f42dd3189cfa4e84bac
2012-03-02 00:00:47 +00:00
drh
24560d16e9 Use GetInformationByHandleEx() instead of GetFileSize() on winRT.
FossilOrigin-Name: 119f251de77aa88cf8ff9fcc72bfbecbe6b741e3
2012-03-01 22:44:56 +00:00
drh
ee3a77de45 Do not run the large file tests if a file named "skip-big-file" exists
in the test directory.  This enables tests to be run much faster on
systems that lack sparse file support.

FossilOrigin-Name: 5a83912352ad6626970efd72e70c433e3a219b6b
2012-03-01 22:33:41 +00:00
drh
8045df0a7d Use SetFilePointerEx() instead of SetFilePointer() on winRT.
FossilOrigin-Name: 36efafc618017b6448f222776d0143e5f98d1e65
2012-03-01 22:06:30 +00:00
drh
7acec68a6e Use WaitForSingleObjectEx() as a substitute for Sleep on winRT.
FossilOrigin-Name: bf897be0daa2f7e16f63b78849ffb76ce02d48f1
2012-03-01 21:19:39 +00:00
drh
cf3d7a4e13 Add recognition of the SQLITE_OS_WINRT compile-time option.
Use InitializeCriticalSectionEx() under winRT.

FossilOrigin-Name: 8b7ca8a09f7b69db1fe766616cba0307e681a6f3
2012-03-01 20:05:41 +00:00
drh
11de93360f Add back in some #includes that were removed incorrectly by the
previous check-in.

FossilOrigin-Name: 718905367ff3f86a449c2c27f724089ba31dea3a
2012-03-01 19:14:13 +00:00
drh
815aac8e0f Remove unused #defines from os.h.
FossilOrigin-Name: c0891296b49fb95917db8a881425f8131cbf6de7
2012-03-01 18:16:48 +00:00
dan
f602963dbc Fix spurious errors that may occur if an empty database is opened and then initialized as a WAL database by a second connection.
FossilOrigin-Name: 16330a2f7262173a32ae48a72c0ee2522b6dc554
2012-02-28 17:57:34 +00:00
dan
4aced72a59 Fix a case where an error code was being overwritten in multiplexDelete().
FossilOrigin-Name: c267893a0813beb1764071409025e178318e1ca3
2012-02-28 11:52:12 +00:00
drh
c611ee94bb Fix the xDelete implementation of the multiplexor VFS so that it correctly
deletes overflow WAL files.

FossilOrigin-Name: e44e26771e5aa48f3bfa14d6db3e669b5b2a1e73
2012-02-27 14:28:50 +00:00
drh
5fb96aaf74 Separate multiplexor overflow pages for -wal and -journal files into
separate namespaces when in 8+3 filename mode.

FossilOrigin-Name: d6850667ea61172ea0ebea4a22b6b306f74775fa
2012-02-24 16:13:55 +00:00
drh
1a3dd3d445 Fix the multiplexor so that it works with WAL mode and 8+3 filenames.
FossilOrigin-Name: a9fcb46bc08c29aebaf3bc999f45846c3c320f68
2012-02-24 15:57:13 +00:00
drh
70708600b5 Add #ifdef SQLITE_ENABLE_ZIPVFS around those bits of code that are only
used by ZIPVFS.

FossilOrigin-Name: 3130275c64a60c5cfacbd11123305e6d99ea866d
2012-02-24 14:33:28 +00:00
drh
8d93684874 If the SQLITE_FCNTL_PRAGMA file control returns something other than
SQLITE_NOTFOUND, then skip the rest of Pragma code generation.

FossilOrigin-Name: 9e6d340f557c2f2c8a07300ac60357af9906a7fa
2012-02-24 00:03:12 +00:00
drh
a40eb7cfee A simple change that allows the SQLITE_32BIT_ROWID compile-time option to
work better.

FossilOrigin-Name: f9df4063fbd100ce306a89fc649c1860fd801f31
2012-02-24 00:02:28 +00:00
drh
63296052a1 Fix an obscure bug that causes a crash when parsing certain invalid SQL
statements.

FossilOrigin-Name: c8c7846fb990199dcc0774a69e8257510bc36f2d
2012-02-23 17:35:28 +00:00
dan
bf24261b7b Fix a typo made inside an assert() statement in the previous commit.
FossilOrigin-Name: f0640615f25ebe8bf2eed0e1a0f2e309471889fe
2012-02-23 16:45:42 +00:00
dan
b3bdc72ded Add the sqlite3PagerWalFramesize() function to pager.c. This is used by zipvfs.
FossilOrigin-Name: 786e24dc56504d1958db0618e645610f2600a087
2012-02-23 15:35:49 +00:00
drh
49dc66df0f Expose the sqlite3_stricmp() interface. Add the SQLITE_FCNTL_PRAGMA file
control.

FossilOrigin-Name: c539cf21ef8f4eb4782790aa97a67d10ae9ffd64
2012-02-23 14:28:46 +00:00
drh
c8517f614d Move test logic for SQLITE_FCNTL_PRAGMA out of os_unix.c and into test_vfs.c.
FossilOrigin-Name: c81fc40b2b584820ac7d1c3848ebeb7225d4eeeb
2012-02-22 20:08:49 +00:00
drh
92c700dbb7 If the SQLITE_FCNTL_PRAGMA file-control returns anything other than
SQLTIE_NOTFOUND and SQLITE_OK, then treat the result as an error.

FossilOrigin-Name: 5643618108a8aafba67ed4004039b862bb5e5da8
2012-02-22 19:56:17 +00:00
drh
eb9a9696f6 Disable the "filename" pragma implemented by os_unix.c except when compiled
with SQLITE_TEST.

FossilOrigin-Name: 9a1da91850b6074e5f9d18382f517eb868cad63c
2012-02-22 19:03:19 +00:00
drh
e4d25e9cfb Make benign any malloc failures inside the sqlite3_file_control() call within
PRAGMA parsing.  Add a couple simple tests for SQLITE_FCNTL_PRAGMA.

FossilOrigin-Name: a1f29fa653b788f563967f55c3d20e64cbe3f549
2012-02-22 18:21:20 +00:00
drh
3fa9730273 Change the SQLITE_FCNTL_PRAGMA file-control so that it can return a string
value.

FossilOrigin-Name: fd8d7440277b17f57a6dc0a210f42adf1fa2dcd2
2012-02-22 16:58:36 +00:00
drh
06fd5d63a4 Begin adding support for SQLITE_FCNTL_PRAGMA.
FossilOrigin-Name: 5be07904baf6e5b8b99ca6f4bb6ddec973e59cd4
2012-02-22 14:45:19 +00:00
drh
cebeee5dcb Avoid redefining NDEBUG if the fuzzer is included in an amalagmated source file.
FossilOrigin-Name: f8ac826f95ae6b7b981e4765d2e65b6839d0eff9
2012-02-21 18:35:42 +00:00
dan
99c7d468a7 Prevent the fuzzer from ever returning a string longer than 100 bytes.
FossilOrigin-Name: 969095ca3067d60f4d3a0a4ad419541cb8b146db
2012-02-21 18:00:20 +00:00
dan
4965ebceb7 Further fuzzer test cases. Fix a case in the fuzzer where an error code was being dropped.
FossilOrigin-Name: 8b77d3953f082e6fa42e42fe903ea9eddf99dd91
2012-02-21 14:11:12 +00:00
dan
766348febe Add further test cases and minor fixes for the fuzzer.
FossilOrigin-Name: 583dde93a9176ba4fff85241bafbbe4e5a6cc95f
2012-02-21 10:36:27 +00:00
drh
5577671da3 Updates to the instructions in the header comment of the fuzzer implementation.
New test cases for the fuzzer.

FossilOrigin-Name: bf1dc7907cf1a5c7e19b04fa1278b2089316c30a
2012-02-20 22:44:12 +00:00
dan
a8ab692fa2 Change the way the fuzzer (test_fuzzer.c) works so that it loads its configuration from a database table.
FossilOrigin-Name: 90b7b957f8933047fd2878048dfa3ec4891988b8
2012-02-20 20:03:48 +00:00
dan
75f8f75f1e Fix a case in test_fuzzer.c causing transformations from the wrong ruleset to be applied in some cases.
FossilOrigin-Name: cb5f5ebc563b8d3e47bc30b6dbb374bb91efd3ef
2012-02-20 19:36:09 +00:00
drh
6e5c5f4124 Increase the maximum ruleset id in the fuzzer from 50 to 2^31-1.
FossilOrigin-Name: 760e009adc6d0fffb8e6f64c7ec283938a417a77
2012-02-14 18:56:01 +00:00
drh
5beafd6ab7 Enhance the fuzzer virtual table to support multiple rule sets.
FossilOrigin-Name: a82938731b21d6166d7d482994cb065c8b725083
2012-02-14 15:34:50 +00:00
drh
99b18401ab Merge the non-blocking ROLLBACK changes into trunk.
FossilOrigin-Name: 9c572d424a20b0585bfac358a5d1ee5276dd05ba
2012-02-13 21:24:03 +00:00
drh
ef595984ec Fix a harmless compiler warning introduced by the previous check-in.
FossilOrigin-Name: a8a042a751557d06bf04455ed7629cb29adcd87f
2012-02-13 20:28:15 +00:00
drh
8c815d14f8 On unix, ignore the umask when creating journal files. That way, journal files
will have exactly the same permissions as the original database and any
process that has permission to write to the database can also recover
hot journals.

FossilOrigin-Name: 84b324606adc8437338c086404eb157f30f04130
2012-02-13 20:16:37 +00:00
drh
21021a5cbf Add the new SQLITE_ABORT_ROLLBACK extended error code to be returned for
statements that are cancelled due to a rollback.

FossilOrigin-Name: 549f4fd00d8325c10099b100e5202b77ee1d83ad
2012-02-13 17:01:51 +00:00
drh
0f198a7409 Change the ROLLBACK command so that pending statements to not block it. The
pending statements instead return SQLITE_ABORT upon next access.  Note: This
causes separate shared-cache connections in read_uncommitted mode to abort as
well.

FossilOrigin-Name: 9b66c79e054c8a109d1ee8d35fed1c42814c330d
2012-02-13 16:43:16 +00:00
dan
2f56da3f26 Changes to various test scripts so that veryquick.test runs with OMIT_COMPOUND_SELECT defined.
FossilOrigin-Name: 76bb649ee2633226324130f5898622c348f93769
2012-02-13 10:00:35 +00:00
dan
d3eaebd414 Fix a typo in the type of the fchown() function in os_unix.c.
FossilOrigin-Name: bfbfe05b81919ecc3d6e7be4c24994f795f16582
2012-02-13 08:50:23 +00:00
drh
23c4b97329 Make fchown() an overrideable system call in os_unix.c.
FossilOrigin-Name: 98efac9630ca96ba0497c8e206dc5022612ff381
2012-02-11 23:55:15 +00:00
mistachkin
b482a4462c Cleanup some directories and files left by the MinGW build, even when using the MSVC Makefile.
FossilOrigin-Name: 3ab89e255d1f2f8004d3256515ac43f74e57f39b
2012-02-11 22:19:26 +00:00
mistachkin
a844f5134e Revise the preprocessor directives used to handle malloc.h and _msize, in order to detect and handle the MSVC special-case automatically.
FossilOrigin-Name: 90e73dc3682680847238e625d415b27fa9c59ba8
2012-02-11 21:56:59 +00:00
drh
3ee3484c4a Silence GCC compiler warnings about unused return value from fchown().
FossilOrigin-Name: b022547389a40930cf0d2a75f5eb293acc9fbfe0
2012-02-11 21:21:17 +00:00