Commit Graph

6454 Commits

Author SHA1 Message Date
shane
c0688ea172 Removed compiler warnings from MSVC builds. Ticket #3701. (CVS 6335)
FossilOrigin-Name: 5477833ec7f707ea9937d3fd6a6d8ab49f2016f1
2009-03-05 03:48:06 +00:00
shane
ce6fa1706a Converted EXPR_*SIZE macros to use offsetof() to avoid MSVC compiler warnings. (CVS 6334)
FossilOrigin-Name: 5e8e16f7d505a4b21272f1d300f366ee0e211e56
2009-03-02 17:18:48 +00:00
drh
18209cd6e2 Fix the SQLITE_ENABLE_UPDATE_DELETE_LIMIT option for the new Expr compression
logic of check-in (6305).  Bug discovered during regression testing. (CVS 6333)

FossilOrigin-Name: 91969edac737adf087e35e10aa0a732b3303afd5
2009-03-02 14:24:21 +00:00
drh
d742bb78f8 Fix a bug in the GROUP BY alias name resolution. The bug was by
check-in (6305).  Discovered by regression test on 64-bit linux.
Test cases added so that the problems is detected on 32-bit systems. (CVS 6332)

FossilOrigin-Name: fa0008502ec4f891bfed4a11f01650d274f95c44
2009-03-02 01:22:40 +00:00
drh
d43fe20bc9 Suppress some compiler warnings (where possible). Ticket #3696. (CVS 6331)
FossilOrigin-Name: a2373e5409e4e59903f315a4446db8cb6ba000cc
2009-03-01 22:29:20 +00:00
drh
b45f65db8f Fix a critical bug in the VDBE opcode array resizer introduced by
check-in (6307).  Bug detected by regression testing. (CVS 6330)

FossilOrigin-Name: ec3b18acaecabae6eb04eda006870e602faacb8c
2009-03-01 19:42:11 +00:00
danielk1977
2f886d1d53 Instead of linking temporary triggers on non-temporary tables into the Table.pTrigger list, search the temp schema for them on demand. Fix for #3688. (CVS 6329)
FossilOrigin-Name: 3befe1ef7e6ebddedfa69579553a1b85b411ee98
2009-02-28 10:47:41 +00:00
danielk1977
02b4e3b34e In sqlite3_table_column_metadata(), hold the mutex on all attached BtShared objects while accessing schema objects. Fix for #3679. (CVS 6328)
FossilOrigin-Name: d197afd658eecfc0e24913e5a779c8f1e2a138a6
2009-02-26 07:15:59 +00:00
drh
da10822a61 Move the new genfkey shell command out from within #ifdef _WIN32_ (CVS 6327)
FossilOrigin-Name: 48ee0e47e2d9669cc7425104e6b04ce49caf2e56
2009-02-25 19:07:24 +00:00
danielk1977
e632004fdd Remove genfkey.c. Change genfkey.README to talk about the new shell dot-command, not the old standalone genfkey program. (CVS 6326)
FossilOrigin-Name: 36d699660bc328e65170d72be715338e82dbbb50
2009-02-25 15:43:57 +00:00
danielk1977
c8c7069035 Add the 'genfkey' functionality to the sqlite3 shell. Accessed using a new dot-command - ".genfkey". (CVS 6325)
FossilOrigin-Name: 0a59fb28b46e5d85c850d1dfa1385a4656e4dda5
2009-02-25 15:22:02 +00:00
danielk1977
02f33725d2 Minor changes and coverge tests for "SELECT count(*)" optimization. (CVS 6324)
FossilOrigin-Name: a3695b98f63fb776c3b7f77f0553e8a38bcc6f78
2009-02-25 08:56:47 +00:00
drh
11b57d6929 Additional commands and another procedure name changes for clarity of
presentation. No logic changes. (CVS 6323)

FossilOrigin-Name: 91d9d51e03657e7492dd7b93e66c82b152abec3b
2009-02-24 19:21:41 +00:00
drh
c25eabedef Changes to comments and functions/procedure names for clarification. No
changes to logic. (CVS 6322)

FossilOrigin-Name: b99c1815fe270decf1ac3d714acc7e945d1e728a
2009-02-24 18:57:31 +00:00
danielk1977
2b0223ecf6 Remove old declaration of sqlite3_pending_byte (which was used by test code). It has been replaced by sqlite3PendingByte. Ticket #3677. (CVS 6321)
FossilOrigin-Name: 44f0162ebb760dd6926ee5691752b6798e3aacb9
2009-02-24 18:40:49 +00:00
danielk1977
7a895a8048 Fixes and some extra test cases for count(*) optimization. (CVS 6320)
FossilOrigin-Name: 3f0baa1b63df31f7dc885fd39290ca12ad2be6df
2009-02-24 18:33:15 +00:00
drh
c74d0b1dfc Enhanced comments on table locking logic as it relates to preparing new
statements.  Added assert() and testcase() but no other changes to code. (CVS 6319)

FossilOrigin-Name: 4a12f5b818b769d7518c942ff3dedf453dde698e
2009-02-24 16:18:05 +00:00
danielk1977
4d9c1dd262 Add test file test/count.test for testing "SELECT count(*)" statements. It is not properly populated yet. (CVS 6318)
FossilOrigin-Name: a195d74ff9ce836447dba4da7edcc6f1cdae5574
2009-02-24 10:48:27 +00:00
danielk1977
2d2e7bd32e Reverse commit (6315) for now. (CVS 6317)
FossilOrigin-Name: 0e7c369c23a8767b4d3e5cdd47c14716992fb71a
2009-02-24 10:14:40 +00:00
danielk1977
a55331620e Optimize queries of the form "SELECT count(*) FROM <tbl>" by adding a sqlite3BtreeCount() interface to the btree layer. (CVS 6316)
FossilOrigin-Name: d4aa6593183224b6868a322511511c0bbf63b598
2009-02-24 10:01:51 +00:00
danielk1977
e2d7b24d08 Scan an index instead of a table for "SELECT count(*) FROM <tbl>" queries. Because an index is usually smaller than a table on disk, this saves some IO. (CVS 6315)
FossilOrigin-Name: 294ba6f743c9132dce0e73da480bd3c2071e7239
2009-02-23 17:33:49 +00:00
drh
699b3d4f89 Add the reverse_unordered_selects pragma. (CVS 6314)
FossilOrigin-Name: bc078e0007b6c3dc07722820bb53798b643212b3
2009-02-23 16:52:07 +00:00
danielk1977
7c5c3cab89 Ensure the return value of sqlite3_errmsg16() is aligned on a 2-byte boundary. Ticket #3665. (CVS 6313)
FossilOrigin-Name: 9b8acf8319ec760713773407a4d5a33dea8d75e8
2009-02-23 14:42:53 +00:00
drh
6104b65303 The sqlite3.def file is automatically generated and is not suppose to be
part of the source code repository.  So it is hereby removed.
Ticket #3671. (CVS 6312)

FossilOrigin-Name: 5dcda154090e55a22b4d19f9def42beba8733f50
2009-02-21 22:38:59 +00:00
rse
973402e511 unbreak Autoconf-based build procedure by added missing backup.lo to the list of library objects (CVS 6311)
FossilOrigin-Name: 94945801973c0e659de3f429c98a7d95a8c693f6
2009-02-20 22:27:41 +00:00
danielk1977
d336e222f4 Instead of using SetNumColumns, specify the number of columns in a table or index using the P4 argument. (CVS 6310)
FossilOrigin-Name: e43ed649630cbc49a6f2a25a26a4a6b5fce84c48
2009-02-20 10:58:41 +00:00
drh
08de14908d Add a count parameter to the OP_Variable opcode and use it to simplify
prepared statements that copy consecutive unnamed parameters into
consecutive registers (a common case). (CVS 6309)

FossilOrigin-Name: 48b77b04935d8942eb22f0c061f3bc5e99bbd7db
2009-02-20 03:55:05 +00:00
drh
5053a79b6c Add the OP_HaltIfNull opcode and use it to simplify prepared statements
for INSERTs and UPDATEs of tables with NOT NULL columns. (CVS 6308)

FossilOrigin-Name: feccad8d0d05925ce67856d40ffe1bc7054168a0
2009-02-20 03:02:23 +00:00
drh
b2771ce24c Reuse space left-over opcode space at the end of the VDBE opcode array to
store memory cells, VDBE cursors, and other content needed by the VDBE.
This reduces the memory required by a prepared statement. (CVS 6307)

FossilOrigin-Name: 58a1809257ccfb7d9112a35f79ca2f82b3daa878
2009-02-20 01:28:59 +00:00
drh
e1935f2367 Remove code in malloc.c that was already commented out using #if 0. (CVS 6306)
FossilOrigin-Name: e1ad757ec0abead25265f9251c954d2497bccc06
2009-02-19 20:50:14 +00:00
danielk1977
6ab3a2ec8a Changes to reduce the heap space consumed by triggers, views and tables in the in-memory representation of the schema. Also to reduce the space used by prepared statements slightly. (CVS 6305)
FossilOrigin-Name: d9f6ffbc5ea090ba0daac571fc9a6c68b9c864e4
2009-02-19 14:39:25 +00:00
drh
076d4661a6 Make sure the auto_vacuum=INCREMENTAL setting is preserved across a VACUUM.
Ticket #3663. (CVS 6304)

FossilOrigin-Name: ded04f12f41504e4a3ecd5164f0d4cbbde5e16f7
2009-02-18 20:31:18 +00:00
drh
8b39db1c83 Move the text of C-API requirements out of the sqlite.h.in source file and
into separate files in the "docsrc" CM system.  Comment changes only - no
changes to code. (CVS 6303)

FossilOrigin-Name: 419eb48b6b4238526850091eef28af503b6c4579
2009-02-18 18:37:58 +00:00
drh
40a390de50 Fix the amalgamation builder to mark sqlite3PagerBackupPtr as private.
Ticket #3662. (CVS 6302)

FossilOrigin-Name: fb281950c51ef81797f93d797113d328d66a7cb0
2009-02-18 12:25:28 +00:00
vapier
d3dd12b202 run autoconf so the updated version is in the configure script (CVS 6301)
FossilOrigin-Name: edbb3586e92d675d621e23126581e9c3072e32b9
2009-02-18 04:35:12 +00:00
vapier
afea974870 break libsqlite3.la install step out so the tcl install step can depend on it as well (CVS 6300)
FossilOrigin-Name: 0998c55467a777783e4d451b3c82d769bef84d0b
2009-02-18 04:33:59 +00:00
drh
446126ab07 Version 3.6.11 (CVS 6299)
FossilOrigin-Name: 6abd630c8703ed09af27776096677c2f35da6b85
2009-02-18 00:00:04 +00:00
drh
50b6568454 Add tests to double-check that nothing within SQLite ever tries to allocate
amounts of memory that are close to the maximum signed integer, leading to
an integer overflow within malloc().  This is not currently a problem.
The extra tests just insure it never becomes a problem. (CVS 6298)

FossilOrigin-Name: f6ba7bb9152cffc9f67dfa7de12e36a3244b7e03
2009-02-17 18:37:28 +00:00
danielk1977
f37adcb40f Initialize an uninitialized buffer to silence a valgrind warning during a VACUUM operation. (CVS 6297)
FossilOrigin-Name: 8c61968b33dd753618589cb3f859984223161d64
2009-02-17 17:56:30 +00:00
danielk1977
0a54907159 Allow sqlite3_shutdown() to be called by a process before sqlite3_initialize() is. Prior to this commit such a call could segfault. (CVS 6296)
FossilOrigin-Name: 79431c58d964d6057c7f42f7c1df74f3df4493eb
2009-02-17 16:29:10 +00:00
drh
e8df800d4c Make sure result variables are initialized or unused following a failure
of the xFullPathname VFS interface.  Problem detected by valgrind. (CVS 6295)

FossilOrigin-Name: 59a4755185f0e51699cd020ae67d279bee45de1c
2009-02-17 16:17:01 +00:00
shane
65ad7d225f Changes to remove some compiler warnings from MSVC. (CVS 6294)
FossilOrigin-Name: 68f15442e8db364952d30daf4ce60c6b938f5906
2009-02-16 17:55:47 +00:00
drh
38aec8dc09 Fix a compiler warning in backup.c. (CVS 6293)
FossilOrigin-Name: 82222fbf5d5a085ce3e2c172c648a4c6d9750626
2009-02-16 16:23:09 +00:00
drh
f16ce3bc2a Make sure OOM errors in the ANALYSIS loader get reported back out to
high-level layers.  Strange behavior can result otherwise. (CVS 6292)

FossilOrigin-Name: 88a6355cd65ddb319dbc27b5248c664dbf599778
2009-02-13 16:59:53 +00:00
drh
0388123f07 Correctly handle attempts to add a UNIQUE or PRIMARY KEY column using
the ALTER TABLE statement.  Ticket #3651. (CVS 6291)

FossilOrigin-Name: dd179ff2986bc2a86d70bbe927fd0e123e17d398
2009-02-13 03:43:31 +00:00
drh
aff46970a7 Add additional cross-references from API documentation to other documents.
Comment changes only; no changes to code. (CVS 6290)

FossilOrigin-Name: 97203a0ad7a7ddfae04daf99558389b0589fc170
2009-02-12 17:07:34 +00:00
drh
a32e0d05ff Update thread tests to clear the sqlite_open_file_count counter at the
end.  This counter is not threadsafe and can end up with an invalid value
at the end of the thread tests. (CVS 6289)

FossilOrigin-Name: 8c4d71a169e529964d2d0cfba82bbad66a0bcd12
2009-02-12 17:06:41 +00:00
danielk1977
f2a79f2248 Fix some edge cases with backing up databases that are exactly PENDING_BYTE bytes in size, or just slightly larger. (CVS 6288)
FossilOrigin-Name: 2fc450e8e60248d6111d0b0d2b8f2344f5b89bca
2009-02-12 17:01:49 +00:00
danielk1977
1435ccd52b Modify lock.test to account for "PRAGMA lock_status" returning "unknown" for in-memory databases. (CVS 6287)
FossilOrigin-Name: 9a6e558ba6fe0b38376a85a6c1e2cea5570ea283
2009-02-12 09:36:15 +00:00
danielk1977
f7f33fb08a Fix a case where during a rollback triggered by an IO or malloc error an unjournalled region of the database could be written to (with it's original data). This was causing an assert in test_journal.c to fail. Add a test case in ioerr2.test to trigger this case. (CVS 6286)
FossilOrigin-Name: 315a6692f9a03a470871cce4f74567683546f343
2009-02-12 09:11:56 +00:00
shane
ce14f6245e Updated for Windows compatibility. Test scripts only. (CVS 6285)
FossilOrigin-Name: 2522ad1df3599fa71cd1d929142adaefaf3a4d67
2009-02-11 16:06:18 +00:00
drh
46f33ef93c Continuing documentation refinements. Comment changes only. (CVS 6284)
FossilOrigin-Name: 83e8308435be8c954fe7a347a64f28abcb81437b
2009-02-11 15:23:35 +00:00
danielk1977
3d781c2176 Fix the backup.test script so that it works regardless of the value of SQLITE_TEMP_STORE and the initial contents of the file-system. (CVS 6283)
FossilOrigin-Name: da660ea73ac6627b4e71706b8cd464646ea66550
2009-02-11 15:11:00 +00:00
drh
ae1a880719 Add hyperlinks from sqlite3_limit() documention to the limits.html page.
Comment changes only - no changes to code. (CVS 6282)

FossilOrigin-Name: f0189ec8c9b5d1dfe1f5d93746cc7b5703a80de5
2009-02-11 15:04:40 +00:00
danielk1977
d6846d75ca Fix the crashtest infrastructure so that it doesn't trigger the "don't write to the locking region" assert in os_unix.c. (CVS 6281)
FossilOrigin-Name: b7fd4615cd41179484bd44d2f4bd7aef04977911
2009-02-11 14:27:04 +00:00
danielk1977
4faa5f41b8 Modify the test_journal.c code to (1) account for the backup code writing to parts of the pending-byte page when changing a databases page-size, and (2) to avoid reading from the pending-byte page and triggering the assert in os_unix.c. Changes to test code only. (CVS 6280)
FossilOrigin-Name: 4879621658c2c785ab7b12dbae780901496d3a78
2009-02-11 07:38:11 +00:00
danielk1977
9ec30744bf In test_mutex.c, zero the global structure staticly instead of in Sqlitetest_mutex_Init(). This is because Sqlitetest_mutex_Init() is now called by each thread during thread tests ((6193)). Test code changes only. (CVS 6279)
FossilOrigin-Name: 8b318b9385d0542ca56750b901c0c6b7d05ca634
2009-02-11 05:18:06 +00:00
danielk1977
2b754b4820 For the "onefile" demo, pass SQLITE_OPEN_TEMP_DB instead of MAIN_DB to the OS layer when opening the single file. This is to work around the assert() in os_unix.c that tests that the locking region is not written to. (CVS 6278)
FossilOrigin-Name: 2da076a2c1663e916dc50e5e1679be216922dfc5
2009-02-10 18:54:02 +00:00
danielk1977
b8f12c1201 Reduce the number of iterations in one of the savepoint4.test crash tests. (CVS 6277)
FossilOrigin-Name: fafb07b83721d67f6c6f3126c8de94b9b7efa519
2009-02-10 14:45:12 +00:00
danielk1977
2d42c2b247 Prevent code in test6.c from reading the 512 byte locking region (the PENDING_BYTE page) of a database file. Doing so triggers an assert failure in os_unix.c. (CVS 6276)
FossilOrigin-Name: 2a6a43169220fab5a15a786e2a464b90cb893179
2009-02-10 14:28:57 +00:00
drh
52224a73f1 Create links from backup API documentation to the backup application note.
Comment changes only - no changes to code. (CVS 6275)

FossilOrigin-Name: 85de23fb4e63e5c71480c4c34efec331e774d7fb
2009-02-10 13:41:42 +00:00
danielk1977
cd503d6a3b Reenable triggering vdbe tracing by creating file-system entries. Add a (redundant) test that modifying the temp schema expires all prepared statements. (CVS 6274)
FossilOrigin-Name: f6590dac4612d0d05105fa820e8fcb80b5907a40
2009-02-10 11:17:43 +00:00
danielk1977
b632201d81 Do not always open a transaction on the temp database when writing to the main or another attached database. (CVS 6273)
FossilOrigin-Name: f76b0b8129657eace0a933ac1988b472d5e79c98
2009-02-10 10:44:42 +00:00
danielk1977
8e3e881a24 Fix a bug in test file misc7.test. No code changes. (CVS 6272)
FossilOrigin-Name: d919d2a14c8cbbda3fbd6fb2ddae174fa709177b
2009-02-10 05:45:41 +00:00
danielk1977
3d0cbc3362 Fix a problem in backup.c causing OsTruncate() to be called with an argument larger than the current file-size. (CVS 6271)
FossilOrigin-Name: b34bde80c7e2028baf7ba2ff26e587a63a170f3d
2009-02-09 18:55:45 +00:00
drh
08c6d4468c Add assert() statements to os_unix.c which fire if there is a read or
write for the locking region of a database file. (CVS 6270)

FossilOrigin-Name: 93e792ffa88ba2e8422d041f36b70d9b2e220da2
2009-02-09 17:34:07 +00:00
drh
0daa002c7c Better error message when DISTINCT is used on an aggregate function that
takes two or more arguments.  Ticket #3641. (CVS 6269)

FossilOrigin-Name: e20bf384668bcde7c2f2152ca88e28cf65a02679
2009-02-09 13:19:28 +00:00
danielk1977
09480a9dc2 Ignore the return structure of and F_GETLK fcntl() call on djgpp. Fix for #3642. (CVS 6268)
FossilOrigin-Name: 8227af3463ded1c52d0a16c63b8dbc516eab57f0
2009-02-09 05:32:32 +00:00
danielk1977
53b6028b9c Attempt to reproduce ticket #3643. No luck yet. (CVS 6267)
FossilOrigin-Name: 8f2f98d247b04ae6bda34621e9ccdba904f34ad7
2009-02-09 05:18:33 +00:00
danielk1977
03ab035796 Changes to the backup API: (1) if a negative number is passed as the second argument to backup_step(), this is interpreted as "copy all remaining pages" and (2) if backup_finish() is called after backup_step() fails with a BUSY or LOCKED error, then this error is also returned by backup_finish() (same handling as for other errors encountered by backup_step()). (CVS 6266)
FossilOrigin-Name: 9b8c8b18cf6b7d44d5fd64760537bc030097756b
2009-02-06 05:59:44 +00:00
drh
f4883888ca Fix a test case that was still using the old pending_byte mechanism. (CVS 6265)
FossilOrigin-Name: 08ec4f2c394ec834c20bfce0d98bbe6b4ce2be65
2009-02-05 17:00:54 +00:00
drh
ddb68e17fa Fix the declaration of sqlite3PendingByte so that it works with the
amalgamation. (CVS 6264)

FossilOrigin-Name: 193c871f3d16ce982040334c543610d330117bd5
2009-02-05 16:53:43 +00:00
drh
c7a3bb94c2 Make the pending byte adjustable via sqlite3_test_control() on all builds,
not just on test builds. (CVS 6263)

FossilOrigin-Name: e8f192e2a93350a136d86bd9caceff65f52f3513
2009-02-05 16:31:45 +00:00
shane
f5d335f851 Fixed error detection in winTrucate() in os_win.c. Windows version only. Ticket #3640. (CVS 6262)
FossilOrigin-Name: 82e03f1b5481c6fe5e94976f086e8fe8c99881af
2009-02-05 03:16:20 +00:00
shane
d20010c70e Improved overrun detection in mem2.c (SQLITE_MEMDEBUG). Previously was only checking up to 3 extra bytes allocated due to rounding. (CVS 6261)
FossilOrigin-Name: a6fe3d6b02734b23fe067a373c0232024a782a6c
2009-02-05 03:00:06 +00:00
drh
dc2c491525 Add "backup" and "restore" methods to the TCL interfaces and test cases
to exercise those methods. (CVS 6260)

FossilOrigin-Name: e420a3cedc7ee086a77cd719f6b9fb85415eb5f3
2009-02-04 22:46:47 +00:00
drh
9ff849fc87 Add ".backup" and ".restore" commands to the CLI - implemented using the
new backup API. (CVS 6259)

FossilOrigin-Name: 003e1d62189e9e37f901d86a696cfccd22bd3b38
2009-02-04 20:55:57 +00:00
drh
bd4c35b999 Increase the version number to 3.6.11. (CVS 6258)
FossilOrigin-Name: 0882a028c8cee868bb79728499fb1fa7c0630fa6
2009-02-04 20:08:26 +00:00
drh
9e7ba7c69a If the truncate operation fails in journalmode=TRUNCATE, do not fall back
to overwriting the journal header with zeros.  Simply fail the operation. (CVS 6257)

FossilOrigin-Name: d4af60e52a12262ad0194908e68a386c719fe177
2009-02-04 19:16:23 +00:00
drh
b309becded Simplify wording of backup API error message. Decapitalize some other
error messages. (CVS 6256)

FossilOrigin-Name: f92405afb649b698b735b423cd9195d4f8f137c9
2009-02-04 17:40:57 +00:00
drh
eef1eb0ff4 The sqlite3_backup_init() interface must lock the destination in case it
needs to change the error message. (CVS 6255)

FossilOrigin-Name: 572378d3a29c7d55fa4a15df14800c26d6c563a1
2009-02-04 16:56:19 +00:00
danielk1977
b48c1f192e Fix a bug in test_malloc.c whereby running multi-threaded test cases could cause subsequent OOM tests to fail. (CVS 6254)
FossilOrigin-Name: 03ea9e591337a3c442080ee7cd01cc4ee85c1357
2009-02-04 15:27:40 +00:00
danielk1977
8a569e2936 Ensure that thread001.test and thread002.test reset the global shared-cache-enabled setting before they finish. (CVS 6253)
FossilOrigin-Name: 416288a9fa39c7c4d9d414de18edc0423ed83794
2009-02-04 11:57:46 +00:00
danielk1977
651a52fac2 Do not attempt to use the sub-journal file descriptor if it is not opened (as in journal_mode=off mode). Ticket #3636. (CVS 6252)
FossilOrigin-Name: 20bd76055463c85f62a450e368f4bcf7d2215f94
2009-02-04 10:09:04 +00:00
danielk1977
de06e9f230 Fix a bug in malloc.test causing the exclusive permutation to fail. Changes to test code only. (CVS 6251)
FossilOrigin-Name: 72745bde90a9b4ffae1496f1668e4bb0678bd400
2009-02-04 08:17:57 +00:00
shane
fbd60f826d Changes to completely remove all floating point ops if SQLITE_OMIT_FLOATING_POINT defined. Note that w/o fp, date/time, round, nan, etc. are all gone or limited in functionality. Updated some of the test scripts to support missing fp and 64-bit functionality. Ticket #3029. (CVS 6250)
FossilOrigin-Name: 5cef400023205b55152b91441acc78f9cd8d58a9
2009-02-04 03:59:25 +00:00
shane
63207ab262 Remove compiler warnings under MSVC. (CVS 6249)
FossilOrigin-Name: 6301f08a2b32289a49c4af994f2770318c444b49
2009-02-04 01:49:30 +00:00
drh
d3a5c50ec7 Correction to check-ins (6246) and (6247): The backup object might not
hold a valid destination connection pointer.  Also, do not reset the
page cache when establishing a read-lock while there is a persistent
or truncated journal, only if there is a journal that really needs to
rollback.  Otherwise backups always reset whenever the source database
file is read. (CVS 6248)

FossilOrigin-Name: 7f827ba9d7af2dfe44aed386b4407716c85daf5e
2009-02-03 22:51:06 +00:00
drh
6231286dfe A backup must clear the internal schema of the destination database so
that the schema will be reloaded for the next sqlite3_prepare() (CVS 6247)

FossilOrigin-Name: 76f23a4394574e31f237e55c641bc70534f44d97
2009-02-03 22:17:42 +00:00
drh
662c58c9ba Must hold mutex on the destination during backups. Add documentation to
warn programmers that attempting to use the destination connection during
a backup can lead to deadlock. (CVS 6246)

FossilOrigin-Name: 5f6c06b974f26532264467ace603b6f1f830fba9
2009-02-03 21:13:07 +00:00
shane
39070edbab Fixed postToParent() return type (Tcl_ThreadCreateType) in test_thread.c to compile with MSVC. Removed a few compiler warnings. Test harness change only. (CVS 6245)
FossilOrigin-Name: e9475abaf87c0ae2f2bbcbaf0f7ba704f9f50c5f
2009-02-03 19:55:20 +00:00
shane
0f911e2559 Fix buffer size in md5_cmd() in test_md5.c. Test harness change only. (CVS 6244)
FossilOrigin-Name: c1e15717ff1b8181ff5fdc800015dadb62135e8c
2009-02-03 19:52:59 +00:00
drh
62b5d2d8e6 More adjustments to the backup API documentation. No changes to code. (CVS 6243)
FossilOrigin-Name: ca650879d3168d4475a33430300a0e8ac806facf
2009-02-03 18:47:22 +00:00
drh
27b3b84796 Tweaks to the backup API documentation contained in comments. No changes
to code. (CVS 6242)

FossilOrigin-Name: 6298bcca14bc0dd447198430af4147a3673963fc
2009-02-03 18:25:13 +00:00
danielk1977
0410302e58 Commit first version of the 'backup' feature. (CVS 6241)
FossilOrigin-Name: 663479b417fc06ba1790a544f28694f8797cee57
2009-02-03 16:51:24 +00:00
drh
7ed0cae237 Fix the sqlite3_mprintf_long test command (added by check-in (6224) in order
to address ticket #3621) so that it works on systems with sizeof(int)==4 and
sizeof(long)==8. (CVS 6240)

FossilOrigin-Name: 2e45c2a85183f7430225aa8dd89ee05028afecf2
2009-02-03 16:25:47 +00:00
drh
1d34fdecb6 Remove several compiler warnings. (CVS 6239)
FossilOrigin-Name: 85e9196d79ef8500300abb215a31e0519b2e8d02
2009-02-03 15:50:33 +00:00
drh
4b9421af6f Remove the text of the sqlite3VdbeMemSanity() routine, which was already
commented out. (CVS 6238)

FossilOrigin-Name: a3c260772bda68007b73feee6612495a704c84f5
2009-02-03 15:39:01 +00:00
drh
eb0d74ff39 Check at the write() call to work around the msdos bug in OSX actually
succeeds and throw an error if it does not.  #ifdef out the work-around
for all platforms other than OSX.  Ticket #3633. (CVS 6237)

FossilOrigin-Name: b054b569172c53f4e185e4a64f41d08784aa0f8b
2009-02-03 15:27:02 +00:00
drh
f158162191 Add a special rule to the amalgamation generator to deal with
the sqlite3OsDlSym function.  Ticket #3631. (CVS 6236)

FossilOrigin-Name: 876f874c6e2e6e7763083e6761eedc10a4522ec9
2009-02-03 13:51:17 +00:00
drh
2333606e9c Fix a problem in check-in (6226) which could cause an assertion fault
following a malloc failure.  The prior check-in was for ticket #3624. (CVS 6235)

FossilOrigin-Name: 1ffe44e9d6b49346a75850a977953de12c127069
2009-02-03 13:19:12 +00:00
drh
478000cf5c Check-in (6230) introduced a bugs in SUBSTR() which was caught by the fuzz
tester.  Fixed by this check-in.  Related to ticket #3628. (CVS 6234)

FossilOrigin-Name: cd2e7f6c0fe4c0c648f8ca21388ab0769164f5ef
2009-02-03 13:10:54 +00:00
drh
07d3117aed Make group_concat() a 1- or 2-value function, as the documentation says it
should be.  Use the md5sum() function to verify ticket #3179, not
group_concat().  This undoes the ill-advised group_concat() change of
check-in (5233). (CVS 6233)

FossilOrigin-Name: f2ae82c4d46c2eca30fc60a50ab5064728f20739
2009-02-02 21:57:05 +00:00
drh
bdb339ff73 Omit the TEMP keyword from the schema of TEMP tables created using
CREATE TEMP TABLE AS SELECT .....  Ticket #3630. (CVS 6232)

FossilOrigin-Name: 3b0a25548c4c15c86aadcd9a6c3af0adafb85c17
2009-02-02 18:03:21 +00:00
drh
a0df4ccfe3 Minor simplifications to SQL function implementations. (CVS 6231)
FossilOrigin-Name: 92e5c27f20f150c1777c1b91d35207ade961319d
2009-02-02 17:29:59 +00:00
drh
65595cd60b Update the SUBSTR function so that works consistently when the
2nd parameter is 0.  Ticket #3628. (CVS 6230)

FossilOrigin-Name: 5fc125d362df4b8525c7e1ab34a14f505756af24
2009-02-02 16:32:55 +00:00
drh
9373b01882 Restrict the RANDOM() function to have zero arguments. Ticket #3627. (CVS 6229)
FossilOrigin-Name: b8b546b6ed799dc1621ef7b06273249af1042fb2
2009-02-02 01:50:39 +00:00
drh
8198d25442 Fix SUBSTR() so that it returns NULL if any argument is NULL.
Ticket #3626. (CVS 6228)

FossilOrigin-Name: 779fce82b7a89b972da488ce8bd35e23ca120c04
2009-02-01 19:42:37 +00:00
drh
4e79c59454 Fix the SUBSTR() function so that when the 3rd argument is negative,
it counts backwards from the selected start point.  Ticket #3625. (CVS 6227)

FossilOrigin-Name: 2217339badf1e84edbed1309c39b9f8dfd7646ff
2009-02-01 19:23:32 +00:00
drh
a605fe8d8b Change the replace() function to return a copy of its first argument when
the 2nd argument is an empty string.  Ticket #3624. (CVS 6226)

FossilOrigin-Name: ffebf10f6fb2c7f3083992e2c712682b4cdcc6f0
2009-02-01 18:08:40 +00:00
drh
9437bd2945 Adjust comments in vdbe.c to use OP_MakeRecord instead of the obsolete
OP_MakeIdxRec.  Ticket #3619. (CVS 6225)

FossilOrigin-Name: 0d2abbbff5d9e12e2382ed201bf1648c5918c1c0
2009-02-01 00:29:56 +00:00
drh
c5cad1e350 Add a new test command, sqlite3_mprintf_long, for testing the behavior
of "long integer" printf formatting.  Ticket #3621. (CVS 6224)

FossilOrigin-Name: 3ba1a17b1306bc61b9861ec8d3b239e16a3081ba
2009-02-01 00:21:09 +00:00
drh
565911e912 Make the TO keyword available even if SQLITE_OMIT_ALTERTABLE is defined.
Ticket #3622. (CVS 6223)

FossilOrigin-Name: 3890985ca6750584876596fd0a124f47ee032075
2009-02-01 00:00:45 +00:00
drh
dfbc3a8a3b Better error message when coalesce() has too few arguments. Ticket #3623. (CVS 6222)
FossilOrigin-Name: 9cd43c82a3c123829806aa7bf14efdd29f4424d8
2009-01-31 22:28:48 +00:00
danielk1977
64beba4338 Avoid a segfault when running vacuum on an in-memory database. Ticket #3620. (CVS 6221)
FossilOrigin-Name: 407830c6839a81fa0a1010940740df3011713a88
2009-01-31 14:54:06 +00:00
drh
c531a22377 Fix a round-off error when moving dates by negative modifier amounts.
Ticket #3618.  Enhance the "NNN years" modifier to accept fractional
years. (CVS 6220)

FossilOrigin-Name: 86be908c5e77ba2b9ac98e394fa987b443d790f8
2009-01-30 17:27:44 +00:00
shane
1a38964b50 Made code to remove unused parameter warning part of the conditional. Ticket #3610. (CVS 6219)
FossilOrigin-Name: c5dca1146de72071ed2e5fdf6890f41682272587
2009-01-30 16:09:22 +00:00
shane
f71f89e842 Changes to setupLookaside() in main.c to better handle lookaside buffer configurations of zero-size. Ticket #3616. (CVS 6218)
FossilOrigin-Name: 0a2c7f740397c5c6373434c75d73c2714f14dd32
2009-01-30 06:11:54 +00:00
shane
9db299fb8f Implemented the SQLITE_LAST_ERRNO op in the xFileControl() method of os_win.c. Ticket #3615. (CVS 6217)
FossilOrigin-Name: 9ea871f3e8ce1ec5cffb72f13704c3002d3f5383
2009-01-30 05:59:10 +00:00
shane
6a91ca06b8 In test case incrvacuum-15.1 close both db handles (db and db2) before attempting to delete test.db. Ticket #3614. (CVS 6216)
FossilOrigin-Name: e764a7c5d369e2ff736d662b1209b3d54d778caf
2009-01-30 05:47:15 +00:00
shane
d87897dfa2 Minor changes to remove a few MSVC compiler warnings at /W3. Ticket #3610. (CVS 6215)
FossilOrigin-Name: c74c78e4eb7f6d674b7564b33387db996fbe5725
2009-01-30 05:40:27 +00:00
drh
db15bcd550 Add test cases to make sure that keywords that we say can be used as
identifiers really can be used as identifiers.  These tests were
inspired by ticket #3612, but they do not directly address ticket #3612. (CVS 6214)

FossilOrigin-Name: 6041ca87a16858f047727bc01f10b0bbc83609ed
2009-01-29 19:27:46 +00:00
vapier
832a36dbf5 add a cvsignore file (CVS 6213)
FossilOrigin-Name: 68c8cdd73b2b9f03264f9fdd27cddb65e1bdc7ae
2009-01-29 02:54:56 +00:00
drh
20abac2f87 Fix a segfault that can occur when attempting to insert into
a corrupt database file.  Need a test case. (CVS 6212)

FossilOrigin-Name: 68957cf0c4bae0c6cf450b4de1d6bc1bc64b232c
2009-01-28 20:21:17 +00:00
vapier
6acb2cf665 regenerate autotools (CVS 6211)
FossilOrigin-Name: 813a3c96863acc9dd6ccd41e7ac9f57d635bcc0d
2009-01-28 04:46:28 +00:00
vapier
6d120f39aa unify TCLLIBDIR handling with libtclsqlite3.so and use libtool to install it rather than custom tclinstaller.tcl ... this integrates better with autotools and avoids relinking issues (RPATH pointing to builddir) (CVS 6210)
FossilOrigin-Name: 3a049ca761f36d0fdb3b5b5f254c00210b373e9e
2009-01-28 04:46:14 +00:00
drh
6711002c7b Add testcase() macros for coverage in date.c. (CVS 6209)
FossilOrigin-Name: 90b42eba8e02402c342e04236148bbd5e4d93eb8
2009-01-28 02:55:28 +00:00
vapier
695f097075 use AC_MSG_xxx funcs rather than echo (CVS 6208)
FossilOrigin-Name: ed08025ad2c5c9e52732ad91192e1c6d58272c87
2009-01-26 21:43:16 +00:00
vapier
fe7e82e4be (#3449) search for tclConfig.sh first by asking tclsh itself where it is (CVS 6207)
FossilOrigin-Name: ff2912dc1483bf934c94bd7866b4ec314a0d784f
2009-01-26 21:39:33 +00:00
vapier
8f50e7b865 (#1428) installed shared libs with exec perms (CVS 6206)
FossilOrigin-Name: 3f2a3414d008636e0d70f3ed8b728ffdd46ae9fc
2009-01-26 21:25:57 +00:00
vapier
2574da5fd5 (#3583) add a rule for sqlite3.pc in case the .in file is updated (CVS 6205)
FossilOrigin-Name: 4d03b69317acde5c29f38ae88276c15abf05266a
2009-01-26 20:59:02 +00:00
drh
bae6f21892 Remove obsolete files from the tools subfolder. (CVS 6204)
FossilOrigin-Name: d74560803e16eb2d28fc644b9aedb8c60eb224c6
2009-01-24 15:23:00 +00:00
drh
dc86e2b2cd Fix some minor compiler warnings. Added sqlite3Isalpha() for use in
the soundex() function. (CVS 6203)

FossilOrigin-Name: bfc71edca471221add6b32b867d0b15171974eaf
2009-01-24 11:30:42 +00:00
danielk1977
25f42fe7a1 Remove incorrect ALWAYS macro associated with empty IN() sets. Ticket #3602. (CVS 6202)
FossilOrigin-Name: f3c09a0cb8bfc1a112c31b556d8921d5c75c5eef
2009-01-24 09:56:15 +00:00
danielk1977
e1fd508a28 Optimization: When loading a new page into the cache, avoid redundant memset() calls to zero it. (CVS 6201)
FossilOrigin-Name: 9c0b9f881367871105965d4268e2f2cde7f4d884
2009-01-23 16:45:00 +00:00
drh
663d56d46f Fix the VACUUM command so that it does not commit a transaction when it is
mistakenly run within a transaction - it should leave the transaction open. (CVS 6200)

FossilOrigin-Name: 75cc709be46ae2096d2ba3e7ac58de8140f8130c
2009-01-22 23:04:45 +00:00
danielk1977
859546cae6 Silence a C++ builder warning by writing "if( (rc = function())!=SQLITE_OK )" instead of "if( (rc = function()) )" in two places in pager.c. Ticket #3605. (CVS 6199)
FossilOrigin-Name: 78ae96def54026461c0d03a90394480f724ea584
2009-01-22 17:12:39 +00:00
danielk1977
e1d3ac9cd0 Add a comment to fts3_tokenizer.h to make it clear how the xNext() method is supposed to set its output variables. Make sure the output variables of xNext() are only used if SQLITE_OK is returned. Ticket #3604. (CVS 6198)
FossilOrigin-Name: 5b3c075f96be9671d0bcffe928589b211559e835
2009-01-21 17:45:33 +00:00
danielk1977
bea2a94850 Big change to make pager.c easier to follow. Unused variables removed, comments improved, etc. (CVS 6197)
FossilOrigin-Name: 12f7346c13c180ed73d7a2e3b590be457360254a
2009-01-20 17:06:27 +00:00
danielk1977
78ca0e7eb4 When not compiling for an EBCDIC system, use built-in alternatives to the tolowe
r(), toupper() and other ctype.h library functions. Ticket #3597. (CVS 6196)

FossilOrigin-Name: 1041abd6784d283bebf646c54e93599522f7889d
2009-01-20 16:53:39 +00:00
drh
770b3cb763 Make sure the *pzErrMsg return from sqlite3_get_table() is aways zeroed.
Ticket #3598. (CVS 6195)

FossilOrigin-Name: 7035c35dbef72b7b4d00201a65734a6d93dd0d3e
2009-01-19 20:49:09 +00:00
drh
8b72747db0 Fix the --enable-tempstore option on the configure script. Ticket #3599 (CVS 6194)
FossilOrigin-Name: c2eabb99fe852142e54f35f423f766411d7ba6c0
2009-01-19 18:18:40 +00:00
drh
b8613ab127 Make sure mutexes are fully enabled for thread001.test. Take steps to
ensure that the thread tests run during regression testing. (CVS 6193)

FossilOrigin-Name: 6242f113eb40d472b78685c296fecf9f749a11cd
2009-01-19 17:40:12 +00:00
danielk1977
3cfe07037f Fix a bug that was preventing SQLite from releasing locks properly under obscure circumstances. (CVS 6192)
FossilOrigin-Name: 502c66df8b5fc5ec8e3d94202030571a4920fb9c
2009-01-17 16:59:40 +00:00
drh
07108f5626 Back out the Makefile.in changes from check-in (6181) because of reports
(ticket #3594) that they do not work on NetBSD.  Separately, documentation
is updated to make clear that configure and Makefile.in are unsupported. (CVS 6191)

FossilOrigin-Name: 2d79aaab134c8a09722cb0466d45e04002bce54f
2009-01-17 15:53:31 +00:00
drh
a6d90f0ddd Remove a harmless UMR that occurs inside some debugging code. (CVS 6190)
FossilOrigin-Name: 191c399fc6354b35477ec21f685377e2af26f49b
2009-01-16 23:47:42 +00:00
danielk1977
db3403973c Fix a change-counter bug similar to #3584. This one is much more obscure though, requiring a transient IO or malloc error to occur while running in exclusive mode. (CVS 6189)
FossilOrigin-Name: 9f07d2d9226b73c4dc311fd142e0aaba4ffcb078
2009-01-16 16:40:14 +00:00
danielk1977
45d6882fd9 Revert (6187). (CVS 6188)
FossilOrigin-Name: a353c1ab376b159c4d12532412365318cdbdcc60
2009-01-16 16:23:38 +00:00
danielk1977
443c0597fe This commit is an error. Reverted by (6188). (CVS 6187)
FossilOrigin-Name: aa67fd0cdb4f53a0c6e15c001d37554d15006718
2009-01-16 15:21:05 +00:00
danielk1977
78c2e6d837 Allow recently added keywords 'savepoint' and 'release' to be used as database object names. Just as they could be prior to 3.6.8. Ticket #3590. (CVS 6186)
FossilOrigin-Name: 54ab8326a1ea574b183f84c8465315e989a23ca4
2009-01-16 11:04:58 +00:00
drh
75d8f84678 Treat "or" as an ANSI-C keyword, even though it is not. Ticket #3588. (CVS 6185)
FossilOrigin-Name: ed4e308caaa50c55aa01cd34079f1be5c8a93c71
2009-01-15 17:40:42 +00:00
drh
a1e2f3e0f9 Version 3.6.10 (CVS 6184)
FossilOrigin-Name: 21b720cc9b9f88b8262c85c58287dd01486c936e
2009-01-15 17:04:23 +00:00
drh
ef731a7b84 Disable test case select2-2.0.3. This was a timing test that sometimes
fails due to CPU contention with other processes on the same host. (CVS 6183)

FossilOrigin-Name: ffdf91fec93aed35cf3dde1edbe9d7f8a5d23ae8
2009-01-15 15:23:59 +00:00
drh
c7288ee0b8 Avoid using ENOTSUP on systems that do not define that symbol.
Ticket #3512. (CVS 6182)

FossilOrigin-Name: fcb6c677124102558f7a7a22bc3569b664424a4c
2009-01-15 04:30:02 +00:00
drh
a81c64a2da Make some changes requested by Fedora. (CVS 6181)
FossilOrigin-Name: 7bc08bc719c2e9ca6d92d4709c0478e15fdfb131
2009-01-14 23:38:02 +00:00
drh
8f800a7d42 Fix the shell so that the ".schema" command works regardless of the
pragma settings.  Ticket #3585. (CVS 6180)

FossilOrigin-Name: 6f6b638e44a8cfc741594f02b0178fa98ed7e2c1
2009-01-14 23:17:55 +00:00
drh
8f941bc7a1 Add asserts to detect if a transaction commits without first incrementing
the transaction counter.  These asserts are intended to prevent future
problems similar to ticket #3584. (CVS 6179)

FossilOrigin-Name: b676ccfd9019e65b52251332d94de1b3018ec823
2009-01-14 23:03:40 +00:00
drh
d162988b47 Fix typos in comments in FTS3 implementation. (CVS 6178)
FossilOrigin-Name: b0f066630c35c4947d3ecd29d32d91036da19e94
2009-01-14 18:59:41 +00:00
drh
6add3c41a4 Increment the version number in preparation for yet another release. (CVS 6177)
FossilOrigin-Name: dce60ea764ae50f1008d178029eff5b3959eca38
2009-01-14 18:59:12 +00:00
danielk1977
104f1fef2d Fix a problem with committing a transaction while there are other active statements. Sometimes, the database change counter was not being updated. (CVS 6176)
FossilOrigin-Name: b7d2a477aa2c3dbbb81d18fba1faa6835711b5c3
2009-01-14 17:45:57 +00:00
drh
44015f9ee3 Version 3.6.9 (CVS 6175)
FossilOrigin-Name: b6ce8199a9286eb2d0a590abc8ef080594d84f83
2009-01-14 04:09:36 +00:00
drh
94eb90c78b Here is the test case to prove that ticket #3581 is fixed. (CVS 6174)
FossilOrigin-Name: f5f5ef646bef6de6a744b565e089219d4e47397d
2009-01-14 01:10:40 +00:00
drh
a7e770612b Make sure the OR-clause optimizer takes the cost of sorting into account.
Reset the rowid cache on the OP_Rewind and OP_Last opcodes.  Bump the
version number so that we can do an emergency release.  Ticket #3581. (CVS 6173)

FossilOrigin-Name: d28b58209bf5eb575d0cad8dc71ac043395c6471
2009-01-14 00:55:09 +00:00
drh
a9e364f00f Updates to comments as suggested by tickets #3578 and #3579. (CVS 6172)
FossilOrigin-Name: b5927213b6171e57018f1f265940c9bcc7a0ba04
2009-01-13 20:14:15 +00:00
danielk1977
5f2d46b313 If the journal file is open when unlocking the database, close it just before unlocking the database file instead of just after. This may fix #3572. (CVS 6171)
FossilOrigin-Name: 36fe9a7a51b5279f1a3964139aa636e81f9c8b06
2009-01-13 16:03:44 +00:00
drh
6338323c49 Version 3.6.8 (CVS 6170)
FossilOrigin-Name: 8ca0b7c13620c8e2acf73343ebfb13128dd4c3b1
2009-01-12 15:46:57 +00:00
danielk1977
838cce4382 Only run tests that depend on SQLITE_PREFER_PROXY_LOCKING builds when said symbol is set. (CVS 6169)
FossilOrigin-Name: 5d88f8be7342acd2a7ed6f269bec615cd03e59e2
2009-01-12 14:01:45 +00:00
drh
44805ad8b6 Sometimes a single byte is written to the main database file. Make sure
that journaltest knows this. (CVS 6168)

FossilOrigin-Name: e0af5a43f3c6ae41042c74339e7404d3373fd6ce
2009-01-11 18:24:27 +00:00
drh
c0731c9d10 Fix an assert() so that it works correctly with SQLITE_TEMP_STORE=3. (CVS 6167)
FossilOrigin-Name: fd2bbcf8d8d03eecd4614636ae787331a8e99816
2009-01-11 17:00:02 +00:00
danielk1977
c499bf1dc0 Fix jrnlmode.test so that it does not run tests involving in-memory journals during the "journaltest" permutation. (CVS 6166)
FossilOrigin-Name: b47ddefc772ee59aa1509ab8d8f229a3d7c4ddaf
2009-01-11 05:54:40 +00:00
drh
487b51e65c The crash8.test depends on auto_vacuum being off. Make sure that is the
case. (CVS 6165)

FossilOrigin-Name: 3538d2a981c5abfe2f88aec75175ae33475e6bcb
2009-01-11 00:44:47 +00:00
drh
8a5268739e In io.test, reset the connection after manually deleting the journal file,
so that the connection does not continue to use the old deleted journal file. (CVS 6164)

FossilOrigin-Name: 1e79f4f9e59469fb9e3e0007163de3e604dcf00f
2009-01-11 00:42:02 +00:00
drh
f57cf606bc Adjust savepoint.test so that it can deal with SQLITE_TEMP_STORE=3. (CVS 6163)
FossilOrigin-Name: 3cb910f0ce116af3f291cb913b32abc89493bcc5
2009-01-11 00:18:38 +00:00
danielk1977
9393497826 Do not run crash8.test as part of the "journaltest" permutation. crash8.test uses "PRAGMA synchronous=off", which is incompatible with journaltest. (CVS 6162)
FossilOrigin-Name: 5f184da6758327e0d5fefe61ac3be06a79cc8269
2009-01-10 18:51:40 +00:00
danielk1977
02983931eb Remove the unused Pager.alwaysRollback flag. Fix a couple of comments in pager.c. (CVS 6161)
FossilOrigin-Name: 8f0672af8d7d46124d01e540eec7b43fc16dd552
2009-01-10 17:57:48 +00:00
drh
ceb92adb9d Remove an faulty assertion inserted a few days ago. (CVS 6160)
FossilOrigin-Name: 495f017e03f32420e6a6a7685125a86929cef142
2009-01-10 17:02:02 +00:00
drh
47c3b3e099 When compiled with SQLITE_DEBUG (in other words, when assert() is enabled)
the ALWAYS and NEVER macros will throw an assertion if their arguments are
not true or false, respectively. (CVS 6159)

FossilOrigin-Name: 64a8dcd8d6152108809e4d10c459f1de5d36a435
2009-01-10 16:15:20 +00:00
danielk1977
7cbd589da0 Improve coverage of pager.c. (CVS 6158)
FossilOrigin-Name: 855c4093cf331496d9ef508011ad814e91e3882f
2009-01-10 16:15:09 +00:00
drh
96c7a7d95f Fix a bug caused by overzealous code test coverage simplifications.
Bug found by TH3. (CVS 6157)

FossilOrigin-Name: 3da5578726cb22118dfca38a2098a1e378644387
2009-01-10 15:34:12 +00:00
drh
d1fa7bca39 Remove some unused code from expr.c in order to increase test coverage. (CVS 6156)
FossilOrigin-Name: 2cbea64fb00a1b5b8aa0e9c958b2a09256ae59bc
2009-01-10 13:24:50 +00:00
danielk1977
c87239fb32 Fix a bug in the previous commit - use SQL comments instead of Tcl comments in SQL blocks. (CVS 6155)
FossilOrigin-Name: 3d7a8de248ad5fba0e9c88f439cd2d988dcbab8c
2009-01-10 11:13:39 +00:00
danielk1977
9585528844 Add a malloc failure test case that covers a few previously untested lines in pager.c (CVS 6154)
FossilOrigin-Name: 000aedb0471b5f5a69e7b61f5e1d4b2644994f32
2009-01-10 11:10:18 +00:00
drh
d2cb50b74c Coverage improvements in pragma.c. Change the __DARWIN__ macro to __APPLE__,
which is available by default on Leopard. (CVS 6153)

FossilOrigin-Name: 64c56226b91e57883c8059f65330318e53376b8a
2009-01-09 21:41:17 +00:00
danielk1977
0371f1b243 Increase pager.c coverage a bit. Fix an assert failure that can occur following a "PRAGMA omit_readlock" command on a read-only database. (CVS 6152)
FossilOrigin-Name: 0f3f9011fa143f7b63c9bf79d3e411327d5c6f9d
2009-01-09 17:11:04 +00:00
drh
5807c4ccc5 Fix two problems in test instrumentation that show up on some fulltests. (CVS 6151)
FossilOrigin-Name: c917961743e9ab60a096801c8910c6cd8367ee2f
2009-01-09 14:29:35 +00:00
drh
6402250ea2 Simplifications to btree.c to improve test coverage. (CVS 6150)
FossilOrigin-Name: ac84f106d572e881136adc3434d00d70564f57cb
2009-01-09 14:11:04 +00:00
danielk1977
03ba3fa02c Add a couple of coverage tests. (CVS 6149)
FossilOrigin-Name: 6a64109d1f9b63ac8b29ea2c77da02506387b4a1
2009-01-09 10:49:14 +00:00
drh
1c767f0df3 More coverage improvements. (CVS 6148)
FossilOrigin-Name: 6e171c0a64850013b26a223189d5bebcc0a01a8b
2009-01-09 02:49:31 +00:00
drh
e2f02bacc1 Increased test coverage. (CVS 6147)
FossilOrigin-Name: 45bb5703d7ef5e835b43a6fa7ee2a2d96db76939
2009-01-09 01:12:27 +00:00
drh
103bd88cf7 Increased test coverage in where.c. (CVS 6146)
FossilOrigin-Name: 1e5725c5179660277c2e8c321877d7ee3ca21808
2009-01-08 21:00:02 +00:00
danielk1977
ad0ea2280a Fix a comment in pager.c. No actual code changes. (CVS 6145)
FossilOrigin-Name: 44d3bfddf44b10b3744db6b41bc3f53c3903df5e
2009-01-08 18:04:13 +00:00
danielk1977
484fe37c9e Avoid an 'invalid cast' warning in test_osinst.c. (CVS 6144)
FossilOrigin-Name: 931f3a21bd4b6c5760ed64c23e8210cf2c3e3ab5
2009-01-08 17:57:31 +00:00
danielk1977
112f752be8 Fix a couple of potential corruption problems in pager.c. (CVS 6143)
FossilOrigin-Name: 5a39525ba3e65f1c6df3cf23fbfb57f6a0bf4b62
2009-01-08 17:50:45 +00:00
drh
4fd18c4b31 Add a test script for ticket #2565. Change the assert() in pager.c into
a testcase() macro. (CVS 6142)

FossilOrigin-Name: 1e53e382e5030de4d908098bf77af053dd81f0c5
2009-01-08 15:24:01 +00:00
drh
617634eca2 Allow database files to be created in the root directory on unix.
Ticket #3570. (CVS 6141)

FossilOrigin-Name: 81014334ad57e380e21c47ad6eebe9f16b4ad24c
2009-01-08 14:36:20 +00:00
danielk1977
e86a5b7798 Clean up test_journal.c to make it easier to follow. (CVS 6140)
FossilOrigin-Name: 5a28c7c7b45655dcfd0da4898e77d0240b511c5f
2009-01-08 12:05:56 +00:00
drh
171256c45c Increase test coverage of where.c. Make sure OR-optimization works on
UPDATE and DELETE in addition to SELECT.  (Bug found by coverage tests.) (CVS 6139)

FossilOrigin-Name: 4b2c08e8984befb12fa2173ca89d9f54cf764d22
2009-01-08 03:11:19 +00:00
drh
7c2fbdeba2 Add new test cases to increase coverage of where.c. (CVS 6138)
FossilOrigin-Name: 2e1ab51f05447f9c1f291636b53b1ec584003841
2009-01-07 20:58:57 +00:00
drh
5bd98aef66 Fix a bug in the LIKE query optimization. (Found by coverage testing.) (CVS 6137)
FossilOrigin-Name: fe90e9116b6e1e25cf3119d2777a8e9c135153ce
2009-01-07 18:24:03 +00:00
danielk1977
f70c1fee96 Make the same change as (6121) (accidentally reverted). Also enhance test_journal.c to catch this kind of bug. (CVS 6136)
FossilOrigin-Name: ccc9c211a285fd4da68b69e15594f080371be522
2009-01-07 18:08:48 +00:00
danielk1977
be87104706 Add a "synchronous = off" variant to savepoint6.test. (CVS 6135)
FossilOrigin-Name: 0f57011e3b21fa5f6a819ce5a7fd8d44ea70679f
2009-01-07 17:06:52 +00:00
danielk1977
a7c17af64d Change SQLITE_MAX_FUNCTION_ARG from 100 to 127 to match invariant H16124. Ticket #3567. (CVS 6134)
FossilOrigin-Name: 1fe79ffd772900bdca85ec6cf072677be53cd5ff
2009-01-07 16:15:42 +00:00
drh
f3c57015d8 For archival purposes, add the TCL script that was used to generate many
of the test cases for where7.test. (CVS 6133)

FossilOrigin-Name: 0e01cdc8d283acd2757d69bf6d8e36bb1f47d460
2009-01-07 15:52:54 +00:00
drh
ee03d629f5 Conjecture: a journal header with nRec==0 must be the last header in the
journal.  Add asserts to make this conjecture explicit. (CVS 6132)

FossilOrigin-Name: 15b5b5f90c2ffa79155cdc2dbc4fb5583cb72017
2009-01-07 15:33:45 +00:00
danielk1977
f90b7260b3 Fix for 'truncate file' operations on in-memory databases. (CVS 6131)
FossilOrigin-Name: 83d1eafbde556f56969c6f285b6767d2c658dbfc
2009-01-07 15:18:20 +00:00
danielk1977
9153d850cc Add a comment to the openSubjournal() function in pager.c. (CVS 6130)
FossilOrigin-Name: 04387ae10ab3be24c93497f4af6f48d6832f37eb
2009-01-07 10:52:56 +00:00
danielk1977
1fab7b6664 Fix a problem with reverting a 'DROP TABLE' command executed inside of a savepoint on an auto-vacuum database. (CVS 6129)
FossilOrigin-Name: 3a4bb83235e9a79297e7d5d47ac7674c9df960bf
2009-01-07 10:35:18 +00:00
danielk1977
fc158bf920 Fix savepoint related bugs. A rollback caused by an IO error or "OR ROLLBACK" clause while one or more savepoints were open was leaving the sqlite3 structure in an invalid state. (CVS 6128)
FossilOrigin-Name: e5d42c69a3b325ca12f53184e33964230acbdd1f
2009-01-07 08:12:16 +00:00
drh
f2a84e3ca6 Add a HIGHSTRESS parameter to the sqlite3_config_alt_pcache debugging
command in the test harness - to force calling pagerStress() more
frequently. (CVS 6127)

FossilOrigin-Name: e426860b94f5b47e3a265549dbac64a421cae425
2009-01-07 03:59:47 +00:00
drh
d6e5e09816 Pager changes attempting to verify that ticket #2565 cannot recur. (CVS 6126)
FossilOrigin-Name: 15b9dac455b3f457bb177fc4985b45957647cbec
2009-01-07 02:03:35 +00:00
drh
5093f6e5ee Now that we have permutations.test, it is really only necessary to run
all.test for a single cycle.  So make that the default. (CVS 6125)

FossilOrigin-Name: 3c2f292fb7c79ba9be32fe8f19e52b35b9cadf6a
2009-01-06 18:43:51 +00:00
danielk1977
076dce5336 Reduce the number of paths in btreeCopyFile(). (CVS 6124)
FossilOrigin-Name: df2c285cb99ac188c96dd1a4e6a30f689195a150
2009-01-06 18:21:08 +00:00
danielk1977
cd1cbff38b Modify test_journal.c to verify the page data being written to the journal file. (CVS 6123)
FossilOrigin-Name: 0d258956f8971c0af7853b836a7d6e7f3a800c37
2009-01-06 17:52:43 +00:00
drh
30d537011a Cleanup of the PAGERTRACE macro. Other comment changes in pager.c. (CVS 6122)
FossilOrigin-Name: ee7b4b60880e80e6fb0b2f93ebc6ee5ad6917f9d
2009-01-06 15:58:57 +00:00
danielk1977
be9c0ab276 The fix in (6120) wasn't quite right. This fixes it. (CVS 6121)
FossilOrigin-Name: ddc2ebfa529b15cdbdd3b6b6d4873cb085cfd3b9
2009-01-06 15:28:34 +00:00
danielk1977
f9bce3c54d Fix a recently introduced problem in "permutations.test autovacuum_crash". (CVS 6120)
FossilOrigin-Name: 2cdbb468ed81d35a7e1a580683864de60e103083
2009-01-06 15:20:58 +00:00
drh
04df18dce8 Update permutations.test so that it does not show an error when running
the singlethread and multithread test cases on THREADSAFE=0 builds. (CVS 6119)

FossilOrigin-Name: 301b57b7bac949dd77037ad3175ba87c41c8c843
2009-01-06 14:50:11 +00:00
danielk1977
401b65ed77 Fix a memory leak in test_journal.c (test code). Also remove function pager_truncate_cache(), a wrapper around sqlite3PCacheTruncate(), from pager.c. (CVS 6118)
FossilOrigin-Name: a64f3db0b39af53c8d8f80c242baa8aa4b5bd04e
2009-01-06 14:34:34 +00:00
drh
1c8781f43b Fix compiler warnings. (CVS 6117)
FossilOrigin-Name: da770a8dff183b28aca287cafb9c8b82b98ea968
2009-01-06 14:19:36 +00:00
danielk1977
f2c31ad8af Add some savepoint related test cases and fix a few problems. (CVS 6116)
FossilOrigin-Name: 8c62ea4fded2251e9daf16f2a050f94359299d76
2009-01-06 13:40:08 +00:00
drh
a6dbbacbcb Remove leftover "breakpoint" from the fuzz.test script. (CVS 6115)
FossilOrigin-Name: c2482d8877a5f9e387b288377e410ae1b8267f3c
2009-01-06 00:11:25 +00:00
drh
813f31eafe Fix a problem in the WHERE clause generator when the FROM clause is empty. (CVS 6114)
FossilOrigin-Name: a7015625610624be1645e918d0a62cf85bec86ce
2009-01-06 00:08:02 +00:00
drh
de58ddb709 The fix in (6111) was not quite right. This version works better. (CVS 6113)
FossilOrigin-Name: 5f80140a2df48fd43a7cbc0990de0205004541b0
2009-01-05 22:30:38 +00:00
drh
66cd1822fe Reenable fuzz testing for all.test. Make sure the query flattener copies
over aggregate information from expressions on outer query terms while
flattening. (CVS 6112)

FossilOrigin-Name: e02323b3629545a3e7e7db0d4edc76807ae903aa
2009-01-05 19:36:30 +00:00
drh
68ac65ecdc Make sure the MEM_Zero flags is cleared whenever removing MEM_Blob. (CVS 6111)
FossilOrigin-Name: b2131e868a3a948ba81f7458270493085da1ae60
2009-01-05 18:02:27 +00:00
drh
8f51eb8fa0 Include fuzz3.test in all.test. Get fuzz3.test working again. (CVS 6110)
FossilOrigin-Name: 77dc19cfabca54353509ff346b12975044d416d5
2009-01-05 17:19:03 +00:00
danielk1977
0d519ca883 Fix some test code problems in "permutations.test journaltest pager.test". (CVS 6109)
FossilOrigin-Name: cf627752c4537f709acae26a1e335731d55bddb2
2009-01-05 17:15:00 +00:00
danielk1977
7e445fbf33 Add some tests with attached databases to savepoint.test. Also tests of creating and dropping tables in auto-vacuum mode inside of a savepoint. (CVS 6108)
FossilOrigin-Name: ca7f11d50d1a73443d18c79dfe4223c975c6e20b
2009-01-03 15:06:38 +00:00
drh
853799a26e When the commit_hook calls a query recursively, make sure the commit_hook
is not invoked recursively.  Ticket #3564. (CVS 6107)

FossilOrigin-Name: 27ae406537c07073db46ecde40c65c78fbb73170
2009-01-03 14:04:38 +00:00
drh
a8a71bac3f Fix a typo in a comment. (CVS 6106)
FossilOrigin-Name: 50f57cd1456f18919a8c90efa05da446ae12788d
2009-01-03 12:55:17 +00:00
danielk1977
e7e6f12aaa Add test file savepoint6.test. Contains pseudo random tests of savepoint related commands. (CVS 6105)
FossilOrigin-Name: 2946fbb7183d597b4db1db203eb5fd57c9762dc4
2009-01-03 10:41:29 +00:00
drh
7539b6b81a Memory allocation failure in Bitvec are probably all benign. Still, add
code to check this, just to be sure. (CVS 6104)

FossilOrigin-Name: 4688e1c8b1203c3538aa862421ed344888059fe2
2009-01-02 21:39:39 +00:00
drh
9f0bbf9cae Reinitialize page 1 of the database file following a ROLLBACK TO of a
transactional SAVEPOINT on an initially empty database. (CVS 6103)

FossilOrigin-Name: 3e9efb763875b20c856d748c19e449080a3ae97c
2009-01-02 21:08:09 +00:00
drh
49b9d33892 Fix compiler warnings in pager.c (CVS 6102)
FossilOrigin-Name: 78dd7909da15a9b2cbcdb9cbe86798cfc24f3230
2009-01-02 18:10:42 +00:00
danielk1977
cd38d520d1 Modify the (transaction) method of the tcl interface to use savepoints. This makes nested calls to (transaction) work more intuitively. (CVS 6101)
FossilOrigin-Name: f047758de9b499866aa4ddf16011498b12a7b963
2009-01-02 17:33:46 +00:00
shane
5df7c0f96b Add fts_expr.* files to Makefile.in. (CVS 6100)
FossilOrigin-Name: 524c8634dfa5926f38fac8bac1da6a14178c7764
2009-01-02 15:47:01 +00:00
shane
d3fc21d1fd Many of the boundary tests depend on a working 64-bit implementation of TCL, so skip them if this is not available. (CVS 6099)
FossilOrigin-Name: b1a4a17f8752d27f3b360019490ab3f15a1f629f
2009-01-02 15:45:47 +00:00
drh
4698e790b3 Increment the version number to 3.6.8. (CVS 6098)
FossilOrigin-Name: 7509641a4c410b1eaaf1edba259fbe01cd60b108
2009-01-02 12:35:03 +00:00
drh
be90df0b3e Do not display matches against
the right-hand side of a NOT operator in the output
of the FTS snippet() or offsets() functions. (CVS 6097)

FossilOrigin-Name: d44c84c0f77bd0fc4a9942177b6cae6d109b89b7
2009-01-02 01:10:42 +00:00
danielk1977
c81806f3ed Fix a (benign) valgrind error that can occur following malloc failure while executing a 'ROLLBACK TO savepoint' command. (CVS 6096)
FossilOrigin-Name: 9ff8598f3be123a244f71b45e77af913b836504a
2009-01-01 15:20:37 +00:00
danielk1977
fc8c9f84ab Fix some problems in the fts3 expression parser with mismatched parenthesis. (CVS 6095)
FossilOrigin-Name: ccfe4580ac7ba9add0e69c786a9a3a43d69b7753
2009-01-01 14:06:13 +00:00
drh
b39187ae89 Additional test cases and cleanup of FTS3 parenthesis processing. (CVS 6094)
FossilOrigin-Name: afac4293000f81410d105a99956605bf7102fa62
2009-01-01 12:34:45 +00:00
danielk1977
758bc07c43 Add a couple of extra tests for the fts3 expression parser to improve mcdc coverage. (CVS 6093)
FossilOrigin-Name: 13146b34935d339d7b8379083e024647af07e2c1
2009-01-01 07:42:49 +00:00
danielk1977
5973e6a30b Add pseudo-random tests of the fts3 expression parser. Revise the fix in (6091). (CVS 6092)
FossilOrigin-Name: 11c2d4686197fb3f0d601651d5bbb3492af8f0dd
2009-01-01 07:08:54 +00:00
danielk1977
49b4b4d84a Fix a bug parsing "<expr> AND (abc NEAR def)" in fts3_expr.c. (CVS 6091)
FossilOrigin-Name: d1a6a2edd799d65ff88510df951e909919e35b6b
2009-01-01 04:19:51 +00:00
drh
f3d20c04a2 Avoid surplus bytes at the end of the keyword string table.
Add testcase() macros to make sure all keywords are used during
testing. (CVS 6090)

FossilOrigin-Name: 73958060aaf641d93bede3a42851e5b3451f5432
2008-12-31 21:52:40 +00:00
drh
42128b9e33 Fix the name in the documentation of the compile-time macro for
enabling FTS3 parenthesis processing. (CVS 6089)

FossilOrigin-Name: ac8258da6ecd3ea37f394dc3b48834eb57832cf4
2008-12-31 19:27:53 +00:00
drh
757b178100 Fix the FTS3 expression parser so that it works in the amalgamation when
FTS3 is disabled. (CVS 6088)

FossilOrigin-Name: 7e238e8604b9a9f786d84a47d21c6b42f1585755
2008-12-31 16:27:58 +00:00
drh
aeba020bea Fix the FTS3 module with parenthesis syntax so that it will work in
the amalgamation. (CVS 6087)

FossilOrigin-Name: c2b9891fc05ec05b270f108f61ab81b2df874e01
2008-12-31 16:01:04 +00:00
drh
04bbcd5ce9 Fix a bug in the multi-index OR cost estimator. Remove leftover "breakpoint"
commands from test scripts. (CVS 6086)

FossilOrigin-Name: b090d5736d7eaec17a39d3133e1587b1d2a42acb
2008-12-30 17:55:00 +00:00