Commit Graph

94 Commits

Author SHA1 Message Date
drh
6ab91a7a7a Add the SQLITE_DEFAULT_DEFENSIVE compile-time option. Fix up test cases
so that they work with DEFENSIVE enabled.

FossilOrigin-Name: 3212733cb6d1a59516d67a86df7c7b1d2456a1b2e5d7080c26b0e87b2609c65d
2018-11-07 02:17:01 +00:00
dan
253c6ee1bf Enhance tester.tcl so that when "--malloctrace=1" is specified, the test
generates self-contained Tcl scripts that present GUIs instead of *.sql files
that require a separate program to interpret.

FossilOrigin-Name: de2e3cbd08c00d235106c040fa472ec267ef8f1ec13c34ed7d16deac8d50b6cc
2018-09-18 17:00:06 +00:00
drh
6116ee4eee Compute the correct column name even if the column identifier is the
very last token in the SQL statement.  This fixes a problem introduced
by check-in [0fdf97efe5df745510c6b] and reported by the community during
beta-testing.

FossilOrigin-Name: 36b89d728ff13d395fe0e1db8e7c01263f73dccb278b3ece27f6ef78e909b492
2018-01-10 00:40:06 +00:00
drh
ff4fa772f5 Update error message text for standard error codes to better describe the
latest usage of those error codes.  Modify sqlite3_open_v2() so that it does
return a valid sqlite3 object in the event of SQLITE_MISUSE due to bad
open flags, so that sqlite3_errmsg() does not report "out of memory" in that
case.

FossilOrigin-Name: f27b6370407842e2c175ea4aa9ce018723c57eaac0cccc1f8399bc20f33324be
2017-07-10 12:07:53 +00:00
drh
e75be1aedb Remove the error message text from disused error codes such as
SQLITE_EMPTY and SQLITE_FORMAT.

FossilOrigin-Name: 871752f2925ee14bdd3e994c00832d00860c03f6f28e63504aa6d35978b7f37c
2017-07-10 11:17:51 +00:00
drh
a690ff360b Change the error message text for SQLITE_ERROR to omit the part about
"missing database" as that meaning is now obsolete (since approx SQLite 2.0).

FossilOrigin-Name: 732f90d6327c5c6368fc8b4cc207bd644ef08e3ae6d2e7295258ab099deaba63
2017-07-07 19:43:23 +00:00
dan
231ee68808 Fix "ifcapable" tests in capi3.test and capi3c.test so that the tests work with more build configurations.
FossilOrigin-Name: 3fa88f68c3e1bbb3421cb0d2b82b9bb3fe7b9b14
2016-03-23 16:32:29 +00:00
drh
b7c9659db3 Merge updates from trunk.
FossilOrigin-Name: 86ab8643969bd2e51a257d80da9316c668437f7b
2016-03-21 10:49:49 +00:00
drh
108e5a9a6c Fix some test cases so that they work under the Apple configuration.
FossilOrigin-Name: 399c60764d3fdec49dab1745c30930ca1dbafe70
2016-03-17 23:56:23 +00:00
drh
0e80e50984 Simple test cases for sqlite3_system_errno()
FossilOrigin-Name: 185bc8644c806597194dc532a4d547a03a2dedaa
2016-03-17 17:23:11 +00:00
drh
22ec13466c Add a couple of requirements marks.
FossilOrigin-Name: d70b0fd4c94f2b70cf31c2ab9ef7a2fb2e71c182
2015-02-27 00:33:15 +00:00
drh
47b7fc7843 Experimental changes that permit read operations to continue after a
ROLLBACK, as long as the schema is unchanged.

FossilOrigin-Name: fa6e6a9ae276cad60e9a4abc1bc23cf2809ea786
2014-11-11 01:33:57 +00:00
dan
1496566560 Add a test case for the problem fixed by [1d134ba2ed].
FossilOrigin-Name: d4fbc05df9501a09623d420fcd5b2bce3a57201b
2014-03-05 15:04:36 +00:00
dan
afcf9bd806 Modifications to test files to omit any tests that intentionally access out-of-bounds locations in clang -fsanitize=address builds.
FossilOrigin-Name: f4a701d55f5c4e1e62ed64b779ad4fff89dd31b7
2014-01-23 14:44:08 +00:00
drh
f6b1a8e1a5 Make sure errors encountered while initializing extensions such as FTS4
get reported out from sqlite3_open().  This fixes a bug introduced by
check-in [9d347f547e7ba9].  Also remove lots of forgotten "breakpoint"
commands left in test scripts over the years.

FossilOrigin-Name: ca3fdfd41961d8d3d1e39d20dc628e8a95dabb2f
2013-12-19 16:26:05 +00:00
drh
a3cc007df4 Simplication and optimization of error message handling.
FossilOrigin-Name: 9d347f547e7ba9590b0c68edf50a14ad94a2bb92
2013-12-13 16:23:55 +00:00
dan
a879342b0e Fix a malloc/free mismatch in pager.c (sqlite3_free() called on a buffer allocated by sqlite3DbMalloc()).
FossilOrigin-Name: 506008f000ba4af0b35da023b8c52f7a3f5033bd
2012-06-07 07:24:04 +00:00
dan
bba02a95d9 When a connection disconnects from a shared-cache database, only delete the in-memory schema if there are no other connections.
FossilOrigin-Name: 46f4eb5430d7bc9a339cdf7124ff4bd518eaa39b
2012-05-15 17:15:34 +00:00
dan
2bd2cfc2b5 Modify capi3.test and capi3c.test so that they work with SQLITE_OMIT_AUTORESET builds.
FossilOrigin-Name: 1d5e744cc645150ccaa7256663146fc7b8540bd5
2012-04-03 18:33:43 +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
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
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
dan
cb35460330 Changes to test scripts so that the "inmemory_journal" permutation works with [ef126e775a].
FossilOrigin-Name: f553c8ed04b4b2df8ff4929e0754e3ffd1d01ba4
2010-07-08 09:44:42 +00:00
dan
68928b6c3e Some changes to test scripts related to codec enabled versions of sqlite.
FossilOrigin-Name: 85dd51a75c75b2a123744f646e04538e4e5d89b3
2010-06-22 13:46:43 +00:00
drh
1c767f0df3 More coverage improvements. (CVS 6148)
FossilOrigin-Name: 6e171c0a64850013b26a223189d5bebcc0a01a8b
2009-01-09 02:49:31 +00:00
drh
ad4a4b8047 The COMMIT command now works even if there are pending queries, as long
as the pending queries are reading and not writing the database. (CVS 5864)

FossilOrigin-Name: 51f04aaff2803487933b9dfcf39f27a249f18a98
2008-11-05 16:37:34 +00:00
drh
99dfe5eb47 Add the sqlite3_extended_errcode() interface. Change to return
SQLITE_BUSY instead of SQLITE_ERROR when a COMMIT is attempted and one
or more queries are still pending. (CVS 5850)

FossilOrigin-Name: 4c6a90a16627b1664bf7f15ab40b440b3bd60b48
2008-10-30 15:03:15 +00:00
danielk1977
185eac95b6 Fix the test script --binarylog option. (CVS 5401)
FossilOrigin-Name: 03e3cfc4ccab3c6441d41ade175dc041b8fa6c98
2008-07-12 15:55:54 +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
drh
52fd7beaba Additional tests added to capi3.test. (CVS 5285)
FossilOrigin-Name: 1fdab2c65b966f74bdf130c640ae56a0e811fb71
2008-06-23 17:56:47 +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
drh
65594045d0 Better error messages when trying to open a large file using a version
of SQLite that omits large file support.  Tickets #3096 and #3094. (CVS 5085)

FossilOrigin-Name: bdd89cd231745e6bd498b2751d7ff2cf6169b3eb
2008-05-05 16:56:34 +00:00
danielk1977
3a2c8c8b73 Avoid an out-of-bounds read in sqlite3_prepare() and fix a case where the output variable *pzTail was being set incorrectly. Fix for #3027. (CVS 4957)
FossilOrigin-Name: c287a7b29410be12cf88f886e8e2525a42aa9c03
2008-04-03 14:36:25 +00:00
drh
345331507f When a parse of the sqlite_master table fails, include the name of the
object being parsed as part of the error message. (CVS 4881)

FossilOrigin-Name: 57805b588f6b6d070918102a0ff096ade674279a
2008-03-19 13:03:33 +00:00
drh
bb8a279e11 Remove the dependency on the direct btree interface from as many test
scripts as is practical.  Fix a bug in the output limiter of the
integrity_check pragma that came up while making this change. (CVS 4880)

FossilOrigin-Name: 24e769972eb6052b82dc94d20444c186a213e104
2008-03-19 00:21:30 +00:00
drh
e4d052a314 Additional test cases. (CVS 4806)
FossilOrigin-Name: 74126bf4e605dc875adbf5a0ee83bf8112891e35
2008-02-21 21:30:07 +00:00
drh
c4dd3fd280 Changes to lemon to generate additional comments in the output file and
to remove unreachable code.  Additional test cases for improved test
coverage. (CVS 4736)

FossilOrigin-Name: 2a0bc1e186532a0bfe36ca18fda74a5e7a199227
2008-01-22 01:48:05 +00:00
drh
85b623f2f9 Change all instances of "it's" in comments to either "its" or "it is",
as appropriate, in case the comments are ever again read by a pedantic
grammarian.  Ticket #2840. (CVS 4629)

FossilOrigin-Name: 4e91a267febda572e7239f0f1cc66b3102558c36
2007-12-13 21:54:09 +00:00
drh
0cf19ed817 Add comments, assertions, and test cases to demonstrate that the
problem described in ticket #2742 is not a real problem. (CVS 4510)

FossilOrigin-Name: c085d6dfc0f5849113986cb2a25e64d0c95b3dfb
2007-10-23 18:55:48 +00:00
drh
107b25f1bd Fix minor problems on various tests. This is a snapshot prior to possible
major changes in order to fix the sqlite3AbortOtherActiveVdbes problem. (CVS 4327)

FossilOrigin-Name: 35cb63ecfd9d8ca7304aae1b150ee5d1c3498bde
2007-08-29 19:15:08 +00:00
danielk1977
a1644fd863 Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321)
FossilOrigin-Name: e38ef81b85feb5bff2ad8448f3438ff0ab36571e
2007-08-29 12:31:25 +00:00
danielk1977
222a757dba Update the rest of the malloc failure test scripts to use the new interface. (CVS 4296)
FossilOrigin-Name: b076e1655d6bae5ae10e6ceee646f502435da66a
2007-08-25 13:37:48 +00:00
drh
27641703cc A complete run of quick.test with mutex debugging enabled. (CVS 4266)
FossilOrigin-Name: 783e07d561d1f5509de9475f3b9f38315f247002
2007-08-22 02:56:42 +00:00
drh
3aefabaf94 Updates to test scripts for better support of soft-heap-limit testing. (CVS 4209)
FossilOrigin-Name: 990f621f2247f1636e895dcf51fea1e08f202d31
2007-08-12 20:07:58 +00:00
drh
bf2564f612 Clarify documentation of the column metadata APIs. Make sure that the
new documentation claims are tested. (CVS 4107)

FossilOrigin-Name: 2dafe08a91b5328a9d0df5ab29c3ff2d94ad5f6f
2007-06-21 15:25:05 +00:00
drh
b21f87dda1 Do not segfault even if sqlite is misused by requesting query results
after the query has been reset.  ticket #2426. (CVS 4090)

FossilOrigin-Name: 783f19be387561fbca3ac7e223bdb7dedb5450c8
2007-06-19 10:58:24 +00:00
drh
331e8d6216 Remove vestiges of SQLITE_PROTOCOL from the test scripts. (CVS 3774)
FossilOrigin-Name: e5e8d56397acf041aeaf5361381eb22eb1554759
2007-03-30 20:46:13 +00:00
drh
dddb2f23e2 Clean up memory leaks and uninitialized variables detected by valgrind.
Identify all tests where we deliberately derefence freed memory by adding
a "-misuse" tag. (CVS 3550)

FossilOrigin-Name: 70a862702d6dfcfe73bdeef8f0502c6c50e32a3a
2007-01-03 23:37:28 +00:00
drh
980b1a7405 Allows UPDATE, INSERT, and DELETEs to occur while a SELECT is pending on
the same table. (CVS 3355)

FossilOrigin-Name: 8c52d2ad468615e50a727adab2977a0bef1bc068
2006-08-16 16:42:48 +00:00
drh
30bcf5dbaf Return the correct declared column type, origin column name, origin database
name, etc. from aggregate queries.  Ticket #1726 and #1755. (CVS 3169)

FossilOrigin-Name: e64809f0ae98ce9d152cf030cae72bf3df3e2403
2006-04-07 13:50:37 +00:00