Commit Graph

8870 Commits

Author SHA1 Message Date
dan
e433235ec2 Change analyze7.test so that it works without SQLITE_ENABLE_STAT2 defined.
FossilOrigin-Name: 9415201c8a0b9b640f5997c5348c5df812e88230
2011-04-01 17:53:19 +00:00
dan
f18749542f When simulating an error in the close() system call, close the file descriptor anyway. Otherwise long running tests leak too many file-descriptors and crash.
FossilOrigin-Name: 81ddbf43366c18ebdd46558d6a0fbee2ce6a4c4e
2011-04-01 16:50:07 +00:00
dan
be53500356 Ensure that it is not possible to add a column to a system table using ALTER TABLE.
FossilOrigin-Name: d9707ef8dcd29667b6d366897f6ad02c87aa0041
2011-04-01 15:15:58 +00:00
drh
295867bd55 Merge the ANALYZE-index enhancement into trunk.
FossilOrigin-Name: 7e237aea22084416d02b89d5223de4e1ca76882d
2011-04-01 14:26:14 +00:00
drh
be28a9b072 Test cases for ANALYZE-index.
FossilOrigin-Name: 365896cb0868fa476e3b4f5a965a1344a2914cc2
2011-04-01 14:04:36 +00:00
drh
026663d305 Move a variable declaration inside an #ifdef to avoid a compiler warning.
FossilOrigin-Name: 7a6d05dfbc36310683dd51a280e9283cef4f9056
2011-04-01 13:29:29 +00:00
dan
ea83bc614e In os_unix.c, do not return SQLITE_BUSY to SQLite following an error in fcntl(F_UNLCK), regardless of the value of errno.
FossilOrigin-Name: ff6dfe6ed74f9ff1669b2bda41d61a01cd0a1bc6
2011-04-01 11:56:32 +00:00
dan
211fb08433 Fix some problems in os_unix.c when compiled with ENABLE_LOCKING_STYLE on OSX. Also some minor issues with test scripts.
FossilOrigin-Name: 8088031bc949bd4efb5edf33bbd1bce5700fca56
2011-04-01 09:04:36 +00:00
drh
ce62d93837 Fix two compiler errors associated with non-standard compile-time options.
FossilOrigin-Name: e3bf2d5ce4f87535e030a446e03d911f421805f7
2011-04-01 02:26:36 +00:00
drh
76a32a81e4 Fix a compiler warning and an unreachable branch. Restore 100% branch test
coverage.

FossilOrigin-Name: 4dc148bb4cec5ecba167cdcb4959a4f0fa05a96f
2011-04-01 01:38:02 +00:00
drh
a071bc5dba Change the ANALYZE command so that it will accept an index name as its
argument and only reanalyze that one index.  A quick smoke-test works.
Need to study the implications to the query planner and test corner cases.

FossilOrigin-Name: c8f9edd962442cbdd848c48f1a134557ab8c6ef5
2011-03-31 02:03:28 +00:00
dan
661d71af8c Further tests for os_unix.c.
FossilOrigin-Name: a84f7711949ea3885b0e36e48118d2c76a8a5b82
2011-03-30 19:08:03 +00:00
drh
f6cf1ffb39 Do not generate sqlite_stat1 entries for empty tables when running
ANALYZE.  Ticket [83ea97620bd31016451]

FossilOrigin-Name: 3a27af5b3c688c651ba1fae261026ef77b7ff5e3
2011-03-30 14:54:05 +00:00
dan
5ef47bf002 Add tests to syscall.test and sysfault.test.
FossilOrigin-Name: 3d2de011814002e2e25b7645f94ff8fc7aab9cdd
2011-03-29 18:28:35 +00:00
dan
60939d0ade Fix a problem whereby following an IO error in CommitPhaseTwo() of a multi-file transaction the b-tree layer could be left in TRANS_WRITE state, causing problems later on.
FossilOrigin-Name: dbe569a099c2855480e35c0cc4d9332821ad80da
2011-03-29 15:40:55 +00:00
dan
0fd7d86081 Fix a problem in the unix VFS implementation of xNextSystemCall(). Also some typos that prevent compilation when HAVE_POSIX_FALLOCATE is defined.
FossilOrigin-Name: bc6cce81565b17f886478bd51500bba2ed11ec1d
2011-03-29 10:04:23 +00:00
drh
278479c1a5 Fix the documentation for the sqlite3_column_*_name() functions to describe
that the information can be invalidated when a prepared statement is 
reprepared by the first invocation of an sqlite3_step() for a particular
execution cycle.

FossilOrigin-Name: 7270f80ac5dd17b979f1f790b2dfcf811866c1dc
2011-03-29 01:47:22 +00:00
dan
213ca0a8cf Add test infrastructure (and some tests) to inject faults into os_unix.c using the new xSetSystemCall interface.
FossilOrigin-Name: 0e1d20dfaeea5ab285d16aa4b8f02b61b1d2bc10
2011-03-28 19:10:06 +00:00
shaneh
dba2cc43c4 Minor change to sqlite3Utf8Read() to make consistent with READ_UTF8() usage and avoid implementation defined usages of <<.
Added some additional UTF-8 test cases.

FossilOrigin-Name: 7173b3929fae4e678223b0e978a2da7fa50a9005
2011-03-24 17:43:18 +00:00
shaneh
d71245c2ad Fix problem with tableapi.test on Windows.
FossilOrigin-Name: 69fe0c873d702ef1d781453ee6ac2b1fb77fce48
2011-03-24 17:37:24 +00:00
drh
22645842a4 The changes to fix [f7b4edece25c9948] mean that the schema is always loaded
whenever a prepared statement is running.  This means that a couple of
branches can be eliminated and one operand of OP_ParseSchema can be removed.

FossilOrigin-Name: b6e268fce12829f058f1dfa223731ec8479493f8
2011-03-24 01:34:03 +00:00
drh
d7b302bf64 Fix a signed/unsigned comparison compiler warning.
FossilOrigin-Name: c81da6f98d89935442c447a51736e11baf5a7bc1
2011-03-23 22:54:59 +00:00
drh
943bf0187c Update the test_vfstrace.c shim to conform to the new VFS interface for
xSetSystemCall and xGetSystemCall.

FossilOrigin-Name: ad4dc7b95f94fc9a5430c1305fb61d9de79b3365
2011-03-23 22:51:46 +00:00
drh
58ad580ffa Change the xSetSyscall methods of the VFS so that they do not cast object
pointers into function pointers.  Fix other unrelated compiler warnings.

FossilOrigin-Name: e059152adce3a8fb693f082b82b5669a238c8d6f
2011-03-23 22:02:23 +00:00
drh
01c7dc887c Increase the upper bound on SQLITE_MAX_ATTACHED from 30 to 62.
FossilOrigin-Name: 7aaf8772274422f5020fad9eea490e195170720f
2011-03-23 18:22:34 +00:00
dan
0370493760 Fix a bug in fts4 to do with matchinfo and deferred tokens.
FossilOrigin-Name: 30d42dc66f19ef5cc5b27d6273eadf56619a3ce8
2011-03-23 17:10:43 +00:00
drh
c8ba212665 In the shell, make sure the ".log" command has at least one argument.
FossilOrigin-Name: 1ed5e361ca7bfa9226fec265704394e0f228f0c5
2011-03-23 11:16:22 +00:00
dan
fb1f98a1ac Fix a numbering issue in rtree6.test. Add a couple of extra tests.
FossilOrigin-Name: 0b7668a71ef8995ea0306c7d890f87761961426e
2011-03-23 10:52:23 +00:00
dan
8ad5c9492d Change the rtree module to support queries with multiple comparison operators (i.e. > or <) of the same type on a single column.
FossilOrigin-Name: 387b55aa9bb0f978641f9c2fa40f84fd98662047
2011-03-23 10:38:49 +00:00
drh
e83cafd2f0 Add the ability to enable and disable foreign key constraints and triggers
using calls to sqlite3_db_config().

FossilOrigin-Name: 09e167f9c14625924b17bbb1f292f89ac9ddc93a
2011-03-21 17:15:58 +00:00
drh
8ce0261d09 Add a test case to verify that ticket [f7b4edece25c994857] is fixed.
FossilOrigin-Name: eedbcf0a0ba91bb8b9cd3d115081ba297e9959fe
2011-03-19 02:04:02 +00:00
drh
c2a75551ef Add a generation counter to the Schema object and enhance OP_VerifySchema
to also check the Schema generation.  Fix for
ticket [f7b4edece25c99].

FossilOrigin-Name: 36c04dd1695f0899b53ce58738181b146fc005ed
2011-03-18 21:55:46 +00:00
drh
d416fe7995 Update the implementation of ".testctrl" in the command-line shell to use
a look-up table rather than a long sequence of if-elses.  Shorten source
code lines of shell.c to 80 characters or less.

FossilOrigin-Name: 54bacb95dd6e2d6ac4971391a40484ccb9126d29
2011-03-17 16:45:50 +00:00
drh
ac8eb11375 Comment enhancement to better explain the logic in the "x IS NULL"
optimization.

FossilOrigin-Name: 869f894798a65f8bc0e0b083866a784fa0189f68
2011-03-17 01:58:21 +00:00
drh
1f9c7663ce Enhances to the query planner such that "x IS NULL" constraints take the
STAT2 statistics into account, just like "x=VALUE" constraints.

FossilOrigin-Name: 2353176811f752a16c1f2351a3d3431919b062a9
2011-03-17 01:34:26 +00:00
drh
2f8ebdde3e Additional interpretation of flags and constants in the VFS trace output.
FossilOrigin-Name: 3e984195f1f6d28734456dd726d226cedf207da2
2011-03-16 18:54:23 +00:00
drh
2b625e243e Add the -vfstrace option to the usage error message in the shell.
FossilOrigin-Name: baca45c549e1c144257ee657258939640120e094
2011-03-16 17:05:28 +00:00
drh
97ae8ffb7a Add the VFS-trace shim.
FossilOrigin-Name: f49a9ef3387bd4453f5654ebe83fea445c03cf4d
2011-03-16 16:56:29 +00:00
drh
7719711b81 Make the "unix-excl" VFS work exactly like "unix" if the database
file is read-only.

FossilOrigin-Name: d9846834993079fb2e42d6bd2644b2154ef324d1
2011-03-15 19:08:48 +00:00
drh
77ec9ba3f8 Fix an out-of-order variable declaration in shell.c.
FossilOrigin-Name: 725708465072fc63736e99610cc9cb0ac336145a
2011-03-15 18:35:44 +00:00
shaneh
9d677e1599 Fix cut-and-paste typo in debugging print statement in winMutexTry().
FossilOrigin-Name: def98fd23e42bda13547e38ab13fed0e6554ce99
2011-03-15 02:55:28 +00:00
drh
0d8abc84fa Merge the unix-excl VFS into the trunk. This merge also adds the -vfs
option to the command-line shell.

FossilOrigin-Name: 3934b004e93852c89b937ec20431de96a2e99440
2011-03-14 13:54:01 +00:00
drh
3cb9339a6c In the "unix-excl" VFS, use the heap for shared memory, since only a single
process is able to read or write the database.

FossilOrigin-Name: a05a6d40875df674f9c2b46e33128c6878d4edaa
2011-03-12 18:10:44 +00:00
drh
a7e61d8b24 Add the new optional "unix-excl" VFS. This VFS grabs an exclusive lock on
the database preventing other processes from accessing it, but continues to
allow other database connections from the same process.

FossilOrigin-Name: 00051c3296e11211b2bb5ae28f016b17dca857d7
2011-03-12 17:02:57 +00:00
shaneh
11c58f7d8e More tests for SQLITE_OMIT_UNIQUE_ENFORCEMENT and minor change to implementation.
FossilOrigin-Name: b86999436ec2414c990ba720441fe316f647eef6
2011-03-12 04:58:55 +00:00
drh
ca6b9d5bbe Remove an unused field from the unix sqlite3_file object.
FossilOrigin-Name: f957f23a8a392bb1720720960bda2c7b24de9663
2011-03-11 16:15:48 +00:00
shaneh
fbf34bf794 Simplification of tests and more added for SQLITE_OMIT_UNIQUE_ENFORCEMENT tests.
FossilOrigin-Name: 75a38411a89bd2969ec5cecca13c13a390b3d478
2011-03-10 21:48:02 +00:00
shaneh
e08160bdc1 Skip unique constraint enforcement if compiled with SQLITE_OMIT_UNIQUE_ENFORCEMENT.
FossilOrigin-Name: ba85bf8cb88f7ae220d919f5c23f51d9dcedc843
2011-03-10 21:13:18 +00:00
shaneh
9324794e1e Minor clean-up of previous mem5 allocator fix.
FossilOrigin-Name: 3643842316239ff7859f0ec522736a2b9c03d22c
2011-03-10 03:54:55 +00:00
shaneh
a6ec892b5b Fix issue with mem5 allocator when min request size is larger thatn 2^30.
FossilOrigin-Name: d7dae06fb2d57ed6b9555b774712f42077ae4155
2011-03-09 21:36:17 +00:00