Commit Graph

123 Commits

Author SHA1 Message Date
dan b84b38fd89 Add test cases to improve coverage of VDBE branches. Still some to go.
FossilOrigin-Name: 4cef609d61de272cfdc2b39e1d49c7cd56ec834086bd63095116ff98f4d402bd
2019-04-04 17:58:34 +00:00
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
drh efeaec365f Updates to test procedures so that they all work with encryption. No changes
to the core SQLite code.

FossilOrigin-Name: 0481330756e861de8e1eb7136e7dca2f333b2a82377949d2e0eba401af7d73dd
2017-10-23 16:34:07 +00:00
drh d33bcb8a3c Improvements to PRAGMA integrity_check for better detection of malformed
records.  Integrity_check now avoids returning SQLITE_CORRUPT on a corrupt
record.  Also includes microoptimizations that I stumbled over while working
on integrity_check.

FossilOrigin-Name: 8525c30c1d6676e51b9d9c642450aae3722c129edafdbc39b8435fcfe09b1817
2017-09-13 00:33:36 +00:00
drh 74588ceb31 PRAGMA integrity_check returns SQLITE_OK even if it encounters corruption
while scanning indexes.

FossilOrigin-Name: 81f62e99f27dedf3dc10fa1593c4cd9fc158680867206aee853e503a0cc8df71
2017-09-13 00:13:05 +00:00
drh 3e1e14d818 Make sure all connections are closed in the pragma.test script.
Test change only - no changes to code.

FossilOrigin-Name: d7b7f038a2c5e81a58c1dd4b556096b58ce10c30eb74fd4b770445927fdb62f3
2017-09-12 00:24:45 +00:00
dan 3841372350 Update "PRAGMA integrity_check" to detect inconsistencies between a single
record's header and body.

FossilOrigin-Name: 9e393a0edf1a578ddecc16a72fe3c54b75c2a650d507bcbc37c9724fbede1494
2017-09-05 20:16:19 +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
drh 518aca114f Merge updates from trunk.
FossilOrigin-Name: cc28106e5c196c0a9678fbbd06f6afd49271a8e8
2016-04-21 15:03:37 +00:00
drh a6dddd9bde Remove quotes from identifiers used as datatype names in a CREATE TABLE
statement.  Fix for ticket [7d7525cb01b68]

FossilOrigin-Name: eba27d4d17a76884292667d570d542e580ee3e77
2016-04-18 15:46:14 +00:00
dan 9131ab9386 For a pager backed by a temp file, store the main journal in memory until it is at least sqlite3_config.nStmtSpill bytes in size. Prevent the backup API from being used to change the page-size of a temp file.
FossilOrigin-Name: 84c557010c211595d2ec80b62c63af1c7f4714bd
2016-04-06 18:20:51 +00:00
drh 7da56b4f65 Many more test cases fixed. Only a few remain.
FossilOrigin-Name: 99b9d7eef68fd6d5c9eecb5fbe3dfe002c1ca4a8
2016-03-14 18:34:42 +00:00
drh 6841b1cb3d Add "PRAGMA synchronous=EXTRA" which syncs the directory containing the
rollback journal when the rollback journal is deleted in order to commit a 
transaction in DELETE mode.

FossilOrigin-Name: af92401826f5cf49e62c278f344ab75252a18da2
2016-02-03 19:20:15 +00:00
drh b3366b99c8 Update evidence marks due to wording changes in requirements text. No
changes to code.

FossilOrigin-Name: 86781093bdb4c4fdedd228cb1c8961db48a483bb
2015-09-11 20:54:44 +00:00
drh d99d28361e Ensure that semantic SQL errors are always reported back up to the syntax
parser.  Also:  Improve the defense against invalid PRAGMA synchronous settings.

FossilOrigin-Name: 7aeade9a07f29bf26e50394042ea18d0121fe7a3
2015-04-17 15:58:33 +00:00
drh 59ac655d02 Silently ignore requests to change the PRAGMA synchronous setting to an
illegal integer value, rather than raising an assertion.

FossilOrigin-Name: e0a88176fcfbed7b554a036948261a332c920053
2015-04-16 16:04:39 +00:00
drh 1b6789697d Remove an incorrect ALWAYS() from the table_info pragma.
FossilOrigin-Name: 0e087c0183bc7a758cf2a1d39158bc24fde833a2
2015-04-15 07:19:27 +00:00
drh 7be0fd9c58 New test cases and requirements marks for PRAGMA index_info, index_xinfo,
and index_list.

FossilOrigin-Name: e5b13634d9794e4c75378cea89b64c5ecc5aa3e5
2015-03-05 15:34:15 +00:00
drh 5e7028c210 Revert "PRAGMA index_info" to output only three columns, for complete
compatibility with prior versions.  The new "PRAGMA index_xinfo" can be
used to get the extra information in 4th, 5th, and 6th columns.

FossilOrigin-Name: fc543c2c5ced30a7dc3a05b0c1ad80fdc838df8e
2015-03-05 14:29:02 +00:00
drh 51a74d4cbd More test cases and requirements marks for pragmas.
FossilOrigin-Name: fc51037cd97063069620213a62efdeff5d898706
2015-02-28 01:04:27 +00:00
drh 9d356fbe6e New requirements marks and a few new test cases to go with them. No changes
to code.

FossilOrigin-Name: 8c2b29d9acb92d47f4deec21a7c2dca52db63345
2015-02-27 20:28:08 +00:00
drh 4bb8cb0927 Merge all recent trunk changes, including the movement of the pragma
table into the separate pragma.h header file.

FossilOrigin-Name: 3af19f84446ba5fc1ed754d0d73f6a6d7fb2f365
2015-02-04 23:13:48 +00:00
drh c228be5b1f Add the "index_xinfo" pragma. Add new columns to the "index_info" and
"index_list" pragmas.

FossilOrigin-Name: 30f51d7b3b292191e8351223242e708bb7f3dfa6
2015-01-31 02:00:01 +00:00
drh 7efa426ee9 Make sure the sqlite3BtreeCount() routine does not leave index cursors in an
inconsistent state, as doing so might result in an assertion fault inside
of sqlite3BtreeKey() called from saveAllCursors() if content is deleted out
from under the statement that issued the sqlite3BtreeCount() call.

FossilOrigin-Name: 5b1b697040116048e464b3ebab8395fe088e389a
2014-12-16 00:08:31 +00:00
drh 2d8233157d Fix a benign test error on PRAGMA collation_list
introduced by a recent checkin.

FossilOrigin-Name: 332cc9591d05508ac9cb56fde2b82e20e0342d1f
2014-11-20 23:11:30 +00:00
drh cefc87fca5 Enhance the PRAGMA integrity_check command to detect UNIQUE and NOT NULL
constraint violations.

FossilOrigin-Name: 9abcf2698c09f4f6a44a68e74f9f6b538f3253d6
2014-08-01 01:40:33 +00:00
dan 597515d70c Update some test cases that deal with corrupt databases.
FossilOrigin-Name: 3a09f5605ac7c6e503eb10acfdc607010414d917
2014-02-28 18:39:51 +00:00
dan 1fed5dab0d Attempt to speed up sqlite3VdbeRecordCompare() by various means. This code is in an interim state.
FossilOrigin-Name: 85206e0bbac29adab52bef795f6d1479f2ae2c0e
2014-02-25 21:01:25 +00:00
drh 6fbe41acf2 Continue working to get UPDATE operational for WITHOUT ROWID tables.
Fix PRAGMA integrity_check so that it works on WITHOUT ROWID tables.

FossilOrigin-Name: 0d4fea7462c0f61cd1c736cbcd7bea5ec2034d54
2013-10-30 20:22:55 +00:00
drh 3ef261567a Restore the index_list pragma back to its former operation. Create a new
PRAGMA stats used to access the table and index widths and heights.

FossilOrigin-Name: f0cf8c85dcbcc7778aed2816792c368d777f79cb
2013-10-12 20:22:00 +00:00
drh 833d198fb1 Fix test cases for the new information in PRAGMA index_list.
FossilOrigin-Name: dd03be1065537679c2daf5e4200902c47714fceb
2013-10-08 22:25:22 +00:00
drh fdaac671b8 Improved estimates of the relative speed of index scans based on declared
datatypes of columns in the table.  Add "r" column to PRAGMA index_info,
showing the estimated relative scan rate.

FossilOrigin-Name: 07462bb6059f023c22a6c84a4a02afbd84e69255
2013-10-04 15:30:21 +00:00
drh 4ee09b4bcc Allocate 4 bytes of unused header space for an "Application ID". Add
the "PRAGMA application_id" command to set and query this identifier.
Add the "magic.txt" file to show how the posix file command might use
this application id.

FossilOrigin-Name: 28c9e7fdee2471a3026ee05ff591194d5f398131
2013-05-01 19:49:27 +00:00
drh c95e01da22 Verify that the schema has not changed before running PRAGMA table_info,
index_list, index_info, and foreign_key_list.

FossilOrigin-Name: 82952d08f3e3aa80a7f51e80dbc89742cb4a09f0
2013-02-14 16:16:05 +00:00
drh 384b7fe221 Enhance the table_info pragma so that the pk column shows the order of the
columns in a multi-column primary key.

FossilOrigin-Name: 3076a89015071e9b40e728bd55160e3a6ed98820
2013-01-01 13:55:31 +00:00
dan 5885e76269 If a specific database is nominated as part of a "PRAGMA integrity_check" or "PRAGMA quick_check" command, search for problems in the nominated database only. i.e. "PRAGMA main.quick_check" now only scans the main database, not all attached databases as before.
FossilOrigin-Name: 4353e40b74f577f224f190c429bfe03cf6a5c6d6
2012-07-16 10:06:12 +00:00
drh cc71645bf7 Merge the changes need to compile on WinRT into trunk.
FossilOrigin-Name: 61360ca6ca3448477d5c662d3642beef6dd2079e
2012-06-06 23:23:23 +00:00
mistachkin a112d140ae Add experimental support for resolving relative database file paths using a fixed user-defined directory.
FossilOrigin-Name: 7354ae8fd3eccee2cf9f6501da5b1a014c31556f
2012-03-14 00:44:01 +00:00
mistachkin f8a784645c On Windows, make sure the current directory value used by the test suite is 'normalized' to what the parent command shell sees. Also, clean the test directories used by the quota2.test file.
FossilOrigin-Name: 82bcd7ec1531f6d71c079578434c58d3ce46a1de
2012-03-08 20:00:36 +00:00
mistachkin 5b044545d7 Fix test pragma-19.5 so that it works on file names that may contain spaces and/or backslashes.
FossilOrigin-Name: 9aaa1ab7c63c9045fecf5e965b333cc5f28b0791
2012-03-02 22:41:06 +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 3b42abb35b A negative value N for the cache_size pragma adjusts the number of cache
pages to use approximately N kibibytes of memory.

FossilOrigin-Name: b3faa680aedc94ed8aa2819228c0d304b181cc51
2011-11-09 14:23:04 +00:00
drh 5d16a9a6c6 Make sure the page_count and quick_check pragmas work properly even when
their names are capitalized.  Fixes a problem reported on the mailing list.

FossilOrigin-Name: 150592b4b4d86372e70332d4f69e41a04c4c54c3
2011-10-13 14:41:22 +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 14d14607a5 Fix minor test suite problems causing errors on OSX.
FossilOrigin-Name: 759c954fee215a64f21fe13491515eebebbc6d01
2010-10-06 16:42:52 +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 dd3cd977cc Experimental changes that cause SQLite to use bytes 28..31 of the database
header to determine the database size, rather than using the actual database
size.  This allows database space to be preallocated.

FossilOrigin-Name: b844ac6fcb72595a71e5c5283ec461309a87ba79
2010-03-27 17:12:36 +00:00
dan 1da40a381f Check in implementation of foreign key constraints.
FossilOrigin-Name: d5d399811876391642937edeb9e8434dd9e356f5
2009-09-19 17:00:31 +00:00