Commit Graph

6467 Commits

Author SHA1 Message Date
drh 5d73854b27 Allow the journal_mode for in-memory databases to be either OFF or MEMORY,
not just MEMORY. (CVS 6448)

FossilOrigin-Name: 11c77f4c2c2beee5267ea6e2f1a4bb845531b42c
2009-04-04 15:53:47 +00:00
drh eb0d629257 Clarify the meanings of the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
passed into the xSync method of the VFS.  Comment changes only - no changes
to code. (CVS 6447)

FossilOrigin-Name: c47aeb37a1c054a8e0444b95e29cb332599af2d8
2009-04-04 14:04:58 +00:00
drh 0d1d5abffa Remove a blank line in sqlite.h.in that was preventing the
SQLITE_LOCKED_SHAREDCACHE constant appears in the automatically-generated
documentation.  Ticket #3775. (CVS 6446)

FossilOrigin-Name: 65f9d3b948cd6ed4728ab49833b9f2fca96563a2
2009-04-03 12:12:58 +00:00
drh 07758962f5 Use integer rather than floating point compuations in converting from julian
day number to unix-time to avoid round-off errors on Borland compilers.
Ticket #3769. (CVS 6445)

FossilOrigin-Name: c26f97bd857f3ddb15e63216cdd4a00e06d8eac8
2009-04-03 12:04:36 +00:00
drh ada2ee0d8b Fix the PRAGMA parser so that it can accept negative numbers in parentheses,
like the syntax diagrams say it should be able to. (CVS 6444)

FossilOrigin-Name: 286e83178ddcd2efe2888697bcf8cc95ccdef880
2009-04-03 01:43:57 +00:00
drh 818e39ad35 Make sure count(*) works on the sqlite_master table of an empty database.
Ticket #3774. (CVS 6443)

FossilOrigin-Name: e0c1a780f5a356c48b2a4cc66fab988fe441722f
2009-04-02 20:27:28 +00:00
drh ce4869f893 Make sure the VACUUM statement locks down the page_size and auto_vacuum
modes after it runs.  Otherwise, pragmas might change these settings on
a populated database, resulting in problems. (CVS 6442)

FossilOrigin-Name: 85e6a4740d6db731c8c35a331031c346e9189c27
2009-04-02 20:16:58 +00:00
drh 860e077a7a Fix the sqlite3_prepare() family of interfaces so that they zero the *ppStmt
value even on an SQLITE_MISUSE return.  Make it clear in the documentation
that the ppStmt parameter cannot be zero. (CVS 6441)

FossilOrigin-Name: 23bf9f266559603e37b2703715eaf8ef5af6bb17
2009-04-02 18:32:26 +00:00
danielk1977 fa542f1fc8 Fix a problem causing the BtShared.isPending flag to be cleared to early. Also coverage improvements for btree.c. (CVS 6440)
FossilOrigin-Name: 8f1423445b29a5f52ed907de6db82128a96ebfe2
2009-04-02 18:28:08 +00:00
danielk1977 e1fb65a0b8 Ensure the required VerifyCookie/Transaction/TableLock opcodes are added for "x
IN (SELECT c FROM t)" expressions. Ticket #3771. (CVS 6439)

FossilOrigin-Name: 058a2f20930d7707c03c3c27db8e761d5657ee46
2009-04-02 17:23:32 +00:00
drh de46798569 Fix a couple of harmless nuisance warnings. (CVS 6438)
FossilOrigin-Name: 53dac0a455b9a822f710c257711e8d319060cf84
2009-04-02 17:22:41 +00:00
drh e8902a70fe Disable the query flattening optimization when the subquery is a compound
query with an ORDER BY clause.  Ticket #3773 shows why that combination
does not work. (CVS 6437)

FossilOrigin-Name: 23f90d50737a36ebd17152dd4667948ce7049967
2009-04-02 16:59:47 +00:00
drh 3034e3d364 Change the way that the random() SQL function prevents the maximum
negative integer so that it is testable. (CVS 6436)

FossilOrigin-Name: 995f2b9b1031fadc85e179701536b9dd4153654b
2009-04-02 14:05:21 +00:00
drh d27135ad82 Use ALWAYS and NEVER macros on unchangeable conditions within func.c. (CVS 6435)
FossilOrigin-Name: eb65e64e7ed5edbe506365971d4d81ea037098d3
2009-04-02 13:36:37 +00:00
drh 27e62dbedd In the built-in SQL function implementations, improve some comments, fix
an off-by-one error in detecting over-size strings, and add testcase()
macros to verify that boundary values have been tested. (CVS 6434)

FossilOrigin-Name: 868a487f5fd7c795e04a08de36a85ba1e06bc8c6
2009-04-02 10:16:17 +00:00
drh ef31c6aa97 Enforce the run-time sqlite3_limit() length limit on zeroblob(), not just
the compile-time SQLITE_MAX_LENGTH limit. (CVS 6433)

FossilOrigin-Name: a04f9e7959325da18f66a1aa4ead1c50993807cb
2009-04-02 09:07:12 +00:00
drh 64f798dddc Increase test coverage of bitvec.c slightly. Fix the line length on a
comment in bitvec.c. (CVS 6432)

FossilOrigin-Name: ca3aa3ba7d751be1c2bcd100a203cd9c794a6cef
2009-04-01 23:49:04 +00:00
drh 2206a2b6ab Mark untestable branches of memjournal.c as such. Reduce the size of a
single block allocation to a power of two.  Reenable the inmemory_journal
permutation test. (CVS 6431)

FossilOrigin-Name: 05c182a5db9fa96f2d588dd884ce77916b0e60e4
2009-04-01 23:09:43 +00:00
drh 6eb41523f1 Fix the strftime() function so that the %s format can handle dates outside
of the range of 1901 to 2038.  Ticket #3769. (CVS 6430)

FossilOrigin-Name: a95b843a9251ca9f9a23e8b67c2126f4c297a534
2009-04-01 20:44:13 +00:00
drh 4b2b8b705d Change an unreachable error condition test to an assert() in rowset.c. (CVS 6429)
FossilOrigin-Name: 36115e4073528f03253dd94fadf3954522c0dfb9
2009-04-01 19:35:55 +00:00
danielk1977 295dc10573 Remove an unreachable branch from lockBtree(). Add comments. (CVS 6428)
FossilOrigin-Name: 859792958b4d4a3623d68526ff773f778bdf3f0d
2009-04-01 19:07:03 +00:00
drh aed382f9f1 Fix a bug in the sqlite3Utf16ByteLen() function so that it computes the
correct length even for strings that contain surrogate pairs.
Ticket #3766. (CVS 6427)

FossilOrigin-Name: 766bb7e59c28884e40ce13e3fc55c870d06d7e34
2009-04-01 18:40:32 +00:00
danielk1977 856cc0fde9 Test that two database connections that use different VFS implementations may not share a cache. (CVS 6426)
FossilOrigin-Name: 3a92c95644ead7c4728ffec1ec70676663518188
2009-04-01 18:25:54 +00:00
danielk1977 20c6cc2b1b Remove the unused SQLITE_Vtab flag. (CVS 6425)
FossilOrigin-Name: fdd78962fcb988edfb4147394045fc5d3944c620
2009-04-01 18:03:00 +00:00
danielk1977 d217e6f16d In pageReinit() in btree.c, only reinitialize a page if there are one or more references to it, not including the transient reference held by pager.c. This was always the intent. (CVS 6424)
FossilOrigin-Name: 0c5a7d1117cfb322d1c89da89e8887b0bb091602
2009-04-01 17:13:51 +00:00
drh 769e97e032 Remove dead code from the UTF conversion routines. Fix a bug in
sqlite3_prepare16_v2() in which an out-of-memory error fails to
set the statement return pointer to NULL. (CVS 6423)

FossilOrigin-Name: 94e2f815ebb38981a2226d8aed9f3731f8833f7c
2009-04-01 16:33:37 +00:00
danielk1977 6011a75c0c Remove an unreachable branch from allocateSpace() in btree.c. Add comments and asserts to the same function. (CVS 6422)
FossilOrigin-Name: f8e15a542df67fd9dc1c91c7d9e1c4df59acb82b
2009-04-01 16:25:32 +00:00
danielk1977 5b413d785f Add some assert() statements to querySharedCacheTableLock(). (CVS 6421)
FossilOrigin-Name: 3e3b5e861aeff2e4ef568c422236fdf7fa22bed3
2009-04-01 09:41:54 +00:00
vapier faa68dbb7d add a sanity check to make sure the configure script and VERSION file are always in sync (CVS 6420)
FossilOrigin-Name: 1b9da6d73f603e66d078463c3571dda86ceedfb3
2009-04-01 07:38:31 +00:00
vapier 051cd806f1 update configure script so it has proper VERSION in it (CVS 6419)
FossilOrigin-Name: ce683cbd329eab45abb6f97f677f560b0fd1cdb6
2009-03-31 23:29:15 +00:00
drh f6023ecae6 Version 3.6.12 (CVS 6418)
FossilOrigin-Name: 0db862a23aa4aae949d5cd90ad395a7f073d7fb8
2009-03-31 13:16:55 +00:00
shane b08a67a772 Fix compiler warnings from gcc and MSVC; Correct typo in select.c; (CVS 6417)
FossilOrigin-Name: 768514179a63783c4e70b931d1697403c04bedf5
2009-03-31 03:41:56 +00:00
drh 86655a1d2a Make sure a ROLLBACK that follows an incremental vacuum works. Ticket #3761. (CVS 6416)
FossilOrigin-Name: 8c1d0c6ad9646816eb8ca15b7df4e79b9b1b59ee
2009-03-31 02:54:40 +00:00
drh 8711c7d62e Remove two unused lines from pcache.c. (CVS 6415)
FossilOrigin-Name: d5cab05c9ecbc5cb5e9ed658a55c35434717e969
2009-03-31 01:32:18 +00:00
drh 2929db8167 Added a test case for ticket #3672. (CVS 6414)
FossilOrigin-Name: 7f40576dd76cb67f5248739a0ef1fbe496a3b42a
2009-03-31 00:50:35 +00:00
danielk1977 f4027782b0 Fix a case where a pointer map page was not being journalled before a file truncation that occurs as part of an incremental vacuum. (CVS 6413)
FossilOrigin-Name: c5890935a0247090162feda73cfea85012317050
2009-03-30 18:50:04 +00:00
drh 5e8d8878fe Add a comment to the pageReinit() routine explaining why the return code from
sqlite3BtreeInitPage() is ignored.  Comment change only - no changes to code. (CVS 6412)

FossilOrigin-Name: 10f605be8c92ff94625a0da0e23b2ffd55ec7509
2009-03-30 17:19:48 +00:00
danielk1977 5be31f519b Modify integrity-check to prevent a buffer overread when dealing with a corrupted database. (CVS 6411)
FossilOrigin-Name: 3c9097f19adae071a12e1114f64993d0c1da1163
2009-03-30 13:53:43 +00:00
drh a111577b6b Make sure recursive calls to winOpen() preserve the pVfs pointer.
Fault found while testing a mingw build in VMWare. (CVS 6410)

FossilOrigin-Name: 18b44f0df3d75689fb5cee20120eb3c6ae5882b3
2009-03-30 13:04:17 +00:00
drh 52b9c53fa7 Avoid calls to newer TCL interfaces in the test logic. This helps the
TCL test harness compile without warnings and link when using older versions
of the TCL library. (CVS 6409)

FossilOrigin-Name: 1ad176375746d680225d7ecddca54bc281b1556d
2009-03-30 12:56:52 +00:00
drh 5c905d6e91 Avoid all use of the "LL" suffix for long-long integer literals.
Ticket #3759. (CVS 6408)

FossilOrigin-Name: 7ef36935424013a1b211906620954a97ffe08de7
2009-03-30 12:42:45 +00:00
drh b71c1751dc Display a warning that the notify2-3 test sometimes fails on single-core
machines. (CVS 6407)

FossilOrigin-Name: ab7c718dec56859c51bfb0b1c1d70a7c84feffd1
2009-03-30 11:59:30 +00:00
danielk1977 64a54c52fe Another change related to (6401) and (6402): When an attempt to unlock a file fails in os_unix.c, close all files held open waiting for the unlock event anyway.
This prevents a file-descriptor leak when testing IO errors. (CVS 6406)

FossilOrigin-Name: 50fbcdea045f7d4266d9afa721616c720564aa93
2009-03-30 07:39:35 +00:00
drh f9e749cbba Add a comment to the doubleToInt64() routine that explains why returning
minInt is in fact correct when it seems like maxInt should be returned. (CVS 6405)

FossilOrigin-Name: 7f3be3608542bbc6ac7916e5c3a5436e5f0a552e
2009-03-29 15:12:09 +00:00
drh e3e2ae4a6f Turn off the debugging macros in where.c - left on by mistake in the
previous check-in. (CVS 6404)

FossilOrigin-Name: b601a57582051184baa37b807b1e18db93313e13
2009-03-29 00:15:54 +00:00
drh 75572e9de9 Improvements to cost estimation for evaluating the IN operator.
Ticket #3757. (CVS 6403)

FossilOrigin-Name: 0c438e813c411e8f9e92d6c7405fccb7a36e110a
2009-03-29 00:13:03 +00:00
drh f48f9ca65c Previous commit ((6401)) did not quite fix the problem. This should work
better. (CVS 6402)

FossilOrigin-Name: 2e7d3cc9f04de1fe7ef95cd5736dbc409c209cef
2009-03-28 23:47:10 +00:00
drh cd731cf540 In the unix-backend, when simulating an I/O error on an unlock operation,
still mark the connection as unlocked to avoid a future assert(). (CVS 6401)

FossilOrigin-Name: fb35cff855e17771caee2a992e7b2b4105b94862
2009-03-28 23:23:02 +00:00
drh 17561adc61 The test_async.c module must pass an unchanging filename to the underlying VFS. (CVS 6400)
FossilOrigin-Name: d1eeee21677a3dffdb4ee1182322007bf24ef03a
2009-03-28 18:56:14 +00:00
danielk1977 1a321c329b Fix thread related problems in test modules test_async.c and test_journal.c. (CVS 6399)
FossilOrigin-Name: 45df27a22d283871ed1de334fe3b74b0121d57a6
2009-03-28 17:21:52 +00:00
drh 94dfe476fa Back out check-in (6380). Replace it with a proper fix to the
xFullPathname method in the async VFS. (CVS 6398)

FossilOrigin-Name: 767a7f7b55456df404a7f8966a0c48318ddac120
2009-03-28 15:04:24 +00:00
danielk1977 ac86169fff The fix in (6395) was not correct. Fix #3756 a different way. (CVS 6397)
FossilOrigin-Name: 9278f7b1e1f2d0d4c2f8829ca801a769e512c2a6
2009-03-28 10:54:22 +00:00
danielk1977 8594373a25 Fix a couple of test script bugs. No changes to SQLite code. (CVS 6396)
FossilOrigin-Name: c9fa329f54736de517cddaf747595c9eca931f32
2009-03-28 07:03:41 +00:00
danielk1977 546820e321 Fix readDbPage() so that if an SQLITE_IOERR_SHORT_READ is encountered, the page content is zeroed. Ticket #3756. (CVS 6395)
FossilOrigin-Name: 647e3b156e32e37debd60b0079fc5a52bdc9b8c8
2009-03-28 06:59:41 +00:00
danielk1977 717811c995 When "PRAGMA case_sensitive_like" is invoked, override all existing "LIKE" functions, including UTF-16 versions. (CVS 6394)
FossilOrigin-Name: 1c6521e53b846eec2e046b1e9c04c60658b8e0e8
2009-03-27 15:26:03 +00:00
drh bcf4f4840b Fix another compiler warning in the test logic of tclsqlite.c. (CVS 6393)
FossilOrigin-Name: 47ffc4dca8f106d0da8cbc0a8ff7453016e9b40d
2009-03-27 12:44:35 +00:00
drh 69910da997 Fix some compiler warnings in test code. (CVS 6392)
FossilOrigin-Name: a43ecc9cb91ea8693e0fcce12c1bb5c5e4baf434
2009-03-27 12:32:54 +00:00
danielk1977 62e5a81a5a Fix an incompatibility between the test_async.c backend and change (6390). (CVS 6391)
FossilOrigin-Name: 6762625d29d5e0053afdad033fe54e2d9121046a
2009-03-27 09:10:12 +00:00
danielk1977 ee8b799d47 Check that the first byte of a potentially hot journal file is non-zero before beginning hot-journal rollback. Fix for #3751 and #3745. (CVS 6390)
FossilOrigin-Name: 80241a050296067937d0b0529fdf0c347358f86c
2009-03-26 17:13:06 +00:00
danielk1977 6d96100912 Prevent the tcl test suite from throwing an exception when a threadsafe SQLite is linked against a non-threadsafe Tcl for testing. Print a warning instead. Ticket #3753. (CVS 6389)
FossilOrigin-Name: a22e7c818b2227a4c80ad84b299d11f365e3b17d
2009-03-26 14:48:07 +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
danielk1977 5a2cc667ca Ensure that the test vfs in test_journal.c zeroes sqlite3_file.pMethods if an xOpen() call fails. Similar problem to that fixed by #6384. This was a problem with test code, not SQLite itself. (CVS 6387)
FossilOrigin-Name: 45ae830d5631afa5d994361f5122c2f0b6fbab4c
2009-03-26 11:49:11 +00:00
drh 7c01f1d754 Remove an unused parameter from sqlite3DequoteExpr. Fix another unrelated
and harmless compiler warning. (CVS 6386)

FossilOrigin-Name: 8589b0fcc51a32188386e442655fd91f421ca7f8
2009-03-25 16:51:43 +00:00
danielk1977 357864ecb6 Fix a problem preventing sqlite3_extended_errcode() from working correctly. (CVS 6385)
FossilOrigin-Name: de469c46f55bf772ab8a49a185dc1b87360a937f
2009-03-25 15:43:08 +00:00
drh 072db2fb13 When a VFS.xOpen fails, make sure the pMethods pointer is zeroed on the
sqlite3_file object so that subsequent xClose() operations against that
same file handler are no-ops.  Bug in the test_async.c module only - not
in the core library.  Ticket #3744. (CVS 6384)

FossilOrigin-Name: c32b454118f4b0cc615edb9b35f749db45f6b36d
2009-03-25 14:24:41 +00:00
drh 892404323f Use fdatasync() only on linux, unless -Dfdatasync=fdatasync is set at
compilation time. (CVS 6383)

FossilOrigin-Name: cbf2ca4cc41f1f710635b863db6e98074bd5e8bc
2009-03-25 01:06:01 +00:00
drh 72bcfa6eeb Change OS_UNIX to SQLITE_OS_UNIX in test_thread.c. Modify notify2.test to
print out its timings in addition to reporting success or failure. (CVS 6382)

FossilOrigin-Name: 940d72d2bae95ddd1aea9b63424179735f440296
2009-03-24 18:42:16 +00:00
drh 86d7a3157c Get the OOM tester in async2.test working again. (CVS 6381)
FossilOrigin-Name: f398a2d1b0a731bbb600d0bb70ab79f1334ceda9
2009-03-24 17:43:56 +00:00
drh 37eecdd41d Adjust the lock.test and lock3.test scripts so that they work with the
asynchronous VFS. (CVS 6380)

FossilOrigin-Name: 40df926b4606b3abe8c797bf17163f996bd03ad5
2009-03-24 16:55:43 +00:00
drh 9a6dedaef8 Include sqliteInt.h in test_async.c so that the asynchronous VFS tests
will run even if SQLITE_OS_UNIX is not explicitly defined. (CVS 6379)

FossilOrigin-Name: 29b0d6a3fe519c71a92e2436d7c5860f3f0178ef
2009-03-24 16:27:09 +00:00
drh 1af466eb6b New assert()s added to verify that the Expr.token value is used correctly. Ticket #3743. (CVS 6378)
FossilOrigin-Name: cf3d84ab73b7f519921a984f88bdad81996a3a82
2009-03-24 15:31:28 +00:00
drh d9da78a2c8 Changes to insure that lookaside memory allocations are never used to hold
schema content.
Ticket #3743. (CVS 6377)

FossilOrigin-Name: ea74d8dc62f5784089aa8ef098e97c505a79b176
2009-03-24 15:08:09 +00:00
danielk1977 4be6469146 Add a comment to prepare.c explaining why the lookaside buffer is disabled before sqlite3_exec() is called to parse a schema statement. No code changes. (CVS 6376)
FossilOrigin-Name: 8ca6a665650c9683a202f3ced17b14f7c85624bf
2009-03-24 04:46:08 +00:00
drh 347a7cb35b Clarify the meaning of a comment. No changes to code. (CVS 6375)
FossilOrigin-Name: 7c2df04b52a40d5d1b744ad1097f7c12143d8c2c
2009-03-23 21:37:04 +00:00
drh 7047e25c45 Add asserts to make sure that database connection locks are held when
accessing the lookaside memory allocation buffers.  No defects were found. (CVS 6374)

FossilOrigin-Name: 8a9f3e66069146ad1b1bc2686567882dc87603a9
2009-03-23 17:49:14 +00:00
danielk1977 a8bbef84bf Fix an obscure race condition that can occur when multiple threads, shared cache and DDL statements are combined. Enhance notify2.test to test this scenario. (CVS 6373)
FossilOrigin-Name: 92ec5975123284aff3a69ee16c397d9e2a844c0b
2009-03-23 17:11:26 +00:00
danielk1977 bc73971db6 Use the ROUND8() macro to round an integer up to the nearest multiple of 8 and ROUNDDOWN8() macro to round down to the nearest multiple of 8. This is a cosmetic change. (CVS 6372)
FossilOrigin-Name: db1d4d2f5083adf5438c7f387b115180800e7bd9
2009-03-23 04:33:32 +00:00
shane ca18d20fd6 Fix compiler warning in MSVC. (CVS 6371)
FossilOrigin-Name: 83a4d5b3d7abe983c2be00a694cc7d4c4847f253
2009-03-23 02:34:32 +00:00
drh 296a483c2e Allow the keyword INDEXED to be used as the name of a table or index or
column - for backwards compatibility. (CVS 6370)

FossilOrigin-Name: 53149c9f5d5cfaba3374703cd3af92a9d4cf8718
2009-03-22 20:36:18 +00:00
drh 0fa991b9e3 Update comments in build.c to conform to the latest implementation. (CVS 6369)
FossilOrigin-Name: a915e8e0a429ab6a10536c45264a790c2d076461
2009-03-21 16:19:26 +00:00
drh 4a7384a25f Rig the unix backend to use fdatasync() by default, without having to set the
HAVE_FDATASYNC macro.  Systems that do not support fdatasync() can be compiled
using -Dfdatasync=fsync. (CVS 6368)

FossilOrigin-Name: a331562727be465874a66c2c1d15ee070f96f7e0
2009-03-21 14:56:52 +00:00
drh 0b647ffd47 On unix, always use fdatasync() instead of fsync() when available, even if
the file size changes, since (we are told) fdatasync() will automatically
flush the inode when the file size changes. (CVS 6367)

FossilOrigin-Name: 0d6b11bcf67f86e5554806869d32338e5831833e
2009-03-21 14:41:04 +00:00
danielk1977 2b31b211c3 Add a test to try to hit the race-condition fixed by (6363). (CVS 6366)
FossilOrigin-Name: 4310411f5027dba18e017023e21cb09982e26752
2009-03-20 15:16:05 +00:00
danielk1977 c926b6a65b Fix an assert failure introduced by (6355). (CVS 6365)
FossilOrigin-Name: a08324d16d1e9a4e7c1b294bc71fc939d173f826
2009-03-20 14:42:11 +00:00
danielk1977 be2296501c Make sure struct WhereClause is aligned on an 8-byte boundary. Fix for #3613, #3736. (CVS 6364)
FossilOrigin-Name: 093a0cf4adc8613f744c2ccdef61f0b30a46818c
2009-03-20 14:18:51 +00:00
drh 7555d8ec40 Rename the unused MEM2 static mutex to OPEN and reuse it to serialize access
to the sqlite3BtreeOpen() routine to prevent a race condition on detection
of sharable caches.  Ticket #3735. (CVS 6363)

FossilOrigin-Name: 19fa5a29b97f017a9e176e48c848100299ba6920
2009-03-20 13:15:30 +00:00
danielk1977 df0f3c06b6 Fix a problem in thread005.test cause errors on osx. (CVS 6362)
FossilOrigin-Name: 56e6fca1a9da69c3a0fe43b00db9a6d9d93f03ba
2009-03-20 10:24:03 +00:00
danielk1977 eefa000331 Fix a problem in loadext.test causing an error on OSX. This is not a real problem, just a case of the test script expecting a slightly different error message than the one returned. (CVS 6361)
FossilOrigin-Name: 18680989b5365b0e35fadca5919dfced22433ff4
2009-03-20 09:09:37 +00:00
danielk1977 238746a650 Fix a couple of fairly obscure cases where an assert() could fail following a malloc failure. (CVS 6360)
FossilOrigin-Name: cc0d925669ddeb55048e88aa5b4f658be60b0962
2009-03-19 18:51:06 +00:00
danielk1977 65a2ea1155 Change sqlite3_step() to return SQLITE_LOCKED if a statement cannot be re-compiled due to locks on the shared-cache schema. Also add a blocking wrapper of sqlite3_prepare_v2() to the test code. (CVS 6359)
FossilOrigin-Name: e8be1af922098e298902820730f8b28603bd6fae
2009-03-19 07:58:31 +00:00
danielk1977 cb9d8d8821 Fix a crash that could occur when creating an index in shared-cache mode with lookaside enabled. (CVS 6358)
FossilOrigin-Name: 097737e3689b9a7e32815fe9c6fc6eed796ae53c
2009-03-18 18:43:36 +00:00
danielk1977 308ef5a548 Modify test script backup2.test so that it works on OSX. (CVS 6357)
FossilOrigin-Name: d82e8cd43f46dda15fd15b567901a7dbb2276287
2009-03-18 13:55:29 +00:00
drh 0bb1221eed Add comments and testcase() macros to the fix for shared-cache schema default
value problem of check-in (6353). (CVS 6356)

FossilOrigin-Name: 05d8607d44cd3ff262c07cc1192f4471f3192b09
2009-03-18 10:36:12 +00:00
danielk1977 bd43455c38 Fix some cases where executing SQL from within a user-function callback could cause problems related to statement-transactions. (CVS 6355)
FossilOrigin-Name: a60f4191791dd7bb49d5c95b350a9924845b59a8
2009-03-18 10:33:00 +00:00
drh 7f75122149 Move the rowid cache out of VdbeCursor and into BtCursor. When multiple
BtCursors are open on the same table, set their rowid cache all at the
same time.  Ticket #3731. (CVS 6354)

FossilOrigin-Name: 189785832a7dc9f4a0a2113d850b92b987e0f9bf
2009-03-17 22:33:00 +00:00
danielk1977 21822c58b0 Fix a problem that could cause a crash when a shared-cache schema contains column default values. (CVS 6353)
FossilOrigin-Name: afadddc34eee3d6a39102b790ce1a869b33d4286
2009-03-17 17:48:59 +00:00
drh 3ded8d6f2a Fix test script bugs in the thread002.test and thread_common.tcl. (CVS 6352)
FossilOrigin-Name: d137e841ce90be92f4c18218f35d22e3a06b0f14
2009-03-17 15:39:31 +00:00
drh 1f4969a117 Make sure the finished() array in thread005.test is cleared before the
script starts. (CVS 6351)

FossilOrigin-Name: ddadc25d550efd56e319bf5508c27d66e346be1b
2009-03-16 17:07:57 +00:00
danielk1977 d52acb3b5b Modify quick.test to support the QUICKTEST_INCLUDE environment variable, which can be used to override the built-in EXCLUDE list. (CVS 6350)
FossilOrigin-Name: fdfe22f0a568b5e8a5a2ad302d7c06b2696809b0
2009-03-16 14:48:18 +00:00
drh 8948747d8d Additional hyperlinks in the sqlite3_unlock_notify() documentation. (CVS 6349)
FossilOrigin-Name: 4dae5f6ed1662ca1c5c26d57049f7d349299468c
2009-03-16 13:37:02 +00:00
danielk1977 404ca07578 Add the sqlite3_unlock_notify() API. (CVS 6348)
FossilOrigin-Name: b649a6cc5bfefddd6a04b1183647d2923e0a0daa
2009-03-16 13:19:36 +00:00
drh b030434d93 Bump the version number to 3.6.12. (CVS 6347)
FossilOrigin-Name: 2fcccca3e56e2e3a95bdedeb01ab7da1b24b7ac2
2009-03-16 12:30:52 +00:00
drh 93a989cf65 Remove surplus white space from shell.c. Use strlen30() instead of strlen(). (CVS 6346)
FossilOrigin-Name: 324a1aff300b7349b9fc1dea56d640d86500f100
2009-03-16 10:59:44 +00:00
danielk1977 1b870de6b0 Fix for #3719. When synthesizing a CREATE TABLE statement as as result of a "CREATE TABLE AS", quote the column type names unless they are simple identifiers or simple identifiers followed by one or two dimensions (e.g. "VARCHAR(10)"). (CVS 6345)
FossilOrigin-Name: 7c6437efe0a0e935cfa8041bd6b94070c8654fa4
2009-03-14 08:37:23 +00:00
danielk1977 9365c6760a Do not overrun a buffer in the genfkey code (now part of shell.c). Fix for #3722. (CVS 6344)
FossilOrigin-Name: 943b11fb188835f0c62b6064b084192b1bbe1c0c
2009-03-13 15:32:53 +00:00
danielk1977 2fe5cb1809 Avoid fts3 crash on (MATCH '""') expressions. Ticket #3717. (CVS 6343)
FossilOrigin-Name: 03679857a320517a7b89e5214e948bce9af896a9
2009-03-12 15:43:47 +00:00
danielk1977 20736d82e2 Make calls to sqlite3BtreeRollbackStmt() no-ops when passed a Btree* handle that does not have an open statement transaction. Ticket #3718. (CVS 6342)
FossilOrigin-Name: a1bb1aef0e06140a2d5d5e4b6c10c73ce95c89e0
2009-03-12 14:43:27 +00:00
danielk1977 6fa0fe13f0 Begin purging dirty pages from the cache once 90% of the cache is dirty (insteadof waiting until it is 100% dirty). This improves performance in some circumstances by effectively reserving 10% of the configured page-cache for frequently reused read-only pages. (CVS 6341)
FossilOrigin-Name: 823fe7f5551e121e211d1ede606a7ce7487ffe0d
2009-03-05 14:59:39 +00:00
danielk1977 c427740b78 Comment out a recently added assert statement that is failing. (CVS 6340)
FossilOrigin-Name: d0b2015f1caf2fc60ec82bd8e760f7b61befa3b4
2009-03-05 14:53:18 +00:00
shane 50daafc74a Implemented winSectorSize(); Other changes for consistency. os_win.c. Ticket #2931. (CVS 6339)
FossilOrigin-Name: 68abcb278ced40c0d97af724dbd1b751a3becdc2
2009-03-05 05:54:55 +00:00
shane 3c9cfa999c Changes to cleanup and improve the consistency of tests for large file support in bigfile.test. (CVS 6338)
FossilOrigin-Name: 3dbdf68030855a5da24de0ae2f10a26da2531d33
2009-03-05 04:27:08 +00:00
shane e34c647ed0 Added some asserts and a check for a null pointer dereference. (CVS 6337)
FossilOrigin-Name: 6b0cabd017ed25530b2d918d2c069fcbdd60a3f6
2009-03-05 04:23:47 +00:00
shane be21779385 Corrected typos and misspellings. Ticket #3702. (CVS 6336)
FossilOrigin-Name: 6404afa0c515a6536fc2e878d4fb451e4dc06942
2009-03-05 04:20:31 +00:00
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