Commit Graph

42 Commits

Author SHA1 Message Date
drh
49d77ee642 An attempt to enhance PRAGMA integrity check so that it does data type
checking on non-STRICT tables.  Specifically:  (1) Columns with TEXT affinity
should not contain numeric values, and (2) columns with numeric affinity should
not contain text values that can be converted to numeric.

FossilOrigin-Name: 8b1e7f0524637728cebe81c7d3ff8ad8a5a55782eac6409b425dad538024f596
2022-10-10 18:25:05 +00:00
drh
b2a0f75c06 Remove the rarely-used scratch memory allocator. This makes the code smaller,
faster, and easier to maintain.  In place of the scratch allocator, add the
SQLITE_CONFIG_SMALL_MALLOC configuration option that provides a hint to SQLite
that large memory allocations should be avoided.

FossilOrigin-Name: 54b000246cfb5c7b8adb61a17357ef5a49adddde9e48e8937834d5ba0beb8a6b
2017-08-28 15:51:35 +00:00
drh
d38a2e2511 Larger margins for one memsubsys1 range check when running with a
non-zero reserved-bytes value.

FossilOrigin-Name: 6db1d1fbc6c1acc896fa635dfdc5564800502c40
2016-03-24 15:32:19 +00:00
drh
b99185f278 Fix more test-case errors in the Apple configuration.
FossilOrigin-Name: 6631e1e655604a7d1fb45b4d151938d4a13b47f3
2016-03-18 00:19:48 +00:00
drh
7da56b4f65 Many more test cases fixed. Only a few remain.
FossilOrigin-Name: 99b9d7eef68fd6d5c9eecb5fbe3dfe002c1ca4a8
2016-03-14 18:34:42 +00:00
dan
03bc525a51 Modify a few test scripts to avoid leaving the sqlite3Config structure in a non-default state.
FossilOrigin-Name: 562687d9f56bf4bb0f5f07f97cbbb7649c81faf8
2015-07-24 14:17:17 +00:00
drh
c54357cc2a Simplify the page recycling condition in pcache1. Fix test cases to work
with the latest changes.

FossilOrigin-Name: 5b60df5503f61922326b3e10e94aa197b17afe4b
2015-07-07 14:06:18 +00:00
drh
a0de826c9f Fix two test cases in memsubsys1 so that they work with the mmap permutation.
FossilOrigin-Name: 66269d0d8e49eb3dc7f508714753584f648bb022
2015-01-01 14:13:45 +00:00
drh
0265eb666b Adjust the memsubsys1-5.5 test case to avoid occasional false positives.
FossilOrigin-Name: 432413187f41061a08ecff2697ce85c935fa6fa8
2014-12-31 20:25:33 +00:00
drh
dfd1547b48 Modify the memsubsys1-3.1.4 test so that it does not fail arbitrarily due
to variations in the behavior of system malloc().

FossilOrigin-Name: d280157da0b5275f3e3c875d2dcfb9998d374ac0
2014-08-19 23:04:49 +00:00
dan
3492f4f9af Fixes for test cases running in the "mmap" permutation.
FossilOrigin-Name: cdb97d41abf4a3b8e22fa8ca9f3aab4a3f968d27
2013-07-06 18:07:57 +00:00
drh
870c0178f7 Merge the PCACHE2 changes into trunk.
FossilOrigin-Name: 457513f21f2438c61b1a214716e338a4e3eeaafa
2011-11-16 18:08:07 +00:00
dan
bf567db91d Update memsubsys1.test to account for the recently increased size of the MemPage structure in btreeInt.h.
FossilOrigin-Name: 4fb3ca756a3a7c66baa4745a9b2c1e246a67c699
2011-11-16 08:18:20 +00:00
drh
6a8ab6d9cb For the mem1.c system malloc implementation, use the malloc_usable_size()
function if the HAVE_MALLOC_USABLE_SIZE macro is defined.  Update autoconf
to look for that function when configuring.

FossilOrigin-Name: 2e8ab3cedfebc33a831837792b523d1aa7cdc6b7
2011-11-09 01:53:25 +00:00
dan
22e21ff4fc Experimental change to the pcache interface to allow page buffers to be allocated separately from their associated container structures.
FossilOrigin-Name: c275c9d323cb1dccb031b199d413ac3a0b244fea
2011-11-08 20:08:44 +00:00
dan
b5126dde0d Remove the SQLITE_PAGECACHE_BLOCKALLOC compilation option.
FossilOrigin-Name: 4eb4689834b538b9eeec5a5803528260e1aff78d
2011-09-22 14:56:31 +00:00
dan
041a0513aa Modify test cases so that veryquick.test passes with PAGECACHE_BLOCKALLOC defined.
FossilOrigin-Name: c61000705b61dc448a838846826d1a5ab5eaca2b
2011-08-22 14:55:54 +00:00
mistachkin
fda06befd5 Add retry logic for AV defense to winOpen. Also, refactor test suite to allow the key Tcl file operations (e.g. copy and delete) to be retried.
FossilOrigin-Name: 9007586fdabed8dbcc78581ea9821cfd1f9a4c8c
2011-08-02 00:57:34 +00:00
dan
ff07ccadee Fix a problem in memsubsys1.test. Modifications to test code only.
FossilOrigin-Name: 7ef3f7cba768ef0c4782a6c80424833b4df6a059
2011-01-25 09:54:53 +00:00
drh
986d3b95bb Get all test cases working with the mutex-free-pcache implementation.
FossilOrigin-Name: 2dc98d29995bef51108e99aa8f7a56427cf9e1d7
2011-01-18 16:13:27 +00:00
dan
072734ec6c Fix memsubsys1.test so that it works with TEMP_STORE>=2.
FossilOrigin-Name: 8ad88ee0c1145eb9f92267c31d7d787739718716
2010-10-04 15:47:30 +00:00
dan
1fab01ac8a Fix a couple of test files so that they work with DEFAULT_AUTOVACUUM.
FossilOrigin-Name: 8cb39306f4bd9104c9d15d5ee98ec1252e798997
2010-09-13 14:38:19 +00:00
drh
badc980afa Refactor the implementation of the scratch memory allocator. Add the
SQLITE_TESTCTRL_SCRATCHMALLOC interface to facilitate testing.

FossilOrigin-Name: a3475ddfbe4526e6e0b334fd1376ee7c31508b80
2010-08-27 17:16:44 +00:00
drh
50d1b5f363 Remove unnecessary code from malloc.c. Enhance pcache1.c so that is tries
to reuse existing pages, rather than create new pages, when SQLite is under
memory pressure.  "Memory pressure" means that SQLITE_CONFIG_PAGECACHE memory
is nearly exhausted or sqlite3_soft_heap_limit() has been reached.

FossilOrigin-Name: 51049479a8577e03cc353f71f6e13a10c8323d91
2010-08-27 12:21:06 +00:00
dan
d53850e579 Do not run the memsubsys1.test script under the memsubsys1 permutation.
FossilOrigin-Name: 3a1a8c77a5c7b57755f18d84234faed1f16c2103
2010-07-03 19:08:19 +00:00
danielk1977
f16c62464d Add some code to sqlite3VdbeMemSetZeroBlob() so that it works (less efficiently) even when OMIT_INCRBLOB is defined. Ticket #3977. (CVS 6906)
FossilOrigin-Name: f5f7259d811ce8c2bf0bc64128256c4cd95f676a
2009-07-18 14:36:23 +00:00
danielk1977
627a3d6ab4 Changes to test scripts so that (make test) works when OMIT_INCRBLOB is defined. (CVS 6904)
FossilOrigin-Name: 1dd834a3d61496dfa138c36676a5fa6afaa4c817
2009-07-18 08:30:44 +00:00
drh
457e621e6e Allocate a little extra scratch space for the memsubsys1 tests. The
extra space is needed in some configurations. (CVS 6495)

FossilOrigin-Name: 5484419294356b704c2c9064f36ed254875ca8c0
2009-04-11 14:46:43 +00:00
drh
73cd27300d Added new tests of the scratch memory allocator for increased test coverage. (CVS 6388)
FossilOrigin-Name: e99e28efbbfff3e46eec0f90d566991de4406fd8
2009-03-26 12:20:32 +00:00
drh
0368072905 Adjust the memory usage bounds on the memsubsys1.test script so that
it works on amd64. (CVS 5759)

FossilOrigin-Name: aabde23fe19bd95371fdebdde66ac553dfd53f8e
2008-10-01 13:55:50 +00:00
drh
798fadd14c A few minor changes to test scripts so that they work on linux-amd64. (CVS 5752)
FossilOrigin-Name: 78d075ff38d96cc58659a7097dec0e49402aa960
2008-09-30 00:31:38 +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
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
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
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
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
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
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
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
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
55b0cf00ad Documentation and test-script updates. (CVS 5249)
FossilOrigin-Name: 68d4f7954108f5bf586c4706c8664d8333fb2230
2008-06-19 17:54:33 +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