Commit Graph

2421 Commits

Author SHA1 Message Date
danielk1977 7aad2983c9 Update shared_err.test to work with (5668) (return SQLITE_CORRUPT if rollback fails). (CVS 5748)
FossilOrigin-Name: 292acaf7c4e68b532cc8d1763e02aa79d90ea20c
2008-09-29 14:12:56 +00:00
danielk1977 71d5d2cd49 Instead of storing a pointer to the parent page in the MemPage structure, have each B-Tree cursor keep track of the ancestry of the current page. (CVS 5747)
FossilOrigin-Name: 40425e93421286cca1965d7a5769084526210c7a
2008-09-29 11:49:47 +00:00
drh 04335886a1 Add the "truncate" journal mode which commits transactions by truncating the
rollback journal file to zero length and not calling fsync(). (CVS 5745)

FossilOrigin-Name: 7c561f2e9264de676c1028943f6c3d06542fd802
2008-09-26 21:08:08 +00:00
danielk1977 e5dd389698 On windows, avoid running those tests in exclusive.test that require the journal file to be externally accessed while SQLite is holding it open. This doesn't work on windows. (CVS 5742)
FossilOrigin-Name: 5debf12fa46520946ac5da44c03448fffbc9940c
2008-09-24 14:03:43 +00:00
danielk1977 0afae93fa4 Fix some function declarations (change "int foo()" to "int foo(void)"). Ticket #3399. (CVS 5740)
FossilOrigin-Name: 0fb98c35353d8c0a8d669bbe45fe84e3a5060621
2008-09-24 09:12:46 +00:00
danielk1977 98c21903bd Always transform error code SQLITE_IOERR_NOMEM to SQLITE_NOMEM before returning. This was already happening in most places. (CVS 5738)
FossilOrigin-Name: 046ef07261d520c9399bd8cdfdfd5281956b7a27
2008-09-23 16:41:29 +00:00
danielk1977 77eb5bb6f7 Fix a memory leak that can follow a malloc failure in sqlite3_initialize. (CVS 5731)
FossilOrigin-Name: 118dc0ba082dd9abba5602dafc86bd56e756db86
2008-09-22 17:22:19 +00:00
drh 695ba06f23 Do not run the async tests if the async module is not installed. (CVS 5722)
FossilOrigin-Name: 4de71a4e2f59d302156e10efcb288efa23e18598
2008-09-18 18:18:29 +00:00
danielk1977 b11bcfde08 Changes to test script nan.test to work on symbian. (CVS 5718)
FossilOrigin-Name: 0889b22a2949160c3f2d06beaa05a867b4c228b3
2008-09-18 11:30:12 +00:00
danielk1977 3e37f5df5b Changes to test script io.test to work on symbian. (CVS 5717)
FossilOrigin-Name: 2b41c4959da2ef5a882a658e85ee34d07d31f379
2008-09-18 11:18:41 +00:00
danielk1977 89bae3ed7a Changes to test scripts to support running on symbian. (CVS 5714)
FossilOrigin-Name: 6ef34e9d3118965781c69011deaede1ebbb19b12
2008-09-17 16:14:10 +00:00
drh d176611b44 Fix for tickets #3378 and #3381 that preserves the aliasing optimization.
And yet, this fix feels uncomfortable.  Seeking an alternative... (CVS 5712)

FossilOrigin-Name: f8b759f1977915c314be874840ebf18e6bc69b57
2008-09-17 00:13:12 +00:00
drh f44ed02790 Add test cases for ticket #3378 and #3381. Add a temporary hack to get those
to problems fixed.  The hack causes failures in alias.test, but those are much
less serious than the aforementioned tickets.  This is a stop-gap until we can
figure out a proper fix. (CVS 5711)

FossilOrigin-Name: a67da9dd2ff6acc163de4ce2b836b03e3f159a88
2008-09-16 18:02:47 +00:00
danielk1977 181ddaa184 Use (file nativename (pwd)) instead of just (pwd) to find the name of the current directory to pass to "PRAGMA temp_store_directory" in pragma.test. This helps the test pass on non-unix systems. (CVS 5709)
FossilOrigin-Name: 50feaa3707f4f61202bc855802ab2e405365d801
2008-09-16 15:50:11 +00:00
drh ec8d24279b Add test script selectC.test which demonstrates ticket #3381. (CVS 5708)
FossilOrigin-Name: 3847faff55d4bd7574785c3b18d5c95e687c7598
2008-09-16 15:09:53 +00:00
danielk1977 fab1127bd1 If the xAccess() call used by "PRAGMA temp_store_directory = /new/path/" to determine if the supplied directory is writable returns an error, assume the directory is not writable. (CVS 5707)
FossilOrigin-Name: e8418588f2c23487cefda702849d4546202fd8ec
2008-09-16 14:38:02 +00:00
drh 5a70d286f5 Add test case for ticket #3376. (CVS 5705)
FossilOrigin-Name: c64260579d353df3eae8c355b082b8206bc6185b
2008-09-16 11:58:20 +00:00
drh b5774cfa8f Adjust the page recycling algorithm so that the number of pages allocated
to each connection does not exceed its cache_size limit. (CVS 5701)

FossilOrigin-Name: 3bc221b940565133ae8d95f59b3b120e57df0124
2008-09-15 15:36:57 +00:00
danielk1977 4ff6202642 Fix the async.test test script so that it invokes (finish_test) even if the asynchronous backend is not included in the build (and no tests are run). (CVS 5700)
FossilOrigin-Name: 5c954b40ecb71203b1013c23cdac54ff83484b0a
2008-09-15 14:47:21 +00:00
danielk1977 78a906552d Fix the shared_err.test script so that it works if the device supports SQLITE_IOCAP_SAFEAPPEND. (CVS 5699)
FossilOrigin-Name: 38e5ea070a38fe1656e0f5c3024f28ce67eae725
2008-09-15 14:42:38 +00:00
drh f018cc2ef0 Fix issues with bizarrely quoted column names. Tickets #3370, #3371,
and #3372. (CVS 5696)

FossilOrigin-Name: ced6bbd228b4a324ddb9c5ff15fd027811c8806a
2008-09-13 01:20:14 +00:00
drh 8578611b95 Fix the NEAR connector in FTS3 so that it can take ranges in excess of 9.
The maximum range is now 32767. (CVS 5695)

FossilOrigin-Name: 8e9b9553115c42dae38cad0612d98d9a0c453a5c
2008-09-12 18:25:30 +00:00
danielk1977 755339ec0f Add a case to permutations.test to run tests with the IOCAP_SAFEAPPEND property set. (CVS 5693)
FossilOrigin-Name: 80bdaafa77ec5c967f633eaaf5ee6f493a6e5a56
2008-09-12 10:22:40 +00:00
danielk1977 540cf6a192 Add a couple of (fconfigure) commands to configure the incremental blob channels used by test file incrblob.test. This is required so that the tests work on windows and other platforms that have a default -translation mode other than 'lf'. (CVS 5692)
FossilOrigin-Name: 753caa20ca50bc42d747d934ccc61438790e7f32
2008-09-11 11:27:59 +00:00
danielk1977 67fd7a9a98 Fix some trivial cases where database corruption was causing an error code other than SQLITE_CORRUPT to be returned. (CVS 5690)
FossilOrigin-Name: 89fda074f6b4959c32f1083badba3c73cffb4995
2008-09-10 17:53:35 +00:00
danielk1977 9f580ad886 Fix for handling database files corrupted in such a was as to make a b-tree page a direct or indirect descendant of itself. (CVS 5689)
FossilOrigin-Name: 93545861a70c190d67b0d1effdd8fe038d28811c
2008-09-10 14:45:57 +00:00
danielk1977 38816ecf99 Avoid deleting a file while it is still open in corrupt2.test. Not all platforms support this. (CVS 5687)
FossilOrigin-Name: 099adfd31167a78d803e2992e5f50cf4e292dd43
2008-09-10 11:28:37 +00:00
danielk1977 f8b10a855e Fix some test script details so that the test suite runs with an SQLITE_DEFAULT_AUTOVACUUM=2 build. (CVS 5686)
FossilOrigin-Name: 300a64b725a111ee66e38de099314f03b064c6eb
2008-09-10 10:57:27 +00:00
danielk1977 f2fb044bca Add fuzz3.test. For testing the library's response to corrupted database files. (CVS 5685)
FossilOrigin-Name: 7fd4dd95791974b0ef6cf30a186b32df25ee2211
2008-09-09 18:28:06 +00:00
drh e3602be8fd Calling sqlite3_create_function with nArg==(-1) does not override prior
calls on the same function name with nArg>=0.  Ticket #3345.  Add the
new -argcount option to the "function" method in the TCL interface. (CVS 5684)

FossilOrigin-Name: 5aa5b8044a14f59559c1839dc0799b0d2f990809
2008-09-09 12:31:33 +00:00
danielk1977 ff9b2e75b4 If the 'rootpage' column of the sqlite_master table contains a NULL value, return SQLITE_CORRUPT to the caller. (CVS 5681)
FossilOrigin-Name: a7b7b126e9e9b0cd2d68643d8dff321cf41ce2ee
2008-09-08 09:06:18 +00:00
danielk1977 fdd8e5bab8 Deallocate a temp register allocated by codeEqualityTerm() in where.c. If it is not deallocated, its value may be reused by the column-cache mechanism. However, by the time it is used, the value may have been clobbered by a sub-routine that also uses the same temp register. Fix for #3357. (CVS 5679)
FossilOrigin-Name: 7c0f638ef3d7ff9156f07d6fb01448453ffcf5ac
2008-09-06 14:19:11 +00:00
danielk1977 f7cbfae96a Change pcache.test so that it works if sqlite is configured to create auto-vacuum databases by default. (CVS 5678)
FossilOrigin-Name: 55e677569ec131c388841f6f453291f737738076
2008-09-05 05:29:08 +00:00
danielk1977 518002e4ba Fix a problem in btree.c preventing an OOM error from being propagated up to the caller. (CVS 5677)
FossilOrigin-Name: 0b8ee83f2ebadab099ccd6490f6995949dafdd6f
2008-09-05 05:02:46 +00:00
drh cc91e7f83e Make the default threading mode multithread (-nomutex) in the TCL interface. (CVS 5670)
FossilOrigin-Name: d9e826942673ad048d611c014bfbee39ab5535c8
2008-09-03 01:08:00 +00:00
drh 039963ad33 Add support for SQLITE_OPEN_FULLMUTEX. (CVS 5669)
FossilOrigin-Name: f2f361a5e2fb81fb0f99e83ecf8bae9a750723b1
2008-09-03 00:43:15 +00:00
drh 78f82d1e6c Continuing work on adding full support for the SQLITE_OMIT_WSD
compile-time option. (CVS 5658)

FossilOrigin-Name: ef26ea5c46d3915d206f8ff7f82a24f4c8955f1f
2008-09-02 00:52:52 +00:00
drh 588a9a1a1c Defer deleting Table objects associated with flattened subqueries until
all code has been generated, in case some expression node still references
the Table object.  Ticket #3346. (CVS 5650)

FossilOrigin-Name: d04d70336727a0db959c672e6c22cdaa0505dce5
2008-09-01 15:52:10 +00:00
drh 5393b651c6 Run permutation subtests in sorted order. (CVS 5646)
FossilOrigin-Name: 4cd1bdf3ce8077e10dcd8ae4fe2df0dd9bb0f56b
2008-08-30 16:07:03 +00:00
danielk1977 c1def3e0af Add some code to permutations.test to make sure no test file modifies the shared-cache setting. (CVS 5645)
FossilOrigin-Name: 8565b7c66525dc7808a2a266deb1a0d995c99917
2008-08-30 13:25:10 +00:00
danielk1977 3dbb0572d7 Make sure thread003.test waits for all spawned threads to finish before continuing. (CVS 5644)
FossilOrigin-Name: 87c7e82f54cd446721d553d5c48ca2571b063669
2008-08-30 09:10:16 +00:00
danielk1977 7a1d17f1d7 Modify tclsqlite.test so that it works reliably with tcl 8.5.4. (CVS 5640)
FossilOrigin-Name: 790d329f5d18d361a5d6d34f46c269f8b4057cd9
2008-08-29 15:54:56 +00:00
danielk1977 34c61e68ad In permutations.test, disable tests that depend on soft-heap-limit functionality when running the memsubsys2 variant. It disables the soft-heap-limit. (CVS 5639)
FossilOrigin-Name: 047c7bdb9f37462c462071334f1cb9d3400917db
2008-08-29 12:00:20 +00:00
danielk1977 062d4cb0ae If a page is made eligible for recycling when more than the configured maximum number of pages are allocated, free it immediately instead of adding it to the LRU list. (CVS 5638)
FossilOrigin-Name: 4b12922dcb4547bf3a7276d0542b2e1d12ad338d
2008-08-29 09:10:02 +00:00
drh 8b213899e8 Avoid reevaluating WHERE and ORDER BY expressions that alias terms in the
result set.  Ticket #3343.  Note that aliased GROUP BY expressions are still
evaluated twice. (CVS 5637)

FossilOrigin-Name: ab0292caa5887cc1bdc0e8c9d3f3502b83975440
2008-08-29 02:14:02 +00:00
danielk1977 3fb120cb9d Fix ioerr5.test so that it works with the new pcache module. (CVS 5636)
FossilOrigin-Name: 83e6a75e7d70b4b01f0892924d7a8a49d5ef6bf2
2008-08-28 18:35:34 +00:00
drh 570f5c7d70 Partial fix for a bug in recovery from xStress failures in pcache. (CVS 5635)
FossilOrigin-Name: 44193b92770062271711570d8532fa5af5f5da54
2008-08-28 17:46:18 +00:00
danielk1977 81fa193a66 Avoid using (clock seconds) in thread003.test. It is not available if testfixture is linked to tcl 8.5. (CVS 5634)
FossilOrigin-Name: b606263d0868aed267bcec623b9fe4d142099145
2008-08-28 13:55:10 +00:00
danielk1977 f599a1994c Enable the disabled asserts added by (5629). Add extra tests to thread003.test. And the required modifications to pcache.c. (CVS 5631)
FossilOrigin-Name: 473c09fac22ed2f56ea86150a60b9f0f2263c889
2008-08-28 10:21:16 +00:00
danielk1977 51d2d03636 Fix a threads/mutex problem in pcache.c. (CVS 5630)
FossilOrigin-Name: 1928f15b78eee0fbf0a8ecdbbdd38dbbde2942b8
2008-08-28 08:31:48 +00:00
danielk1977 59633aeec2 If any error occurs during sqlite3_open(), move the database handle into "sick" state. When in the sick state the user can use sqlite3_errcode() and sqlite3_errmsg(), but not much else. (CVS 5628)
FossilOrigin-Name: ce9c74eaab459ddde213c828e821940f5d6cb354
2008-08-27 19:01:57 +00:00
drh 255538e947 Add the trans2.test script designed to stress statement rollback and
no-write optimizations on large transactions with a small cache. (CVS 5627)

FossilOrigin-Name: 39c34e2238c27b2a2f4f0b896126ccbd299114c5
2008-08-27 18:56:36 +00:00
danielk1977 468c82bc50 Modifications to malloc5.test to account for the fact that sqlite3_release_memory() no longer reclaims dirty pages. (CVS 5625)
FossilOrigin-Name: b01c65b065c62e3dd71e88866a953668b5e2f25f
2008-08-27 16:38:56 +00:00
drh 8af6906348 Clear the $result variable prior to using it in corrupt2.test. (CVS 5624)
FossilOrigin-Name: 12f2d24f88e55d170dd7750e7904ff14e84e820e
2008-08-27 16:14:20 +00:00
drh 426c854102 Fix an issue with the permutation test script. (CVS 5619)
FossilOrigin-Name: 2e12aa3e078c0da9e418ff1f25a08f05cd03c07d
2008-08-26 23:08:04 +00:00
drh 7426f864ae All the page_size pragma to change the page size on a new :memory: database,
but not a vacuumed :memory: database.  Ticket #3335 (CVS 5617)

FossilOrigin-Name: 226a9056783247679fcf442e10807a1f2707f463
2008-08-26 21:07:26 +00:00
danielk1977 d491e1bfd1 Simplify the pcache module by only recycling clean pages from 'other' caches. This commit causes errors in test files ioerr5.test and malloc5.test because they test recycling dirty pages from other caches. (CVS 5615)
FossilOrigin-Name: 9e511e161bcb077450d31fca5dd20c2557f103b3
2008-08-26 18:05:48 +00:00
drh 229cf702f0 Do not flatten subqueries where the subquery has a LIMIT and the outer
query has a WHERE clause.  Ticket #3334. (CVS 5613)

FossilOrigin-Name: 4995a1d1c9530be9ce647d338169620cd95a72eb
2008-08-26 12:56:14 +00:00
drh df81a25abe Fix obscure permutation test problems. (CVS 5611)
FossilOrigin-Name: aa92a1bec3d6bbcc59680ba13fed51ada9249d4c
2008-08-25 19:09:01 +00:00
drh 0a846f96ef Fix bug in the premutation testing that was causing many permutations from
begin skipped.  There are now 16 errors reported by the permutation test. (CVS 5610)

FossilOrigin-Name: 4ad096bda1fc5c7b66f71ff5b32a4085c9a40574
2008-08-25 17:23:29 +00:00
drh f436620e3f Additional coverage testing in the new name resolver module. (CVS 5608)
FossilOrigin-Name: 0d61960afd35721d6d07acd75288c20d2cd6fda1
2008-08-25 12:14:08 +00:00
danielk1977 8c20014a0a If the sector size is greater than the database page size, SQLite journals all pages that lie within a sector before writing to any of them. This change ensure that a journal sync does not occur halfway through journalling the set of pages that belong to a single sector. (CVS 5605)
FossilOrigin-Name: 16f612d61e00938f29ecae4ebfe598be7a8709a8
2008-08-25 07:12:28 +00:00
danielk1977 06249db141 Do not incorrectly detect corruption when an auto-vacuum database is converted to a non-auto-vacuum database within a vacuum. Ticket #3332. (CVS 5603)
FossilOrigin-Name: cb869946d68f2abbd1322fababbe4aa74a4e08aa
2008-08-23 16:17:55 +00:00
drh 9d8b3072ce Enhanced test coverage. (CVS 5598)
FossilOrigin-Name: cc36b4e016a1f519ca81d591de3a551ee8aa6813
2008-08-22 16:29:51 +00:00
danielk1977 a858aa2e8c When recycling a page, try to find one that does not require a call to xSync() on the journal file. Also simplify some of the mutex related things in pcache. (CVS 5597)
FossilOrigin-Name: 93dbc5427bebaa0b3d726731027caad3f70611c7
2008-08-22 16:22:17 +00:00
pweilbacher e7c8a5c75d fix some tests to take the right branch on OS/2 (hope I got the Tcl syntax right) (CVS 5593)
FossilOrigin-Name: 10e62d4700c99faf07140a8204d3cd81481206ac
2008-08-22 13:57:39 +00:00
drh f388dc19e6 Add test case to verify that Ticket #3301 was fixed by (5569) (CVS 5590)
FossilOrigin-Name: 73b260686264a31f43211efb235e4e0121115a50
2008-08-22 12:46:45 +00:00
drh 2a5d825ea2 Allow the WHERE clause in an UPDATE or DELETE against a view with an
INSTEAD OF trigger to refer to the view by name.  Ticket #3298. (CVS 5589)

FossilOrigin-Name: 7360e5d1f37ed6672f336b625b3c90d060e0a020
2008-08-22 12:30:52 +00:00
aswift 831045dd33 Deferring file descriptor closing to avoid trashing locks when directly manipulating sqlite db file contents (causes errors on AFP testing) (CVS 5587)
FossilOrigin-Name: e28a2870b49509502529892ff8ddb9fcf3a27173
2008-08-22 00:25:52 +00:00
danielk1977 801880f66c Fix soft-heap-limit related test suite failures. (CVS 5582)
FossilOrigin-Name: 2091d9a5260b1d7e27ff5ca93e60dae1e3b12081
2008-08-21 15:54:01 +00:00
drh f0209f7410 Make sure "rowid" columns in views are named correctly. Ticket #3308. (CVS 5580)
FossilOrigin-Name: 8593218c7c8016fbdbcc223db951751eaba9c0dd
2008-08-21 14:54:28 +00:00
drh 74073b6da8 Add test cases to verify that ticket #3314 has been fixed. (CVS 5579)
FossilOrigin-Name: b46267ff07f9b967bb7aee16b6d9dd8d0bd23f0c
2008-08-21 14:24:29 +00:00
drh 6a012f04d5 Reinsert an SCopy operation that was removed in (5523) because coverage
testing indicated that it was dead code.  Ticket #3324 shows that the
code was not as dead as we thought it was. (CVS 5578)

FossilOrigin-Name: 6855711595b58d4b6fbaf9480720b788904d0e2d
2008-08-21 14:15:59 +00:00
danielk1977 67e3da7ad4 Fix the functionality associated with sqlite3_release_memory() and sqlite3_soft_heap_limit(). It is automatically disabled if the SQLITE_CONFIG_PAGECACHE option is used. (CVS 5576)
FossilOrigin-Name: d025866b09352b32a6d35b97144eaad2fafb7165
2008-08-21 12:19:44 +00:00
drh 7d10d5a6e1 Refactor the name resolution procedures in the code generator. (CVS 5569)
FossilOrigin-Name: daf730d1defa78fb8b80a78f9108ac35a13e09f6
2008-08-20 16:35:10 +00:00
danielk1977 260d8a6aec When a "pragma main.table_info(...)" is issued, consider only tables from the main database, not the temp db. Ticket #3320. (CVS 5568)
FossilOrigin-Name: d0cfbbbaeef7b8ce9f73c6cd58888989a2df5b1f
2008-08-20 16:34:24 +00:00
danielk1977 8c0a791a58 Add the pcache module from the experimental branch. Also change things so that most of the built-in SQL functions are kept in single static hash-table, rather than creating and populating a separate hash table for each open database connection. (CVS 5566)
FossilOrigin-Name: cb494e10d71852024647aaa254203579ad438ea9
2008-08-20 14:49:23 +00:00
drh 2b300d5d6f Do not flatten the right term of a LEFT join. Ticket #3300. (CVS 5565)
FossilOrigin-Name: 8947c72f93d0b79c8061a3bfd5ab595edfb155a5
2008-08-14 00:19:48 +00:00
drh ec1fc80ca3 A partial fix for ticket #3292. This fixes the original problem but there
are other similar problems lurking in the code still. (CVS 5561)

FossilOrigin-Name: 055f173ab1b6fb657bf817faa3a37335d8fa60d5
2008-08-13 14:07:40 +00:00
drh ec444fc163 Make sure the lookaside test script saturates the lookaside buffer even
when SQLITE_DEBUG is off.  Ticket #3289 (CVS 5560)

FossilOrigin-Name: d6aacc5dc7c06f97fb5faa3d85a8f2d8ab0dd554
2008-08-12 15:48:25 +00:00
drh 93ed56d9ea Revise the initialization and shutdown logic so that it no longer keeps
a recursive mutex allocated for the whole interval but instead releases
the mutex as soon as possible.  Do not reset status values upon initialization. (CVS 5559)

FossilOrigin-Name: 697fe7a3167c22a3232ce154e9d47cf75af613c4
2008-08-12 15:21:11 +00:00
drh c456e57af7 Do not allow indexing of any table whose name begins with "sqlite_".
Ticket #3284.  Improve handling of databases with malformed schemas -
just in case somebody has actually indexed a system table. (CVS 5553)

FossilOrigin-Name: 0e1d8d14a153483e65bd0246d23db2b823a122d1
2008-08-11 18:44:58 +00:00
drh e50135e26d Add SQLITE_STATUS_PAGECACHE_SIZE and SQLITE_STATUS_SCRATCH_SIZE. (CVS 5537)
FossilOrigin-Name: c4e9b824062ba82a8db01cd82e3e681de1940208
2008-08-05 17:53:22 +00:00
drh e9d1c720ee Separate verbs of sqlite3_config() and sqlite3_db_config() into their
own namespaces.  Allow SQLITE3_DBCONFIG_LOOKASIDE to specific an external
memory buffer. (CVS 5536)

FossilOrigin-Name: 5dd865da5e787c10ef4c9e96647724bfab9dea01
2008-08-04 20:13:26 +00:00
danielk1977 de3e41e304 Fix (make test) with SQLITE_OMIT_COMPOUND_SELECT. Ticket #3235. (CVS 5530)
FossilOrigin-Name: 9ca975c8fdeaae7d5af8fe62e097d8d251362cfe
2008-08-04 03:51:24 +00:00
drh e6a6464895 Test scripts revised to work when auto_vacuum defaults on. (CVS 5528)
FossilOrigin-Name: e63186b0b6defce9ce16b3c334887c1f5a0bfcf0
2008-08-02 20:09:36 +00:00
drh 701bb3b4f0 Additional coverage testing. Fix a segfault following OOM in
sqltie3_load_extension(). (CVS 5523)

FossilOrigin-Name: f1e44eb323f05495cbae25113aebcc50d16b40df
2008-08-02 03:50:39 +00:00
drh c890fec362 Bring test coverage up to 99%. (CVS 5522)
FossilOrigin-Name: 2cd6bae80984126023bcf479e5f3db5eaa5c4134
2008-08-01 20:10:08 +00:00
drh 4cfb22f798 Fix problems in test scripts. Add new test cases to improve test coverage. (CVS 5521)
FossilOrigin-Name: b65f493c7519e8a5ee632a395b57d45269741dda
2008-08-01 18:47:01 +00:00
danielk1977 987a00e8b5 Also test that setting sqlite3_vtab.zErrMsg works from within the xRename method. (CVS 5520)
FossilOrigin-Name: 4f4a9ccae7d25b9856d1203f6b289d552c2b425e
2008-08-01 17:51:47 +00:00
danielk1977 3e3a84d32a Test that virtual table methods xBestIndex, xOpen, xFilter, xNext, xColumn, xRowid, xUpdate, xSync and xBegin can all return error messages using the sqlite3_vtab.zErrMsg variable. (CVS 5519)
FossilOrigin-Name: 007359b770f225877880b11f4c5d97bb548e38ca
2008-08-01 17:37:40 +00:00
drh 6480aad473 Test cases for sqlite3_db_config() and sqlite3_db_status(). (CVS 5518)
FossilOrigin-Name: 6a6b94302acdfe6404b04bff1cc8d16c1ef69df9
2008-08-01 16:31:14 +00:00
drh e2a7c6e04f Add a permutation test case for running all OOM tests with lookaside
disabled. (CVS 5517)

FossilOrigin-Name: 3f70e03ae83d374f5f69770bd7a4b279584f7090
2008-08-01 15:06:30 +00:00
drh 129ed69ea2 Update the memsubsys1 test script to take into account the buffer size
changes of the previous check-in. (CVS 5513)

FossilOrigin-Name: d43ff7bb8fc59c54b85658aaeb3dd088a324276f
2008-07-31 17:20:58 +00:00
shane 8225f5ac55 Omit calls to test_get_table_printf() if SQLITE_OMIT_GET_TABLE defined. (CVS 5509)
FossilOrigin-Name: 524a4075ddaecb07469da717e8afebc91240616e
2008-07-31 02:05:04 +00:00
shane 2a5fc4d6f5 Omit calls to test_destructor16() if SQLITE_OMIT_UTF16 defined. (CVS 5508)
FossilOrigin-Name: 2d5cec53c2f31875d198d81ac4fd54e7066ea0ff
2008-07-31 01:47:11 +00:00
drh 5462624dc4 When opening a zero-size database on unix, write one byte into the file before
interrogating the inode number.  This works around issues with msdos
filesystems mounted on OS-X.  Ticket #3260. (CVS 5504)

FossilOrigin-Name: a480a8845fb3b49967de0790b30e6250c824b9be
2008-07-30 17:28:04 +00:00
drh 61669b3824 Implicit string->numeric conversion should go to an integer value when
possible.  Ticket #3257. (CVS 5502)

FossilOrigin-Name: da0e4bff30a77f72ae283406b547401c2ebb42c5
2008-07-30 13:27:10 +00:00
drh d63bd75987 Make sure everything is deallocated before calling sqlite3_shutdown().
Ticket #3259. (CVS 5501)

FossilOrigin-Name: 4a6ee88697ddc28e0c7df1954d1526de18191827
2008-07-30 13:15:46 +00:00
shess 7fdb522caf Backport http://www.sqlite.org/cvstrac/chngview?cn=5489 from fts3.
Re-used prepared statement from fts2 cursor. (CVS 5499)

FossilOrigin-Name: 02870ed21dae2601a656b2f30c3ca0041e9cb60f
2008-07-29 20:38:17 +00:00
shess 9eb7c2ad83 Add some simple tests to make sure that the different fulltextFilter
query paths are being exercised. (CVS 5498)

FossilOrigin-Name: ae96d960e6e31315d25c7e5c3fb8363ed1b35350
2008-07-29 20:24:46 +00:00
drh 5f4bcf15d1 Enhancements to the pagecache malloc test configuration. Changes to the
speed test scripts to use the new test enhancements. (CVS 5494)

FossilOrigin-Name: 0ce39c21f32958ae53c00dc8bbf8cdd453f2d90e
2008-07-29 14:29:06 +00:00
danielk1977 003c1ffa15 Add a missing "finish_test" to the end of misc5.test. (CVS 5491)
FossilOrigin-Name: 89216b166924e831dd6264dd60f8da42cef7deee
2008-07-29 10:26:45 +00:00
drh 633e6d57d9 Implement the "lookaside" memory allocation cache. Use of this cache makes
the speed1.test script run about 15% faster.  Added new interfaces to
control the cache. (CVS 5488)

FossilOrigin-Name: e48f9697e9fea339e150ddc32940760027dd07d9
2008-07-28 19:34:53 +00:00
danielk1977 161546c7e5 Fix a case where database corruption was causing an invalid reference. (CVS 5484)
FossilOrigin-Name: 7aecabacf924ad8c1f9f4e707d0c56e433e3a434
2008-07-26 18:26:10 +00:00
drh ec424a5be6 Add the capability to track the maximum depth of the LALR(1) parser stack
so that critical applications can check to see if they are getting close
to limits. (CVS 5481)

FossilOrigin-Name: ef0250f3dc769a4acd534f31fa06d90922d4145b
2008-07-25 15:39:03 +00:00
drh 1bb14aca96 Fix the corrupt7 tests to track changes in the integrity check error message. (CVS 5480)
FossilOrigin-Name: 22177dac2e3cd9acafe7fcc71674a675fdd098ff
2008-07-25 14:53:17 +00:00
drh ebf1b467f7 Increase limits on memsubsys1 tests to accomodate the larger structure
sizes on 64-bit platforms. (CVS 5479)

FossilOrigin-Name: f7720f1bfcc6dcdd60002520e10f545a6f0eb126
2008-07-25 13:39:08 +00:00
danielk1977 31fab4f30b Updates to mem6.c allocator. (CVS 5473)
FossilOrigin-Name: 43a4cae2acea33d1a17c0037516e9c27fb7e8e91
2008-07-25 08:48:59 +00:00
drh 2abcd58f09 Reduce the size of the parser allocation. Add additional instrumentation
to mem2.  speed1*.test uses scratch malloc. (CVS 5472)

FossilOrigin-Name: 599a9dea8fc97d0e7f09e67c9954de8cc1b8748e
2008-07-24 23:34:07 +00:00
danielk1977 fae8917633 Do not run capi3.test or capi3c.test when testing memsys6. (CVS 5469)
FossilOrigin-Name: e0a101117ca44f0cce555b5db667286729fd2ad4
2008-07-24 10:32:30 +00:00
danielk1977 8969718379 Add a mutex to mem6.c to make it threadsafe. (CVS 5468)
FossilOrigin-Name: 9b97ce60c63c8b8afa43496a97917afd5fc26c71
2008-07-24 10:11:27 +00:00
danielk1977 2d34081de9 Add mem6.c, a new allocator. More to come. (CVS 5467)
FossilOrigin-Name: 192bc192185a7b475ef9331e2a4a0dc68083ec03
2008-07-24 08:20:40 +00:00
drh 80cc85b3c2 Error messages from virtual tables store on the sqlite3_vtab->zErrMsg field
are reported back up to the application interface and memory is reclaimed. (CVS 5466)

FossilOrigin-Name: 4a9dd5e782a363e93d4705fa3671bc6cf0bb5a33
2008-07-23 21:07:25 +00:00
drh 9a1ec1e3ae Remove stray breakpoints from test scripts. (CVS 5465)
FossilOrigin-Name: cb5e75dfa5c7048bd0994afac19846f70bfa7a4d
2008-07-23 20:28:13 +00:00
drh 4dc754d96d Read the sqlite3_vtab.zErrMsg after each call to a virtual table
method and transfer any error into the database connection.
Fix the fts2.test and fts3.test scripts to that they return
silently rather than failing the test sequence if the appropriate
FTS implementation is unavailable. (CVS 5463)

FossilOrigin-Name: e2c6771d44f1b4fee16ef90e91c3498be2a7d2b1
2008-07-23 18:17:32 +00:00
shess db94e39b07 Implement optimize() function.
Backports check-in (5417) from fts3. (CVS 5458)

FossilOrigin-Name: c16900dc7603cab30f8729b25361bc88bb37ae43
2008-07-22 23:49:44 +00:00
shess 08904673c8 Delete all fts2 index data the table becomes empty.
Backports check-in (5413) from fts3. (CVS 5457)

FossilOrigin-Name: 4c98179be258319f441ae4e123cf59af77e96409
2008-07-22 23:41:26 +00:00
shess 3d373110f0 fts2 functions for testing scripts.
Backports (5340) from fts3. (CVS 5456)

FossilOrigin-Name: 4e47394be9dfbf0f9309e55eb6c6a3a517ea2006
2008-07-22 23:32:27 +00:00
shess b2822a2b5e Changes fts2 to use only sqlite3_malloc() and not system malloc.
Backports (4554) and (4555) from fts3. (CVS 5454)

FossilOrigin-Name: ecf2dec66cb979cb7d8db3b7ce5c64cab57fe2bb
2008-07-22 22:57:54 +00:00
danielk1977 b27475ba75 To ensure SQLITE_THREADSAFE is always defined, have test_mutex.c include sqliteInt.h. (CVS 5443)
FossilOrigin-Name: d8be91e2d2737dcb0e82e6c8a6a3f4827bc98d63
2008-07-19 13:43:23 +00:00
drh 4a0611dd29 Fix SQLITE_OMIT_AUTOVACUUM so that it works again. Ticket #3228. (CVS 5439)
FossilOrigin-Name: 3b2dd417f9dab3cae3ab3693629a65a2c90f00e9
2008-07-18 17:16:26 +00:00
drh e54a62ad85 Make sure expression spans are set correctly for "x.*" expressions in
the result set of a SELECT.  Ticket #3229. (CVS 5438)

FossilOrigin-Name: 17a9984e7668be388c4042c070718a02b284a336
2008-07-18 17:03:52 +00:00
drh 137802cbeb Make sure the auxiliary database connection is closed after every test. (CVS 5428)
FossilOrigin-Name: e60bb6a179c6e674db2b9362e2ccdefaa3bc17f4
2008-07-16 18:35:45 +00:00
drh 06a0a81c38 More improvements to the 64-bit integer conversion testing in func.test. (CVS 5427)
FossilOrigin-Name: 632bb3c73443606bd2c7a5eadf0f4b8971a2b41e
2008-07-16 18:20:09 +00:00
drh 01859b0b07 Fix a test in func.test so that it works on machines that lack long double. (CVS 5425)
FossilOrigin-Name: 8686959d4289dc0bf9e1c353b948f26cca5a9a65
2008-07-16 18:04:36 +00:00
drh 7830cd41ba Activate testing of mem3 and mem5. Fix problems found. Tickets #3223
and #3225.  Other test configuration changes. (CVS 5419)

FossilOrigin-Name: a3a7820540f6f2285e6c83cac84383fc7d60d267
2008-07-16 12:25:32 +00:00
shess 7d9ef0d0fc Implement optimize() function. This merges all segments in the fts
index into a single segment, including dropping delete cookies. (CVS 5417)

FossilOrigin-Name: b22e187bc2b38bd219dd0feba19b97279bd83089
2008-07-15 21:32:07 +00:00
drh edaedab238 Update column naming rules. Ticket #3221. Rules for column naming
are still subject to change (except for the AS rule which we promise to
keep the same) but are more consistent now.  And the rules are tested
using a new test script. (CVS 5416)

FossilOrigin-Name: 61f6e19755b85bcb065f85fc425c2172badea308
2008-07-15 20:56:17 +00:00
drh 85e9e22b33 Increased test coverage. (CVS 5414)
FossilOrigin-Name: 7cf91e08c08ce515c24c738c7d079f5b81eebee6
2008-07-15 00:27:34 +00:00
shess c2c66a030d Delete all fts3 index data the table becomes empty. Previously,
deleting all rows from an fts3 table would leave a bunch of index data
describing the terms of the original data, plus deletions of those
terms, perhaps with some amount of it merged together so the deletions
knocked out the originals.  Even when all rows were deleted that
original data would hang out, though eventually it would mostly be
overwritten if new data contained the same set of terms. (CVS 5413)

FossilOrigin-Name: 8b872e426091d9ef108e52dbec0d968ed7452907
2008-07-14 20:43:15 +00:00
drh 65cef1affc Add a new test script to exercise the deadlock avoidance code in the
btree mutex logic. (CVS 5412)

FossilOrigin-Name: 7d5e1c4375599a913d23e5954fa63c10ac9d7688
2008-07-14 19:39:16 +00:00
drh 582de4f297 Remove the malloc2.test script since it was designed for use in versions
of SQLite that predate SQLite's ability to recover from out-of-memory
errors automatically.  Removing this script causes no reduction in
test coverage and removes potential problems reported by ticket #3213. (CVS 5409)

FossilOrigin-Name: 5bfc962533995530a0ef0875556f9f46e8dbf68b
2008-07-14 15:11:20 +00:00
drh ff1590ee00 Write sqlite3_initialize() calls in sqlite3_malloc() within
SQLITE_OMIT_AUTOINIT.  Ticket #3217. (CVS 5408)

FossilOrigin-Name: 4961b0bbe8b9cf5fb27de7f2514e8ab399a00134
2008-07-14 12:52:53 +00:00
danielk1977 185eac95b6 Fix the test script --binarylog option. (CVS 5401)
FossilOrigin-Name: 03e3cfc4ccab3c6441d41ade175dc041b8fa6c98
2008-07-12 15:55:54 +00:00
drh e8f52c5089 Remove leftover debugging commands (breakpoint and btree_breakpoint) from
test scripts. (CVS 5400)

FossilOrigin-Name: dcb160249fa2d592ad09b8b0052102dc44a93511
2008-07-12 14:52:20 +00:00
drh a34605859d Detect and handles the case where a row is modified or deleted while it
is being read during SELECT processing. (CVS 5399)

FossilOrigin-Name: c80a5d09935c60a2a50bc262c172a94073355f0d
2008-07-11 21:02:53 +00:00
drh a29afcbd1e Added corruptA.test for testing malformed database headers. (CVS 5397)
FossilOrigin-Name: 6dcce6b9748c6148a768a4f6b69f33f70edc3993
2008-07-11 16:39:23 +00:00
drh 34004cebb6 Additional test coverage for the btree module. Remove the failsafe() macro
and replace it with ALWAYS() and NEVER(). (CVS 5395)

FossilOrigin-Name: d7e2f0d2d45574d6191c1b191c0daf5260696f27
2008-07-11 16:15:17 +00:00
drh 8278ce7910 Fix minor problems in the test scripts and harness. (CVS 5394)
FossilOrigin-Name: c9ffbfe343b640051161301869698dd9f1f76cb7
2008-07-11 13:53:54 +00:00
drh 1013148b1c Make the btree layer robust when faced with a corrupt database that
contains duplicate entries on the freelist.  Ticket #3209. (CVS 5392)

FossilOrigin-Name: 30825f74d60d8ace39bafd06814017ceefeb4fa4
2008-07-11 03:34:09 +00:00
drh fa67c3c584 Additional test coverage in btree.c. Added corruption tests for
the ptrmap pages of an autovacuumed database (corrupt8.test). (CVS 5391)

FossilOrigin-Name: 620b472133438607c412e0c21d2a27605a89a414
2008-07-11 02:21:40 +00:00
drh 8a42cbd3f0 Enhancements to the testing logic for malloc and mutex. Only permit one
of MEMSYS3/5 to be compiled-in at a time.  Omit the SQLITE_CONFIG_MEMSYS3/5
configuration options. (CVS 5389)

FossilOrigin-Name: ed8b2525006ae7f8cacd01b291760513fdbdff57
2008-07-10 18:13:42 +00:00
danielk1977 80b3c54851 Fix a crash in flattenSubquery(). (CVS 5388)
FossilOrigin-Name: 9c8b97ef593c17740640a01a7338164d7fbe070e
2008-07-10 17:59:12 +00:00
danielk1977 9a6284c1bb Add the SQLITE_OPEN_NOMUTEX flag. Used for opening connections that are not protected by an internal mutex. (CVS 5387)
FossilOrigin-Name: 7e58b78712420b3bd4320192a58d89eb71eecc9c
2008-07-10 17:52:49 +00:00
drh 93a960a0a8 Remove unused code. Test coverage enhancements. Modify the algorithm used
to select column names for VIEWs of joins so that the constructed column
names omits the underlying table names. (CVS 5386)

FossilOrigin-Name: 636cd723296a8b1709011fdd99b236ffddf3f1b0
2008-07-10 00:32:42 +00:00
drh af005fbc13 Test coverage improvements on printf. (CVS 5385)
FossilOrigin-Name: 2d8f7bebf0f13f3a95f1e2163e35d43229cabfea
2008-07-09 16:51:51 +00:00
danielk1977 10235605ff Add a test case to join.test. No code changes, no bugs found. (CVS 5384)
FossilOrigin-Name: 417aa1580abec8cc335dcb6ac36245c081a31ef8
2008-07-09 14:47:21 +00:00
danielk1977 474b7cc785 Coverage testing for balance_quick() and balance_deeper(). (CVS 5382)
FossilOrigin-Name: 491f8f9613d2b886acad2ab8f631a4ec61ad698d
2008-07-09 11:49:46 +00:00
drh e49b146f30 Additional test coverage in select.c and expr.c. (CVS 5381)
FossilOrigin-Name: c6cf08477cc4d622a05ad6706cb9418cf7eea432
2008-07-09 01:39:44 +00:00
drh a9671a22b3 Remove obsolete code from select.c, including the "affinity" parameter
to the sqlite3Select() module. (CVS 5380)

FossilOrigin-Name: cbd3c1585b7a8f8042aa1448fe1be87de056c41a
2008-07-08 23:40:20 +00:00
drh 0880a74633 Improved testing of the min/max optimization. (CVS 5373)
FossilOrigin-Name: fa07c360b708324c47c8e9931f1e2b1b24e4faf8
2008-07-08 18:05:26 +00:00
danielk1977 49fc1f60b0 Prevent the flattening optimization from transforming a to a query with an illegal ORDER BY clause. (CVS 5372)
FossilOrigin-Name: 6c2adade34fdbe344cf73f6bac951e0c37dd003b
2008-07-08 17:43:56 +00:00
danielk1977 1bc71590c4 Test another corruption case in btree.c. And an IO error related scenario. (CVS 5371)
FossilOrigin-Name: d74fbb81ca3f973ac46534344e5076afc5dd5491
2008-07-08 17:13:59 +00:00
danielk1977 9ffe5d7247 3 more coverage tests for btree.c. (CVS 5370)
FossilOrigin-Name: 96df0a5fa4bb2b3dfedf034d81704e152cdc63a9
2008-07-08 15:59:51 +00:00
drh ddff9ae46b Tests for SQLITE_LIMIT_LENGTH enforcement in sqlite3_bind. (CVS 5369)
FossilOrigin-Name: c5e45dd664198e5b4fc44b316bd4adbc9a6c296b
2008-07-08 15:26:49 +00:00
danielk1977 35af9ba095 Another corruption related test case. (CVS 5367)
FossilOrigin-Name: f781a68127c97e30763447a12314180f0728deb9
2008-07-08 14:31:14 +00:00
danielk1977 a961339cd7 Extra coverage tests for btree.c. (CVS 5365)
FossilOrigin-Name: 08334f60303e63b581fa7f1f00d3e8833f1710ca
2008-07-08 12:07:32 +00:00
danielk1977 3aa4b67f04 Improve coverage of btree.c. (CVS 5363)
FossilOrigin-Name: f6d9cb835b8f75545f455328d61ba225e7da9bc4
2008-07-08 10:19:58 +00:00
danielk1977 983e230939 Prohibit the user from changing the temporary storage medium (pragma temp_store) while there is a read transaction open on the temporary database. Add tests to shared.test to cover a few more lines in btree.c. (CVS 5362)
FossilOrigin-Name: 92e0cf9a08a8b337a8f239afb048a0e045485771
2008-07-08 07:35:51 +00:00
drh f43639a0bc Test coverage improvements in printf.c. (CVS 5360)
FossilOrigin-Name: 6f2629c78327bb6cbb15d1f9900a1ef58f2d37dd
2008-07-08 02:24:02 +00:00
drh c8d75674d6 Add tests to verify correct behavior when mutex initialization fails. (CVS 5359)
FossilOrigin-Name: 65875005ac8bc7988d7d7d8e8b999857449568fd
2008-07-08 02:12:37 +00:00
drh fb45d8c563 Testing coverage enhancements. (CVS 5358)
FossilOrigin-Name: fe80aa58a4ac12db5a92d25d28165f5159f04533
2008-07-08 00:06:49 +00:00
drh bd0b1b50f4 Make check-in (5356) compatible with builds that do not enable memory
management.  Remove unnecessary code from main.c.  Add out-of-memory
tests for sqlite3_complete16(). (CVS 5357)

FossilOrigin-Name: 28f8b6bfcc3e169f8a54a6681395f2c85bf99cab
2008-07-07 19:52:09 +00:00
danielk1977 75c5fa88e9 Fix a problem in shared_err.test preventing it from running properly and add a test to corrupt2.test to cover another corruption detection case. (CVS 5355)
FossilOrigin-Name: 2dcd5287a0d71140baa23aae2ab3d95d78a5676d
2008-07-07 17:55:28 +00:00
danielk1977 b34a4ede32 Another test case to test a specific kind of database corruption. (CVS 5352)
FossilOrigin-Name: 38e04d67635d49661f9b95338fc1cb8197bf0bc7
2008-07-07 17:04:22 +00:00
danielk1977 2b76b05dcc Add a test case to test corruption discovered as part of the ptrmapPut() routine. (CVS 5351)
FossilOrigin-Name: cbb9536fc4fb2419e0eb6f3a32c67eeb7a73da82
2008-07-07 15:39:11 +00:00
danielk1977 7eaabcdb2a Test a couple of specific malloc() failures that were not tested before. (CVS 5350)
FossilOrigin-Name: b96bcaa197519b5be89e1f6a1579f0e36fe2b644
2008-07-07 14:56:56 +00:00
drh 24b58dd717 Additional test cases added on the sqlite3_create_function() interface. (CVS 5349)
FossilOrigin-Name: 4e941f3d43556d8a503bb96e8a74451de36d243e
2008-07-07 14:50:14 +00:00
drh a2820970c5 Add the vfs_unregister_all and vfs_reregister_all test commands. Use them
to test the sqlite3_sleep() interface when no VFSes are registered. (CVS 5348)

FossilOrigin-Name: 024d439299478062b6efdb63adce85b251af18ce
2008-07-07 13:31:58 +00:00
danielk1977 bb50e7ad76 Fix for explicitly inserting a NULL value into the rowid column of a virtual table. (CVS 5343)
FossilOrigin-Name: a7f3b431669f7392a6acba8cd8f3fa5297a916b5
2008-07-04 10:56:07 +00:00
danielk1977 a7d8b85980 Remove references to temporary registers from the compiler column-cache when such registers are released. Fix for #3201. (CVS 5341)
FossilOrigin-Name: f099d6773a837dbe4ba85a8fda818e2d9466e743
2008-07-04 09:15:11 +00:00
shess 6c106e3f3b fts3 functions for testing scripts. These are a first step towards
being able to write test script which verify that fts3 is internally
building indices in the expected way.  Both new functions are only
defined if fts3.c is compiled with SQLITE_TEST defined, as when
building testfixture.  These functions are not intended to be part of
the exposed fts3 API.

dump_terms() generates a TEXT result of all the terms in the index (or
a specified segment), sorted and joined with spaces.

dump_doclist() generates a TEXT representation of the doclist
associated with a given term in the index (or a specified segment). (CVS 5340)

FossilOrigin-Name: a48e3d95f7a656285e959cef595cbe6d53428ad9
2008-07-03 19:53:21 +00:00
danielk1977 524cc21ed6 Call the authorizer callback the same number of times whether or not the query flattening occurs. (CVS 5338)
FossilOrigin-Name: 8b88b64bb37df4e38cbfe31a14c219688b26e2af
2008-07-02 13:13:51 +00:00
danielk1977 4914cf92e3 Fix errors in in.test. Also add a few tests to selectB.test. (CVS 5337)
FossilOrigin-Name: 8f9d1abb315a3d4aa3a580fd5cf3ae572cc330f4
2008-07-01 18:26:49 +00:00
danielk1977 5e7ad50858 Fix another memory leak related to UNION ALL and sub-selects. (CVS 5336)
FossilOrigin-Name: 56109b9a1f600ab3f16769aba0d47dcf782bbc95
2008-07-01 17:39:27 +00:00
danielk1977 eca7e01a71 Fix a memory leak to do with the recent UNION ALL sub-select optimization. (CVS 5333)
FossilOrigin-Name: 6ee71f4ddb4fa934f58c87dad2d30560af2e55d7
2008-07-01 16:05:25 +00:00
danielk1977 4b86ef1d87 Fix a problem with LIMIT and OFFSET clauses on the parent query when optimizing a UNION ALL sub-select. (CVS 5332)
FossilOrigin-Name: a79786a961dba8f4ffaddbe55e6467c14b12f7d6
2008-07-01 14:39:35 +00:00
danielk1977 f23329a221 Optimize sub-selects and views that use UNION ALL. This optimization isn't very well tested yet. (CVS 5331)
FossilOrigin-Name: 3ef468e7046b2091b5b6880fe19261ef1ee2887b
2008-07-01 14:09:13 +00:00
danielk1977 daf79acb68 Call the query flattener while processing the parent query. Previously, it was called while processing the sub-queries. (CVS 5330)
FossilOrigin-Name: 6fcb3bffe26ae1c21c72ce9019f1db1c118094a4
2008-06-30 18:12:28 +00:00
danielk1977 63703a42f1 Changes to loadext.test so that it works on osx as well as linux. (CVS 5329)
FossilOrigin-Name: 189cd85413a2e00696752bb82e7a442e86e621ac
2008-06-30 15:09:29 +00:00
danielk1977 7a8097b6d8 Add a couple of tests to see if the new compound select optimizations work when the compound select is hidden inside a view. (CVS 5327)
FossilOrigin-Name: 1a711249c25aafbaf08057ffdcbb9cf2f872f13d
2008-06-30 07:53:09 +00:00
danielk1977 986fbb8e30 Remove an assert() that was failing if there were any open incremental blob handles when a statement transaction was rolled back. (CVS 5326)
FossilOrigin-Name: f66491ab2ba3645d4e44e33ec6fa0ab94b2989be
2008-06-28 15:33:24 +00:00
danielk1977 e339d65a89 Rearrange some ENABLE_LOCKING_STYLE related code in os_unix.c. (CVS 5324)
FossilOrigin-Name: f70d552bcd0df884eea2e2272bae558d35fc8845
2008-06-28 11:23:00 +00:00
danielk1977 0d84e5b2a7 Fix mem3.c (broken by (5320)). (CVS 5321)
FossilOrigin-Name: fef90a21aea11f15371d3fcf44548d786dd8819b
2008-06-27 14:05:24 +00:00
danielk1977 5099be5e85 Change mem5.c so that the minimum allocation size is runtime configurable. (CVS 5320)
FossilOrigin-Name: 4f95f4cdf77e134fab42148e10198c7b008d4ae6
2008-06-27 13:27:03 +00:00
danielk1977 0cdc022e88 Fix handling of "x IN (...)" and "x NOT IN (...)" expressions when the set contains an SQL NULL value. (CVS 5314)
FossilOrigin-Name: d45a97be71fa61ab4a692bd807ab762130f7f5b9
2008-06-26 18:04:03 +00:00
danielk1977 71bc31c68d Fix a race condition in sqlite3_initialize(). (CVS 5310)
FossilOrigin-Name: 70b2ed2afcf1757d1c58f3a83dad4a5fb226ae63
2008-06-26 08:29:34 +00:00
danielk1977 ff3c898d13 Change the makefiles so that "make test" now runs the veryquick.test script instead of quick.test. Also modify veryquick.test to reuse the code in quick.test. veryquick.test is now the same as quick.test except that it omits all testing related to malloc and IO error simulation. (CVS 5308)
FossilOrigin-Name: 8c65146ea0e77e8e31fffc467806b1edf91fb4db
2008-06-25 17:54:53 +00:00
danielk1977 6b39c2e40b Have mem3.c and mem5.c grab a mutex when required. Include them both in the amalgamation again. (CVS 5306)
FossilOrigin-Name: 9e3c95ff4048cd8e4c56acf7a8ebedc49621e9c7
2008-06-25 14:57:53 +00:00
drh 3f994d06ff Test enhancements, especially to the new compound-SELECT merge logic. (CVS 5305)
FossilOrigin-Name: edf7f518361902924105142a8c67b898ba7d532f
2008-06-25 14:31:53 +00:00
danielk1977 c66c0e14a6 Fix the allocator in mem5.c so that it can be enabled at run time using the sqlite3_config() function. (CVS 5304)
FossilOrigin-Name: 30ff6bb0b2d1068d28e86ac90bb9f454e4537a2d
2008-06-25 14:26:07 +00:00
danielk1977 32155ef0ff Fix up some details to do with the mem3.c (memsys3) allocator. If the library is compiled with SQLITE_ENABLE_MEMSYS3, the memsys3 allocator can be selected at runtime. (CVS 5303)
FossilOrigin-Name: 9c6c8e01b31abfe2bc8e650bbfdb504021dc7e59
2008-06-25 10:34:34 +00:00
mihailim 29b13cc9d9 Fixed typo to close #1731. (CVS 5302)
FossilOrigin-Name: 9902be8d66453d3f4cfdc7f81a4ebe9bc6729204
2008-06-25 08:02:44 +00:00
drh ff354e91ba If a unique index covers any prefix of the ORDER BY clause then let it
satisfy the ORDER BY clause. (CVS 5301)

FossilOrigin-Name: e53403b6d742be83c5b130ed6cef4035d081d613
2008-06-25 02:47:57 +00:00
drh fae37af17f Add new test script for compound select statements. (CVS 5300)
FossilOrigin-Name: a193b1612e7ccd1c8f6136ece8d4768fccfe43fe
2008-06-25 02:22:32 +00:00
danielk1977 57e5ea9327 Modify the memory allocation system in mem3.c so to fit in with the new sqlite3_mem_methods scheme. At this point it only "mostly" works. (CVS 5297)
FossilOrigin-Name: 3febef548fb1c314336fe4bc359d72a4fe84e84e
2008-06-24 19:02:55 +00:00
danielk1977 6fb6444c3e Add a few extra tests to select9.test. (CVS 5296)
FossilOrigin-Name: 37b084fd7d7ad7f13fc9454fc25ca5aed48d4a31
2008-06-24 15:39:43 +00:00
drh f6e369a119 Fix a problem in sqlite3ExprIsInteger() causing failures on select1-4.9.2.
Other bug fixes in compound-merge.  The compound-merge is still disabled
in this check-in using "#if 0" due to additional bugs. (CVS 5295)

FossilOrigin-Name: 95037e6dbf4ed0ffd38790f3270dcaa4c1ae64ed
2008-06-24 12:46:30 +00:00
drh 398cf3d707 Remove a surplus "breakpoint" from select4.test. (CVS 5294)
FossilOrigin-Name: 3117238ce9cbfc36e2de929592decef86220e2a2
2008-06-24 12:28:03 +00:00
danielk1977 9afe68477d Add start of new test file "select9.test". To test LIMIT, OFFSET and ORDER BY on compound SELECT statements. (CVS 5293)
FossilOrigin-Name: 3a13e943d8fb4060fc1f0f827a156a730ee64be0
2008-06-24 11:21:20 +00:00
drh 92b01d53c2 The compound-select merge optimization is mostly working with this check-in.
But there are still a few problems and so the optimization is disabled by
and "#if 0".  This check-in is to synchronize with the other changes happening
in parallel. (CVS 5291)

FossilOrigin-Name: e2ba324cbcac0ba35bbde50048677e085abb092b
2008-06-24 00:32:35 +00:00
danielk1977 f7b9d66fd4 Fix a bug in handling queries on the sqlite_master table with an empty (0 bytes in size) database file. (CVS 5286)
FossilOrigin-Name: f8238770bf41e17014c6de05363b759304fc80de
2008-06-23 18:49:43 +00:00
drh 52fd7beaba Additional tests added to capi3.test. (CVS 5285)
FossilOrigin-Name: 1fdab2c65b966f74bdf130c640ae56a0e811fb71
2008-06-23 17:56:47 +00:00
danielk1977 8cf6c554c0 Fix a bug causing the pager-cache size to be reset to its default value whenever the database schema was reloaded. (CVS 5283)
FossilOrigin-Name: 6dbe67da5cb0141e011b4fdcc3964a20f68be843
2008-06-23 16:53:46 +00:00
danielk1977 b13dee9900 Run (a subset of) the rtree tests from quick.test. (CVS 5282)
FossilOrigin-Name: e872c78c72eb5976e72123485692a76409bd857f
2008-06-23 15:55:52 +00:00
danielk1977 171bfed311 Fix a bug whereby opening a connection to an existing shared-cache caused the cache-size (the value configured by "PRAGMA cache_size") to revert to its default value. (CVS 5274)
FossilOrigin-Name: 0492aa8ed3c35dd2cdfc69c9cb87e43ef0460826
2008-06-23 09:50:50 +00:00
danielk1977 94527a6d49 Prevent veryquick.test and all.test from running permutations.test directly. (CVS 5267)
FossilOrigin-Name: ae9e4c0e4d5639ff11f3fa23775a1118b39688c8
2008-06-21 19:20:13 +00:00
danielk1977 2dd6d809b6 Fix a bug in permutations.test causing the utf-16 tests to fail. (CVS 5266)
FossilOrigin-Name: 710621f373398748f31942f2ac9d1c857492538a
2008-06-21 19:10:27 +00:00
danielk1977 1077e3f7e0 Add test file permutations.test, which runs various other test files with sqlite configured in various ways. This adds a few new tests and replaces test files autovacuum_crash.test, autovacuum_ioerr.test, exclusive3.test, jrnlmode2.test, jrnlmode3.test, jrnlmode4.test, mutex2 and onefile.test. (CVS 5265)
FossilOrigin-Name: 0e9df3507bd30d320b7ccfeaf3e06e10938022e1
2008-06-21 18:07:37 +00:00
danielk1977 959e3a9b80 Remove mutex2.test. It will be replaced later today by permutations.test. (CVS 5261)
FossilOrigin-Name: 98a6a0a30f16cbc60c655663b5895429a34da0ba
2008-06-21 12:15:04 +00:00
danielk1977 4b9507a0f1 Fix a problem in the test suite that could cause a crash if using a pre-allocated block of memory for pages (the problem was that sqlite3_shutdown() was being called while there were still open database connections). (CVS 5259)
FossilOrigin-Name: 3d413e9b466a871650597407016131df4d07b3d2
2008-06-21 08:12:15 +00:00
danielk1977 9324c8f280 Add a test to check that opening a second connection to a shared cache does not reset the cache size to its default value. (CVS 5256)
FossilOrigin-Name: 3546e245aaf5d75b9f52ffb3268da9bc26946396
2008-06-20 17:51:16 +00:00
drh af83758645 Patch to memsubsys1.test in order to avoid a segfault in tableapi.test. (CVS 5252)
FossilOrigin-Name: 62411a6e605ec50d8d61233d753cd2ad65c2218d
2008-06-20 00:03:21 +00:00
drh 3780b5de7e Unset global TCL variables in the func.test script prior to use to avoid
conflicts from other scripts. (CVS 5251)

FossilOrigin-Name: 9b04e10f6c00c36652444206d1d8868a560eb56e
2008-06-19 18:39:11 +00:00
danielk1977 d09414cdd6 Move the malloc() failure simulation out of malloc.c and into a separate sqlite3_mem_methods interface. Still some related changes to come. (CVS 5250)
FossilOrigin-Name: d22cd2a59f472f4eaf80aa9f55fbff2514ca428d
2008-06-19 18:17:49 +00:00
drh 55b0cf00ad Documentation and test-script updates. (CVS 5249)
FossilOrigin-Name: 68d4f7954108f5bf586c4706c8664d8333fb2230
2008-06-19 17:54:33 +00:00
drh d72a841467 Additional test cases for loadable extensions. (CVS 5247)
FossilOrigin-Name: 9d73a68c305db673d393db118b6a41241683a670
2008-06-19 15:44:00 +00:00
drh bb5a9c3eea Add the sqlite3_next_stmt() interface, including test cases. (CVS 5243)
FossilOrigin-Name: 565a530896b40790287eeaad709edd51980fbddf
2008-06-19 02:52:25 +00:00
drh f714199054 Add some test logic to the new memory allocation subsystem. (Lots more needed.)
The test suite is currently indicating memory leaks, though it is unclear if
this is a true code problem or just an instrumentation problem. (CVS 5240)

FossilOrigin-Name: cb1f11cd9764cf0275e88e1f6342e366e5536bfd
2008-06-19 00:16:08 +00:00
danielk1977 01bf29966d Fix a test case in mutex1.test that was failing when sqlite was compiled with SQLITE_THREADSAFE=0. (CVS 5235)
FossilOrigin-Name: d1a87c3bcc9a32918f1cf743f85cd1a71557220e
2008-06-18 17:59:03 +00:00
danielk1977 59f8c08ecc Implement the 'CONFIG_SINGLETHREAD' and 'CONFIG_MULTITHREAD' configuration modes. (CVS 5234)
FossilOrigin-Name: 5059644c4bc5f6679afd939e0bc26080f42a9918
2008-06-18 17:09:10 +00:00
drh a2baf3a2e5 Make sure aggregate functions can take any number of arguments up to the
limit imposed by SQLITE_LIMIT_FUNCTION_ARGS.  Ticket #3179.  Modify
the group_concat() function to take an unlimited number of arguments in
order to facilitate testing this behavior. (CVS 5233)

FossilOrigin-Name: 70c6739f4e84b3433e14960346b54d0e9e0bb9c6
2008-06-18 15:34:09 +00:00
danielk1977 1a9ed0b27a Add some test infrastructure and cases for the new mutex api. (CVS 5230)
FossilOrigin-Name: 262baee9952b28afe5dc77eb7365ebb11a480906
2008-06-18 09:45:56 +00:00
danielk1977 dfdf9844aa Fix a recently introduced resource leak in test file incrblob2.test (forgot to close a blob handle). (CVS 5223)
FossilOrigin-Name: 88e1c6092e48c860950d3437f264785243bb67ed
2008-06-16 14:36:01 +00:00
danielk1977 99e925da51 Fix a problem with the incremental blob API. sqlite3_blob_open() was always reading the data for the leftmost column of the row that the opened blob was stored in. If this column happened to contain a (the) large blob, sqlite would make a large memory allocation to read the data into. Which defeats the purpose of using incremental blobs. (CVS 5222)
FossilOrigin-Name: 1b9478da2f421c1270e76297324fff8037d2f231
2008-06-16 14:19:57 +00:00
danielk1977 fce96308b1 Add a test to verify that IN(...) WHERE clause terms are not handled by virtual table implemetations. (CVS 5221)
FossilOrigin-Name: 85483c8fb3b45281ce07e84349841fc80e560b1f
2008-06-16 06:31:34 +00:00
drh 40257ffd0a Progress toward implementation of sqlite3_config() and a rework of the
mutex and memory allocation subsystems.  This is an incremental check-in. (CVS 5218)

FossilOrigin-Name: a03c5af115889f477e17187a198a7d2d40bc76bf
2008-06-13 18:24:27 +00:00
drh 655194d6ae Enhance zeroblob tests to use the sqlite3_memory_highwater in order to
double-check that no large allocations are occurring. (CVS 5217)

FossilOrigin-Name: e93079be83a9df7328d9b910fcbdb762be7ec815
2008-06-12 18:17:40 +00:00
drh c91d86c95a Fix a typo in the date/time function tests. Add additional cases to
the zeroblob tests to make sure sqlite3_bind_zeroblob() does not use
excess memory. (CVS 5216)

FossilOrigin-Name: c1006fb1c817bc0b7fada873edb772abbf972012
2008-06-12 18:05:40 +00:00
drh 85f477a141 Convert the date/time functions to work with milliseconds since the
julian epoch internally (instead of days since the epoch) in order to avoid
problems with floating-point roundoff error.  The interface is unchanged. (CVS 5215)

FossilOrigin-Name: ed35f8a98323dadb64b423615287fb24ea262ffb
2008-06-12 16:35:38 +00:00
danielk1977 5e982b1c38 Add another test to incrblob2.test. This test failed to reveal any new bugs. (CVS 5214)
FossilOrigin-Name: 20d8ea45afcddf22632c3de984147826d0616d3f
2008-06-12 14:42:06 +00:00
shane f1aaaa4092 Added additional testcases for julianday calculations with midnight boundary for UTC time. (CVS 5209)
FossilOrigin-Name: edd2cb00ae606858d8ae138c69eee7821b8cd6ea
2008-06-12 05:16:14 +00:00
drh 9e855dac4f Adjust the error-message text in corrupt7.test. (CVS 5205)
FossilOrigin-Name: 4a77ff5b588f4c83959591c208a8b20224b75a66
2008-06-11 18:56:42 +00:00
drh f3840b0645 Add a test case for the database corruption in the form of cell offsets
out of range in an otherwise valid btree page. (CVS 5202)

FossilOrigin-Name: c569a6cf664e9a8095f616327719392fb8186d37
2008-06-11 18:01:21 +00:00
danielk1977 3588ceb868 Invalidate sqlite3_blob* handles whenever an SQL statement is used to delete or modify the rows containing the open blob. Previously, modifying the table containing the open blob in any way invalidated the handle. This was too restrictive. (CVS 5199)
FossilOrigin-Name: e339c91f8718482ce74fc53781091db95e69d4c3
2008-06-10 17:30:26 +00:00
danielk1977 55edca5c17 Add test file incrblob2.test to test opening two blob handles on a single database blob. (CVS 5196)
FossilOrigin-Name: c1d877feb530b5cdaad55da3dbbb7c2596a10c49
2008-06-09 15:51:26 +00:00
danielk1977 ad0132dff1 Change the signature of sqlite3PagerPagecount() so that it can return an error code. (CVS 5195)
FossilOrigin-Name: e9f01c01866d302d81bf9ebc484ea6351cbc0f60
2008-06-07 08:58:22 +00:00
danielk1977 8162054b44 Do not call xSync() from zeroJournalHdr() if the Pager.noSync flag is set (i.e. for temp files). (CVS 5194)
FossilOrigin-Name: 9f5cbe29226151113e4565fcf8170317afe1b8c6
2008-06-07 05:19:37 +00:00
danielk1977 17b90b5316 Remove the xGetTempname() method from the vfs structure. Temp files are now opened by passing a NULL pointer as the filename to xOpen(). (CVS 5190)
FossilOrigin-Name: 5173b3e816c7eb711cd21a9068bbafb9ebb7cff1
2008-06-06 11:11:25 +00:00
danielk1977 861f74563d Modify the signatures of the sqlite3_vfs.xAccess and sqlite3_vfs.xCheckReservedLock functions. (CVS 5188)
FossilOrigin-Name: 4226ac54beea1b58de8ab7b9d768d999f50438a6
2008-06-05 11:39:11 +00:00
danielk1977 b53e496095 Add "pragma journal_size_limit", used to limit the space consumed by persistent journal files left in the file-system after a transaction has concluded in exclusive (or journal_mode=persist) mode. (CVS 5185)
FossilOrigin-Name: 5c59f469d0321c6a2e702ca2c61db012f63aeecc
2008-06-04 06:45:59 +00:00
danielk1977 53a4ddf7c4 Ensure that vacuum3.test closes all opened database connections. Fix for #3157. (CVS 5184)
FossilOrigin-Name: 654e3b3de8ddeba3e31e9677ec4086e9f73c3598
2008-06-03 07:34:09 +00:00
drh c9ded4c62e When initializing the sqlite_sequence entry for an AUTOINCREMENT table,
make sure the value is an reasonable integer even if the initial insert
failed.  Ticket #3148. (CVS 5175)

FossilOrigin-Name: 7e6847852d4517b1d14bebb8f0ae4d938b0b6f6d
2008-05-29 03:20:59 +00:00
danielk1977 7dc89e6514 Add another test case to vacuum3.test. (CVS 5168)
FossilOrigin-Name: d895e85e2f9b595e58562d57226404f72db89a60
2008-05-28 16:00:43 +00:00
danielk1977 b388c41552 Add a test to vacuum3.test to try to trick sqlite into using the wrong database page-size. Turns out there was no problem. (CVS 5167)
FossilOrigin-Name: 281589a22fa481b1dfcae69fc124458d240a0ae1
2008-05-28 14:08:17 +00:00
drh 02a50b709c Fix the LIKE query optimizer so that it works with LIKE patterns
ending in '@%' on NOCASE columns.  Ticket #3139. (CVS 5158)

FossilOrigin-Name: 33548744369643cc8843b74ad1fc1b7d5988d7a4
2008-05-26 18:33:40 +00:00
drh 4837f53121 Add a test case of preparing a statement with an nBytes parameter of 0
and where the previous byte of the string is zero.  Ticket #3134. (CVS 5156)

FossilOrigin-Name: 846a69acb59403438696000b4ffd588ab42b2f95
2008-05-23 14:49:49 +00:00
danielk1977 131c8bc0c2 Ensure that the db.mallocFailed flag is cleared before sqlite3_errmsg16() returns. (CVS 5154)
FossilOrigin-Name: 0d47653a3c39b7cd41c7e6edd8c4b4543658412d
2008-05-22 13:56:17 +00:00
shane 05eaf73c8c Added more DST boundary checks for 2006 and 2007. Added check for suspect Windows DST implementations and warning about them. Ticket #2322. (CVS 5147)
FossilOrigin-Name: 14226ff0a7af7b39a1089a17eeb5bbb8d09d778d
2008-05-20 14:01:59 +00:00