# event

type: ci
user: drh
comment:
  Fix the NEAR connector in FTS3 so that it can take ranges in excess of 9.
  The maximum range is now 32767. (CVS 5695)


type: ci
user: danielk1977
comment:
  Modify test_async.c to avoid using internal SQLite APIs. There are still some comments that need updating. (CVS 5698)


type: ci
user: danielk1977
comment:
  Fix the shared_err.test script so that it works if the device supports SQLITE_IOCAP_SAFEAPPEND. (CVS 5699)


type: ci
user: danielk1977
comment:
  Fix the async.test test script so that it invokes (finish_test) even if the asynchronous backend is not included in the build (and no tests are run). (CVS 5700)


type: ci
user: drh
comment:
  Adjust the page recycling algorithm so that the number of pages allocated
  to each connection does not exceed its cache_size limit. (CVS 5701)


type: ci
user: danielk1977
comment:
  Do not attempt to change the page size after a pager has entered the error state (Pager.errCode!=SQLITE_OK). This prevents an assertion failure in vacuum3.test. (CVS 5703)


type: ci
user: danielk1977
comment:
  Set the type of the "comment" field to SQLITE_TEXT when outputing the results of an EXPLAIN query. (CVS 5704)


type: ci
user: danielk1977
comment:
  Modify the sqlite3VdbeMemCompare() routine so that it does not modify any Mem.z values. Ticket #3376. (CVS 5706)


type: ci
user: danielk1977
comment:
  If the xAccess() call used by "PRAGMA temp_store_directory = /new/path/" to determine if the supplied directory is writable returns an error, assume the directory is not writable. (CVS 5707)


type: ci
user: danielk1977
comment:
  Use (file nativename (pwd)) instead of just (pwd) to find the name of the current directory to pass to "PRAGMA temp_store_directory" in pragma.test. This helps the test pass on non-unix systems. (CVS 5709)


type: ci
user: danielk1977
comment:
  Initialize variable pKeyDup in multiSelectOrderBy(). Technically it doesn't need to be initialized, but the reasoning required to come to that conclusion is too complicated for some automated systems. So it is initialized to keep some compilers happy. Ticket #3382. (CVS 5710)


type: ci
user: drh
comment:
  Add test cases for ticket #3378 and #3381.  Add a temporary hack to get those
  to problems fixed.  The hack causes failures in alias.test, but those are much
  less serious than the aforementioned tickets.  This is a stop-gap until we can
  figure out a proper fix. (CVS 5711)


type: ci
user: drh
comment:
  Fix for tickets #3378 and #3381 that preserves the aliasing optimization.
  And yet, this fix feels uncomfortable.  Seeking an alternative... (CVS 5712)


type: ci
user: drh
comment:
  Speed improvements for in-memory databases by omitting flag clearing on pages
  where it is impossible for the flag to be set and by avoiding assert()s on
  non-debugging builds.  Ticket #3384. (CVS 5715)


type: ci
user: drh
comment:
  Performance improvements in getAndInitPage(): omit the upper bound check on
  page number if the page is already in cache. (CVS 5716)


type: ci
user: danielk1977
comment:
  Avoid parsing the structure of b-tree pages (in sqlite3BtreeInitPage) more than is necessary. (CVS 5720)


type: ci
user: danielk1977
comment:
  In sqlite3BtreeGetMeta(), if BtShared.pPage1 is available use it instead of requesting a new reference from the pager layer. (CVS 5724)


type: ci
user: danielk1977
comment:
  In function moveToRoot(), use the MemPage.pParent pointers to find the root page if they are valid. This is slightly faster than requesting a new reference to the root page from the pager layer. (CVS 5725)


type: ci
user: danielk1977
comment:
  Speed up releaseMemArray() a bit by handling the most common types of memory cells inline. (CVS 5726)


type: ci
user: danielk1977
comment:
  Add instrumentation to os_unix.c to test that a return value of SQLITE_FULL from an xSync() callback is handled correctly. (CVS 5730)


type: ci
user: drh
comment:
  Get rid of all of the compiler magic associated with SQLITE_EXPERIMENTAL
  and SQLITE_DEPRECATED.  It was causing more problems than it was solving.
  Ticket #3395 et al. (CVS 5732)


type: ci
user: drh
comment:
  Fix for ticket #3382 was mistakenly removed by (5712).  Add an assert to
  prevent it from being removed again. (CVS 5733)


type: ci
user: drh
comment:
  Fix the TCL installer so that it omits the release number.  Ticket #3396.
  Use strcmp() instead of sqlite3StrICmp() in the "copy" method of the SQLite
  object in the TCL interface. (CVS 5735)


type: ci
user: drh
comment:
  Enable the LOCKING_STYLE extensions by default on a Mac.  Leave them
  disabled on all other posix platforms. (CVS 5737)


type: ci
user: danielk1977
comment:
  Always transform error code SQLITE_IOERR_NOMEM to SQLITE_NOMEM before returning. This was already happening in most places. (CVS 5738)


type: ci
user: danielk1977
comment:
  Catch another case where SQLITE_IOERR could be returned instead of SQLITE_NOMEM following an out-of-memory error. (CVS 5739)


type: ci
user: danielk1977
comment:
  Add file fts3_icu.c to the amalgamation. Because of the way header files are included into sqlite3.c, fts3_icu.c has to appear after all the other fts3 and icu extension files. Ticket #3398. (CVS 5741)


type: ci
user: danielk1977
comment:
  On windows, avoid running those tests in exclusive.test that require the journal file to be externally accessed while SQLite is holding it open. This doesn't work on windows. (CVS 5742)


type: ci
user: drh
comment:
  Make sure the queueMutex is held prior to writing the pQueueLast field
  of the write queue in the async demonstration code.  Ticket #3405. (CVS 5744)


type: ci
user: drh
comment:
  Add the "truncate" journal mode which commits transactions by truncating the
  rollback journal file to zero length and not calling fsync(). (CVS 5745)


type: ci
user: danielk1977
comment:
  Instead of storing a pointer to the parent page in the MemPage structure, have each B-Tree cursor keep track of the ancestry of the current page. (CVS 5747)


type: ci
user: danielk1977
comment:
  Remove the reparentPage() and reparentChildPages() functions from btree.c. All calls to these functions can now be replaced by a call to setChildPtrmaps(). (CVS 5751)


type: ci
user: shane
comment:
  Misc clean up.  Wrapped a CE only variable in if-defs. Changed to only provide cache hint for CE builds (as this prevents CE from compressing the file.) Performance testing on XP and Vista showed caching hint had little effect when the DB size was much smaller than the O/S disk cache size, and provided only marginal benefit when the DB size was much larger than the cache.  On Vista, overall system performance was hurt for very large DBs.  Ticket #3387. (CVS 5753)


type: ci
user: danielk1977
comment:
  Fix a bug in where.c where a non-temp register was being incorrectly deallocated. Ticket #3408. (CVS 5758)


type: ci
user: danielk1977
comment:
  Optimize queries that contain "WHERE rowid IN (x, y, z...)" by using an intkey btree to store the (x, y, z...) set instead of an index btree. (CVS 5760)


type: ci
user: drh
comment:
  Fix a typo that prevents the sqlite3_sql() interface from appearing
  in the official documentation. (CVS 5761)


type: ci
user: danielk1977
comment:
  Fix for sqlite3_blob_write(): If either 3rd or 4th argument is less than zero, return SQLITE_ERROR. H17879. (CVS 5762)


type: ci
user: danielk1977
comment:
  Change one of the test cases in incrblob2.test to avoid allocating a 10MB block of heap memory. (CVS 5764)


type: ci
user: danielk1977
comment:
  Modifications to bind.test to account for different values of SQLITE_MAX_VARIABLE_NUMBER. Ticket #3409. (CVS 5765)


type: ci
user: danielk1977
comment:
  Add a test to indexedby.test to check that automatic indexes (sqlite_autoindex_xxx) can be used with the INDEXED BY syntax. (CVS 5767)


type: ci
user: drh
comment:
  In sqlite3_bind() interfaces, avoid acquiring the mutex until after the
  statement handle has been validated.  Ticket #3418. (CVS 5768)


type: ci
user: shane
comment:
  Initial support for LIMIT clause on DELETEs and UPDATEs.  Changes likely with more testing.  The code can be omitted with the define SQLITE_OMIT_UPDATE_DELETE_LIMIT. (CVS 5774)


type: ci
user: danielk1977
comment:
  Fix a problem with hot-journal rollback. SQLITE_CANTOPEN was being returned if the hot-journal file contained a pointer to a master journal file that did not exist. (CVS 5775)


type: ci
user: danielk1977
comment:
  Have sqlite3_bind_value() call sqlite3ApiExit() before returning. Otherwise the db->mallocFailed flag may not be cleared. (CVS 5777)


type: ci
user: danielk1977
comment:
  Fix a recently introduced test script bug causing rollback.test to throw an exception when run using the "onefile" variation. (CVS 5778)


type: ci
user: drh
comment:
  Remove the SQLITE_MUTEX_APPDEF compile-time option.  The SQLITE_THREADSAFE=0
  option always removes all mutex code.  For application-defined mutexes only,
  use SQLITE_THREADSAFE=1 with SQLITE_MUTEX_NOOP=1.  Ticket #3421. (CVS 5779)


type: ci
user: drh
comment:
  Raise the hard upper bound on SQLITE_MAX_FUNCTION_ARG to 1000 from 100.
  The default upper bound is still 100, but it can now be raised as high
  as 1000 at compile-time. (CVS 5780)


type: ci
user: danielk1977
comment:
  After an OP_NullRow is executed on a cursor, cause any subsequent OP_Next or OP_Prev to behave as if there were no more rows to traverse. Ticket #3424. (CVS 5782)


type: ci
user: drh
comment:
  Add a test to verify the sqlite3_column_name() interface returns the
  correct value when the query is of the form: "SELECT rowid,* FROM...".
  Ticket #3429. (CVS 5785)


type: ci
user: danielk1977
comment:
  Fix an assert() failure that can occur if the user attempts to set an into an integer primary key column to a text value in a table that has a BEFORE UPDATE trigger. (CVS 5787)


type: ci
user: shane
comment:
  Updated LIMIT support for DELETE/UPDATE.  Omit option changed to SQLITE_ENABLE_UPDATE_DELETE_LIMIT. (CVS 5788)


type: ci
user: shane
comment:
  Added mallocJ.test to test allocation failure handling of the new LIMIT/OFFSET support for UPDATE/DELETE. (CVS 5790)


type: ci
user: shane
comment:
  Re-factored memory allocation failure handling in the sqlite3LimitWhere() function based on failures in the mallocJ.test script. (CVS 5791)


type: ci
user: drh
comment:
  Simplify the symbol hash table to use only a single key class.  Other
  changes to improve code coverage. (CVS 5794)


type: ci
user: shane
comment:
  Further simplifications of the code for the LIMIT clause on an UPDATE or DELETE.  Added a few test cases to wherelimit.test. (CVS 5797)


type: ci
user: drh
comment:
  Add the SQLITE_OMIT_TRUNCATE_OPTIMIZATION option.  Other unrelated
  documentation enhancements. (CVS 5798)


type: ci
user: drh
comment:
  Added an assert() to detect lookaside memory leaks.  Also added the
  SQLITE_OMIT_LOOKASIDE compile-time option which is useful in trying to
  track down lookaside memory leaks. (CVS 5800)


type: ci
user: drh
comment:
  Fix a memory leak on ORDER BY of a compound select caused by the resolver
  on a flattened query.  Also fix a OOM segfault in WHERE clause processing. (CVS 5801)


type: ci
user: drh
comment:
  Fix a OOM segfault in the BETWEEN operator parsing - discovered while
  using SQLITE_OMIT_LOOKASIDE. Add SQLITE_OMIT_LOOKASIDE to test_config.c and
  bypass lookaside.test when defined. (CVS 5803)


type: ci
user: drh
comment:
  Fix to sqlite3DbMallocRaw() when SQLITE_OMIT_LOOKASIDE is defined so that
  once it fails it continues to fail.  Add a comment explaining why this is
  important. (CVS 5804)


type: ci
user: drh
comment:
  Conditionally omit prototypes in pcache.h when the corresponding routines
  are not used.  Ticket #3430. (CVS 5805)


type: ci
user: danielk1977
comment:
  When transfering an error message from a statement handle to the database handle so that it can be accessed by sqlite3_errmsg(), a malloc may fail. If this malloc fails, it is considered benign. (CVS 5806)


type: ci
user: shane
comment:
  Added SQLITE_OMIT_DEPRECATED compile time option to leave out deprecated functions.  Updated test scripts to skip tests of deprecated functions if they are compiled out. (CVS 5808)


type: ci
user: danielk1977
comment:
  If sqlite3_column_value() is called to obtain a value with the MEM_Static flag set, clear it and set the MEM_Ephem flag before returning. Otherwise, if the value is passed to sqlite3_bind_value() or sqlite3_result_value(), sqlite may attempt to use the buffer after the statement has been finalized. This is not always valid, as MEM_Static only guarantees that a MEM.z buffer will be valid for the lifetime of the owner statement, not that it is actually a static buffer. (CVS 5812)


type: ci
user: danielk1977
comment:
  Use one less temporary table in genfkey.c. The retired table was being used to workaround the bug fixed by (5812). (CVS 5813)


type: ci
user: drh
comment:
  In rollback.test, do not check for journal deletion if the journal mode
  is not DELETE.  Call show_memstats after each test module in all.test
  and quick.test. (CVS 5814)


type: ci
user: danielk1977
comment:
  Update main.mk so that a couple of fts3 files are compiled with SQLITE_TEST when building testfixture. (CVS 5819)


type: ci
user: drh
comment:
  Make sure malloc3.test runs even if a CREATE TABLE transaction commits
  prior to the last OOM error. (CVS 5820)


type: ci
user: drh
comment:
  Fix the xRandomness() method on the unix VFS to return the number of bytes
  of randomness obtained. (CVS 5821)


type: ci
user: danielk1977
comment:
  After running speed1.test and speed1p.test, reset the size of the lookaside buffer. Otherwise, subsequent runs of malloc5.test may report an error. Changes to test code only. (CVS 5824)


type: ci
user: danielk1977
comment:
  Do not open and sync the directory in unixDelete() if the SQLITE_DISABLE_DIRSYNC option is defined. (CVS 5826)


type: ci
user: danielk1977
comment:
  Add "pragma journal_mode=memory". Change the way rollback works for in-memory databases so that it reuses the journal_mode=memory code. (CVS 5830)


type: ci
user: drh
comment:
  When a name in double quotes falls back to being a string literal,
  make sure it has no affinity.  Ticket #3442. (CVS 5832)


type: ci
user: shane
comment:
  Removed some more dead code and fixed some unresolved externals for WINCE.  Ticket #3420. (CVS 5837)


type: ci
user: shane
comment:
  Updated configure/makefiles to handle SQLITE_ENABLE* compile options.  Made sure makefile passes command line options (OPTS=-Dfoo) to the compiler.  Add -DSQLITE_COVERAGE_TEST=1 if gcov being used. (CVS 5838)


type: ci
user: danielk1977
comment:
  Fix a bug in pragma table_info. Column default values specified as negative numbers (col DEFAULT -1) were being reported as NULL by the pragma. (CVS 5839)


type: ci
user: danielk1977
comment:
  Add file tkt3461.test with a few examples of bug #3461. Because these tests currently fail they are disabled for now. (CVS 5840)


type: ci
user: drh
comment:
  Disable the result-set alias cache when on conditional code branches.
  Ticket #3461.  The column cache and result set alias cache mechanisms are
  prone to this kind of error and need to be refactored.  This check-in should
  be considered a temporary fix in advance of a more general redesign of the
  whole mechanism. (CVS 5841)


type: ci
user: danielk1977
comment:
  If an SQLITE_DELETE authorization callback returns SQLITE_IGNORE, proceed with the delete operation but disable the truncate optimization. (CVS 5845)


type: ci
user: danielk1977
comment:
  Avoid exposing internal interfaces sqlite_attach() and sqlite_detach() as SQL scalar functions. Ticket #3466. (CVS 5846)


type: ci
user: drh
comment:
  Remove the vestigial mem4 and mem6 memory allocators.  Add the
  SQLITE_ZERO_MALLOC compile-time option and the mem0.c module to
  handle memory allocation for that case. (CVS 5848)


type: ci
user: danielk1977
comment:
  If a hot-journal file is detected but the application does not have the required read/write permissions, return SQLITE_CANTOPEN. Prior to this change, SQLITE_BUSY was returned. Ticket #3457. (CVS 5849)


type: ci
user: drh
comment:
  Add the sqlite3_extended_errcode() interface.  Change to return
  SQLITE_BUSY instead of SQLITE_ERROR when a COMMIT is attempted and one
  or more queries are still pending. (CVS 5850)


type: ci
user: danielk1977
comment:
  Change the way sqlite3VdbeSetColName() is called so as to remove a few lines of code. This also fixes #3470. (CVS 5853)


type: ci
user: shane
comment:
  Test that single byte corruptions in increasingly larger quantities are handled gracefully. (CVS 5854)


type: ci
user: danielk1977
comment:
  Fix a bug reported on the mailing list triggered by the pattern "SELECT <col>, (SELECT ... FROM tbl WHERE rowid > <col>) FROM ...". (CVS 5855)


type: ci
user: drh
comment:
  Test cases to verify that COMMIT and ROLLBACK return SQLITE_BUSY when
  there are active statements. (CVS 5858)


type: ci
user: drh
comment:
  The COMMIT command now works even if there are pending queries, as long
  as the pending queries are reading and not writing the database. (CVS 5864)


type: ci
user: drh
comment:
  Add documentation to make it clear that short reads from xRead in the VFS
  must be zero-filled. (CVS 5867)


type: ci
user: drh
comment:
  Prevent a rollback from crashing if the sector-size field of the
  rollback journal is corrupted. (CVS 5868)


type: ci
user: shane
comment:
  In btree.c, omit calls to setChildPtrmaps() if SQLITE_OMIT_AUTOVACUUM is defined. Ticket #3439. (CVS 5871)


type: ci
user: shane
comment:
  Removed a few more small parts of memsys6 code, including some config and test code for it; (CVS 5872)


type: ci
user: drh
comment:
  Fix the documentation of the SQLITE_FUNCTION authorizer code so that it
  agrees with how SQLite has always behaved.  Ticket #3489. (CVS 5876)


type: ci
user: drh
comment:
  When an OOM error occurs while resizing an sqlite_value object, make sure
  the value of the object is set to NULL.  Ticket #3488. (CVS 5877)


type: ci
user: drh
comment:
  Fix the CLI so that it does not terminate input when an Oracle or MS-SQL
  command terminator mark is seen in the middle of a string literal.
  Ticket #3490. (CVS 5878)


type: ci
user: drh
comment:
  When an assignment occurs in a boolean, always test the result using "!=0"
  to avoid confusion and make it clear that assignment is intended, not
  an equality test.  Ticket #3491. (CVS 5879)


type: ci
user: drh
comment:
  Avoid signed/unsigned comparison warnings in bitvec.c by changing the
  types of loop variables to unsigned int. (CVS 5880)


type: ci
user: drh
comment:
  Cleanup in flattenSubquery.  Add OOM tests for flattenSubquery.  Fix issues
  with OOM errors causes problems for flattenSubquery.  Ticket #3485. (CVS 5882)


type: ci
user: danielk1977
comment:
  Change the way threadsOverrideEachOthersLocks() works to avoid trying to write-lock a (potentially) read-only files. Also, assume that on non-linux systems threads do override each others locks. Ticket #3472. (CVS 5883)


type: ci
user: drh
comment:
  Send the "Incomplete SQL" error message of the CLI to stderr instead of
  stdout.  Ticket #3476. (CVS 5885)


type: ci
user: danielk1977
comment:
  Make sure affinities and implicit collation sequences are correctly used by comparison expressions in the select-list or having clause of an aggregate query. Ticket #3493. (CVS 5889)


type: ci
user: danielk1977
comment:
  Modify a failing test case in corruptC.test. The test case was failing only because the integrity_check was returning a slightly different error message than expected. (CVS 5891)


type: ci
user: danielk1977
comment:
  Avoid committing a transaction from within the xSync() method of a virtual table. Fix for #3497. (CVS 5902)


type: ci
user: drh
comment:
  Fix to the lemon parser template when YYSTACKSIZE is 0 (dynamically
  allocated stack space). (CVS 5919)


type: ci
user: drh
comment:
  Add an alternative application-defined pcache implementation and add test
  cases to permutations.test to invoke it.  Added the SQLITE_CONFIG_GETPCACHE
  method to sqlite3_config(). (CVS 5920)


type: ci
user: danielk1977
comment:
  In os_unix.c, use "IS_VXWORKS" instead of "defined(__RTP__) || defined(_WRS_KERNEL)". Purely because it's easier on the eyes. (CVS 5925)


type: ci
user: shane
comment:
  In bitvec.c: removed some of the recursion, minor optimizations, added comments, improved consistency. (CVS 5929)


type: ci
user: shane
comment:
  In os_win.c, if SQLITE_TEST defined, winRandomness() should return all zeroes like os_unix.c. (CVS 5932)


type: ci
user: drh
comment:
  When a memory allocation fails on the %Q conversion in sqlite3_mprintf(),
  make sure the error is reported back up the call stack. (CVS 5933)


type: ci
user: aswift
comment:
  Added support for proxy file locking style
  Added pragma support for controlling proxy file locking
  Added file control access to last errno and proxy locking
  Added support for TMPDIR environment variable
  Extended unit tests to cover new proxy locking pragmas and file control features (CVS 5934)


type: ci
user: drh
comment:
  Fixes to the proxy locking so that os_unix.c compiles on linux with proxy
  locking omitted. (CVS 5935)


type: ci
user: drh
comment:
  On a ROLLBACK, if there page cache entries which are dirty but not in the
  rollback journal, make sure they get reinitialized in the btree layer. (CVS 5936)


type: ci
user: danielk1977
comment:
  Add another test case to tkt35xx.test showing that a statement rollback can also trigger the problem. (CVS 5937)


type: ci
user: danielk1977
comment:
  Fix a segfault that can be caused by an INSTEAD OF trigger on a view that includes an expression of the form "table.column" in the select list. (CVS 5940)


type: ci
user: danielk1977
comment:
  Fix the OOM handling for explain statements so that it is the same as for regular statements if the OOM error occurs from within a call to sqlite3_column_text() or text16(). (CVS 5941)


type: ci
user: drh
comment:
  Work toward cleaning up and refactoring the os_unix.c VFS module.
  Change IS_VXWORKS to OS_VXWORKS.  The VxWorks implementation can now
  be built and tested on Linux using -DOS_VXWORKS=1 -Dsem_t=int -DPATH_MAX=512 -DNO_GETTOD=1. (CVS 5942)


type: ci
user: drh
comment:
  Make sure the error message handler is able to deal with NULL expression
  spans. Ticket #3508. (CVS 5949)


type: ci
user: shane
comment:
  Added cast to PAGE_TO_PGHDR1 macro to remove warning.  It looks like despite the warning, the compiler (tested with VS2005 and GCC on Windows) was doing the right thing.  Ticket #3510. (CVS 5953)


type: ci
user: danielk1977
comment:
  Move the definition of function transferOwnership() in os_unix.c to below the static functions it calls. (CVS 5954)


type: ci
user: danielk1977
comment:
  Fix a couple of assert() failures provoked by running with a small default cache-size (64 pages). (CVS 5955)


type: ci
user: pweilbacher
comment:
  make os2Randomness() act the same as other platforms with SQLITE_TEST (all zeroed buffer) (CVS 5961)


type: ci
user: drh
comment:
  Add 19 new assert() statements in btree.c that attempt to detect writing to
  a cache page which is not writeable. (CVS 5964)


type: ci
user: drh
comment:
  First step in refactoring os_unix.c.  This is work in progress.  The code
  compiles and runs on Linux and MacOSX (as long as SQLITE_ENABLE_LOCKING_STYLE
  is turned off), but there are a few test failures. (CVS 5965)


type: ci
user: drh
comment:
  Continuing work on the os_unix.c refactoring.  Removed all of the
  LOCKING_STYLE_* constants and instead pass around pointers to the
  underlying sqlite3_io_method objects. (CVS 5966)


type: ci
user: drh
comment:
  Fully initialize the unused bytes of the buffer that will become the journal
  file header, in order to silence a complaint from valgrind. (CVS 5968)


type: ci
user: drh
comment:
  Fix a missing forward declaration that is needed when
  SQLITE_PREFER_PROXY_LOCKING is defined. (CVS 5972)


type: ci
user: drh
comment:
  Always enable the OP_Blob opcode in the VDBE even when
  SQLITE_OMIT_BLOB_LITERAL is defined, since that opcode is used for other
  purposes as well.  Ticket #3518. (CVS 5974)


type: ci
user: drh
comment:
  Make sure dot-lock is fully enabled when SQLITE_ENABLE_LOCKING_STYLE is
  disabled.  Fix compiler warnings when SQLITE_ENABLE_LOCKING_STYLE is
  disabled. (CVS 5976)


type: ci
user: drh
comment:
  Variable name changes in the query optimizer for disambiguation and
  clarification.  Clear space in boolean vectors for new bit values to
  encode new query plan templates. (CVS 5980)


type: ci
user: drh
comment:
  Make use of sqlite3DbMallocSize to maximize the size of growable buffers
  after each reallocation.  Added new comments and testcase() macros to
  where.c. (CVS 5981)


type: ci
user: drh
comment:
  Fix integrity check so that it always reports memory allocation errors that
  it encounters. (CVS 5984)


type: ci
user: drh
comment:
  Make the minimum allocate size for RowSet objects large enough to accommodate
  8-byte pointers. (CVS 5985)


type: ci
user: drh
comment:
  Make sure the KeyInfo object attached to a transient table used for
  sorting records the sqlite3 object used for memory allocation, so that
  memory allocation failures on UTF16 to UTF8 conversion can be recorded. (CVS 5987)


type: ci
user: drh
comment:
  Make sure a memory allocation error did not prevent UTF16 to UTF8 conversion
  prior to doing a string comparison. (CVS 5988)


type: ci
user: drh
comment:
  Fix a segfault associated with the column cache that occurs on nested VIEWs.
  Ticket #3527. (CVS 5989)


type: ci
user: drh
comment:
  The amalgamation now compiles cleanly on GCC with options
  -pedantic-errors -Wno-long-long. (CVS 5991)


type: ci
user: drh
comment:
  Fix a bug in win32 command-line client introduced during efforts to reduce
  the number of harmless compiler warnings (check-in (5982).) (CVS 5992)


type: ci
user: drh
comment:
  Some minor name refactoring in where.c.  Avoid declaring variables before
  initializing them in the amalgamation because VC++ doesn't like that. (CVS 5993)


type: ci
user: shane
comment:
  Removed some harmless compiler warnings and converted some "double" ops to "int" in date.c. (CVS 5997)


type: ci
user: drh
comment:
  A subquery in the result set of a SELECT should be able to look into outer
  queries to find variable references.  But a subquery in the FROM clause
  should not be able to do this.  Ticket #3530. (CVS 5998)


type: ci
user: drh
comment:
  Return an appropriate out-of-memory message when sqlite3_errmsg() is called
  following an SQLITE_NOMEM error. (CVS 6001)


type: ci
user: drh
comment:
  Use memcpy() rather than "=" to copy a structure, in order to work around
  a bug in the XLC compiler on AIX.  Ticket #3344. (CVS 6003)


type: ci
user: drh
comment:
  Never use strlen().  Use our own internal sqlite3Strlen30() which is
  guaranteed to never overflow an integer.  Additional explicit casts to
  avoid nuisance warning messages. (CVS 6007)


type: ci
user: drh
comment:
  Fix an issue with the new sqlite3Strlen30() introduced by
  check-in (6007).  Additional casts for compiler warnings. (CVS 6011)


type: ci
user: drh
comment:
  The strlen30 function in tclsqlite.c should be defined regardless of whether
  or not the amalgamation is used. (CVS 6012)


type: ci
user: drh
comment:
  Fix the TCL test harness so that it compiles and runs on OSX with
  SQLITE_ENABLE_LOCKING_STYLE. (CVS 6017)


type: ci
user: drh
comment:
  Make sure the OP_ForceInt vdbe opcode does not cause a rowid overflow.
  Ticket #3536.  Tests to verify this change will be checked in separately. (CVS 6022)


type: ci
user: drh
comment:
  Previous change to the OP_ForceInt opcode did not work correctly when the
  input is a negative floating point value.  This change is the fix.
  Ticket #3536. (CVS 6023)


type: ci
user: drh
comment:
  Rework the rowid lookup logic in the query optimizer to fix various
  boundary value problems.  Ticket #3536.  Renamed the OP_MoveXX opcodes
  to OP_SeekXX. (CVS 6024)


type: ci
user: drh
comment:
  Fix the name of the source algorithm in the comments of the script generators
  for the recently checked-in test cases for integer boundary-value testing. (CVS 6026)


type: ci
user: drh
comment:
  Make sure the memory returned from sqlite3ScratchMalloc() is 8-byte aligned.
  Ticket #3542. (CVS 6031)


type: ci
user: danielk1977
comment:
  Modify fts3 to support a more complex expression syntax that allows parenthesis. The new syntax is not entirely backwards compatible, so is disabled by default. Use -DSQLITE_ENABLE_FTS3_PARENTHESIS to enable it. (CVS 6034)


type: ci
user: drh
comment:
  Update the WHERE clause processing infrastructure in preparation for adding
  multi-index OR evaluation. (CVS 6037)


type: ci
user: danielk1977
comment:
  Add savepoint2.test, a file containing savepoint tests similar to tests in trans.test and avtrans.test. And a few savepoint bug fixes. (CVS 6039)


type: ci
user: danielk1977
comment:
  Add the file ext/fts3/README.syntax, containing documentation describing the two query syntaxes now supported by fts3. (CVS 6042)


type: ci
user: danielk1977
comment:
  Add extra crash test cases that stress the savepoint mechanism to savepoint4.test. Currently, these tests are causing database corruption which (obviously) needs to be fixed. (CVS 6044)


type: ci
user: drh
comment:
  Enhanced analysis of OR terms in a WHERE clause.  Another step toward being
  able to use indices with OR-connected WHERE clause terms. (CVS 6045)


type: ci
user: drh
comment:
  Specify type "void" in the parameter list of functions that take no parameters.
  Tickets #3545 and #3546. (CVS 6046)


type: ci
user: danielk1977
comment:
  Fix the crash-followed-by-corruption bug revealed by savepoint4.test. This is actually the same bug as was fixed by (6043). The fix was not entirely correct. (CVS 6047)


type: ci
user: danielk1977
comment:
  Add a case to permutations.test to run tests with the test_journal.c backend installed. Also many fixes to test_journal.c and one quite obscure fix to pager.c. (CVS 6052)


type: ci
user: danielk1977
comment:
  Changes to test scripts so that veryquick.test runs with SQLITE_TEMP_STORE=3 defined. Also a fix to stop the same switch causing a crash in the savepoint code. (CVS 6053)


type: ci
user: danielk1977
comment:
  Add a test to savepoint.test that tests that nothing goes wrong if an incremental vacuum occurs inside a savepoint. (CVS 6057)


type: ci
user: drh
comment:
  Multi-index OR-clause optimization now works for simple tests.  There are
  no test scripts for it yet, though.  And it is disabled by default, pending
  further testing and optimization.  We need a lot of both. (CVS 6058)


type: ci
user: drh
comment:
  Continuing improvements to the multi-index OR-clause optimizer.  Added a
  few simple test cases. (CVS 6062)


type: ci
user: danielk1977
comment:
  Fix a couple of problems in test file test_journal.c that were causing segfaults when running all.test. (CVS 6063)


type: ci
user: danielk1977
comment:
  Reset the column cache before coding each step of a trigger program. Candidate fix for #3554. (CVS 6065)


type: ci
user: drh
comment:
  Multi-index OR optimizer response to ORDER BY rowid.
  But fix in sqlite3_stmt_status(): report a full table scan
  when "ORDER BY rowid" is used without constraints. (CVS 6069)


type: ci
user: drh
comment:
  Always make sure WhereClause objects are initialized to zero when they
  are first allocated. (CVS 6073)


type: ci
user: danielk1977
comment:
  Invoke the authorization callback when compiling SAVEPOINT, ROLLBACK TO and RELEASE commands. (CVS 6074)


type: ci
user: danielk1977
comment:
  Fix a bug in where.c causing a malfunction when an INDEXED BY clause specified an unusable index on other than the leftmost table in the FROM clause. Ticket #3560. (CVS 6076)


type: ci
user: danielk1977
comment:
  Do not run savepoint4.test (crash simulation tests) in permutations.test. It slows things down too much. (CVS 6078)


type: ci
user: drh
comment:
  Get EXPLAIN QUERY PLAN working with the multi-index OR optimization.
  Added new test script "where9.test". (CVS 6084)


type: ci
user: drh
comment:
  Fix a bug in the multi-index OR cost estimator.  Remove leftover "breakpoint"
  commands from test scripts. (CVS 6086)


type: ci
user: drh
comment:
  Fix the FTS3 expression parser so that it works in the amalgamation when
  FTS3 is disabled. (CVS 6088)


type: ci
user: drh
comment:
  Fix the name in the documentation of the compile-time macro for
  enabling FTS3 parenthesis processing. (CVS 6089)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix a (benign) valgrind error that can occur following malloc failure while executing a 'ROLLBACK TO savepoint' command. (CVS 6096)


type: ci
user: drh
comment:
  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)


type: ci
user: shane
comment:
  Many of the boundary tests depend on a working 64-bit implementation of TCL, so skip them if this is not available. (CVS 6099)


type: ci
user: danielk1977
comment:
  Modify the (transaction) method of the tcl interface to use savepoints. This makes nested calls to (transaction) work more intuitively. (CVS 6101)


type: ci
user: drh
comment:
  Reinitialize page 1 of the database file following a ROLLBACK TO of a
  transactional SAVEPOINT on an initially empty database. (CVS 6103)


type: ci
user: drh
comment:
  Memory allocation failure in Bitvec are probably all benign.  Still, add
  code to check this, just to be sure. (CVS 6104)


type: ci
user: danielk1977
comment:
  Add test file savepoint6.test. Contains pseudo random tests of savepoint related commands. (CVS 6105)


type: ci
user: drh
comment:
  When the commit_hook calls a query recursively, make sure the commit_hook
  is not invoked recursively.  Ticket #3564. (CVS 6107)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Add a HIGHSTRESS parameter to the sqlite3_config_alt_pcache debugging
  command in the test harness - to force calling pagerStress() more
  frequently. (CVS 6127)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix a problem with reverting a 'DROP TABLE' command executed inside of a savepoint on an auto-vacuum database. (CVS 6129)


type: ci
user: drh
comment:
  Conjecture: a journal header with nRec==0 must be the last header in the
  journal.  Add asserts to make this conjecture explicit. (CVS 6132)


type: ci
user: drh
comment:
  For archival purposes, add the TCL script that was used to generate many
  of the test cases for where7.test. (CVS 6133)


type: ci
user: danielk1977
comment:
  Make the same change as (6121) (accidentally reverted). Also enhance test_journal.c to catch this kind of bug. (CVS 6136)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Add a test script for ticket #2565.  Change the assert() in pager.c into
  a testcase() macro. (CVS 6142)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  Coverage improvements in pragma.c.  Change the __DARWIN__ macro to __APPLE__,
  which is available by default on Leopard. (CVS 6153)


type: ci
user: danielk1977
comment:
  Fix a bug in the previous commit - use SQL comments instead of Tcl comments in SQL blocks. (CVS 6155)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Do not run crash8.test as part of the "journaltest" permutation. crash8.test uses "PRAGMA synchronous=off", which is incompatible with journaltest. (CVS 6162)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix jrnlmode.test so that it does not run tests involving in-memory journals during the "journaltest" permutation. (CVS 6166)


type: ci
user: drh
comment:
  Sometimes a single byte is written to the main database file.  Make sure
  that journaltest knows this. (CVS 6168)


type: ci
user: danielk1977
comment:
  Only run tests that depend on SQLITE_PREFER_PROXY_LOCKING builds when said symbol is set. (CVS 6169)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix a problem with committing a transaction while there are other active statements. Sometimes, the database change counter was not being updated. (CVS 6176)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Fix the shell so that the ".schema" command works regardless of the
  pragma settings.  Ticket #3585. (CVS 6180)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix a bug that was preventing SQLite from releasing locks properly under obscure circumstances. (CVS 6192)


type: ci
user: drh
comment:
  Make sure mutexes are fully enabled for thread001.test.  Take steps to
  ensure that the thread tests run during regression testing. (CVS 6193)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Big change to make pager.c easier to follow. Unused variables removed, comments improved, etc. (CVS 6197)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Optimization: When loading a new page into the cache, avoid redundant memset() calls to zero it. (CVS 6201)


type: ci
user: drh
comment:
  Fix some minor compiler warnings.  Added sqlite3Isalpha() for use in
  the soundex() function. (CVS 6203)


type: ci
user: vapier
comment:
  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)


type: ci
user: drh
comment:
  Fix a segfault that can occur when attempting to insert into
  a corrupt database file.  Need a test case. (CVS 6212)


type: ci
user: drh
comment:
  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)


type: ci
user: shane
comment:
  In test case incrvacuum-15.1 close both db handles (db and db2) before attempting to delete test.db. Ticket #3614. (CVS 6216)


type: ci
user: shane
comment:
  Implemented the SQLITE_LAST_ERRNO op in the xFileControl() method of os_win.c.  Ticket #3615. (CVS 6217)


type: ci
user: shane
comment:
  Changes to setupLookaside() in main.c to better handle lookaside buffer configurations of zero-size.  Ticket #3616. (CVS 6218)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Add a new test command, sqlite3_mprintf_long, for testing the behavior
  of "long integer" printf formatting.  Ticket #3621. (CVS 6224)


type: ci
user: drh
comment:
  Adjust comments in vdbe.c to use OP_MakeRecord instead of the obsolete
  OP_MakeIdxRec.  Ticket #3619. (CVS 6225)


type: ci
user: drh
comment:
  Change the replace() function to return a copy of its first argument when
  the 2nd argument is an empty string.  Ticket #3624. (CVS 6226)


type: ci
user: drh
comment:
  Fix the SUBSTR() function so that when the 3rd argument is negative,
  it counts backwards from the selected start point.  Ticket #3625. (CVS 6227)


type: ci
user: drh
comment:
  Update the SUBSTR function so that works consistently when the
  2nd parameter is 0.  Ticket #3628. (CVS 6230)


type: ci
user: drh
comment:
  Omit the TEMP keyword from the schema of TEMP tables created using
  CREATE TEMP TABLE AS SELECT .....  Ticket #3630. (CVS 6232)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Add a special rule to the amalgamation generator to deal with
  the sqlite3OsDlSym function.  Ticket #3631. (CVS 6236)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: shane
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: shane
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix a bug in malloc.test causing the exclusive permutation to fail. Changes to test code only. (CVS 6251)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Ensure that thread001.test and thread002.test reset the global shared-cache-enabled setting before they finish. (CVS 6253)


type: ci
user: danielk1977
comment:
  Fix a bug in test_malloc.c whereby running multi-threaded test cases could cause subsequent OOM tests to fail. (CVS 6254)


type: ci
user: drh
comment:
  The sqlite3_backup_init() interface must lock the destination in case it
  needs to change the error message. (CVS 6255)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Add "backup" and "restore" methods to the TCL interfaces and test cases
  to exercise those methods. (CVS 6260)


type: ci
user: shane
comment:
  Improved overrun detection in mem2.c (SQLITE_MEMDEBUG).  Previously was only checking up to 3 extra bytes allocated due to rounding. (CVS 6261)


type: ci
user: drh
comment:
  Make the pending byte adjustable via sqlite3_test_control() on all builds,
  not just on test builds. (CVS 6263)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  Better error message when DISTINCT is used on an aggregate function that
  takes two or more arguments.  Ticket #3641. (CVS 6269)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix a problem in backup.c causing OsTruncate() to be called with an argument larger than the current file-size. (CVS 6271)


type: ci
user: danielk1977
comment:
  Do not always open a transaction on the temp database when writing to the main or another attached database. (CVS 6273)


type: ci
user: danielk1977
comment:
  Reenable triggering vdbe tracing by creating file-system entries. Add a (redundant) test that modifying the temp schema expires all prepared statements. (CVS 6274)


type: ci
user: drh
comment:
  Create links from backup API documentation to the backup application note.
  Comment changes only - no changes to code. (CVS 6275)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  Add hyperlinks from sqlite3_limit() documention to the limits.html page.
  Comment changes only - no changes to code. (CVS 6282)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Modify lock.test to account for "PRAGMA lock_status" returning "unknown" for in-memory databases. (CVS 6287)


type: ci
user: danielk1977
comment:
  Fix some edge cases with backing up databases that are exactly PENDING_BYTE bytes in size, or just slightly larger. (CVS 6288)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Add additional cross-references from API documentation to other documents.
  Comment changes only; no changes to code. (CVS 6290)


type: ci
user: drh
comment:
  Correctly handle attempts to add a UNIQUE or PRIMARY KEY column using
  the ALTER TABLE statement.  Ticket #3651. (CVS 6291)


type: ci
user: drh
comment:
  Make sure OOM errors in the ANALYSIS loader get reported back out to
  high-level layers.  Strange behavior can result otherwise. (CVS 6292)


type: ci
user: drh
comment:
  Make sure result variables are initialized or unused following a failure
  of the xFullPathname VFS interface.  Problem detected by valgrind. (CVS 6295)


type: ci
user: danielk1977
comment:
  Allow sqlite3_shutdown() to be called by a process before sqlite3_initialize() is. Prior to this commit such a call could segfault. (CVS 6296)


type: ci
user: danielk1977
comment:
  Initialize an uninitialized buffer to silence a valgrind warning during a VACUUM operation. (CVS 6297)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Make sure the auto_vacuum=INCREMENTAL setting is preserved across a VACUUM.
  Ticket #3663. (CVS 6304)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Add the OP_HaltIfNull opcode and use it to simplify prepared statements
  for INSERTs and UPDATEs of tables with NOT NULL columns. (CVS 6308)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Instead of using SetNumColumns, specify the number of columns in a table or index using the P4 argument. (CVS 6310)


type: ci
user: rse
comment:
  unbreak Autoconf-based build procedure by added missing backup.lo to the list of library objects (CVS 6311)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Ensure the return value of sqlite3_errmsg16() is aligned on a 2-byte boundary. Ticket #3665. (CVS 6313)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Optimize queries of the form "SELECT count(*) FROM <tbl>" by adding a sqlite3BtreeCount() interface to the btree layer. (CVS 6316)


type: ci
user: danielk1977
comment:
  Add test file test/count.test for testing "SELECT count(*)" statements. It is not properly populated yet. (CVS 6318)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Remove old declaration of sqlite3_pending_byte (which was used by test code). It has been replaced by sqlite3PendingByte. Ticket #3677. (CVS 6321)


type: ci
user: drh
comment:
  Changes to comments and functions/procedure names for clarification.  No
  changes to logic. (CVS 6322)


type: ci
user: drh
comment:
  Additional commands and another procedure name changes for clarity of
  presentation. No logic changes. (CVS 6323)


type: ci
user: danielk1977
comment:
  Add the 'genfkey' functionality to the sqlite3 shell. Accessed using a new dot-command - ".genfkey". (CVS 6325)


type: ci
user: danielk1977
comment:
  Remove genfkey.c. Change genfkey.README to talk about the new shell dot-command, not the old standalone genfkey program. (CVS 6326)


type: ci
user: danielk1977
comment:
  In sqlite3_table_column_metadata(), hold the mutex on all attached BtShared objects while accessing schema objects. Fix for #3679. (CVS 6328)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  Fix a critical bug in the VDBE opcode array resizer introduced by
  check-in (6307).  Bug detected by regression testing. (CVS 6330)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: shane
comment:
  Changes to cleanup and improve the consistency of tests for large file support in bigfile.test. (CVS 6338)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Make calls to sqlite3BtreeRollbackStmt() no-ops when passed a Btree* handle that does not have an open statement transaction. Ticket #3718. (CVS 6342)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Modify quick.test to support the QUICKTEST_INCLUDE environment variable, which can be used to override the built-in EXCLUDE list. (CVS 6350)


type: ci
user: danielk1977
comment:
  Fix a problem that could cause a crash when a shared-cache schema contains column default values. (CVS 6353)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix some cases where executing SQL from within a user-function callback could cause problems related to statement-transactions. (CVS 6355)


type: ci
user: drh
comment:
  Add comments and testcase() macros to the fix for shared-cache schema default
  value problem of check-in (6353). (CVS 6356)


type: ci
user: danielk1977
comment:
  Fix a crash that could occur when creating an index in shared-cache mode with lookaside enabled. (CVS 6358)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Fix a couple of fairly obscure cases where an assert() could fail following a malloc failure. (CVS 6360)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Allow the keyword INDEXED to be used as the name of a table or index or
  column - for backwards compatibility. (CVS 6370)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  Add asserts to make sure that database connection locks are held when
  accessing the lookaside memory allocation buffers.  No defects were found. (CVS 6374)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  Changes to insure that lookaside memory allocations are never used to hold
  schema content.
  Ticket #3743. (CVS 6377)


type: ci
user: drh
comment:
  New assert()s added to verify that the Expr.token value is used correctly.  Ticket #3743. (CVS 6378)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Remove an unused parameter from sqlite3DequoteExpr.  Fix another unrelated
  and harmless compiler warning. (CVS 6386)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  When "PRAGMA case_sensitive_like" is invoked, override all existing "LIKE" functions, including UTF-16 versions. (CVS 6394)


type: ci
user: danielk1977
comment:
  Fix readDbPage() so that if an SQLITE_IOERR_SHORT_READ is encountered, the page content is zeroed. Ticket #3756. (CVS 6395)


type: ci
user: drh
comment:
  Back out check-in (6380).  Replace it with a proper fix to the
  xFullPathname method in the async VFS. (CVS 6398)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Make sure recursive calls to winOpen() preserve the pVfs pointer.
  Fault found while testing a mingw build in VMWare. (CVS 6410)


type: ci
user: danielk1977
comment:
  Modify integrity-check to prevent a buffer overread when dealing with a corrupted database. (CVS 6411)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Remove an unreachable branch from allocateSpace() in btree.c. Add comments and asserts to the same function. (CVS 6422)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  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)


type: ci
user: danielk1977
comment:
  Test that two database connections that use different VFS implementations may not share a cache. (CVS 6426)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Fix the strftime() function so that the %s format can handle dates outside
  of the range of 1901 to 2038.  Ticket #3769. (CVS 6430)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Increase test coverage of bitvec.c slightly.  Fix the line length on a
  comment in bitvec.c. (CVS 6432)


type: ci
user: drh
comment:
  Enforce the run-time sqlite3_limit() length limit on zeroblob(), not just
  the compile-time SQLITE_MAX_LENGTH limit. (CVS 6433)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Change the way that the random() SQL function prevents the maximum
  negative integer so that it is testable. (CVS 6436)


type: ci
user: drh
comment:
  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)


type: ci
user: danielk1977
comment:
  Ensure the required VerifyCookie/Transaction/TableLock opcodes are added for "x
  IN (SELECT c FROM t)" expressions. Ticket #3771. (CVS 6439)


type: ci
user: danielk1977
comment:
  Fix a problem causing the BtShared.isPending flag to be cleared to early. Also coverage improvements for btree.c. (CVS 6440)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  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)


type: ci
user: drh
comment:
  Allow the journal_mode for in-memory databases to be either OFF or MEMORY,
  not just MEMORY. (CVS 6448)


type: ci
user: drh
comment:
  Additional code to make sure and to assert that memory allocations have
  8-byte alignment.  Ticket #3777. (CVS 6450)


type: ci
user: drh
comment:
  Fix a segfault in Lemon that occurs if the input grammar does not define
  a type for tokens.  This does not effect SQLite since the SQLite grammar
  does define a type for tokens. (CVS 6451)


type: ci
user: drh
comment:
  Check-in (6450) introduced the possibility of calling memset() with a
  negative 3rd argument.  This fixes that bug.  Ticket #3777. (CVS 6452)


type: ci
user: drh
comment:
  Make sure the reverse_unordered_selects pragma works even on unindexed
  tables that are queried without a WHERE clause (CVS 6453)


type: ci
user: drh
comment:
  Updates and clarification to the documentation of the sqlite3_temp_directory
  global variable.  No changes to code. (CVS 6455)


type: ci
user: drh
comment:
  It is OK for a unix file descriptor to be zero.  It just can't be negative.
  Adjust an assert accordingly.  Ticket #3781. (CVS 6457)


type: ci
user: drh
comment:
  Always enable WHERE-tracing on a test build.
  Oops - accidentally included a debugging change to pragma.c in 
  this check-in.  The real fix for the pragma problem is in the
  following checking. (CVS 6458)


type: ci
user: chw
comment:
  Compile fixes and improvements for vxwork: fixed deadlock in semClose,
  detect if fcntl is usable, fall back to named semaphores if not. (CVS 6460)


type: ci
user: danielk1977
comment:
  Change "... myfunction() { ... }" to "... myfunction(void) { ... }" in a few pla
  ces. Ticket #3783. (CVS 6462)


type: ci
user: drh
comment:
  Fix the sqlite3_unlock_notify() interface so that when the callback is NULL
  it simply cancels any outstanding callbacks. (CVS 6467)


type: ci
user: drh
comment:
  Minor refactoring of the expression-compaction logic for clarity of
  presentation.  New comments added.  The EXPRDUP_DISTINCTSPAN flag is
  removed as obsolete. (CVS 6470)


type: ci
user: drh
comment:
  Remove a pair unnecessary conditions from printf.c.  The "db" parameter is
  now required for sqlite3MPrintf(). (CVS 6471)


type: ci
user: drh
comment:
  Add an assert() to the implementation of count(*) that checks the
  correct operation of the sqlite3_aggregate_count() function. (CVS 6473)


type: ci
user: drh
comment:
  Simplify the implementation of the columnName() function in vdbeapi.c.
  This is a code cleanup only - no behavior changes. (CVS 6474)


type: ci
user: drh
comment:
  Enhance sqlite3_shutdown() so that it automatically invokes
  sqlite3_reset_auto_extension().  This is a harmless no-op if applications
  are already calling sqlite3_reset_auto_extension() prior to sqlite3_shutdown().
  And it prevents possible memory corruption if they do not.  So it works
  either way.  Most of the changes are to the test cases. (CVS 6475)


type: ci
user: drh
comment:
  Remove misuse detection from the deprecated sqlite3_transfer_bindings()
  interface.  The code was hard to test and was simply taking up space. (CVS 6476)


type: ci
user: chw
comment:
  Provide dummy DWORD arguments to output parameters of GetDiskFreeSpace(A|W),
  NULL causes access violations on Windows NT 4.0 (CVS 6477)


type: ci
user: drh
comment:
  Force 8-byte alignment of sqlite3_value objects in the
  sqlite3VdbeUnpackRecord() primitive.  Ticket #3777. (CVS 6479)


type: ci
user: danielk1977
comment:
  Changes to ensure that when running in shared-cache mode with a non-threadsafe build, the correct busy-handler callback is always invoked. (CVS 6481)


type: ci
user: drh
comment:
  Simplifications and additional comments on the sqlite3_get_table()
  implementation.  Changes to facilitate full branch test coverage. (CVS 6482)


type: ci
user: drh
comment:
  Re-enable the alt_pcache tests in permutations.test so that they run
  automatically during a full regression.  Fix async.test so that it
  works with the permutation.test pcacheNN test modules. (CVS 6486)


type: ci
user: danielk1977
comment:
  Do not run io.test as part of the inmemory_journal permutation. io.test uses the tcl API to test for journal files in the file-system (which of course never exist when running with in-memory journals). (CVS 6487)


type: ci
user: danielk1977
comment:
  Increase the error tolerance when verifying the approximate size of a pseudo-random database in backup_ioerr.test. Otherwise the test could fail depending on the PRNG seed. (CVS 6488)


type: ci
user: danielk1977
comment:
  In sqlite3PagerMovepage(), avoid holding a reference to page number X when calling sqlite3PcacheRekey() to move another page to page number X. (CVS 6492)


type: ci
user: danielk1977
comment:
  Replace invocation of (really_finish_test) from async.test with (finish_test). Otherwise a tcl exception may be thrown when running permutations. (CVS 6493)


type: ci
user: drh
comment:
  Increase the hard upper bound on the number of pcache pages in test_pcache
  when the test harness is compiled for in-memory temp tables.  Some of the
  test cases need to extra memory to avoid unplanned out of memory errors. (CVS 6494)


type: ci
user: drh
comment:
  Allocate a little extra scratch space for the memsubsys1 tests.  The
  extra space is needed in some configurations. (CVS 6495)


type: ci
user: drh
comment:
  Add a comments and an assert() to the virtual table implementation.
  No functional changes. (CVS 6497)


type: ci
user: drh
comment:
  Fix malloc5.test so it work on both 64-bit and 32-bit systems.  The
  ::tcl_platform(wordSize) variable has to be used to adjust some memory
  sizes. (CVS 6499)


type: ci
user: chw
comment:
  updated Makefile.vxwSH4 and renamed it to Makefile.vxworks,
  should now be able to support SH4 and PPC targets. (CVS 6500)


type: ci
user: drh
comment:
  Reimplement the sqlite3_bind_value() interface so that it works when the
  value being bound comes from a different database connection. (CVS 6504)


type: ci
user: drh
comment:
  Change the sqlite3_bind_value() implementation to use a default branch on
  the type switch so that there are no untested jumps in the switch. (CVS 6505)


type: ci
user: drh
comment:
  Mark an branch in alter.c as always false.  Only run the assert() on
  the sqlite3_aggregate_count() function in func.c if the
  SQLITE_OMIT_DEPRECATED compile-time option is off. (CVS 6508)


type: ci
user: drh
comment:
  Fix the group_concat() function so that it inserts the separator string
  even if the initial content strings are empty.  Ticket #3806. (CVS 6510)


type: ci
user: drh
comment:
  In a 3-fold compound SELECT make sure early code generation of the SELECTs
  to the right do not dereference non-existant columns in SELECTs on the left. (CVS 6511)


type: ci
user: drh
comment:
  Make sure the 'unixepoch' converter in the date and time functions rounds
  to the nearest millisecond rather than truncating downward to the next
  smaller millisecond.  Ticket #3808. (CVS 6512)


type: ci
user: drh
comment:
  Check-in (6514) did not completely remove the obsolete test, resulting in a
  segfault.  This check-in finishes the job.  Ticket #3802. (CVS 6516)


type: ci
user: drh
comment:
  Add the SQLITE_HAVE_ISNAN compile-time option which, if present, causes
  SQLite to use the math library isnan() function rather than its own homebrew
  implementation of isnan(). (CVS 6517)


type: ci
user: drh
comment:
  Get the behavior of SQLITE_HAVE_ISNAN right.  It was reversed
  in check-in (6517).  Ticket #3809. (CVS 6518)


type: ci
user: drh
comment:
  Revise the implementation of sqlite3_initialize() slightly in order to make
  it more easily testable.  The functionality should be unchanged. (CVS 6519)


type: ci
user: drh
comment:
  Do not use deprecated interfaces internally when compiling with
  SQLITE_OMIT_DEPRECATED.  Ticket #3813. (CVS 6523)


type: ci
user: drh
comment:
  Clarify the documentation to make it clear that sqlite3_interrupt() does not
  effect new SQL statements that are started after the running statement
  count reaches zero.  Ticket #3815. (CVS 6524)


type: ci
user: drh
comment:
  Add new tests to show that journal_mode=OFF works with locking_mode=EXCLUSIVE
  as long as the journal_mode is set prior to the first transaction.
  Ticket #3811. (CVS 6525)


type: ci
user: drh
comment:
  Change the journal_mode pragma so that it always returns the current
  journal mode, even on a failed attempt to change the journal mode.
  Allow the journal mode to be changed as long as there is not a pending
  transaction.  Ticket #3811. (CVS 6526)


type: ci
user: drh
comment:
  Adjust the rowhash.test module so that it recovers gracefully in the rare
  event of a rowid collision. (CVS 6531)


type: ci
user: drh
comment:
  Extend the Rowset object to contain all the capabilities of Rowhash in
  addition to its legacy capabilities.  Use Rowset to replace Rowhash.
  In addition to requiring less code, This removes the 2^32 result row
  limitation, uses less memory, and gives better bounds on worst-case
  performance.  The Rowhash implementation has yet to be removed. (CVS 6534)


type: ci
user: drh
comment:
  Change the OP_Rowid opcode so that a deferred OP_Seek is pending, it simply
  pulls the rowid from the deferred seek target and does not actually move
  the cursor or do a seek.  Other where.c cleanups. (CVS 6536)


type: ci
user: drh
comment:
  Eliminate the OP_VRowid opcode.  The regular OP_Rowid now work for both
  regular and virtual tables. (CVS 6537)


type: ci
user: drh
comment:
  Rework the column-cache mechanism to be more robust (and more correct).
  The column-alias cache is currently disabled, (CVS 6538)


type: ci
user: danielk1977
comment:
  Move the asynchronous IO code from src/test_async.c to ext/async/. Refactor it to be a standalone module and to support windows. (CVS 6539)


type: ci
user: shane
comment:
  os_win.c, winOpen(), changed to handle the SQLITE_OPEN_EXCLUSIVE flag and sharing modes in the same manner as os_unix.c. Ticket #3821. (CVS 6542)


type: ci
user: danielk1977
comment:
  Make selecting the asynchronous IO file-locking mode a runtime operation. Still untested. (CVS 6544)


type: ci
user: drh
comment:
  Make sure that the optimizer realizes that an "x IS NULL" contraint does not
  necessarily give a single-row result even on a UNIQUE index.  Ticket #3824. (CVS 6545)


type: ci
user: drh
comment:
  Get rid of the special RowSet processing in where.c and move that into
  clients.  Added the WHERE_DUPLICATES_OK option to eliminate an unnecessary
  RowSet during DELETE with a WHERE clause containing ORs. (CVS 6546)


type: ci
user: danielk1977
comment:
  Dequote the "from" table in a FOREIGN KEY definition (affects the output of "pragma foreign_key_list). Fix for #3800. (CVS 6547)


type: ci
user: drh
comment:
  Add another test case for the "x IS NULL" uniqueness problem of ticket #3824.
  No changes to code.  This just double-checks that everything is working now. (CVS 6548)


type: ci
user: drh
comment:
  Bring the documenation and implementation of sqlite3_collation_needed() into
  agreement.  Use a more efficient implementation of sqlite3ErrStr().
  sqlite3_result_error_code() now calls sqlite3ErrStr() if no prior
  error string was set. (CVS 6550)


type: ci
user: drh
comment:
  Enhance sqlite3_complete() so that it understands EXPLAIN QUERY PLAN.
  Ticket #3828.  Testing is done in TH3. (CVS 6551)


type: ci
user: drh
comment:
  Make sure sqlite3_open16() always zeros the db return pointer if
  SQLite initialization fails. (CVS 6552)


type: ci
user: drh
comment:
  Add test cases for sqlite3_complete with an EXPLAIN QUERY PLAN on a
  CREATE TRIGGER statement.  Ticket #3828. (CVS 6553)


type: ci
user: danielk1977
comment:
  Avoid changing the pager journal-mode once a write-transaction is open, even if no database pages have been modified. (CVS 6554)


type: ci
user: drh
comment:
  Do not store the zero string terminator as part of the name when holding
  symbols in the symbol table. (CVS 6557)


type: ci
user: danielk1977
comment:
  Have sqlite3_create_collation() return MISUSE if passed an encoding value other than SQLITE_UTF8, SQLITE_UTF16LE, SQLITE_UTF16BE, SQLITE_UTF16 or SQLITE_UTF16_ALIGNED. (CVS 6558)


type: ci
user: drh
comment:
  Simplifications to the symbol table implementation in hash.c.  For very small
  symbol tables (less than 10 entries) a simple linked list is used instead
  of a hash table.  Number of hash table buckets is limited to prevent large
  allocations. (CVS 6559)


type: ci
user: danielk1977
comment:
  When testing with TEMP_STORE=3 and the test pcache, only run 20 iterations in trans.test. Otherwise the test pcache runs out of memory. (CVS 6562)


type: ci
user: drh
comment:
  Fix an out-of-order test number in blob.test.  Cosmetic change.  No
  changes to code.  Ticket #3830. (CVS 6564)


type: ci
user: danielk1977
comment:
  Add a version of cellSizePtr() that is faster than using sqlite3BtreeParseCellPtr(). This speeds up balance_nonroot(). (CVS 6566)


type: ci
user: danielk1977
comment:
  Fix a case in where.c where a crash can follow a malloc failure. Also modify test code in test8.c to check a return code that was being dropped (causing a test in vtab_err.test to fail). (CVS 6567)


type: ci
user: shane
comment:
  Fixed compile for MSVC;  removed compiler warnings; changes for NDEBUG build; minor code tweaks. (CVS 6570)


type: ci
user: drh
comment:
  Remove an always-true test from delete.c.  Move the sqlite3OpenTable()
  routine from delete.c to insert.c since it is not used in delete.c. (CVS 6571)


type: ci
user: drh
comment:
  Remove always-true tests from attach.c.  In btree.c, always test the return
  from sqlite3PagerSetPagesize() since it might return SQLITE_NOMEM. (CVS 6572)


type: ci
user: drh
comment:
  Take care not to leave a zombie attached database if the attachment fails
  due to an encoding mismatch.  Update attach logic to always use dynamically
  allocated error message strings. (CVS 6573)


type: ci
user: danielk1977
comment:
  When SQLite is configured to use in-memory temp files (either by setting SQLITE_TEMP_STORE during compilation or using the temp_store pragma at run time), store statement/savepoint journals in memory also. Ticket #3825. (CVS 6575)


type: ci
user: drh
comment:
  Disallow attaching the same database multiple times to the same db connection
  in shared cache mode, since doing so leads to deadlock. (CVS 6578)


type: ci
user: danielk1977
comment:
  Fix a problem with in-memory sub-journals and exclusive locking mode. Also a test script problem introduced by (6575). (CVS 6580)


type: ci
user: drh
comment:
  Fix processing of BEFORE triggers on INSERT statements with RHS SELECTs
  that insert a NULL into the INTEGER PRIMARY KEY.  Ticket #3832. (CVS 6583)


type: ci
user: danielk1977
comment:
  Fix for tempdb.test so that it passes when running the inmemory_journal permutation test. (CVS 6584)


type: ci
user: danielk1977
comment:
  Remove a NEVER() clause from a condition that is true at least once when running attachmalloc.test. (CVS 6585)


type: ci
user: danielk1977
comment:
  Change lock2.test so that it does not enter a busy loop if the child process exists unexpectedly. (CVS 6586)


type: ci
user: drh
comment:
  Update PRAGMA integrity_check so that it treats SQLITE_IOERR_NOMEM errors
  from underlying components the same as SQLITE_NOMEM errors. (CVS 6587)


type: ci
user: drh
comment:
  Fix an error message that is generated if the number of columns do not
  match on an INSERT into a virtual table with hidden columns. (CVS 6588)


type: ci
user: drh
comment:
  Record within the Token structure itself whether or not the token has
  been dequoted.  This steals one bit from the length of a token and
  thus limits the size of tokens to 1GiB. (CVS 6589)


type: ci
user: drh
comment:
  When checking indices for xfer compatibility, compare collating sequences
  by string, not by pointer. (CVS 6590)


type: ci
user: danielk1977
comment:
  Do not reset the cursor before seeking it in sqlite3BtreeInsert(). This speeds up INSERT operations that use auto-generated rowid values. (CVS 6591)


type: ci
user: danielk1977
comment:
  When a cursor points at the last entry of an intkey btree after an insert, leave it there (instead of moving it to the tree root node). This speeds up statements of the form "INSERT INTO ... SELECT ..." that use auto-generated rowids. (CVS 6592)


type: ci
user: drh
comment:
  Reduce the size of an integer literal in rowhash.tcl so that the test
  is able to run with the default TCL installation on Mac OS 10.5. (CVS 6593)


type: ci
user: drh
comment:
  Remove the aFKey hash table, which was not being used.  Simplify the
  FKey object.  Simplify the hash.c module since the copyKey parameter
  formerly used only by aFKey is now no longer required. (CVS 6594)


type: ci
user: drh
comment:
  Work toward cleaning up the authorizer interface.  Work is on-going.  This
  is an incremental check-in. (CVS 6598)


type: ci
user: danielk1977
comment:
  Speed up INSERT operations that add data to UNIQUE or PRIMARY KEY indexes by rationalizing duplicate seek operations. (CVS 6599)


type: ci
user: drh
comment:
  Make sure va_arg() does not occur on the same line as any "if" statement
  or "?" operator. (CVS 6602)


type: ci
user: drh
comment:
  Make sure the default value on a column added using ALTER TABLE has the
  correct encoding.  Ticket #3838. (CVS 6603)


type: ci
user: drh
comment:
  Minor changes to the sqlite3_exec() implementation in legacy.c
  to facility full coverage testing. (CVS 6608)


type: ci
user: drh
comment:
  Fix the test case misc3-6.11 so that it works correctly on UTF16 databases
  after the fix of for ticket #3838, check-in (6603) (CVS 6609)


type: ci
user: drh
comment:
  Add a short pause to force a context swap while waiting for a separate process
  to clear its lock in the lock4.test script. (CVS 6610)


type: ci
user: drh
comment:
  Make sure the iteration counter on aggregate functions is reset each
  time the aggregate is used in an correlated subquery.  Ticket #3841. (CVS 6616)


type: ci
user: drh
comment:
  Change the sqlite3_create_function() family of routines to return
  SQLITE_MISUSE instead of SQLITE_ERROR if their parameters are incorrect. (CVS 6617)


type: ci
user: danielk1977
comment:
  Correctly update the cache page-count when discarding pages in the xTruncate() method of the default pcache implementation. Otherwise the effective configured size of the cache shrinks each time xTruncate() is called. Fix for #3844. (CVS 6619)


type: ci
user: drh
comment:
  Change sqlite_blob_open() so that it zeros the output pBlob pointer when
  it fails.  The other sqlite3_blob interfaces accept a NULL pointer as
  input. (CVS 6622)


type: ci
user: drh
comment:
  Add the SQLITE_TESTCTRL_ASSERT and SQLITE_TESTCTRL_ALWAYS codes for the
  sqlite3_test_control() interface. (CVS 6623)


type: ci
user: drh
comment:
  Enhance the parser to allow nested parentheses in the module argument of
  a CREATE VIRTUAL TABLE statement. (CVS 6625)


type: ci
user: drh
comment:
  Rework the logic that generates a schema for tables created using
  "CREATE TABLE ... AS SELECT ...".  Instead of trying to copy the raw
  datatype string from the right-hand side, just make the type one 
  of TEXT, INT, REAL, NUM, or nothing.  This is much simpler than 
  trying to parse and quote datatype strings.  Other minor 
  implifications to build.c are bundled with this change. (CVS 6626)


type: ci
user: drh
comment:
  If a virtual table constructor returns SQLITE_NOMEM, set the mallocFailed
  flag in the corresponding database connection to insure that the error
  is propagated back to the top layer. (CVS 6627)


type: ci
user: drh
comment:
  Make sure the SQLITE_OPEN_EXCLUSIVE flag is ignored by sqlite3_open_v2().
  That flag is to be used by the VFS interface only.  Ticket #3855. (CVS 6629)


type: ci
user: drh
comment:
  Move the sqlite3MinimumFileFormat() routine from build.c over to alter.c
  since alter.c is the only code that uses it.  Additional changes and
  cleanup to build.c to facility coverage testing. (CVS 6630)


type: ci
user: danielk1977
comment:
  When locking a database file, check if any backup objects need to be restarted even if the page cache is empty. Ticket #3858. (CVS 6632)


type: ci
user: danielk1977
comment:
  Do not run async4.test as part of the "journaltest" permutation. It specifically tests that the asynchronous IO backend can be configured to violate the assumptions made by journaltest. (CVS 6633)


type: ci
user: drh
comment:
  Change the sqlite3_backup_finish() interface so that calling it with
  a NULL pointer is a harmless no-op.  One other change to backup.c to facilitate
  full coverage testing. (CVS 6638)


type: ci
user: drh
comment:
  Documentation enhancements for sqlite3_update_hook(), sqlite3_commit_hook(),
  and the various incremental blob I/O routines.  No changes to code. (CVS 6639)


type: ci
user: drh
comment:
  Attempt to provide a version of the SQLITE_INT_TO_PTR macro that works
  on both llvm-gcc-4.2 and MSVC.  Ticket #3860. (CVS 6641)


type: ci
user: drh
comment:
  Take care to free the memory for the ORDER BY clause on SELECT statements
  containing errors and contained within triggers.  Ticket #3863. (CVS 6644)


type: ci
user: drh
comment:
  Improvements to the SQLITE_INT_TO_PTR macro to reduce the number of
  warnings.  For some platforms it might be necessary to compile with
  the -DHAVE_STDINT_H flag.  Ticket #3860. (CVS 6657)


type: ci
user: drh
comment:
  Remove unused, undocumented, and untested error reporting logic from the
  xFindFunction interface in virtual tables. (CVS 6660)


type: ci
user: drh
comment:
  Fix a memory leak that occurs when an out-of-memory error occurs while
  preparing a statement that has multiple virtual table updates within
  triggers.  Other virtual table changes to support full-coverage testing. (CVS 6661)


type: ci
user: drh
comment:
  In the CLI in the ".dump" command, do not attempt to clear the sqlite_sequence
  table until the first row of content of that table is seen.  Ticket #3867 (CVS 6664)


type: ci
user: drh
comment:
  Make sure sqlite3_shutdown() completely disables the default pager cache
  mechanism in pcache1.c.  Ticket #3872.  Also fix some comments associated
  with configuring the page cache. (CVS 6668)


type: ci
user: drh
comment:
  Additional changes to pcache1 to prevent the page buffer memory from being
  configured if pcache1 is not enabled.  Ticket #3872. (CVS 6669)


type: ci
user: drh
comment:
  Add an assert() to pcache1.c to double-check that page cache buffer memory
  is never allocated if pcache1 is not enabled.  Ticket #3872 (CVS 6670)


type: ci
user: danielk1977
comment:
  Do not transform a WHERE clause of the form "a = ? OR a = ?" to "a IN (?, ?)" if "a" is a column of a virtual table. Ticket #3871. (CVS 6671)


type: ci
user: drh
comment:
  Correct and clarify the documentation on the third parameter to
  sqlite3_create_function(). (CVS 6672)


type: ci
user: drh
comment:
  In the previous, the upper bound on the number of function arguments is
  127, not 255.  Ticket #3876 (CVS 6673)


type: ci
user: drh
comment:
  Additional clarification of the 3rd parameter to sqlite3_create_function().
  Documentation change only; no changes to code.  Ticket #3875. (CVS 6674)


type: ci
user: drh
comment:
  When pinning a temp register after it is reused by the column cache, make
  sure all instances of that register in the cache are pinned so that the
  register is never reused for a different purpose.  Ticket #3879. (CVS 6676)


type: ci
user: drh
comment:
  Fix the rtree test module so that it works even if the ext/ subfolder is
  omitted from the tree. (CVS 6679)


type: ci
user: drh
comment:
  Simplifications to the Expr object:  Remove Expr.span completely and convert
  Expr.token into a char* Expr.zToken.  Also simplify the Token object by
  removing the Token.dyn and Token.quoted fields. (CVS 6681)


type: ci
user: drh
comment:
  Additional refinements to Expr handling.  Restore compression of trigger
  expressions.  Change Expr.zToken to Expr.u.zToken and added Expr.u.iValue.
  Remove an unnecessary ExprDup from CHECK constraint processing.  And so forth. (CVS 6682)


type: ci
user: danielk1977
comment:
  Workaround the need for internal API sqlite3BtreeCursorDb(). It was only being used for an assert() statement, which can be done differently. (CVS 6683)


type: ci
user: drh
comment:
  Make sure the column name resolver does not try to duplicate Expr.u.zToken
  when the Expr.u.iValue union member is the element being used. (CVS 6684)


type: ci
user: drh
comment:
  Remove references to deleted function sqlite3ExprRegister().  Changes to
  the expr.c source module to promote better testing. (CVS 6686)


type: ci
user: drh
comment:
  Modify the hasHotJournal() routine to return a false-positive if it is
  unable to open the journal file to check its header due to a race
  condition.  Processing downstream of hasHotJournal() already knows how to
  deal with false-positives.  Ticket #3883. (CVS 6687)


type: ci
user: drh
comment:
  The hasHotJournal() fix of check-in (6687) causes some minor problems in
  various alternative operating modes, such as locking_mode=EXCLUSIVE.  This
  additional patch attempts to fix those concerns.  Ticket #3883. (CVS 6688)


type: ci
user: drh
comment:
  Refinements in expression handling logic that have resulted from recent
  structural testing. (CVS 6690)


type: ci
user: drh
comment:
  Enhance the sqlite3VdbeGetOp() routine so that it always returns a pointer
  to VdbeOp, even following an OOM fault.  This simplifies error handling in
  callers.  Cleanup to the column cache logic and the expr.c source module. (CVS 6691)


type: ci
user: drh
comment:
  Fix the ".genfkey" command of the CLI so that it does not leak memory
  if sqlite3_realloc() fails.  Ticket #3891. (CVS 6696)


type: ci
user: drh
comment:
  Code simplifications to facilitate coverage testing following the recent
  changes to the Expr object. (CVS 6697)


type: ci
user: shane
comment:
  Ensure that "static" mutexes are deleted on shutdown so that they are not leaked across restarts. (CVS 6700)


type: ci
user: drh
comment:
  Malloc for space to hold the Parse object in sqlite3_prepare() and friends.
  Or, if compiled with SQLITE_USE_ALLOCA, obtain space for the object from
  alloca(). (CVS 6702)


type: ci
user: drh
comment:
  Add the vdbe-compress.tcl script which automatically refactors the
  sqlite3VdbeExec() routine to use less stack space.  Use this script
  when constructing the amalgamation. (CVS 6704)


type: ci
user: drh
comment:
  Additional changes to reduce stack usage.  The SQLITE_SMALL_STACK compile-time
  option is now available. (CVS 6708)


type: ci
user: danielk1977
comment:
  Define a set of constants to use as the "index" argument to sqlite3BtreeGetMeta and UpdateMeta. This makes some parts of the code easier to follow. (CVS 6709)


type: ci
user: danielk1977
comment:
  Add corruptD.test, a container for testing the "cell overflow" problem. Also shuffle a small amount of code in BtreeInitPage() to check that the page header pointer to the start of the cell offset array is set to a sane value. (CVS 6710)


type: ci
user: drh
comment:
  Change the pcache1.c implementation so that the "header" occurs at the end
  of page buffer, not at the beginning.  This insures that the 20 bytes
  immediately following the page buffer are mapped if a read of the page
  buffer overruns due to a malformed cell. (CVS 6711)


type: ci
user: drh
comment:
  Fix two instances where a malformed header in a database file (in other words
  a corrupt database file) can lead to an assertion fault. (CVS 6712)


type: ci
user: drh
comment:
  If the root page of a btree is empty and is also not a leaf page and the
  page is not page 1, then report database corruption. (CVS 6716)


type: ci
user: drh
comment:
  Fix an assertion fault in balance_quick() that occurs when an interior
  btree node has zero cells due to database corruption.  Also update the
  corrupt7.test result vectors for a couple of cases where the error report
  on database corruption changed due to earlier detection. (CVS 6717)


type: ci
user: drh
comment:
  Take care that a corrupt variable-length integer does not cause 32-bit
  integer overflow when parsing a record format, nor cause excessively large
  memory allocations. (CVS 6719)


type: ci
user: drh
comment:
  Remove leftover "breakpoint" commands from test scripts.  Also remove blank
  lines at the end of scripts. (CVS 6721)


type: ci
user: drh
comment:
  Detect when database corruption causes an attemp to set the pointer map
  value for a pointer map page and report the corruption. (CVS 6722)


type: ci
user: danielk1977
comment:
  When building in debug mode with gcc, force the nullMem variable in function columnMem() to be aligned to an 8-byte boundary. Otherwise an assert() statement may fail. (CVS 6723)


type: ci
user: drh
comment:
  Make sure the result of sqlite3VdbeGetOp() is not used as an array following
  an OOM error, since after (6691) it might be a single-entry dummy opcode. (CVS 6724)


type: ci
user: drh
comment:
  Update the error message on one of the corruption tests to account for the fact
  that we are finding the corruption sooner. (CVS 6726)


type: ci
user: drh
comment:
  Disable the LIKE optimization if the affinity of the LHS column is
  not TEXT.  Ticket #3901. (CVS 6727)


type: ci
user: danielk1977
comment:
  Do not clear the MemPage.nFree variable when insertCell() adds an overflow cell to a page. Not doing this means balance_quick() can avoid a call to sqlite3BtreeInitPage(). (CVS 6732)


type: ci
user: drh
comment:
  Only do the cell overread checks in sqlite3BtreeInitPage if
  SQLITE_OVERREAD_CHECK is defined at compile-time. (CVS 6733)


type: ci
user: danielk1977
comment:
  Avoid calling fillInCell() to create an internal node intkey cell from balance_nonroot(). A single putVarint() does the same thing more quickly. (CVS 6734)


type: ci
user: drh
comment:
  Enable cell overflow checking in sqlite3BtreeInitPage() using the
  compile-time option SQLITE_ENABLE_OVERSIZE_CELL_CHECK.  Change the tests
  so that they recognize different error messages depending on the setting
  of this macro. (CVS 6735)


type: ci
user: drh
comment:
  Modify mkkeywordhash.c so that it puts the original text of each token in
  a comment beside the "testcase()" macros. (CVS 6736)


type: ci
user: danielk1977
comment:
  Change savepoint4.test to limit database growth. Otherwise the test can take a very long time to run, depending on the prng. (CVS 6737)


type: ci
user: shane
comment:
  Avoid a false failure report in the test scripts caused by the vdbe stack "compression" script. (CVS 6740)


type: ci
user: drh
comment:
  Remove the actual checks that verify that memory pools (such as set up
  using SQLITE_CONFIG_HEAP) are 8-byte aligned.  But document that 8-byte
  alignment is required. (CVS 6742)


type: ci
user: drh
comment:
  Do not let the reverse_unordered_selects pragma force the use of an index that
  would not otherwise be used.  Ticket #3904.
  Also: remove an test which is always true. (CVS 6745)


type: ci
user: drh
comment:
  Changes to reenable codec operation and to handle memory allocation
  failures within a codec. (CVS 6746)


type: ci
user: drh
comment:
  Honor the SQLITE_OPEN_READONLY flag even on a :memory: or temporary database,
  even though such a database is pointless.  Ticket #3908. (CVS 6748)


type: ci
user: drh
comment:
  Make sure nested queries with USING clauses do not leak memory.
  Preliminary fix for ticket #3911. (CVS 6750)


type: ci
user: drh
comment:
  The lemon parser generator now inserts yytestcase() macros on reduce action
  and on each destructor, to verify that all have been executed.  yytestcase()
  is a no-op by default but can be set to something more useful inside
  of %include. (CVS 6755)


type: ci
user: drh
comment:
  The previous check-in ((6755)) put in more yytestcase() macros than are
  called for.  This check-in addresses that problem. (CVS 6756)


type: ci
user: drh
comment:
  Change lemon so that it does not generate yytestcase() macros on destructor
  cases since destructors are commonly unreachable in a reasonable grammar.
  For the reduce-rule switch, gather all no-ops into the "default:" case. (CVS 6757)


type: ci
user: drh
comment:
  Detect database corruption and abort balance_nonroot() before the
  corruption causes problems. (CVS 6758)


type: ci
user: drh
comment:
  Changes to allow a clean compile with no floating-point instructions
  generated when SQLITE_OMIT_FLOATING_POINT is used. (CVS 6763)


type: ci
user: drh
comment:
  Additional updates to the symbol resolver and expression tree walker to
  facilitate test coverage. (CVS 6764)


type: ci
user: shane
comment:
  Fix a link error and warning that can occur in where.c when compiling under MSVC with SQLITE_OMIT_VIRTUALTABLE defined. Ticket #3914. (CVS 6767)


type: ci
user: danielk1977
comment:
  Changes to balance_nonroot() and BtreeDelete() to simplify delete operations and reduce stack/heap usage while balancing b-tree structures. (CVS 6768)


type: ci
user: drh
comment:
  Changes sqlite3_prepare_v2() (and related routines) so that if it fails due
  to a missing table and the schema is out of date, it retries once before
  returning SQLITE_SCHEMA.  Other changes to prepare.c to facilitate coverage
  testing. (CVS 6769)


type: ci
user: drh
comment:
  Fix a potential segfault following database corruption.  Problem 
  made visible by check-in (6772). (CVS 6775)


type: ci
user: drh
comment:
  Use caution to avoid integer overflow when doing real to integer affinity
  operations.  Ticket #3922. (CVS 6776)


type: ci
user: drh
comment:
  Fix a problem in vdbe.c that could cause a double-free of memory if the
  SQLITE_LIMIT_LENGTH is changed after a statement is prepared but before
  it is run.  Also remove debugging statements from tkt3841.test. (CVS 6777)


type: ci
user: drh
comment:
  Avoid an assertion fault if an out-of-memory error occurs while trying
  to run the string-concatentation operator on a zero-blob.  (This is an
  absurd thing to do, but even so, we still should not fault.) (CVS 6778)


type: ci
user: drh
comment:
  Move codec management from database connections into the pager so that it
  will work together with shared cache. (CVS 6782)


type: ci
user: drh
comment:
  Make sure the sqlite3VdbeGetOp() subroutine works even when SQLite is
  compiled with SQLITE_OMIT_TRACE. (CVS 6784)


type: ci
user: drh
comment:
  Reorganize and cleanup the prepared statement object.  Remove code that has
  been commented out for ages and is no longer relevant to anything. (CVS 6786)


type: ci
user: danielk1977
comment:
  If a call is made to sqlite3PagerAcquire when there are no outstanding references to any pages and the pager is in the error-state, try to exit the error-state at this point. Previously this was only attempted if the pager was configured to use exclusive mode. (CVS 6788)


type: ci
user: danielk1977
comment:
  If after obtaining an exclusive lock to rollback a hot-journal file it is found that the journal file has been deleted, do not return an SQLITE_BUSY error. Just downgrade the lock and continue with the current operation. This eliminates a spurious SQLITE_BUSY error caused by a race condition. (CVS 6792)


type: ci
user: danielk1977
comment:
  When recovering from the error-state in pagerSharedLock(), do not search for a hot-journal in the file-system if the pager is configured to use an anonymous temp file as the journal. (CVS 6793)


type: ci
user: danielk1977
comment:
  If an OOM error occurs just after obtaining a shared lock on the database file, release the lock before returning. (CVS 6795)


type: ci
user: drh
comment:
  More simplifications to vdbe.c.  Remove a NEVER() from vdbe.c that is possible
  after all. (CVS 6796)


type: ci
user: drh
comment:
  Make sure sqlite3BtreeCreateTable() returns an error code if the largest
  rootpage field is invalid in auto_vacuum mode.  Update file-format comments
  to describe all of the "meta" values. (CVS 6797)


type: ci
user: danielk1977
comment:
  Fix a failing assert in btree.c. The same bug was causing a spurious SQLITE_CORRUPT return when compiled without SQLITE_DEBUG. (CVS 6800)


type: ci
user: danielk1977
comment:
  Call balance_shallower() from balance_nonroot() instead of from balance(). This simplifies coverage testing a bit. (CVS 6805)


type: ci
user: drh
comment:
  Enhance autoincrement so that it works with triggers that also do
  autoincrement inserts, even multiple inserts into the same table.
  Ticket #3928 (CVS 6807)


type: ci
user: danielk1977
comment:
  Simplify things by rolling the functionality of balance_shallower() into balance_nonroot(). (CVS 6808)


type: ci
user: drh
comment:
  Remove the sqlite3Assert() function.  The ALWAYS() and NEVER() macros call
  assert() directly when compiled with SQLITE_DEBUG. (CVS 6809)


type: ci
user: drh
comment:
  Remove a declaration of the sqlite3Assert() function that was deleted by the
  previous check-in. (CVS 6810)


type: ci
user: drh
comment:
  Disable the new malloc-37 test when locking_mode==exclusive.  The test
  basically works, but sometimes reports "database is locked" instead of
  "out of memory" and that messes up the error reporting. (CVS 6811)


type: ci
user: drh
comment:
  Improved handling of oversize string and blob errors.  Other simplifications
  in support of full coverage testing. (CVS 6813)


type: ci
user: drh
comment:
  Get the notify2.test running again by removing an ALWAYS() that was mistakenly
  inserted and by taking care not to report corruption following an
  SQLITE_LOCKED failure during schema parsing. (CVS 6815)


type: ci
user: danielk1977
comment:
  Avoid writing the 8-byte journal-header magic until the journal-header is synced. In persistent journal-mode, this prevents any old content that follows an unsynced journal-header from being interpreted as part of the rollback journal. (CVS 6817)


type: ci
user: danielk1977
comment:
  Another change to test_journal.c to account for (6817). Again, only test code has changed. (CVS 6819)


type: ci
user: drh
comment:
  Fix the new pager.c changes so that they compile with IOTRACE defined.
  Fix an out-of-order variable definition in vdbeaux.c. (CVS 6820)


type: ci
user: drh
comment:
  When sqlite3VdbeAddOp() fails due to an OOM fault, return an address of 1
  rather than zero so that there appears to always be a prior instruction.
  This prevents a negative jump-to address computation in where.c following
  an OOM fault. (CVS 6822)


type: ci
user: shane
comment:
  Skip a couple tests requiring working 64bit int support on platforms without that support.  Test code change only. (CVS 6823)


type: ci
user: drh
comment:
  Remove the priorNewRowid field from the sqlite3 structure.  Use the
  last_insert_rowid as the initial value when searching for a new random
  rowid in the OP_NewRowid opcode. (CVS 6824)


type: ci
user: drh
comment:
  Remove incorrect NEVER() macros from malloc.c.  The allocations can be
  exceeded using sqlite3_malloc() and sqlite3_realloc(). (CVS 6826)


type: ci
user: drh
comment:
  Fix a bug in sqlite3_realloc() - if called with a size of more than
  2147483392 it returns 0 but it also releases the prior allocation. (CVS 6827)


type: ci
user: drh
comment:
  Fix an instance where sqlite3JumpHere() might be called with a negative
  address following an OOM fault. (CVS 6828)


type: ci
user: danielk1977
comment:
  Cause incremental-blob read/write operations lock shared-cache tables in the same way as normal SQL read/writes. Add complex assert statements to make sure tehe correct shared-cache locks are held when accessing the database. Eliminate some redundant checks from btree.c. (CVS 6830)


type: ci
user: danielk1977
comment:
  Do not ignore alias "a" in a query of the form "SELECT ... FROM (...) AS a" Fix for #3935. Also expand upon (6751) to fix some similar obscure memory leaks. (CVS 6831)


type: ci
user: danielk1977
comment:
  Report an error if a USING or ON clause is specified following a from-list element that is not to the right of a join operator. Fix for #3846. (CVS 6832)


type: ci
user: danielk1977
comment:
  Fix a 1-byte buffer overwrite that can occur when a virtual table overloads an SQL function. (CVS 6833)


type: ci
user: danielk1977
comment:
  Change to test code and scripts allowing memsys3 to be tested using a build that has both memsys3 and memsys5 enabled. (CVS 6834)


type: ci
user: danielk1977
comment:
  Cause opening a transaction on a sharable b-tree module automatically obtain a read-lock on page 1. This means there is no way for sqlite3BtreeGetMeta() to fail. (CVS 6836)


type: ci
user: danielk1977
comment:
  When a b-tree transaction is committed when there are open cursors, downgrade shared-cache write-locks to read-locks instead of relinquishing all locks. Fix for #3942. (CVS 6837)


type: ci
user: danielk1977
comment:
  Fix to sqlite3AuthRead to accommodate "new" or "old" references that are used in a context where a column reference may also be used (i.e. "SELECT new.<col> FROM <tble>"). Ticket #3944. (CVS 6838)


type: ci
user: drh
comment:
  Test the result of pthread_create() and do not call pthread_join() if the
  thread creation failed.  Ticket #3933. (CVS 6839)


type: ci
user: drh
comment:
  Make explicit the restrictions on UPDATE, DELETE, and INSERT statement syntax
  within triggers.  Ticket #3947. (CVS 6840)


type: ci
user: drh
comment:
  Add a version of the Lemon parser template "lempar.c" to the src/ subfolder.
  This new parser template contains a couple of NEVER() macros that disable
  tests that are needed for general grammars but not for the specific grammar
  used by SQLite.  SQLite builds with the modified lempar.c. (CVS 6842)


type: ci
user: drh
comment:
  Cause sqlite3_exec() to return SQLITE_NOMEM if it cannot allocate memory to
  hold the error message for some other error. (CVS 6844)


type: ci
user: drh
comment:
  Remove unused code (that was commented out) from prepare.c.  Remove an
  incorrect NEVER() macro.  Fix the comment on schemaIsValid() to correctly
  describe its return behavior. (CVS 6845)


type: ci
user: drh
comment:
  Remove two unused fields from the Parse structure.  The TCL interface now
  removes leading whitespace from SQL statements before parsing them. (CVS 6846)


type: ci
user: danielk1977
comment:
  Make the sqlite3BtreeMoveto function static, since it is only used from within btree.c. Remove unused function lockBtreeWithRetry from btree.c. (CVS 6850)


type: ci
user: drh
comment:
  Fix the backup logic so that it detects a failure to sqlite3BtreeUpdateMeta()
  and reports that failure back up to the top level. (CVS 6851)


type: ci
user: drh
comment:
  Fix the pager so that it remembers the name of the journal for an in-memory
  database as an empty string.  This is important when committing a multi-database
  transaction that includes one or more attached memory databases. (CVS 6852)


type: ci
user: drh
comment:
  Fix a reference count problem following database corruption detection in
  the ptrmapPut() routine of btree.c. (CVS 6854)


type: ci
user: danielk1977
comment:
  If an error occurs in PagerBegin(), call pager_end_transaction() to reset the internal state of the pager object. (CVS 6855)


type: ci
user: danielk1977
comment:
  Do not load the root-page of a b-tree table/index when opening a cursor. Instead, allow it to be loaded when the cursor is first used (in function moveToRoot()). Also move the root-page flags sanity checks that were a part of the OP_OpenRead/OpenWrite opcodes into the moveToRoot() function. (CVS 6856)


type: ci
user: drh
comment:
  Simplifications to sqlite3BtreeInsert() and allocateSpace().  Added many
  testcase() macros to verify boundary conditions in btree.c. (CVS 6858)


type: ci
user: danielk1977
comment:
  Remove an ALWAYS clause that could be false if an IO error within a statement executed by a virtual table caused an emergency rollback. (CVS 6859)


type: ci
user: drh
comment:
  Comment out sqlite3BtreeFlags() when not in debug mode.  Tweaks to
  database corruption detection logic in freeSpace(). (CVS 6861)


type: ci
user: drh
comment:
  Improvements to comments in btree.c:freeSpace().  Added a testcase() macro
  to verify a boundary case is tested in sqlite3BtreeInitPage(). (CVS 6862)


type: ci
user: drh
comment:
  Add another boundary-condition testcase() macro to btree.c.  Correct the
  comment on modifyPagePointer(). (CVS 6863)


type: ci
user: danielk1977
comment:
  Restore (btree_set_cache_size) to test3.c. This is used on unix for the tcl "crash tests". Make some functions no longer used outside of btree.c static. (CVS 6869)


type: ci
user: danielk1977
comment:
  In btree.c, have setSharedCacheLock() assume that the b-tree is sharable instead of checking to see if it is. The caller has already performed this check. (CVS 6870)


type: ci
user: drh
comment:
  Fix two faulty assert() statements btree.  (It was possible for the assertions
  to be false given a corrupt database file as input.) (CVS 6872)


type: ci
user: danielk1977
comment:
  Fix a double-free that can occur when using the fts3 legacy syntax '-' operator. Add tests for the same operator. Ticket #3960. (CVS 6874)


type: ci
user: drh
comment:
  Fix a pager reference count leak in btree that occurs on an OOM following
  a database page size change. (CVS 6875)


type: ci
user: danielk1977
comment:
  Modify the integrity-check code so that each b-tree page inspected is reinitialized while doing so, even if an initialized copy exists in the cache. This prevents an assert from failing when running integrity_check on a corrupt database. (CVS 6877)


type: ci
user: drh
comment:
  Bug fix in the computation of the number of pages to autovacuum when
  nReserve is greater than zero. (CVS 6880)


type: ci
user: drh
comment:
  When an OOM fault occurs while moving a page for autovacuum in an in-memory
  database, be sure to undo the page move prior to returning the error, to
  avoid corrupting the in-memory database file. (CVS 6883)


type: ci
user: danielk1977
comment:
  Remove an assert ("assert( subpage>0 )") from btree.c that may not be true for a corrupt database. Also add comments and other assert() statements to btree.c function moveToRoot(). (CVS 6886)


type: ci
user: danielk1977
comment:
  In sqlite3PagerWrite(), do not set the PGHDR_NEED_SYNC flag on a page if an IO error occured while attempting to journal it. (CVS 6887)


type: ci
user: drh
comment:
  Remove the SQLITE_CommitBusy flag.  This was an attempt to block recursion
  on the sqlite3_commit_hook() interface.  But such recursion is explicitly
  disallowed, so the flag is pointless. (CVS 6889)


type: ci
user: drh
comment:
  Make sure the IN operator works with zeroblobs. Ticket #3965.
  Other simplifications associated with structural testing. (CVS 6890)


type: ci
user: drh
comment:
  Add comments and assert() statements to show that the return value from
  sqlite3BtreeKeySize() and sqlite3BtreeData() usually do not matter.
  Ticket #3968.  Also remove a NEVER() macro that can sometimes be true -
  discovered while testing the previous change. (CVS 6893)


type: ci
user: drh
comment:
  Added the SQLITE_TESTCTRL_RESERVE option to sqlite3_test_control().
  Simplifications to btree.c to facilitate structural coverage testing. (CVS 6894)


type: ci
user: drh
comment:
  Remove an assert() from vdbeaux.c that might not be true if the database
  file is corrupt. (CVS 6895)


type: ci
user: drh
comment:
  Simplifications to btree.c in support of structural testing.  Renamed the
  "skip" field of the BtCursor object to "skipNext" to make it easier to
  search for places where it is used. (CVS 6896)


type: ci
user: drh
comment:
  Fix a potential database corruption following DROP TABLE when the pending
  byte page corresponds to a ptrmap page.  This situation cannot happen in
  a real deployment - but it still needs to be fixed. (CVS 6897)


type: ci
user: danielk1977
comment:
  Return a meaningful error message if a keyword is used as an rtree table column name. Ticket #3970. (CVS 6902)


type: ci
user: danielk1977
comment:
  Fix a subtle problem that can occur when a transaction is automatically rolled back, and afterwards a VM that had opened a statement transaction within the abandoned transaction is finalized. Fixes an assert() that was failing in rtree3.test. (CVS 6903)


type: ci
user: danielk1977
comment:
  When the asynchronous IO backend opens a file with the EXCLUSIVE flag set, make sure only a single file-descriptor is opened (not one for reading and one for writing). This change fixes #3978. (CVS 6905)


type: ci
user: danielk1977
comment:
  Add some code to sqlite3VdbeMemSetZeroBlob() so that it works (less efficiently) even when OMIT_INCRBLOB is defined. Ticket #3977. (CVS 6906)


type: ci
user: drh
comment:
  Always provide a name for the TEMP database even if SQLite is compiled using
  SQLITE_OMIT_TEMPDB. (CVS 6908)


type: ci
user: drh
comment:
  Corrections to the comment that is inserted at the top of the amalgamation.
  Ticket #3981. (CVS 6909)


type: ci
user: drh
comment:
  Modify various routines inside btree.c to take a pointer to the return-code
  as a parameter and to no-op if the return-code storage location already
  contains a non-zero code. (CVS 6911)


type: ci
user: drh
comment:
  Reverse the order of two conditionals in a test in order to achieve coverage
  of them both.  Also: clarifications to comments in btree.c. (CVS 6912)


type: ci
user: drh
comment:
  Remove an assert() in btree.c which is no longer true due to changes in
  the error reporting behavior of ptrmapPut(). (CVS 6914)


type: ci
user: danielk1977
comment:
  Change getAndInitPage() (btree.c) to use only PagerAcquire(), not PagerLookup() and PagerAcquire(). (CVS 6916)


type: ci
user: drh
comment:
  Further simplifications to btree.c, especially the sqlite3BtreeKey() and
  sqlite3BtreeData() functions.  New assert() statements added to verify
  that these routines are called correctly. (CVS 6917)


type: ci
user: drh
comment:
  Remove an ALWAYS() from a condition that can in fact be false under very
  obscure circumstances. (CVS 6918)


type: ci
user: danielk1977
comment:
  Changes to test code (only) to allow veryquick.test to run with OMIT_UTF16 builsd. Ticket #3985. (CVS 6919)


type: ci
user: drh
comment:
  Add a NEVER() macro around a pager.c conditional that must always be false
  in the current implementation. (CVS 6920)


type: ci
user: danielk1977
comment:
  Avoid leaving a suspect page in the page-cache if an error occurs during sqlite3PagerAcquire(). (CVS 6922)


type: ci
user: drh
comment:
  Add assert() statements to more tightly constrain the state of pager.c.
  Remove the three pager*.test scripts since they violate the constraints
  asserted above by modifying the state of the system in ways that it cannot
  be modified in a live system. (CVS 6933)


type: ci
user: danielk1977
comment:
  Remove the "proc zeroblob" implementation from incrvacuum2.test. It is no longer required as of (6906) and, as #3988 points out, unreliable. (CVS 6936)


type: ci
user: drh
comment:
  Add a NEVER() on an always-false conditional in pager.c.
  Make sure the text of the master journal file is zero-terminated before
  trying to process it - to prevent a buffer overrun in strlen(). (CVS 6937)


type: ci
user: danielk1977
comment:
  Change an unreachable condition in PagerSharedLock to a NEVER(...). Add an assert to pager_error() to show that it is never called to put an in-memory pager to the error-state. (CVS 6941)


type: ci
user: drh
comment:
  Adjust memory size computations to avoid a conditional that is always
  false on 64-bit systems. (CVS 6942)


type: ci
user: drh
comment:
  The noReadlock property on a pager object implies the readOnly property.
  Use this fact to simplify the logic in sqlite3PagerSharedLock(). (CVS 6944)


type: ci
user: danielk1977
comment:
  When extracting values from a record to use in an UPDATEd version of that record, apply OP_RealAffinity if required. Fix for #3992. (CVS 6945)


type: ci
user: danielk1977
comment:
  Do not simulate OOM conditions in the sqlite3OsXXX() calls if the underlying file is an in-memory journal file. (CVS 6946)


type: ci
user: danielk1977
comment:
  If there is a hot-journal in the file-system, a connection with journal_mode=memory set may have to open it to effect rollback. Account for this in pager_end_transaction(). This prevents an assert from failing in the in-memory journal permutation test. (CVS 6947)


type: ci
user: danielk1977
comment:
  When flattening a SELECT query, do not discard collation sequences explicitly attached to expressions in the parent query. Fix for #3997. (CVS 6949)


type: ci
user: danielk1977
comment:
  Add the experimental API sqlite3_strnicmp(). Modify fts3 so that in terms like 'column_name:token' the column_name is interpreted in a case-insenstive fashion. Ticket #3996. (CVS 6950)


type: ci
user: danielk1977
comment:
  Add a test to mallocI.test to show that a shared lock is correctly released if an OOM condition occurs while parsing a database schema. (CVS 6951)


type: ci
user: danielk1977
comment:
  Fix a bug in where.c that could cause SQLite to write to freed memory while compiling a query with many terms in the WHERE clause. (CVS 6952)


type: ci
user: drh
comment:
  Fix a segfault following OOM that was introduced by check-in (6949) which
  was a fix for ticket #3997. (CVS 6954)


type: ci
user: drh
comment:
  Return a better error message when problems are encountered parsing a
  TEMP trigger or TEMP view that references objects in other databases that
  have been modified or dropped.  Ticket #3810. (CVS 6956)


type: ci
user: drh
comment:
  Make sure all database connections are closed at the end of the test case
  for ticket #3810. (CVS 6957)


type: ci
user: danielk1977
comment:
  Enhancement to (6844). If sqlite3_exec() is to return SQLITE_NOMEM because it fails to allocate space for an error message, set the database error-code to SQLITE_NOMEM too. (CVS 6962)


type: ci
user: shane
comment:
  Fixed "Interlocked" logic error that prevented the "static" mutexes from being released when sqlite3_shutdown() is called. Ticket #4011. (CVS 6964)


type: ci
user: danielk1977
comment:
  Exclude a static function in test1.c from the build when OMIT_DEPRECATED is defined. This avoids a compiler warning that occurs with some compilers. (CVS 6967)


type: ci
user: danielk1977
comment:
  Update a couple of tests in corrupt7.test to account for a change in the error message text emitted by SQLite. (CVS 6968)


type: ci
user: danielk1977
comment:
  Instead of adding SQLITE_API macros sqlite3.h while creating sqlite3.c, add them as part of generating the sqlite3.h target, while copying from sqlite.h.in to sqlite3.h. This fixes a build problem that was causing multiple SQLITE_API macros to be added to a single line of sqlite3.h, and the problem cited by #4016. (CVS 6971)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Add the sqlite_temp_directory global variable which, if set, defines the
  directory in which temporary files are created. (CVS 1316)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Improvements to testing of sqlite_interrupt.  More checking for interrupt
  inside of VACUUM. (CVS 1344)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Update the version number to 2.8.14.  For whatever reason, the version at
  the tip of the 2.8 branch fixes ticket #757. (CVS 1552)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Do not authenticate statements when reading the schema.  Backport of bug
  fix in (1588) to version 2. (CVS 1591)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Update the publish.sh script so that it no longer generates documentation
  pages (that is handled by the version 3.0.0 publish.sh).  Also insert
  version numbers in the filenames of all build products. (CVS 1601)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  The MIN() aggregate function returns NULL if any element in the result
  was NULL.  This makes MIN() consistent with ORDER BY which sorts NULL first.
  Ticket #777. (CVS 1679)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  The %W date specifier in strftime should be measured from the first Monday
  of the year.  Ticket #758. (CVS 1806)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Fix a segfault in the authorizer when it is given a SELECT statement with
  no FROM clause.  Ticket #896. (CVS 1953)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Preserve the default_temp_store pragma across VACUUM in version 2.8.
  (Version 3.0 already does this.)  Ticket #1008. (CVS 2120)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  The ".dump" method in the shell for version 2 should not sort tables by
  name because this can put views out of dependency order.   Ticket #1124. (CVS 2347)


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Fix a bad variable reference.  The reference is actually in unreachable
  code and is therefore harmless.  The fix is to remove the code. (CVS 3483)


type: ci
bgcolor: #fff0c0
user: drh
ecomment:
  Back-port critical soft heap limit fixes to version 3.3.17.  The following
  check-ins were back-ported: (4031), (4037), (4097), (4202), (4203),
  (4207), (4208), (4214). (CVS 4222)

comment:
  Back-port critical soft heap limit fixes to version 3.3.17.  The following
  check-ins were back-ported: (4031), (4037), (4097), (4202), (4203),
  (4207), (4208), (4214). (CVS 4222)


type: ci
bgcolor: #fff0c0
user: drh
comment:
  Port patches from the trunk into the 3.6.14.1 branch:
  the group_concat() fix of check-in (6616), ticket #3841 and the
  pcache fix of check-in (6619), ticket #3844. (CVS 6652)


type: ci
user: dan
comment:
  Changes to the query planner that improve the order in which tables/indexes are scanned in join queries.


type: g
user: drh
comment:
  Edit [f06cae3b5e42e5a2]: Change branch background color to "#fff0c0". Move to branch [/timeline?r=branch_3_6_14&nd&dp=f06cae3b5e42e5a2 | branch_3_6_14].


type: g
user: drh
comment:
  Edit [15d88edf7671822c]: Change branch background color to "#fff0c0". Move to branch [/timeline?r=branch_3_6_6&nd&dp=15d88edf7671822c | branch_3_6_6]. Edit check-in comment.


type: g
user: drh
comment:
  Edit [f0029da32f024c92]: Change branch background color to "#fff0c0". Move to branch [/timeline?r=branch_3_3_17&nd&dp=f0029da32f024c92 | branch_3_3_17]. Edit check-in comment.


type: g
user: drh
comment:
  Edit [e91012b603014765]: Change branch background color to "#fff0c0". Move to branch [/timeline?r=branch_3_3_13&nd&dp=e91012b603014765 | branch_3_3_13].


type: g
user: drh
comment:
  Edit [635f674d20ca3e0b]: Change branch background color to "#c0c0c0". Move to branch [/timeline?r=version_2&nd&dp=635f674d20ca3e0b | version_2].


type: g
user: drh
comment:
  Edit [3339774228242535]: Change branch background color to "#fff0c0". Move to branch [/timeline?r=branch_3_2&nd&dp=3339774228242535 | branch_3_2].


type: t
user: drh
brief: Ticket [c25aab7e7e]: 5 changes
comment:
  Ticket [c25aab7e7e] <i>The &quot;.import&quot; command does not parse CSV correctly.</i> status still Open with 5 other changes


type: ci
user: dan
comment:
  If a binary operator in a WHERE clause that should be performed with no affinity conversions applied to its operands (see http://www.sqlite.org/datatype3.html) is optimized by index lookup, do not apply any conversions to the key value before looking it up in the index. Fix for 93fb9f89d6.


type: ci
user: drh
comment:
  Incorporate fossil-scm version information into the build.  Add the
  SQLITE_SOURCE_ID macro to the header.  Add the sqlite3_sourceid() interface.
  Add the sqlite_source_id() SQL function.


type: ci
user: dan
comment:
  Fix a case where SQLite may write past the end of a buffer as a result of a corrupted database file.


type: ci
user: drh
comment:
  Update the amalgamation builder so that it avoids putting redundant
  SQLITE_API macros on declarations.


type: ci
user: dan
comment:
  Add a test to verify that 3.6.17 releases read-locks obtained to read the database schema even if the connection is not currently in auto-commit mode.


type: t
user: drh
brief: Ticket [7d96113ff0]: 3 changes
comment:
  Ticket [7d96113ff0] <i>SQLite fails to build when TCL isn't installed</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  Enhanced documentation and minor code tweaks in preparation for hardening
  the sqlite3_initialize/shutdown interfaces against initialization failures.


type: t
user: anonymous
brief: Ticket [7d96113ff0]: 1 change
comment:
  Ticket [7d96113ff0] <i>SQLite fails to build when TCL isn't installed</i> status still Open with 1 other change


type: ci
user: shane
comment:
  More documentation and comment updates for sqlite3_initialize/shutdown interface changes to handle failures.


type: ci
user: drh
comment:
  Fix a bug in mem5.c which would cause an infinite loop on an attempt
  to allocate more than 1073741824 bytes of contiguous memory.  Also, some
  cleanup of mem5.c.  More work to do on this.


type: ci
user: drh
comment:
  When shutting down the memsys5 memory allocator, be sure to clear the mutex
  pointer in case the next startup does not use a mutex because it is configured
  differently.


type: ci
user: drh
comment:
  Fix obscure issues with the memsys5 memory allocator.  Arrange that the
  xRealloc() interface to memory allocators is only called with a value
  that has been through xRoundup().


type: ci
user: drh
comment:
  Unknown functions in the DEFAULT clause of a table cause an error when
  the DEFAULT value is needed.  Ticket [2d401a94287b5].


type: t
user: anonymous
brief: Ticket [92c5deed07]: 3 changes
comment:
  Ticket [92c5deed07] <i>FTS3 bug with multiple terms for exclusion</i> status still Open with 3 other changes


type: t
user: anonymous
brief: New ticket [1248e6cda8].
comment:
  New ticket [1248e6cda8] <i>Insufficient precision of sqlite3_column_text16() for floating point values</i>.


type: t
user: drh
brief: Fixed ticket [93fb9f89d6].
comment:
  Fixed ticket [93fb9f89d6]: <i>Index causes incorrect WHERE clause evaluation</i> plus 3 other changes


type: t
user: drh
brief: Ticket [92c5deed07]: 1 change
comment:
  Ticket [92c5deed07] <i>FTS3 bug with multiple terms for exclusion</i> status still Closed with 1 other change


type: ci
user: dan
comment:
  Add the SQLITE_ENABLE_STAT2 macro. If this is not defined at build-time, the stat2 table is not created, populated, or used.


type: ci
user: dan
comment:
  Fix a problem where a buffer allocated from a lookaside pool was being released using the system free().


type: ci
user: drh
comment:
  Update the version number to 3.6.18, even though the actual release of
  that version is still a few weeks away.


type: ci
user: dan
comment:
  Change the way an Expr that has been converted to TK_REGISTER stores its original opcode. The previous method, overloading Expr.iColumn, did not work in all cases.


type: ci
user: drh
comment:
  Make sure that sqlite3ValueFromExpr() sets the "type" field of the 
  sqlite3_value object correctly when the value is a floating point
  number.


type: ci
user: dan
ecomment:
  Change the code that collects samples for sqlite_stat2 so that the first sample taken is the (nRow/(2*SQLITE_INDEX_SAMPLES))th entry in the index, where nRow is the total number of index entries.

comment:
  Change the code that collects samples for sqlite_stat2 so that the first sample taken is the (nRow/(2*SQLITE_INDEX_SAMPLES))th entry in the index, where nRow is the total number of index entries.


type: ci
user: drh
comment:
  Continuing refinements of the range-scan optimizations in where.c.
  The range scores are changed from an integer 1..9 to 0..100.


type: t
user: anonymous
brief: Ticket [2fd50fa665]: 3 changes
comment:
  Ticket [2fd50fa665] <i>cygwin-1.7 support: winFullPathname</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  Change the expression code generator to account for the fact that the new
  sqlite3AtoF() never returns NaN.  Also, clarification of a comment in
  where.c.


type: t
user: drh
brief: Ticket [2fd50fa665]: 1 change
comment:
  Ticket [2fd50fa665] <i>cygwin-1.7 support: winFullPathname</i> status still Open with 1 other change


type: ci
user: dan
comment:
  When a database file is opened, try to find an unused file descriptor to reuse.  This change affects unix (and other systems that use os_unix.c) only. Fix for cvstrac ticket [http://www.sqlite.org/cvstrac/tktview?tn=4018|#4018].


type: ci
user: dan
comment:
  Fix some errors in [http://www.sqlite.org/src/vdiff/aa6acfa8caa2ef59b4c16dfe42c4b5644da96905|aa6acfa8ca].


type: t
user: drh
brief: Ticket [efc02f9779]: 3 changes
comment:
  Ticket [efc02f9779] <i>Trigger creation order affects query correctness</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [efc02f9779]: 1 change
comment:
  Ticket [efc02f9779] <i>Trigger creation order affects query correctness</i> status still Open with 1 other change


type: ci
user: drh
comment:
  Run the column cache in a new context when generating code for trigger
  programs.  Fix for ticket [efc02f9779].


type: t
user: drh
brief: Fixed ticket [efc02f9779].
comment:
  Fixed ticket [efc02f9779]: <i>Trigger creation order affects query correctness</i> plus 2 other changes


type: t
user: anonymous
brief: New ticket [d2b46cfc75].
comment:
  New ticket [d2b46cfc75] <i>sqlite3BitvecClear will clear all bit in aHash when iSize&gt;BITVEC_NBIT</i>.


type: t
user: drh
brief: Ticket [d2b46cfc75]: 3 changes
comment:
  Ticket [d2b46cfc75] <i>sqlite3BitvecClear will clear all bit in aHash when iSize>BITVEC_NBIT</i> status still Open with 3 other changes


type: t
user: drh
brief: Closed ticket [d2b46cfc75].
comment:
  Closed ticket [d2b46cfc75]: <i>sqlite3BitvecClear will clear all bit in aHash when iSize>BITVEC_NBIT</i> plus 2 other changes


type: ci
user: dan
comment:
  Fix a bad interaction between "proxy-locking" and [http://www.sqlite.org/src/vdiff/aa6acfa8caa2ef59b4c16dfe42c4b5644da96905|aa6acfa8ca].


type: ci
user: drh
comment:
  Avoid calling sqite3VdbeRecordCompare() with uninitialized memory following
  an OOM.  Doing so is harmless, but it worries valgrind.


type: ci
user: drh
comment:
  Make sure that the output of EXPLAIN is right when the P4 argument of
  an opcode is of type P4_MEM with the MEM having type MEM_Blob.


type: ci
user: drh
comment:
  Initialize variables differently in the range processing logic of where.c
  in order to make sure variables are always initialized even following
  an OOM error.


type: ci
user: drh
comment:
  Remove an unreachable branch from where.c in order to restore 100%
  branch test coverage.  Add assert() and testcase() macros to verify
  that the branch is unreachable.


type: t
user: anonymous
brief: New ticket [991789d9f3].
comment:
  New ticket [991789d9f3] <i>ext/fts? code uses tolower() when parsing tokens, which is problematic when using certain locales, such as tr_TR.UTF-8.</i>.


type: t
user: anonymous
brief: Ticket [991789d9f3]: 3 changes
comment:
  Ticket [991789d9f3] <i>ext/fts? code uses tolower() when parsing tokens, which is problematic when using certain locales, such as tr_TR.UTF-8.</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [4b81075908]: 3 changes
comment:
  Ticket [4b81075908] <i>In mult-thread that have a problem of updata lost</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [991789d9f3]: 1 change
comment:
  Ticket [991789d9f3] <i>ext/fts? code uses tolower() when parsing tokens, which is problematic when using certain locales, such as tr_TR.UTF-8.</i> status still Open with 1 other change


type: t
user: drh
brief: Ticket [03b198a2fa]: 3 changes
comment:
  Ticket [03b198a2fa] <i>Getting several warnings when compiling in eVC++ 4</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  More thorough initialization of a buffer when writing the rollback journal
  header, in order to prevent a harmless valgrind warning.
  CVSTrac ticket #4039


type: t
user: anonymous
brief: Ticket [97214a34d8]: 3 changes
comment:
  Ticket [97214a34d8] <i>Use of os2MutexNotheld before their definition</i> status still Open with 3 other changes


type: t
user: drh
brief: Closed ticket [44a1b817c3].
comment:
  Closed ticket [44a1b817c3]: <i>Problem with Kaspersky Anti-Virus and SQLite</i> plus 5 other changes


type: ci
user: dan
comment:
  Change "PRAGMA disable_recursive_triggers" to "PRAGMA recursive_triggers". Also a fix for compiling with OMIT_TRIGGER defined.


type: t
user: anonymous
brief: New ticket [9fd0bc3663].
comment:
  New ticket [9fd0bc3663] <i>Add a new open flag to enable shared cache for a single db connection</i>.


type: ci
user: drh
comment:
  Do not reuse function parameters in subsequent expressions since the 
  function call might have triggered a text encoding change.
  Fix for ticket [2ea2425d34be].


type: t
user: drh
brief: Fixed ticket [2ea2425d34].
comment:
  Fixed ticket [2ea2425d34]: <i>Assertion fault:  Text encoding mismatch on value comparison</i> plus 3 other changes


type: t
user: anonymous
brief: New ticket [df2c3ad12a].
comment:
  New ticket [df2c3ad12a] <i>free() on unallocated memory when fts3 match phrase contains terms after &quot;-&quot; modifier</i>.


type: t
user: drh
brief: Closed ticket [cbb5a315df].
comment:
  Closed ticket [cbb5a315df]: <i>Concatenating strings should be possible with a plus '+' operator</i> plus 3 other changes


type: ci
bgcolor: #f0ffc0
user: drh
ecomment:
  On any rollback, immediately interrupt all running statements on the
  same database connection.  This is a partial fix for ticket [f777251dc7].

comment:
  On any rollback, immediately interrupt all running statements on the
  same database connection.  This is a partial fix for ticket [f777251dc7].


type: t
user: dan
brief: Fixed ticket [df2c3ad12a].
comment:
  Fixed ticket [df2c3ad12a]: <i>free() on unallocated memory when fts3 match phrase contains terms after "-" modifier</i> plus 3 other changes


type: t
user: drh
brief: Ticket [e33452c90f]: 4 changes
comment:
  Ticket [e33452c90f] <i>Query plan doesn't use existing index</i> status still Open with 4 other changes


type: ci
user: dan
comment:
  Merge [/src/vinfo/1958db4493461b3a54217a6a45f2730287107860|1958db4493] and [/src/vinfo/26cd015c0ee1c18dd37f11b47ce35cfa320b3514|26cd015c0e].


type: ci
user: dan
comment:
  Fix a bug where a condition was incorrectly being compiled out when SQLITE_OMIT_VIRTUALTABLE was defined.


type: ci
user: dan
comment:
  If recursive-triggers are enabled, fire DELETE triggers if database rows are removed as a result of OR REPLACE conflict resolution.


type: t
user: anonymous
brief: New ticket [b2d64a52a0].
comment:
  New ticket [b2d64a52a0] <i>pkgIndex.tcl is being deleted by 'make clean' but it is not created by 'make'</i>.


type: t
user: drh
brief: Ticket [eaa105fe74]: 6 changes
comment:
  Ticket [eaa105fe74] <i>(...) WHERE [col] IN (val1) not reflected in xBestIndex</i> status still Open with 6 other changes


type: t
user: dan
brief: Ticket [eaa105fe74]: 1 change
comment:
  Ticket [eaa105fe74] <i>(...) WHERE [col] IN (val1) not reflected in xBestIndex</i> status still Open with 1 other change


type: t
user: anonymous
brief: New ticket [3350da7d35].
comment:
  New ticket [3350da7d35] <i>Error: malformed database schema - near &quot;VIRTUAL&quot;: syntax error</i>.


type: t
user: anonymous
brief: Ticket [3350da7d35]: 3 changes
comment:
  Ticket [3350da7d35] <i>Error: malformed database schema - near "VIRTUAL": syntax error</i> status still Open with 3 other changes


type: t
user: dan
brief: New ticket [29ab7be99f].
comment:
  New ticket [29ab7be99f] <i>Hitting NOT NULL constraint does not roll back statement transaction</i>.


type: t
user: dan
brief: Closed ticket [29ab7be99f].
comment:
  Closed ticket [29ab7be99f]: <i>Hitting NOT NULL constraint does not roll back statement transaction</i> plus 3 other changes


type: ci
user: drh
comment:
  Added SQLITE_OPEN_SHAREDCACHE and SQLITE_OPEN_PRIVATECACHE flags as
  possibilities to sqlite3_open_v2(), to override the global shared
  cache mode setting.  Ticket [9fd0bc36639c15]


type: t
user: drh
brief: Ticket [3350da7d35]: 1 change
comment:
  Ticket [3350da7d35] <i>Error: malformed database schema - near "VIRTUAL": syntax error</i> status still Open with 1 other change


type: t
user: drh
brief: Closed ticket [3350da7d35].
comment:
  Closed ticket [3350da7d35]: <i>Error: malformed database schema - near "VIRTUAL": syntax error</i> plus 2 other changes


type: t
user: drh
brief: Closed ticket [f76cabebfd].
comment:
  Closed ticket [f76cabebfd]: <i>xBestIndex/xFilter slight interface improvement</i> plus 3 other changes


type: ci
user: drh
comment:
  Update the README file to state that TCL is required in order to run
  the makefiles for SQLite.  Ticket [7d96113ff].


type: t
user: drh
brief: Fixed ticket [9fd0bc3663].
comment:
  Fixed ticket [9fd0bc3663]: <i>Add a new open flag to enable shared cache for a single db connection</i> plus 3 other changes


type: t
user: drh
brief: Closed ticket [4b81075908].
comment:
  Closed ticket [4b81075908]: <i>In mult-thread that have a problem of updata lost</i> plus 2 other changes


type: ci
user: dan
comment:
  Add some tests that involve BEFORE UPDATE or BEFORE DELETE triggers messing with the row being updated or deleted. SQLite behaviour in this scenario is undefined, so the tests just check that the behaviour is relatively sane and there are no crashes.


type: t
user: drh
brief: Fixed ticket [7d96113ff0].
comment:
  Fixed ticket [7d96113ff0]: <i>SQLite fails to build when TCL isn't installed</i> plus 2 other changes


type: ci
user: dan
comment:
  Trying to open a transaction in one thread and close it in another is a misuse with LinuxThreads. Doing so may cause memory and file-descriptors to be leaked. Update an assert() and some test cases to account for this.


type: t
user: drh
brief: Ticket [92bd6eaf04]: 3 changes
comment:
  Ticket [92bd6eaf04] <i>Suggestion to revise clean rule in main.mk.</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  Add assert() statement to verify that new mutexes are not allocated when
  the mutex subsystem is uninitialized.


type: ci
user: drh
comment:
  Make sure the threadsOverrideEachOthersLocks variable is only referenced by
  linux systems on a threadsafe compile.


type: t
user: anonymous
brief: New ticket [6e1086fb2c].
comment:
  New ticket [6e1086fb2c] <i>&quot;create table as select&quot; and &quot;pragma *_column_names&quot;</i>.


type: t
user: drh
brief: Ticket [6e1086fb2c]: 3 changes
comment:
  Ticket [6e1086fb2c] <i>"create table as select" and "pragma *_column_names"</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  Make sure the (unsupported) configure script in the source tree has
  execute permission prior to constructing a tarball.
  Ticket [65bbb65a47ce].


type: g
user: drh
comment:
  Edit [b084828a771ec40b]: Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2009-09-11 14:05:07.


type: t
user: anonymous
brief: New ticket [65bbb65a47].
comment:
  New ticket [65bbb65a47] <i>'configure' file without +x permission in sqlite-3.6.18.tar.gz tarball</i>.


type: t
user: drh
brief: Fixed ticket [65bbb65a47].
comment:
  Fixed ticket [65bbb65a47]: <i>'configure' file without +x permission in sqlite-3.6.18.tar.gz tarball</i> plus 3 other changes


type: ci
user: drh
comment:
  Make sure sufficient space is allocated for at least one VDBE cursor when
  autoincrement is used.  Ticket [a696379c1f088].


type: t
user: anonymous
brief: New ticket [ab7498f2f6].
comment:
  New ticket [ab7498f2f6] <i>54 seconds to sort two(2) rows only when LIKE operator is used in WHERE clause and the query also contains an order-by clause</i>.


type: t
user: drh
brief: Ticket [ab7498f2f6]: 4 changes
comment:
  Ticket [ab7498f2f6] <i>54 seconds to sort two(2) rows only when LIKE operator is used in WHERE clause and the query also contains an order-by clause</i> status still Open with 4 other changes


type: t
user: anonymous
brief: New ticket [8c743979c2].
comment:
  New ticket [8c743979c2] <i>SQLite version correction on LIKE operator + ORDER BY bug I reported earlier today</i>.


type: t
user: drh
brief: Tested ticket [8c743979c2].
comment:
  Tested ticket [8c743979c2]: <i>SQLite version correction on LIKE operator + ORDER BY bug I reported earlier today</i> plus 2 other changes


type: t
user: drh
brief: Closed ticket [8c743979c2].
comment:
  Closed ticket [8c743979c2]: <i>SQLite version correction on LIKE operator + ORDER BY bug I reported earlier today</i>


type: t
user: drh
brief: Ticket [ab7498f2f6]: 1 change
comment:
  Ticket [ab7498f2f6] <i>54 seconds to sort two(2) rows only when LIKE operator is used in WHERE clause and the query also contains an order-by clause</i> status still Open with 1 other change


type: t
user: anonymous
brief: New ticket [127c1c42ff].
comment:
  New ticket [127c1c42ff] <i>Build error &quot;C compiler cannot create executables&quot; on debian lenny host</i>.


type: t
user: anonymous
brief: Closed ticket [127c1c42ff].
comment:
  Closed ticket [127c1c42ff]: <i>Build error "C compiler cannot create executables" on debian lenny host</i> plus 3 other changes


type: t
user: anonymous
brief: Ticket [127c1c42ff]: 1 change
comment:
  Ticket [127c1c42ff] <i>Build error "C compiler cannot create executables" on debian lenny host</i> status still Closed with 1 other change


type: t
user: anonymous
brief: Open ticket [127c1c42ff].
comment:
  Open ticket [127c1c42ff]: <i>Build error "C compiler cannot create executables" on debian lenny host</i> plus 2 other changes


type: t
user: anonymous
brief: Ticket [127c1c42ff]: 1 change
comment:
  Ticket [127c1c42ff] <i>Build error "C compiler cannot create executables" on debian lenny host</i> status still Open with 1 other change


type: t
user: shane
brief: Fixed ticket [03b198a2fa].
comment:
  Fixed ticket [03b198a2fa]: <i>Getting several warnings when compiling in eVC++ 4</i> plus 3 other changes


type: t
user: drh
brief: Ticket [03b198a2fa]: 1 change
comment:
  Ticket [03b198a2fa] <i>Getting several warnings when compiling in eVC++ 4</i> status still Fixed with 1 other change


type: t
user: drh
brief: Ticket [a696379c1f]: 3 changes
comment:
  Ticket [a696379c1f] <i>Access violation error trying to insert into triggered view</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [a696379c1f]: 1 change
comment:
  Ticket [a696379c1f] <i>Access violation error trying to insert into triggered view</i> status still Open with 1 other change


type: ci
user: drh
comment:
  When coding a trigger, assume that the "oldmask" requires all columns until
  we know otherwise.  That pessimistic assumption assures that all necessary
  parameters are available on a cascading delete trigger.
  Ticket [e25d9ea771f]


type: t
user: drh
brief: Fixed ticket [a696379c1f].
comment:
  Fixed ticket [a696379c1f]: <i>Access violation error trying to insert into triggered view</i> plus 3 other changes


type: t
user: drh
brief: Closed ticket [127c1c42ff].
comment:
  Closed ticket [127c1c42ff]: <i>Build error "C compiler cannot create executables" on debian lenny host</i> plus 1 other change


type: t
user: anonymous
brief: Ticket [832b2f3e6e]: 3 changes
comment:
  Ticket [832b2f3e6e] <i>integrity_check error after backup restore</i> status still Open with 3 other changes


type: t
user: anonymous
brief: Ticket [832b2f3e6e]: 1 change
comment:
  Ticket [832b2f3e6e] <i>integrity_check error after backup restore</i> status still Open with 1 other change


type: t
user: anonymous
brief: New ticket [f1c2a689c6].
comment:
  New ticket [f1c2a689c6] <i>configure script ignores ``--with-tcl'' option when tclsh8.4 is installed.</i>.


type: t
user: drh
brief: Ticket [e25d9ea771]: 3 changes
comment:
  Ticket [e25d9ea771] <i>recursive_triggers=1 failed to work for delete trigger</i> status still Open with 3 other changes


type: t
user: anonymous
brief: Ticket [1ff6d29030]: 3 changes
comment:
  Ticket [1ff6d29030] <i>Compile fails with SQLITE_OMIT_TRIGGER</i> status still Open with 3 other changes


type: t
user: anonymous
brief: Ticket [f76cabebfd]: 1 change
comment:
  Ticket [f76cabebfd] <i>xBestIndex/xFilter slight interface improvement</i> status still Closed with 1 other change


type: t
user: anonymous
brief: Ticket [15e11a2c87]: 3 changes
comment:
  Ticket [15e11a2c87] <i>IfEmpty(a,b) : a function like IfNull(a,b) but for empty strings</i> status still Open with 3 other changes


type: t
user: anonymous
brief: Ticket [56928bd084]: 3 changes
comment:
  Ticket [56928bd084] <i>Cannot compile with SQLITE_OMIT_UTF16 and SQLITE_ENABLE_STAT2</i> status still Open with 3 other changes


type: t
user: anonymous
brief: New ticket [aad47726e9].
comment:
  New ticket [aad47726e9] <i>Generator of sqlite3UpperToLower[] and sqlite3CtypeMap[] for single lang</i>.


type: t
user: drh
brief: Ticket [56928bd084]: 1 change
comment:
  Ticket [56928bd084] <i>Cannot compile with SQLITE_OMIT_UTF16 and SQLITE_ENABLE_STAT2</i> status still Open with 1 other change


type: ci
user: dan
comment:
  Fix compilation with OMIT_TRIGGER defined. Ticket [1ff6d29030e9757d052af0f394e56bea96b8b59b|1ff6d29030].


type: t
user: anonymous
brief: Ticket [1ff6d29030]: 4 changes
comment:
  Ticket [1ff6d29030] <i>Compile fails with SQLITE_OMIT_TRIGGER</i> status still Open with 4 other changes


type: t
user: drh
brief: Closed ticket [c472df6c1c].
comment:
  Closed ticket [c472df6c1c]: <i>Segmentation fault by instead of insert triggers</i> plus 3 other changes


type: t
user: anonymous
brief: Ticket [c472df6c1c]: 1 change
comment:
  Ticket [c472df6c1c] <i>Segmentation fault by instead of insert triggers</i> status still Closed with 1 other change


type: ci
user: dan
comment:
  Fix compilation with both OMIT_UTF16 and ENABLE_STAT2 defined. Ticket [56928bd084ea530eb8a0b3ebe5d2d9033fb1de7f|56928bd084].


type: t
user: dan
brief: Closed ticket [56928bd084].
comment:
  Closed ticket [56928bd084]: <i>Cannot compile with SQLITE_OMIT_UTF16 and SQLITE_ENABLE_STAT2</i> plus 2 other changes


type: t
user: anonymous
brief: Ticket [702bbe755b]: 3 changes
comment:
  Ticket [702bbe755b] <i>Invalid VDBE program built if ORDER BY used</i> status still Open with 3 other changes


type: t
user: anonymous
brief: Ticket [702bbe755b]: 1 change
comment:
  Ticket [702bbe755b] <i>Invalid VDBE program built if ORDER BY used</i> status still Open with 1 other change


type: ci
user: drh
comment:
  Factor the UMINUS and UPLUS tokens out of the parser so that the parser
  tables can go back to using 8-bit values instead of 16-bit values.


type: ci
user: drh
comment:
  Generalize the IS and IS NOT operators so that their right-hand side can be
  an arbitrary expression and not simple the constant NULL.  They work like
  = and <> except that NULL values compare equal to one another an unequal to
  everything else.


type: ci
user: drh
comment:
  Do not run ON UPDATE actions of a foreign key constraint unless at least one
  column value really does change.


type: ci
user: dan
comment:
  Add missing comments to fkey.c. Also, change the terminology used for comments and names in fkey.c from "referenced/referencing" to "parent/child". This is arguably less correct, but is easier to follow.


type: ci
user: drh
comment:
  Change the version number to 3.6.19.  Fix a couple of incorrect testcase()
  macros associated with the new IS and IS NOT operators in expr.c.


type: ci
user: drh
comment:
  Modify the ".dump" command on the CLI so that it always issues a
  PRAGMA foreign_keys=OFF at the top of the output.


type: ci
user: dan
comment:
  Do not check immediate foreign key constraints until the end of the statement. This matches the postgres behaviour.


type: ci
user: drh
comment:
  Make sure a transaction is available for rollback whenever a REDUCE conflict
  resolution occurs and there is the possibility to ABORT.
  Ticket [4a03edc4c8c]


type: ci
user: dan
comment:
  Remove unused parameter from sqlite3CodeRowTrigger(). Fix header comments for this function and CodeRowTriggerDirect().


type: ci
user: dan
comment:
  Use sqlite3FkOldmask() in delete.c instead of assuming that foreign key constraints always require all columns of the deleted row to be stored in registers.


type: ci
user: dan
comment:
  Ensure foreign key related processing takes place when rows are deleted from the database by REPLACE conflict handling.


type: ci
user: dan
comment:
  Fix a bug in the code for REPLACE conflict handling on IPK columns when there are no indexes on the table. Triggers and foreign key processing were being bypassed.


type: ci
user: dan
comment:
  Fixes and test cases to make sure the affinity and collation sequence associated with the parent key is used when comparing it with a child key value.


type: ci
user: dan
comment:
  Prevent ALTER TABLE from being used to add a column with a REFERENCES clause and a non-NULL default value while foreign key support is enabled.


type: t
user: drh
brief: Fixed ticket [4a03edc4c8].
comment:
  Fixed ticket [4a03edc4c8]: <i>Index corruption following aggressive use of ON CONFLICT clause.</i> plus 3 other changes


type: t
user: anonymous
brief: New ticket [3338b3fa19].
comment:
  New ticket [3338b3fa19] <i>ambiguous column name when using multiple JOIN USING clauses and WHERE clause</i>.


type: t
user: drh
brief: Ticket [3338b3fa19]: 3 changes
comment:
  Ticket [3338b3fa19] <i>ambiguous column name when using multiple JOIN USING clauses and WHERE clause</i> status still Open with 3 other changes


type: t
user: anonymous
brief: Ticket [860d129c15]: 3 changes
comment:
  Ticket [860d129c15] <i>builds with sqlite 3.6.18 depends on tchsh</i> status still Open with 3 other changes


type: ci
user: dan
comment:
  Avoid checking if an insert or delete has "fixed" an outstanding FK constraint violation if the constraint counter indicates that the database contains no such violations.


type: ci
user: dan
comment:
  When ALTER TABLE RENAME TO is used to change the name of a table that is the parent table of a foreign key constraint, modify that foreign key constraint to use the new table name.


type: t
user: anonymous
brief: New ticket [d77ffcd7a5].
comment:
  New ticket [d77ffcd7a5] <i>Memory leak on failing INSERT statements on tables with UNIQUE INDEX</i>.


type: t
user: drh
brief: Ticket [d77ffcd7a5]: 3 changes
comment:
  Ticket [d77ffcd7a5] <i>Memory leak on failing INSERT statements on tables with UNIQUE INDEX</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [d77ffcd7a5]: 4 changes
comment:
  Ticket [d77ffcd7a5] <i>Memory leak on failing INSERT statements on tables with UNIQUE INDEX</i> status still Open with 4 other changes


type: t
user: anonymous
brief: Ticket [d77ffcd7a5]: 1 change
comment:
  Ticket [d77ffcd7a5] <i>Memory leak on failing INSERT statements on tables with UNIQUE INDEX</i> status still Open with 1 other change


type: t
user: drh
brief: Closed ticket [d77ffcd7a5].
comment:
  Closed ticket [d77ffcd7a5]: <i>Memory leak on failing INSERT statements on tables with UNIQUE INDEX</i> plus 2 other changes


type: t
user: drh
brief: Closed ticket [cff1a52937].
comment:
  Closed ticket [cff1a52937]: <i>sqlite3_get_table() returns wrong result when using where clause</i> plus 3 other changes


type: ci
user: dan
comment:
  Fix the DROP TABLE command so that it cannot be used to bypass foreign key constraints (if foreign key support is enabled).


type: t
user: rogerb
brief: Ticket [eb620916be]: 3 changes
comment:
  Ticket [eb620916be] <i>Shell doesn't print header if multiple statements on one line</i> status still Open with 3 other changes


type: ci
user: dan
comment:
  Check that a unique index uses the default collation sequences for each column before using it as part of a foreign key constraint operation.


type: t
user: ralfjunker
brief: Ticket [668fe22637]: 3 changes
comment:
  Ticket [668fe22637] <i>pragma table_info doesn't accept database names</i> status still Open with 3 other changes


type: ci
user: dan
comment:
  Use the affinity and collation sequence associated with the parent key when finding child table rows to apply a foreign key action to.


type: t
user: rogerb
brief: Closed ticket [668fe22637].
comment:
  Closed ticket [668fe22637]: <i>pragma table_info doesn't accept database names</i> plus 2 other changes


type: t
user: rogerb
brief: New ticket [e123bd2242].
comment:
  New ticket [e123bd2242] <i>[POSIX] File handles aren't always immediately released on sqlite3_close</i>.


type: t
user: rogerb
brief: Ticket [e063139eb3]: 3 changes
comment:
  Ticket [e063139eb3] <i>Download .zip excludes shell but .tar includes it</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [e123bd2242]: 3 changes
comment:
  Ticket [e123bd2242] <i>[POSIX] File handles aren't always immediately released on sqlite3_close</i> status still Open with 3 other changes


type: t
user: rogerb
brief: Ticket [f12a9eeedc]: 3 changes
comment:
  Ticket [f12a9eeedc] <i>Shell command argument parsing is lax</i> status still Open with 3 other changes


type: t
user: rogerb
brief: Ticket [e063139eb3]: 1 change
comment:
  Ticket [e063139eb3] <i>Download .zip excludes shell but .tar includes it</i> status still Open with 1 other change


type: ci
user: dan
comment:
  If an update does not modify any child or parent key columns, omit foreign key processing for the statement.


type: t
user: rogerb
brief: Ticket [19b44e3575]: 3 changes
comment:
  Ticket [19b44e3575] <i>sqlite3_bind_text inconsistent with NULL pointers, zero length etc</i> status still Open with 3 other changes


type: t
user: rogerb
brief: Ticket [2fd50fa665]: 4 changes
comment:
  Ticket [2fd50fa665] <i>cygwin-1.7 issues: winFullPathname and tempname</i> status still Open with 4 other changes


type: ci
user: dan
comment:
  Add a test to check that the incrblob API cannot be used to write to an IPK column. Also a comment to explain why the incrblob code does not need to check if a column is part of a parent key before writing to it.


type: ci
user: dan
comment:
  When inserting a row into a child table, invoke the authorization callback to request permission to read the parent key columns.


type: ci
user: dan
comment:
  Handle an SQLITE_IGNORE returned when requesting authorization to read parent key columns by pretending the parent key columns contain NULL values.


type: t
user: rogerb
brief: Ticket [4776dee07a]: 3 changes
comment:
  Ticket [4776dee07a] <i>Incorrect documentation about overriding builtin functions</i> status still Open with 3 other changes


type: t
user: rogerb
brief: Ticket [4776dee07a]: 2 changes
comment:
  Ticket [4776dee07a] <i>Documentation and code about registering functions</i> status still Open with 2 other changes


type: t
user: rogerb
brief: Ticket [6da68f691b]: 3 changes
comment:
  Ticket [6da68f691b] <i>tables says you provide a like pattern but it adds % in code</i> status still Open with 3 other changes


type: t
user: rogerb
brief: Ticket [0322cd49c0]: 3 changes
comment:
  Ticket [0322cd49c0] <i>create_function_v2 that takes destructor</i> status still Open with 3 other changes


type: ci
user: dan
comment:
  Update header file comments describing the sqlite3_changes and sqlite3_total_changes functions to describe how changes made by foreign key actions are handled.


type: t
user: rogerb
brief: Ticket [c25aab7e7e]: 2 changes
comment:
  Ticket [c25aab7e7e] <i>The &quot;.import&quot; command does not parse CSV correctly.</i> status still Open with 2 other changes


type: ci
user: dan
comment:
  Update the header comment for sqlite3_blob_open to note that it is not possible to write to a column that is indexed, part of a primary key or, if foreign key support is enabled, part of a foreign key.


type: ci
user: drh
comment:
  Use memcpy() rather than structure assignment so that memcmp() can later
  be used for comparison.  Ticket [8550ecca70]


type: ci
user: drh
comment:
  Fix a segfault that can occur following an OOM fault while renaming a
  table holding foreign key constraints.


type: t
user: drh
brief: Fixed ticket [8550ecca70].
comment:
  Fixed ticket [8550ecca70]: <i>findLockInfo uses memcmp on non-zeroed, = assigned struct</i> plus 3 other changes


type: t
user: rogerb
brief: Ticket [23b2128201]: 3 changes
comment:
  Ticket [23b2128201] <i>Uninformative error message on check constraint failure</i> status still Open with 3 other changes


type: t
user: anonymous
brief: Ticket [23b2128201]: 1 change
comment:
  Ticket [23b2128201] <i>Uninformative error message on check constraint failure</i> status still Open with 1 other change


type: t
user: drh
brief: Ticket [ebde3f66fc]: 3 changes
comment:
  Ticket [ebde3f66fc] <i>Shared cache has different busy behaviour than non-shared</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  Update requirement text for sqlite3_open_blob().  Update evidence comment
  in e_fkey.test to conform to the latest requirement phrasing.


type: t
user: rogerb
brief: Ticket [ba7fdb568d]: 3 changes
comment:
  Ticket [ba7fdb568d] <i>Page size should auto default to file system block size</i> status still Open with 3 other changes


type: t
user: rogerb
brief: New ticket [ee19e690ec].
comment:
  New ticket [ee19e690ec] <i>If shell is interrupted while dumping it still produces commit (and invalid dump)</i>.


type: ci
user: drh
comment:
  When processing FK constraints on changes to parent tables, make sure the
  names of child tables appear correctly in the output of EXPLAIN QUERY PLAN.


type: ci
user: drh
comment:
  When a write transaction fails to being because the database is read-only,
  fail right away.  Do not give the error code an opportunity to be
  overwritten with SQLITE_OK.  Ticket [5ee23731f15].


type: t
user: dan
brief: New ticket [5ee23731f1].
comment:
  New ticket [5ee23731f1] <i>assert() failure (or invalid error code) caused by opening statement transaction on read-only database with active read statements</i>.


type: ci
user: drh
comment:
  Update the TCL wrapper to provide a non-NULL objProc pointer to the
  Tcl_NRCreateCommand() interface.  The TCL gurus say this is needed to
  support legacy TCL extensions.


type: t
user: drh
brief: Fixed ticket [5ee23731f1].
comment:
  Fixed ticket [5ee23731f1]: <i>assert() failure (or invalid error code) caused by opening statement transaction on read-only database with active read statements</i> plus 3 other changes


type: t
user: anonymous
brief: Ticket [c25aab7e7e]: 1 change
comment:
  Ticket [c25aab7e7e] <i>The &quot;.import&quot; command does not parse CSV correctly.</i> status still Open with 1 other change


type: g
user: drh
comment:
  Edit [c1d499afc50d54b3]: Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2009-10-14 11:33:55. Add tag "release".


type: g
user: drh
comment:
  Edit [ff691a6b2a302fe7]: Change background color to "#ffc0d0". Timestamp 2009-06-27 14:10:30. Add tag "release".


type: g
user: drh
comment:
  Edit [aff34826aa4667d2]: Change background color to "#ffc0d0". Timestamp 2009-06-15 03:28:58. Add tag "release".


type: g
user: drh
comment:
  Edit [469ad1ded35f5ff8]: Change background color to "#ffc0ff". Timestamp 2009-05-07 02:26:08. Add tag "release".


type: g
user: drh
comment:
  Edit [982cc7f4e7e2d8ab]: Change background color to "#ffc0d0". Timestamp 2009-04-13 09:29:05. Add tag "release".


type: g
user: drh
comment:
  Edit [0db862a23aa4aae9]: Change background color to "#ffc0d0". Timestamp 2009-03-31 13:16:56. Add tag "release".


type: g
user: drh
comment:
  Edit [6abd630c8703ed09]: Change background color to "#ffc0d0". Timestamp 2009-02-18 00:00:04. Add tag "release".


type: g
user: drh
comment:
  Edit [21b720cc9b9f88b8]: Change background color to "#ffc0d0". Timestamp 2009-01-15 17:04:24. Add tag "release".


type: g
user: drh
comment:
  Edit [b6ce8199a9286eb2]: Change background color to "#ffc0d0". Timestamp 2009-01-14 04:09:36. Add tag "release".


type: g
user: drh
comment:
  Edit [8ca0b7c13620c8e2]: Change background color to "#ffc0d0". Timestamp 2009-01-12 15:46:57. Add tag "release".


type: g
user: drh
comment:
  Edit [f4f40370fb83d677]: Change background color to "#ffc0d0". Timestamp 2008-12-16 18:15:59. Add tag "release".


type: g
user: drh
comment:
  Edit [01a6e2820af0729f]: Change background color to "#ffc0d0". Timestamp 2008-11-19 21:03:38. Add tag "release".


type: g
user: drh
comment:
  Edit [369f74983bb1b6a6]: Change background color to "#ffc0d0". Timestamp 2008-11-12 15:38:53. Add tag "release".


type: g
user: drh
comment:
  Edit [cd73cffab39d8039]: Change background color to "#ffc0d0". Timestamp 2008-10-15 11:59:24. Add tag "release".


type: g
user: drh
comment:
  Edit [1634fd223d65a6ad]: Change background color to "#ffc0d0". Timestamp 2008-09-22 10:44:32. Add tag "release".


type: g
user: drh
comment:
  Edit [88c51b9f1579707a]: Change background color to "#ffc0d0". Timestamp 2008-08-30 16:34:19. Add tag "release".


type: g
user: drh
comment:
  Edit [65ab777fd0a29ca9]: Change background color to "#ffc0d0". Timestamp 2008-08-06 10:50:00. Add tag "release".


type: g
user: drh
comment:
  Edit [1841aee6045b00cf]: Change background color to "#ffc0d0". Timestamp 2008-07-16 14:44:40. Add tag "release".


type: t
user: drh
brief: Ticket [f777251dc7]: 3 changes
comment:
  Ticket [f777251dc7] <i>Assertion fault following ROLLBACK with running queries</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [f777251dc7]: 1 change
comment:
  Ticket [f777251dc7] <i>Assertion fault following ROLLBACK with running queries</i> status still Open with 1 other change


type: ci
bgcolor: #f0ffc0
user: drh
ecomment:
  When a forced rollback occurs, cause all active statements on the same
  database connection to halt immediately with an SQLITE_ABORT error code.
  This is a partial fix to ticket [f777251dc7].

comment:
  When a forced rollback occurs, cause all active statements on the same
  database connection to halt immediately with an SQLITE_ABORT error code.
  This is a partial fix to ticket [f777251dc7].


type: g
user: drh
comment:
  Edit [9bd6f3d8864d422f]: Change branch background color to "#f0ffc0". Move to branch [/timeline?r=experimental&nd&dp=9bd6f3d8864d422f | experimental]. Timestamp 2009-10-15 18:35:39.


type: g
user: drh
comment:
  Edit [f256bc0796ca8bd4]: Change branch background color to "#f0ffc0". Marked "Closed". Edit check-in comment. Timestamp 2009-10-15 23:03:11. Add tag "experimental".


type: t
user: drh
brief: Fixed ticket [f777251dc7].
comment:
  Fixed ticket [f777251dc7]: <i>Assertion fault following ROLLBACK with running queries</i> plus 3 other changes


type: ci
user: drh
comment:
  Make sure the target register is allocated before adding the bogus
  OP_Variable opcode in isLikeOrGlob().  Bugfix for the new 
  sqlite3_reoptimize() logic.


type: t
user: rogerb
brief: Ticket [4d5c039d12]: 3 changes
comment:
  Ticket [4d5c039d12] <i>Truncated database not detected well</i> status still Open with 3 other changes


type: t
user: rogerb
brief: Ticket [8d510499cc]: 3 changes
comment:
  Ticket [8d510499cc] <i>Repreparation errors are always returned as SQLITE_SCHEMA</i> status still Open with 3 other changes


type: t
user: rogerb
brief: Ticket [eb620916be]: 1 change
comment:
  Ticket [eb620916be] <i>Shell doesn't print header if multiple statements on one line</i> status still Open with 1 other change


type: ci
user: dan
comment:
  When generating WHERE clause terms internally for NATURAL and USING joins, identify the table by its position in the FROM list, not by its name or alias. Fix for [b73fb0bd64].


type: t
user: dan
brief: Closed ticket [94c04eaadb].
comment:
  Closed ticket [94c04eaadb]: <i>Crash in asyncRead() with large (>2GB) database file</i> plus 2 other changes


type: t
user: dan
brief: Ticket [897b96d49d]: 3 changes
comment:
  Ticket [897b96d49d] <i>SQLITE_CANTOPEN when using journal_mode=persist and async IO</i> status still Open with 3 other changes


type: t
user: dan
brief: Deferred ticket [897b96d49d].
comment:
  Deferred ticket [897b96d49d]: <i>SQLITE_CANTOPEN when using journal_mode=persist and async IO</i> plus 1 other change


type: ci
user: dan
comment:
  Remove the sqlite3_reoptimize() API. The same functionality is now provided automatically to queries prepared using prepare_v2().


type: ci
user: dan
comment:
  Fix an assert() that may fail if sqlite3_step() is called on a statement after a previous call has already returned SQLITE_SCHEMA.


type: ci
user: drh
comment:
  Remove an unreachable condition in the WHERE clause processing of bound
  parameters and replace it with an assert(), for test coverage.


type: ci
user: dan
comment:
  Fix cases where modifying bound variables using the clear_bindings() or transfer_bindings() APIs can invalidate a query plan.


type: t
user: rogerb
brief: Ticket [8d510499cc]: 1 change
comment:
  Ticket [8d510499cc] <i>Repreparation errors are always returned as SQLITE_SCHEMA</i> status still Open with 1 other change


type: t
user: drh
brief: Closed ticket [8d510499cc].
comment:
  Closed ticket [8d510499cc]: <i>Repreparation errors are always returned as SQLITE_SCHEMA</i> plus 2 other changes


type: t
user: drh
brief: Closed ticket [f80d443a3b].
comment:
  Closed ticket [f80d443a3b]: <i>pragma cache size doesn report actual size (min is 10)</i> plus 4 other changes


type: t
user: drh
brief: Ticket [4d5c039d12]: 2 changes
comment:
  Ticket [4d5c039d12] <i>Truncated database not detected well</i> status still Open with 2 other changes


type: ci
user: drh
comment:
  Fix the VACUUM command so that when the MAIN and TEMP databases have
  identically named tables, content from the TEMP database does not
  accidently overwrite MAIN database content.
  Ticket [d82e3f3721296e905d7e8c9dee718f71a826b0eb].
  Note that this bug could potentially lead to database corruption.


type: ci
user: drh
comment:
  Clarify the use of sqlite3_shutdown().  
  Ticket [f9af981dd2a2].
  Comment changes only - no changes to code.


type: t
user: drh
brief: Fixed ticket [d82e3f3721].
comment:
  Fixed ticket [d82e3f3721]: <i>VACUUM corrupts database when MAIN and TEMP table names overlap.</i> plus 5 other changes


type: ci
user: shane
ecomment:
  For Windows VFS, modified xGetLastError() to call FormatMessage() 
  with the FORMAT_MESSAGE_IGNORE_INSERTS option.  Additionally updated
  to ensure strings are returned as UTF8.  Ticket [39c85e8a4e].

comment:
  For Windows VFS, modified xGetLastError() to call FormatMessage() 
  with the FORMAT_MESSAGE_IGNORE_INSERTS option.  Additionally updated
  to ensure strings are returned as UTF8.  Ticket 39c85e8a4e.


type: t
user: drh
brief: Fixed ticket [f9af981dd2].
comment:
  Fixed ticket [f9af981dd2]: <i>sqlite3_shutdown documentation needs to mention danger</i> plus 3 other changes


type: t
user: rogerb
brief: Ticket [8440a8e22f]: 1 change
comment:
  Ticket [8440a8e22f] <i>LENGTH & QUOTE stop at first zero</i> status still Closed with 1 other change


type: t
user: rogerb
brief: Ticket [f80d443a3b]: 1 change
comment:
  Ticket [f80d443a3b] <i>pragma cache size doesn report actual size (min is 10)</i> status still Closed with 1 other change


type: ci
user: shane
ecomment:
  For Windows version of shell, add support for .timer command
  using the GetProcessTimes() API if available (in the same way
  getrusage() is used on UNIX.) Ticket [89668ca167].

comment:
  For Windows version of shell, add support for .timer command
  using the GetProcessTimes() API if available (in the same way
  getrusage() is used on UNIX.) Ticket 89668ca167.


type: ci
user: shane
ecomment:
  For the shell, changed the output of the errors on lines 2910 and 2914 to goto
  stderr.  I left the timer values going to stdout as all of the other interactive
  shell commands (startup banner, help, etc.) go to stdout and I felt this was more
  consistent.  Ticket [43db771bb2].

comment:
  For the shell, changed the output of the errors on lines 2910 and 2914 to goto
  stderr.  I left the timer values going to stdout as all of the other interactive
  shell commands (startup banner, help, etc.) go to stdout and I felt this was more
  consistent.  Ticket 43db771bb2.


type: t
user: shane
brief: Fixed ticket [43db771bb2].
comment:
  Fixed ticket [43db771bb2]: <i>Sqlite shell prints some error messages to stdout</i> plus 4 other changes


type: t
user: shane
brief: Ticket [89668ca167]: 2 changes
comment:
  Ticket [89668ca167] <i>shell can support .timer on Windows</i> status still Fixed with 2 other changes


type: t
user: shane
brief: Ticket [39c85e8a4e]: 2 changes
comment:
  Ticket [39c85e8a4e] <i>FormatMessage incorrectly used (Windows VFS)</i> status still Fixed with 2 other changes


type: ci
user: shane
comment:
  Modified shell to call output_html_string() for header values in .mode html.
  Updated output_html_string() to support the 5 basic HTML entities (<,>,&,',").
  Ticket [dc3a6e5b31].


type: ci
user: drh
comment:
  Mention the sqlite3_column_count() function on the same documentation page
  with all of the other sqlite3_column... interfaces.


type: ci
user: shane
ecomment:
  In shell, in shell_exec() logic, use type info if available when
  outputting in "insert" mode for other types in addition to blobs.
  Changed shell_exec() to use sqlite_prepare_v2().  Ticket [72adc99de9] and [7b61b6c6ce].

comment:
  In shell, in shell_exec() logic, use type info if available when
  outputting in "insert" mode for other types in addition to blobs.
  Changed shell_exec() to use sqlite_prepare_v2().  Ticket [72adc99de9].


type: t
user: shane
brief: Review ticket [72adc99de9].
comment:
  Review ticket [72adc99de9]: <i>shell mode insert doesn't output blobs as blobs</i> plus 3 other changes


type: t
user: shane
brief: Ticket [72adc99de9]: 1 change
comment:
  Ticket [72adc99de9] <i>shell mode insert doesn't output blobs as blobs</i> status still Review with 1 other change


type: t
user: shane
brief: Fixed ticket [7b61b6c6ce].
comment:
  Fixed ticket [7b61b6c6ce]: <i>insert mode is incorrectly converting text to numbers</i> plus 4 other changes


type: ci
user: drh
comment:
  Merge the MD5 checksum logic into the TCL interface.  This facilitates building
  a tclsh that contains both SQLite and MD5.  The plan is to use this
  augmented tclsh to help build the documentation.


type: ci
user: shane
comment:
  In shell, reworked .header and .echo handling.   
  Updated shell_exec() to (really) handle multiple statements.
  Tickets [72adc99de9], [7b61b6c6ce], and [eb620916be].


type: ci
user: shane
comment:
  In shell, modified "import" handling to ensure error code returned correctly on exit.
  Ticket [bd770b2c52].


type: t
user: shane
brief: Fixed ticket [eb620916be].
comment:
  Fixed ticket [eb620916be]: <i>Shell doesn't print header if multiple statements on one line</i> plus 3 other changes


type: t
user: shane
brief: Ticket [72adc99de9]: 1 change
comment:
  Ticket [72adc99de9] <i>shell mode insert doesn't output blobs as blobs</i> status still Fixed with 1 other change


type: t
user: shane
brief: Ticket [7b61b6c6ce]: 1 change
comment:
  Ticket [7b61b6c6ce] <i>insert mode is incorrectly converting text to numbers</i> status still Fixed with 1 other change


type: ci
user: shane
comment:
  In shell, ensure that do_meta_command() returns consistent error values.  
  Adjusted the text of some error message to be more consistent.
  Ticket [beb2dd69ad].


type: t
user: shane
brief: Fixed ticket [bd770b2c52].
comment:
  Fixed ticket [bd770b2c52]: <i>shell doesn't return error exit code on import errors</i> plus 3 other changes


type: ci
user: drh
comment:
  Make sure that UTF16 to UTF8 conversions to not read past the end of the
  UTF16 input buffer if the last two bytes of the UTF16 happen to be the
  first half of a surrogate pair.  Ticket [3fe897352e]


type: t
user: shane
brief: Open ticket [f80d443a3b].
comment:
  Open ticket [f80d443a3b]: <i>pragma cache size doesn report actual size (min is 10)</i> plus 1 other change


type: t
user: drh
brief: Closed ticket [f80d443a3b].
comment:
  Closed ticket [f80d443a3b]: <i>pragma cache size doesn report actual size (min is 10)</i> plus 1 other change


type: t
user: drh
brief: Ticket [3fe897352e]: 3 changes
comment:
  Ticket [3fe897352e] <i>Malformed UTF16 leads to a 2-byte buffer overread</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  Check-in [19064d7cea] broke the pTail return on sqlite3_prepare16() when
  the SQL contained surrogates. This check-in restores correct function.
  Part of ticket [3fe897352e].


type: t
user: drh
brief: Fixed ticket [3fe897352e].
comment:
  Fixed ticket [3fe897352e]: <i>Malformed UTF16 leads to a 2-byte buffer overread</i> plus 1 other change


type: t
user: rogerb
brief: Ticket [4c9223e34e]: 3 changes
comment:
  Ticket [4c9223e34e] <i>Vacuum fails within transaction but also rolls it back</i> status still Open with 3 other changes


type: t
user: shane
brief: Ticket [3fe897352e]: 1 change
comment:
  Ticket [3fe897352e] <i>Malformed UTF16 leads to a 2-byte buffer overread</i> status still Fixed with 1 other change


type: ci
user: shane
comment:
  In shell, changed ".tables" command to not add '%' to specified pattern.  This is consistent
  with other commands that take a LIKE pattern (.dump, .schema, .indices).
  Updated internal help to better describe LIKE pattern usage.
  Fixed a few more inconsistencies in error messages. Ticket [6da68f691b].


type: ci
user: shane
comment:
  In shell, modified to not print informational messages during startup while in "batch mode".
  Ticket [2cb66577f6].


type: t
user: shane
brief: Fixed ticket [6da68f691b].
comment:
  Fixed ticket [6da68f691b]: <i>tables says you provide a like pattern but it adds % in code</i> plus 3 other changes


type: ci
user: drh
comment:
  Another attempt at getting the pTail pointer computations correct for
  sqlite3_prepare16().  Ticket [3fe897352e].


type: t
user: shane
brief: Fixed ticket [2cb66577f6].
comment:
  Fixed ticket [2cb66577f6]: <i>Diagnostic message is unintentionally printed in batch mode</i> plus 3 other changes


type: t
user: rogerb
brief: New ticket [0841d0f524].
comment:
  New ticket [0841d0f524] <i>Exclusive transactions do not work if same database multiply attached</i>.


type: t
user: rogerb
brief: Ticket [d82e3f3721]: 1 change
comment:
  Ticket [d82e3f3721] <i>VACUUM corrupts database when MAIN and TEMP table names overlap.</i> status still Fixed with 1 other change


type: ci
user: drh
comment:
  Reduce the memory required by prepared statements that use the IN operator 
  with a list on the right and an INTEGER PRIMARY KEY on the left.


type: t
user: rogerb
brief: Ticket [293860ac26]: 3 changes
comment:
  Ticket [293860ac26] <i>Allow triggers to reference other databases</i> status still Open with 3 other changes


type: t
user: rogerb
brief: Closed ticket [aad47726e9].
comment:
  Closed ticket [aad47726e9]: <i>Generator of sqlite3UpperToLower[] and sqlite3CtypeMap[] for single lang</i> plus 3 other changes


type: t
user: drh
brief: Ticket [aad47726e9]: 1 change
comment:
  Ticket [aad47726e9] <i>Generator of sqlite3UpperToLower&#91;&#93; and sqlite3CtypeMap&#91;&#93; for single lang</i> status still Closed with 1 other change


type: ci
user: drh
comment:
  Avoid storing the result register for EXISTS and SELECT in any field of
  the Expr object - simply return the register number as the return value
  of the function that codes those expressions.


type: ci
bgcolor: #fff0c0
user: drh
ecomment:
  Fix a 16-bit integer overflow that might occur in statements that use both 
  an EXISTS clause and IN operator with a RHS holding in excess of 32K entries.

comment:
  Fix a 16-bit integer overflow that might occur in statements that use both 
  an EXISTS clause and IN operator with a RHS holding in excess of 32K entries.


type: g
user: drh
comment:
  Edit [65a1f1334d92873e]: Change branch background color to "#fff0c0". Edit check-in comment. Timestamp 2009-10-29 18:38:22.


type: ci
user: drh
comment:
  Fix compiler warnings.  Better comments on some variables associated with
  LIKE/GLOB processing in the query planner.


type: ci
user: drh
comment:
  Update the generator AWK script for opcodes.h so that it always generates
  opcode numbers in the same order and is not dependent on the hash order
  of opcode names within AWK.


type: ci
user: drh
comment:
  All SQLITE_MAX_VARIABLE_NUMBER to exceed 32767.  The sizes of some structures
  increase when the compile-time parameter is configured this way.


type: ci
user: drh
comment:
  Adjust the lemon implementation so that it always computes the same PDA
  regardless of qsort() implementation on the host platform.  In other words,
  make all sorts in lemon stable.


type: ci
user: drh
comment:
  Force all qsort() calls in mkkeywordhash.c to be stable so that we get
  predictable results on different platforms.


type: ci
user: drh
comment:
  Enhancements to lemon to generate more compact action tables and to avoid
  making array bounds tests that can never fail on action table calculations.


type: g
user: drh
comment:
  Edit [64989904d44556ee]: Change background color to "#ffc0d0". Timestamp 2007-08-13 20:31:01. Add tag "release".


type: ci
user: adam
ecomment: Customizations for OSX contributed by Apple.
comment:
  Merging in OSX customizations:

  A ext/sqlrr/sqlrr.[ch]
  -- add sql recording/replay support (very experimental extension -- pre alpha)

  M ext/rtree/rtree.c
  -- fix cast compiler warning

  M src/func.c
  -- substring backward compatiblity <rdar://problem/6778339> 

  M src/legacy.c
  -- replay recorder calls

  M src/main.c
  -- if SQLITE_ENABLE_AUTO_PROFILE, call sqlite3_profile when env(SQLITE_AUTO_PROFILE)   
  -- replay recorder calls

  M src/mem1.c
  -- use custom malloc zone on single core systems

  M src/os_unix.c
  -- hostid via gethostuuid
  -- read-only file system support for proxy locking
  -- improved handling of simulated shared lock on AFP/SMB on 64 bit systems
  -- disable whole-file-lock NFS file locking
  -- fix for downgrading from exclusive to shared lock on NFS
  -- proxy lock breaking & recreating local lock files
  -- support SQLITE_OPEN_AUTOPROXY flag
  -- only write 1st byte into new zero-length files if fs is DOS
  -- cache fs type info in unixFile struct
  -- force use of fsync() even if fdatasync() is available
  -- remove flock locking style support for SMB
  -- replace strcpy with strlcpy

  M src/prepare.c
  -- replay recorder calls

  M src/sqlite.h.in
  -- added SQLITE_OPEN_AUTOPROXY

  M src/sqliteInt.h
  -- include replay recorder header

  M src/vdbeapi.c
  -- checking for NULL statement for <rdar://6646331> 
  -- replay recorder calls


type: g
user: drh
comment:
  Edit [941a01eb868815f5]: Change branch background color to "#c0ffc0". Edit check-in comment. Timestamp 2009-11-03 22:34:36.


type: ci
user: drh
comment:
  Create a new datatype "ynVar" to hold "nVar" (number of variable) values.
  This is normally 16-bits can can be 32-bits if SQLITE_MAX_VARIABLE_NUMBER
  is large enough.


type: g
user: drh
comment:
  Edit [eb7a544fe49d1626]: Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2009-11-04 13:30:02.


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Fix a typo on the ynVar typedef that unfortunately caused 3.6.20 to be
  released with a "bug" that causes excess memory usage for Expr objects.
  This bug should be benign in the sense that the correct answer is still
  always obtained - it only uses more more memory than is really necessary.


type: ci
bgcolor: #c0c0c0
user: drh
ecomment:
  Do not limit the trigger recursion depth when SQLITE_SMALL_STACK is defined
  since trigger recursion uses the heap, not the stack.

comment:
  Do not limit the trigger recursion depth when SQLITE_SMALL_STACK is defined
  since trigger recursion uses the heap, not the stack.


type: ci
user: drh
comment:
  Recover an ophaned branch that resulted from some ill-advised "shunning".
  This check-in should be identical to [bd443f39a9] except that it should
  be on the trunk.


type: g
user: drh
comment:
  Edit [590d4ac1ee0db824]: Change branch background color to "#c0c0c0". Move to branch [/timeline?r=shunning-error&nd&dp=590d4ac1ee0db824 | shunning-error]. Timestamp 2009-11-04 18:51:17.


type: ci
user: drh
comment:
  Fix the backup API so that a backup from an empty database to a non-empty
  database works.  Ticket [0bf974bdf9].  The only changes are in assert()
  statements.


type: t
user: drh
brief: Fixed ticket [0bf974bdf9].
comment:
  Fixed ticket [0bf974bdf9]: <i>backup api asserts with zero length source file</i> plus 5 other changes


type: t
user: rogerb
brief: New ticket [33fdaab1a0].
comment:
  New ticket [33fdaab1a0] <i>Need to cancel an integrity check in progress with sqlite3_interrupt</i>.


type: t
user: rogerb
brief: Ticket [33fdaab1a0]: 3 changes
comment:
  Ticket [33fdaab1a0] <i>Need to cancel an integrity check in progress with sqlite3_interrupt</i> status still Open with 3 other changes


type: t
user: shane
brief: Ticket [aeff892c57]: 3 changes
comment:
  Ticket [aeff892c57] <i>-batch mode not creating DB in CLI</i> status still Open with 3 other changes


type: t
user: shane
brief: Ticket [aeff892c57]: 1 change
comment:
  Ticket [aeff892c57] <i>-batch mode not creating DB in CLI</i> status still Fixed with 1 other change


type: ci
user: drh
comment:
  Generate VDBE code for the built-in COALESCE() and IFNULL() functions.  This
  allows unused arguments to never be evaluated, which is a performance win when
  the unused argument is a subquery.


type: t
user: rogerb
brief: Ticket [61d35ac210]: 3 changes
comment:
  Ticket [61d35ac210] <i>A way to tell if a journal should exist</i> status still Open with 3 other changes


type: ci
user: shaneh
comment:
  Modified CLI to raise an error when extra command line options are passed.  
  Added tests to verify correct handling, as well as other basic handling
  of command line options. Ticket [f5cb008a65].


type: ci
user: drh
comment:
  Tweaks to the SUBSTR() function to make it dramatically faster in the common
  case where the input string is large but the 2nd and 3rd arguments are small
  positive integers.


type: ci
user: drh
comment:
  Suppress excess OP_Null opcodes caused by binary IS or IS NOT operators 
  that are converted into unary ISNULL or NOTNULL operators.


type: ci
user: drh
comment:
  Suppress unnecessary OP_Noop instructions on when the right table of a 
  LEFT JOIN uses the index-only optimization.


type: ci
user: drh
comment:
  Factor out the IN operator code generation into a subroutine.  Use this
  subroutine to implement both logic and branching versions of the IN operator.


type: ci
user: drh
comment:
  Enhance the OP_Found and OP_NotFound opcodes so that they can accept an
  array of registers as an unpacked record in addition to a record built
  using OP_MakeRecord.  Use this to avoid OP_MakeRecord calls during IN
  expression processing.


type: ci
user: drh
ecomment:
  Changes to test_intarray.c so that it build with SQLITE_OMIT_VIRTUALTABLE.
  Added testcase() macros to expr.c.

comment:
  Changes to test_intarray.c so that it build with SQLITE_OMIT_VIRTUALTABLE.
  Added testcase() macros to expr.c.


type: ci
bgcolor: #f3f4f6
user: dan
comment:
  Start reworking fts3 code to match the rest of SQLite (code conventions, malloc-failure handling etc.).


type: ci
user: drh
comment:
  Simplify the OPFLG processing logic in the VDBE for a speed boost in the
  VDBE processing loop and a reduction in code size.


type: ci
user: drh
comment:
  Make the sqlite3VdbeExec() function about 2% faster by storing the opcode
  array in a local variable.


type: ci
user: drh
comment:
  Optimizations to the main loop inside sqlite3VdbeExec() to help VDBE byte code
  run a few percent faster.


type: ci
user: drh
comment:
  Optimizations to the sqlite3VdbeRecordCompare() routine help it to run 12.5%
  faster for some traces.


type: ci
user: drh
ecomment:
  Use the sqlite3CtypeMap to improve the speed and reduce the size of the 
  logic in the tokenizer that recognizes identifiers.

comment:
  Use the sqlite3CtypeMap[] to improve the speed and reduce the size of the 
  logic in the tokenizer that recognizes identifiers.


type: t
user: drh
brief: Closed ticket [e123bd2242].
comment:
  Closed ticket [e123bd2242]: <i>[POSIX] File handles aren't always immediately released on sqlite3_close</i> plus 3 other changes


type: t
user: drh
brief: Ticket [8f81455baf]: 3 changes
comment:
  Ticket [8f81455baf] <i>fts3GetVarint32 sets random number on error</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [19b44e3575]: 1 change
comment:
  Ticket [19b44e3575] <i>sqlite3_bind_text inconsistent with NULL pointers, zero length etc</i> status still Open with 1 other change


type: t
user: drh
brief: Fixed ticket [29ab7be99f].
comment:
  Fixed ticket [29ab7be99f]: <i>Hitting NOT NULL constraint does not roll back statement transaction</i> plus 1 other change


type: t
user: drh
brief: Ticket [e123bd2242]: 1 change
comment:
  Ticket [e123bd2242] <i>File handles aren't always immediately released on sqlite3_close</i> status still Closed with 1 other change


type: ci
user: drh
comment:
  Back out part of the change in [23ea2b700fd6d28d] since TH3 reveals some
  problems in OOM situations.


type: ci
user: drh
comment:
  Make sure the output of sqlite3OsFullPathname is initialized even if the
  fails due to I/O or OOM errors.


type: ci
user: drh
comment:
  Enhancements to the VDBE opcode loop to reduce the number of machine-code
  instructions evaluated by about 10%.


type: ci
user: drh
comment:
  Fix a bug introduced with recent optimizations:  The unary minus operator
  is TK_UMINUS, not TK_MINUS.


type: ci
user: drh
comment:
  Fix a bug in LIMIT 0 for compound SELECT statement.
  The problem was introduced by recent enhancements and has not appeared
  in any release.


type: ci
user: drh
comment:
  Avoid unnecessary page cache allocations when move a page while autovacuuming 
  an in-memory database, since the allocation might fail making it impossible to
  rollback the transaction.


type: ci
user: drh
comment:
  If the root pages numbers of the internal schema are adjusted due to 
  autovacuum on a DROP TABLE statement and that statement later aborts (for
  example, due to an OOM error) then reset the internal schema at the
  conclusion of the statement.
  Partial fix for ticket [564d412f15a].


type: ci
bgcolor: #fff0c0
user: drh
ecomment:
  Recomputed unchanged column values in an UPDATE statement after running
  BEFORE triggers, in case the triggers have modified any of those values.

comment:
  Recomputed unchanged column values in an UPDATE statement after running
  BEFORE triggers, in case the triggers have modified any of those values.


type: ci
user: dan
comment:
  Add a test to make sure a database can be attached to a single handle twice if not in shared-cache mode.


type: ci
user: drh
comment:
  When moving pages as part of autovacuum on an in-memory database, make sure
  that the source location is journalled so that a ROLLBACK can occur.
  Part of the fix for ticket [564d412f15a00]


type: ci
user: drh
comment:
  Fix a bug in transaction rollback during backup when the CODEC is enabled
  that can result in a corrupt backup file.  This is only a problem when
  SQLITE_HAS_CODEC is defined.


type: t
user: drh
brief: Fixed ticket [564d412f15].
comment:
  Fixed ticket [564d412f15]: <i>OOM on autovacuum of in-memory database causes problems.</i> plus 3 other changes


type: ci
user: dan
comment:
  Change so that deleting an Expr structure requires only one frame per level in the expression tree, not two.


type: ci
user: drh
comment:
  Rearrange the order of two branches in order to restore 100% branch coverage
  after recent changes to in-memory database processing.


type: ci
user: drh
comment:
  Make sure registers computed for the VFilter opcode are marked invalid
  after the VFilter opcode finishes.  Ticket [16fbf14cb2].


type: ci
user: drh
comment:
  Fix SQLITE_SECURE_DELETE so that it overwrites content on the root pages
  of tables and indices that are dropped using the truncate optimization.


type: t
user: drh
brief: Fixed ticket [16fbf14cb2].
comment:
  Fixed ticket [16fbf14cb2]: <i>Faulty VDBE code generated for certain third-party virtual tables</i> plus 3 other changes


type: g
user: drh
comment:
  Edit [7d30880114802606]: Change branch background color to "#fff0c0". Move to branch [/timeline?r=experimental&nd&dp=7d30880114802606 | experimental]. Marked "Closed". Edit check-in comment. Timestamp 2009-11-24 19:02:43.


type: ci
user: drh
comment:
  Initial check-in of code that inserts tokenizations of the values
  for bound parameters into the output of sqlite3_trace().


type: ci
user: drh
comment:
  Enhance the %q, %Q, and %w printf conversions so that the precisions 
  specifies the length of the input.


type: ci
user: dan
comment:
  Move [7d30880114] to the trunk. Add optimizations to reduce the number of opcodes used for BEFORE UPDATE triggers.


type: ci
user: dan
comment:
  Fix a bug introduced by the fts3 refactoring (segfault when creating a table with zero module args). Also a fix to handle an OOM error.


type: ci
user: dan
comment:
  Add a test case for creating an FTS3 table with no module arguments or opening/closing brackets in the CREATE VIRTUAL TABLE statement.


type: ci
user: drh
comment:
  Remove all benign OOM failure opportunities from the FTS3 hash table
  implementation.  All OOM faults cause SQLITE_NOMEM to be returned.


type: ci
user: drh
comment:
  Change FTS3 to detect when the RHS of the MATCH opertor encounters an OOM
  during string format conversion and report back an SQLITE_NOMEM error.


type: ci
user: drh
comment:
  Updates to snippet() and offsets() functions of FTS3 so that they work
  sanely following an OOM fault.


type: ci
user: dan
comment:
  Fix a segfault that can occur when querying an empty FTS3 table. Also restore the rowid/docid conflict handling to work as it did in version 3.6.20.


type: ci
user: drh
comment:
  Reorder function declarations in mutex_os2.c.  This is a blind change - we
  have no capability of testing on OS/2.  
  Ticket [97214a34d814]


type: t
user: drh
brief: Fixed ticket [97214a34d8].
comment:
  Fixed ticket [97214a34d8]: <i>Use of os2MutexNotheld before their definition</i> plus 2 other changes


type: ci
user: dan
comment:
  Clear the Pager.dbModified flag when unlocking the database. Assert that it is clear when locking the database.


type: ci
user: drh
comment:
  Add links from C/C++ interfaces to their equivalent SQL functions.  Comment
  changes only - no changes to code.


type: ci
user: drh
comment:
  Remove a NEVER() from btree.c that could occur in a very obscure tested
  evaluation with an I/O error on fstat().


type: ci
user: drh
comment:
  Fix an FTS3 problem where an OOM error was not being propagated back
  out to the top-level interface.


type: ci
user: dan
comment:
  Modify [2ad1461f25] to avoid leaving a prepared statement in "active" state following an OOM error in FTS3.


type: ci
user: drh
comment:
  Remove an assert() in btree.c:releasePage() that is not necessarily true
  when the btree is recovering from an OOM that occurs in the middle of
  a balance().


type: ci
user: drh
comment:
  Add the SQLITE_4_BYTE_ALIGNED_MALLOC compile-time option which tells some
  assert() statements that the underlying system only requires 4-byte alignment
  of 8-byte data objects like double or int64 and that system malloc() only
  guarantees 4-byte alignment of returned pointers.


type: ci
user: drh
comment:
  Fix to check-in [f221f31eff]:  Make sure local variable rc is declared even
  when compiled without SQLITE_DEBUG.


type: ci
user: dan
comment:
  Add some tests for OR, AND and NOT operations to fts3rnd.test. Add tests to check that errors are returned when bad arguments are passed to fts3 functions snippet, offsets and optimize. Minor fix for the same


type: ci
user: shaneh
comment:
  Move some SQLITE_TEST code down to avoid mixing code and variable declarations.  
  Fix a test for high-order bit handling in sqlite3Fts3InitTokenizer().


type: g
user: drh
comment:
  Edit [1ed88e9d01e9eda5]: Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2009-12-07 16:39:13. Add tag "release".


type: ci
user: drh
comment:
  Avoid dereferencing a null pointer when doing a multi-database comment where
  one or more of the databases is an ATTACH-ed TEMP database.
  Ticket [abe728bbc311d].


type: t
user: dan
brief: Ticket [abe728bbc3]: 3 changes
comment:
  Ticket [abe728bbc3] <i>Crash committing multi-file transaction including temp file</i> status still Open with 3 other changes


type: t
user: drh
brief: Fixed ticket [abe728bbc3].
comment:
  Fixed ticket [abe728bbc3]: <i>Crash committing multi-file transaction including temp file</i> plus 3 other changes


type: ci
user: drh
comment:
  Begin updating API documentation to use the new MD5-hash based 
  automatic requirements numbering.  Comment changes only.  Many similar
  changes will follow.


type: t
user: drh
brief: Fixed ticket [78e04e52ea].
comment:
  Fixed ticket [78e04e52ea]: <i>Assertion failure dropping table with zero length name</i> plus 3 other changes


type: t
user: drh
brief: Fixed ticket [4abd1e4c00].
comment:
  Fixed ticket [4abd1e4c00]: <i>omitted.html still says recursive triggers are not supported</i> plus 3 other changes


type: t
user: rogerb
brief: Ticket [ff44d82f3b]: 4 changes
comment:
  Ticket [ff44d82f3b] <i>fts3ReallocOrFree and fts3InitVtab are not marked static</i> status still Open with 4 other changes


type: t
user: dan
brief: Closed ticket [ff44d82f3b].
comment:
  Closed ticket [ff44d82f3b]: <i>fts3ReallocOrFree and fts3InitVtab are not marked static</i> plus 1 other change


type: ci
user: drh
comment:
  The USING clause and NATURAL JOIN look at all tables to the left when
  searching for a match, not just the one table to the immediate left.
  Tables further to the left are preferred.
  Fix for ticket [f74beaabde].  Still need to add test cases to complete
  the ticket.


type: t
user: dan
brief: Ticket [f74beaabde]: 3 changes
comment:
  Ticket [f74beaabde] <i>Problem with 3-way joins and the USING clause</i> status still Open with 3 other changes


type: t
user: dan
brief: Ticket [f74beaabde]: 1 change
comment:
  Ticket [f74beaabde] <i>Problem with 3-way joins and the USING clause</i> status still Open with 1 other change


type: ci
user: drh
comment:
  Restore the incorrect legacy ON INSERT syntax to the parser as a no-op.
  That way, older databases that actually use this meaningless syntax will
  still be readable.


type: t
user: drh
brief: Fixed ticket [f74beaabde].
comment:
  Fixed ticket [f74beaabde]: <i>Problem with 3-way joins and the USING clause</i> plus 2 other changes


type: ci
user: drh
comment:
  Only declare the sqlite3_mutex_held() and sqlite3_mutex_notheld() interfaces
  in the header file if NDEBUG is not defined.


type: t
user: anonymous
brief: Ticket [8f81455baf]: 2 changes
comment:
  Ticket [8f81455baf] <i>fts3GetVarint32 sets random number on error</i> status still Open with 2 other changes


type: ci
user: drh
comment:
  Extensive edits to the comments in the sqlite.h.in source file to identify
  testable statements of truth about the C-language interface.


type: ci
user: dan
comment:
  Rationalize some code in fts3 used by optimize operations, queries of the pending-terms hash table and segment merges. Add the "INSERT INTO tbl(tbl) VALUES('optimize')" syntax.


type: ci
user: drh
comment:
  Ensure WHERE clause terms involving tables on the right end of a join
  are not prematurely evaluated when tables on the left end of the join
  make use of the OR-clause optimization.  
  Fix for ticket [31338dca7e].


type: t
user: drh
brief: Ticket [31338dca7e]: 3 changes
comment:
  Ticket [31338dca7e] <i>OR operator in WHERE clause gives wrong answer when indexed</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [31338dca7e]: 1 change
comment:
  Ticket [31338dca7e] <i>OR operator in WHERE clause gives wrong answer when indexed</i> status still Open with 1 other change


type: ci
user: drh
comment:
  Remove unreachable code that was added by the fix to the "(xANDy)OR(z)" bug
  in the previous check-in.


type: t
user: drh
brief: Fixed ticket [31338dca7e].
comment:
  Fixed ticket [31338dca7e]: <i>OR operator in WHERE clause gives wrong answer when indexed</i> plus 2 other changes


type: g
user: drh
comment:
  Edit [867347323b0c0951]: Change branch background color to "#c0f0ff". Move to branch [/timeline?r=branch-3.6.21&nd&dp=867347323b0c0951 | branch-3.6.21]. Timestamp 2009-12-16 23:28:32.


type: ci
user: shaneh
comment: In shell.c (CLI), modified local_getline() to remove '\r' as well as '\n' from end of lines.
ecomment:
  In shell.c (CLI), modified local_getline() to remove '\r' as well as '\n' from end of lines.  This provides consistency between MSVC and CYGWIN builds.


type: ci
user: shaneh
ecomment:
  Modified statement machine in sqlite3_complete() to return 0 on empty string.  
  Added/updated tests for same.  Ticket [356c885b0b].

comment:
  Modified statement machine in sqlite3_complete() to return 0 on empty string.  
  Added/updated tests for same.  Ticket 356c885b0b.


type: t
user: shane
brief: Fixed ticket [356c885b0b].
comment:
  Fixed ticket [356c885b0b]: <i>sqlite3_complete() should return 0 on empty string</i> plus 3 other changes


type: t
user: shane
brief: Ticket [356c885b0b]: 1 change
comment:
  Ticket [356c885b0b] <i>sqlite3_complete() should return 0 on empty string</i> status still Fixed with 1 other change


type: ci
user: dan
comment:
  Change many comments in e_fkey.test to include the full text of the corresponding statement in foreignkeys.html.


type: ci
user: dan
comment:
  Add the experimental FTS3 matchinfo() function. Provides details of the match that may be used for result ranking and other purposes.


type: ci
user: drh
comment:
  Move the query flattener turn-off from a pragma to an sqlite3_test_control()
  call.  Make provisions (not yet implemented) to turn off other optimizers
  using the same call.


type: ci
user: drh
comment:
  Immediately purge entries from the column cache when the associated register
  undergoes an affinity change.  Ticket [eb5548a849].  Enhance the
  SQLITE_TESTCTRL_OPTIMIZATIONS setting of sqlite3_test_control so that it
  can disable the column cache for testing purposes, in an effort to prevent
  future problems of a similar nature to this one.


type: ci
user: dan
comment:
  Fix a bug triggered by optimizing an FTS3 table when there are no segments on disk but pending terms in the hash table.


type: t
user: drh
brief: Fixed ticket [eb5548a849].
comment:
  Fixed ticket [eb5548a849]: <i>CAST in WHERE clause causes inconsistent query results</i> plus 3 other changes


type: ci
user: drh
comment:
  Within the special new.* and old.* tables of a trigger, recognize all the
  original table names even if those names overload the "rowid", "oid", or
  "_rowid_" special names.  Ticket [34d2ae1c6d0].


type: t
user: drh
brief: Fixed ticket [34d2ae1c6d].
comment:
  Fixed ticket [34d2ae1c6d]: <i>Overloaded column named "ROWID" mishandled in triggers.</i> plus 3 other changes


type: t
user: dan
brief: New ticket [0d676cd6e6].
comment:
  New ticket [0d676cd6e6] <i>Triggers: new/old.oid is interpreted as the IPK, even if there is another column &quot;oid&quot;</i>.


type: t
user: dan
brief: Closed ticket [0d676cd6e6].
comment:
  Closed ticket [0d676cd6e6]: <i>Triggers: new/old.oid is interpreted as the IPK, even if there is another column "oid"</i> plus 3 other changes


type: t
user: drh
brief: Ticket [0d676cd6e6]: 1 change
comment:
  Ticket [0d676cd6e6] <i>Triggers: new/old.oid is interpreted as the IPK, even if there is another column "oid"</i> status still Closed with 1 other change


type: ci
user: drh
comment:
  Add comments and an assert() to help clarify the operation of the
  sqlite3VdbeList() routine used to implement EXPLAIN.


type: ci
user: drh
comment:
  Add a new sqlite3_test_control() verb that facilitates testing that all
  keywords are shown in the documentation.  (Two keywords were found to
  be missing while testing the change.)


type: ci
user: dan
comment:
  Add experimental implementation of FTS3 functions matchinfo() and snippet() (not enabled by default).


type: ci
user: drh
comment:
  Fix a case in os_unix.c where two structures that might have uninitialized
  padding bytes are compared using memcmp().


type: ci
user: drh
comment:
  In the debugging memory allocator, initialize new memory allocations to
  pseudo-randomness in an effort to find problems with memcmp() of structures
  that have uninitialized pad bytes.


type: ci
user: dan
comment:
  Fix a problem in the shell tool. In some cases sqlite3_errmsg() was being called before sqlite3_finalize(), causing error messages to be more generic than they should be.


type: ci
user: drh
comment:
  Make sure new pages are zeroed even when loading a freelist page using the
  noContent option.  This prevents a harmless valgrind warning.


type: g
user: dan
comment:
  Edit [9f819ea6b21e13e6]: Move to branch [/timeline?r=branch-3.6.1&nd&dp=9f819ea6b21e13e6 | branch-3.6.1]. Change background color to "#d0c0ff". Timestamp 2010-01-05 18:06:38.


type: g
user: dan
comment:
  Edit [9f819ea6b21e13e6]: Change branch background color to "#f2dcdc". Timestamp 2010-01-05 18:06:38.


type: g
user: drh
comment:
  Edit [28d0d7710761114a]: Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2010-01-06 00:00:00.


type: ci
user: drh
comment:
  Another attempt at fixing the table generator in lemon.  Again, this does
  not effect the SQLite grammar.


type: ci
user: dan
comment:
  Changes to test code so that testfixture compiles when OMIT_SHARED_CACHE and OMIT_UTF16 are defined.


type: ci
user: drh
comment:
  Fix the expression comparison logic to take the COLLATE operator into account.
  Ticket [360c6073e197]


type: t
user: drh
brief: Ticket [360c6073e1]: 3 changes
comment:
  Ticket [360c6073e1] <i>Aggregate MAX() function with COLLATE clause</i> status still Open with 3 other changes


type: ci
user: dan
comment:
  Fix handling of an OOM error in the fts3 offsets() function. Fix a couple of snippet related test cases in e_fts3.test.


type: ci
user: dan
comment:
  Modify snippets code to run more efficiently. And to avoid a bug relating to snippets based on full-text queries that contain duplicate terms.


type: ci
user: drh
comment:
  Fix the implementation of CURRENT_TIMESTAME and CURRENT_DATE when 
  SQLITE_OMIT_DATETIME_FUNCS is defined.


type: ci
user: drh
comment:
  Make sure internal queries are well ordered, even when the 
  reverse_unordered_selects pragma is in effect.
  Ticket [eb942c64a157].


type: ci
user: drh
comment:
  Make the sqlite3_result_double() interface work the same as
  sqlite3_result_int64() when SQLITE_OMIT_FLOATING_POINT is defined.


type: ci
user: drh
comment:
  Comment out unused code when SQLITE_OMIT_FLOATING_POINT is selected.
  Added testcase() macros to boundary conditions in util.c routines.


type: ci
user: dan
comment:
  Add tests to backup.test to verify that SQLite behaves as expected when the source database is modified mid-backup.


type: t
user: drh
brief: Fixed ticket [eb942c64a1].
comment:
  Fixed ticket [eb942c64a1]: <i>PRAGMA reverse_unordered_selects causes schema parse to fail</i> plus 3 other changes


type: ci
user: drh
comment:
  When SQLITE_OMIT_FLOATING_POINT is defined, make sure the result of a
  mathematical operation is always tagged as an integer.


type: ci
user: drh
comment:
  When SQLITE_OMIT_FLOATING_POINT is defined, the floating-point formats in
  the sqlite3_*printf() functions should pull an int64 off of the parameter
  list and ignore it.


type: ci
user: drh
comment:
  Make the sqlite3IsNaN() function a macro that evaluates to FALSE when
  compiled with SQLITE_OMIT_FLOATING_POINT.


type: ci
user: shaneh
comment:
  Fix a problem with the CLI where not all SQL commands were being echoed.  
  Added tests of same to tools/shell2.test.  Ticket [eb620916be].


type: t
user: shane
brief: Ticket [eb620916be]: 1 change
comment:
  Ticket [eb620916be] <i>Shell doesn't print header if multiple statements on one line</i> status still Fixed with 1 other change


type: ci
user: drh
comment:
  Redesign the string to numeric value caster so that it is more likely to
  work on unusual floating point hardware.


type: ci
user: drh
comment:
  Fix a segfault that can occur when the LHS of a LIKE operator has an
  undefined collating sequence.  Ticket [1258875e07553].


type: t
user: drh
brief: Fixed ticket [1258875e07].
comment:
  Fixed ticket [1258875e07]: <i>Undefined collating sequence on LIKE causes segfault</i> plus 3 other changes


type: ci
user: drh
comment:
  Make the TEMP file tables use the page size set for the main database.
  Ticket [b80eeab588c4].  
  Also copy over the changes from apple-osx check-in [7c3bede3f2].


type: t
user: drh
brief: Fixed ticket [b80eeab588].
comment:
  Fixed ticket [b80eeab588]: <i>Respect custom page size for temp tables, indices, etc</i> plus 2 other changes


type: ci
user: drh
comment:
  If an OOM occurs while setting the page size for the TEMP database, be sure
  that error gets reported back out to the interface layer.


type: ci
bgcolor: #8696fe
user: drh
comment:
  Fix a missing mutex on page cache truncation during vacuum and auto-vacuum 
  when SQLITE_ENABLE_MEMORY_MANAGEMENT is engaged.


type: ci
bgcolor: #8696fe
user: drh
comment:
  Remove all cache pages from the LRU list prior to removing the pager from the
  pager list when closing a pager.


type: ci
user: drh
comment:
  Add a new full-text search variant that tracks the total number of documents
  and document sizes, to make ranking search results easier.  Currently
  called FTS4.


type: t
user: drh
brief: Ticket [8905af11a0]: 3 changes
comment:
  Ticket [8905af11a0] <i>NOT NULL interferes with ON CONFLICT REPLACE</i> status still Open with 3 other changes


type: t
user: drh
brief: Closed ticket [8905af11a0].
comment:
  Closed ticket [8905af11a0]: <i>NOT NULL interferes with ON CONFLICT REPLACE</i> plus 2 other changes


type: ci
user: drh
comment:
  Remove the use of 64-bit math in the offset computations of 
  the OP_Column opcode for a small performance improvement.


type: ci
user: shaneh
comment:
  Avoid truncating non-in-memory sub-journals when releasing a savepoint for a small performance improvement.


type: ci
user: dan
comment:
  Fix a segfault in fts3 that may occur if the snippet, offsets or matchinfo functions are used in a query that does not contain a MATCH clause.


type: ci
user: drh
ecomment:
  Allow the secure-delete setting to be changed at run-time using a pragma.
  The SQLITE_SECURE_DELETE compile-time option determines the default setting.

comment:
  All the secure-delete setting to be changed at run-time using a pragma.
  The SQLITE_SECURE_DELETE compile-time option determines the default setting.


type: g
user: drh
comment:
  Edit [f3676b243d94229f]: Change branch background color to "#c0ffc0". Timestamp 2010-02-12 22:43:48.


type: ci
user: drh
comment:
  When creating a trigger on a main database table when there is a TEMP table
  with the same name, make sure the trigger is bound to the main table.
  Ticket [985771e11612].


type: ci
user: drh
comment:
  Fix the ALTER TABLE RENAME command so that it converts FOREIGN KEY constraints
  in ATTACH-ed and in TEMP tables as well as in the main database.
  Ticket [13336e9c3c8c3f].


type: t
user: drh
brief: Fixed ticket [985771e116].
comment:
  Fixed ticket [985771e116]: <i>CREATE TRIGGER confused by TEMP/MAIN table name overlap</i> plus 2 other changes


type: ci
user: dan
comment:
  Fix for [e9a9fde1f4]. When opening an existing rtree, determine the node size by inspecting the root node of the r-tree structure (instead of assuming it is a function of the page-size).


type: t
user: drh
brief: Fixed ticket [13336e9c3c].
comment:
  Fixed ticket [13336e9c3c]: <i>ALTER TABLE RENAME fails to update foreign key references</i> plus 2 other changes


type: t
user: dan
brief: Ticket [e9a9fde1f4]: 3 changes
comment:
  Ticket [e9a9fde1f4] <i>rtree module malfunctions if db page-size is changed</i> status still Open with 3 other changes


type: t
user: dan
brief: Fixed ticket [e9a9fde1f4].
comment:
  Fixed ticket [e9a9fde1f4]: <i>rtree module malfunctions if db page-size is changed</i> plus 1 other change


type: ci
user: dan
comment:
  Allow statements like "REPLACE INTO tbl(rowid) VALUES(...)" to run without a statement journal as long as there are no triggers, foreign keys or indexes.


type: ci
user: drh
comment:
  Add a new, experimental logging interface designed to aid in debugging of
  deeply embedded projects that use SQLite.


type: ci
bgcolor: #c0fff0
user: icculus
comment:
  Added option to not clip error output.

  This is useful for IDEs and other tools that benefit from full path
  information, so they can jump directly to the error line in the source code.


type: ci
bgcolor: #c0fff0
user: icculus
comment:
  Delete output files if this is a failed run.

  Otherwise, the fail will stop a Makefile from progressing, but if you
  immediately run the build again, Make will think the output files are up to
  date, since they are newer (albeit incomplete/incorrect).


type: ci
bgcolor: #c0fff0
user: icculus
comment:
  Added %expect directive, to consider a certain number of conflicts "correct."

  This has the side effect of changing the process exit code to never overflow.


type: ci
bgcolor: #c0fff0
user: icculus
ecomment:
  Added -T option, to specify a template filename on the command line.

  The default is still "lempar.c", though.

comment:
  Added -T option, to specify a template filename on the command line.

  The default is still "lempar.c", though.


type: g
user: drh
comment:
  Edit [e6cbe1e5ee80db28]: Change branch background color to "#c0fff0". Move to branch [/timeline?r=lemon-update-2010&nd&dp=e6cbe1e5ee80db28 | lemon-update-2010]. Edit check-in comment. Timestamp 2010-02-14 00:48:50.


type: ci
user: drh
comment:
  Merge in the massive clean-up and ANSI-fication of Lemon carried out
  by Ryan Gordon.  There are no functional changes to SQLite itself - Lemon
  still generates exactly the same parsing automaton from exactly the same
  grammar.


type: ci
user: drh
comment:
  Fix an assertion-fault/segfault problem that comes up when trying to
  VACUUM an auto-vacuumed database with a large schema. 
  Ticket [da1151f97df244].


type: ci
user: drh
comment:
  Remove the ".genfkey" command from the shell.  We've had foreign-key support
  in the core since 3.6.19.  Anyone who still needs the simulated foreign-key
  triggers can always generate them with an older version of the shell.


type: t
user: drh
brief: Fixed ticket [da1151f97d].
comment:
  Fixed ticket [da1151f97d]: <i>Assertion fault on VACUUM in an auto_vacuumed database.</i> plus 2 other changes


type: ci
user: drh
comment:
  Add the ".log" command to the shell.  This shows that some errors are logged
  multiple times and other errors are never logged at all.


type: ci
user: drh
comment:
  Remove the obsolete sqlite3SafetyOn() mechanism.  Add additional logging
  output for CORRUPT, and CANTOPEN errors.


type: ci
user: drh
comment:
  Fix an assertion fault that occurs when two different virtual tables are
  used in a single UPDATE statement.
  Ticket [d2f02d37f52b].


type: t
user: drh
brief: Ticket [d2f02d37f5]: 3 changes
comment:
  Ticket [d2f02d37f5] <i>Assertion fault on UPDATE involving two virtual tables.</i> status still Open with 3 other changes


type: t
user: drh
brief: Fixed ticket [d2f02d37f5].
comment:
  Fixed ticket [d2f02d37f5]: <i>Assertion fault on UPDATE involving two virtual tables.</i> plus 1 other change


type: ci
user: drh
comment:
  Fix an incorrect ALWAYS() macro in vdbeapi.c.  Fix the output of a few
  test cases that changed due to better error propagation out of reprepare.


type: ci
user: drh
comment:
  Add a sqlite3_log() call on anonymous constraint failures.
  Fix the output of test cases having to do with improved reprepare reporting.
  Fix the VACUUM command to report more helpful error messages when things go
  wrong.


type: ci
user: shaneh
comment:
  Changes to compile time option diags to report values for some defines.  
  Added test cases to TCL test suite (ctime.test).


type: ci
user: drh
comment:
  Add testcase() macros beside each sqlite3_log() call to make sure it is
  tested with both logging enable and disabled.


type: t
user: anonymous
brief: Ticket [2e047cbefa]: 4 changes
comment:
  Ticket [2e047cbefa] <i>select DISTINCT performance could be better</i> status still Open with 4 other changes


type: ci
user: drh
comment:
  Make sure the ON clause of a LEFT JOIN does not cause an index to be
  used to speed access to a table to the left of the join.
  Ticket [ebdbadade5]


type: t
user: drh
brief: Ticket [ebdbadade5]: 3 changes
comment:
  Ticket [ebdbadade5] <i>LEFT JOIN incorrect when ON clause does not reference right table.</i> status still Open with 3 other changes


type: ci
bgcolor: #bfd970
user: drh
comment:
  Merge in the fix for VACUUM on auto_vacuumed databases with large schemas.
  Check-in [86d50ce57f].  Ticket [da1151f97df].


type: ci
bgcolor: #bfd970
user: drh
comment:
  Start a new branch for release 3.6.22 plus limited enhancements and fixes.
  This first check-in includes the performance enhancements of check-ins
  [26cb1df735], [61a2c8d4d6], and [27dc5b1c52]


type: ci
bgcolor: #bfd970
user: drh
comment:
  Enhance integrity_check to detect out-of-order rowids.  This is a
  cherrypick merge of check-in [cae47c5b09].


type: ci
bgcolor: #bfd970
user: drh
comment:
  Fix a segfault that is possible for an OOM fault in ATTACH when in
  shared-cache mode.  This is a cherrypick merge of check-in [e37137376a].


type: ci
bgcolor: #bfd970
user: drh
comment:
  Merge in all of the logging enhancements.  This is a cherrypick merge of
  the following check-ins: [103321e37a], [a8076aede3], [6d910245ad], 
  [7c4cca6d1a], [edea3bb740], [1a6d4bb130], [a8c984c1d6], [69a493182f], and
  [1168763d2c].


type: t
user: drh
brief: Fixed ticket [ebdbadade5].
comment:
  Fixed ticket [ebdbadade5]: <i>LEFT JOIN incorrect when ON clause does not reference right table.</i> plus 1 other change


type: ci
user: drh
comment:
  Minor simplifications to the compile-time option reporting functions and
  pragmas to facilitate coverage testing.


type: ci
bgcolor: #bfd970
user: drh
comment:
  When TEMP files are in memory, also put the massive TEMP file used by
  the VACUUM command in memory.  This is a cherry-pick merge of
  [9daf4e7d07]


type: ci
user: shaneh
ecomment:
  Fixed numbering of a few tests; minor tweaks on others;  
  added a couple new tests to stress previous simplifications to compile-time option reporting functions.

comment:
  Fixed numbering of a few tests; minor tweaks on others.  
  Added a couple new tests to stress previous simplifications.


type: ci
user: drh
comment:
  Remove the compile_option pragma (retaining compile_options - with an "s").
  Updates to documentation.


type: ci
user: drh
comment:
  Rename the sqlite_compile_option_*() SQL functions to sqlite_compileoption_*()
  for consistency with the C/C++ interface.


type: t
user: drh
brief: Ticket [ebdbadade5]: 1 change
comment:
  Ticket [ebdbadade5] <i>LEFT JOIN incorrect when ON clause does not reference right table.</i> status still Fixed with 1 other change


type: ci
bgcolor: #ffc0d0
user: dan
comment:
  Silence a compiler warning by using a constant value instead of a constant expression that some compilers mistakenly believe causes bitshift overflow.


type: ci
user: drh
comment:
  Factor out constant expressions in sqlite3GetVarint() to work around
  nuisance warning messages from the RVT compiler.


type: ci
bgcolor: #ffc0d0
user: drh
ecomment:
  Second thoughts:  Let Tiger users set SQLITE_ENABLE_LOCKING_STYLE=0.  Was:
  Change SQLITE_ENABLE_LOCKING_STYLE to default off, even on Macs, since
  older Macs (Tiger) cannot compile the latest proxy locking sources.

comment:
  Change SQLITE_ENABLE_LOCKING_STYLE to default off, even on Macs, since
  older Macs (Tiger) cannot compile the latest proxy locking sources.


type: g
user: drh
comment:
  Edit [587109c81a9cf479]: Change branch background color to "#ffc0d0". Move to branch [/timeline?r=mistake&nd&dp=587109c81a9cf479 | mistake]. Timestamp 2010-03-03 08:12:22.


type: ci
bgcolor: #f2dcdc
user: drh
comment:
  Invoke the SQLITE_FCNTL_SIZE_HINT opcode on the sqlite3_file_control()
  interface for database files before extending the size of the file.  The
  VFS can use this hint to preallocate space.


type: ci
user: drh
comment:
  Modify the sqlite3_log() interface and implementation so that it never
  uses dynamic memory allocation - to avoid deadlocking when called while
  holding the memory allocator mutex.


type: ci
bgcolor: #bfd970
user: drh
comment:
  Modify the sqlite3_log() interface and implementation so that it never uses
  dynamic memory allocation - to avoid deadlocking when called while holding 
  the memory allocator mutex.  Cherry-pick merge of [28d1bc98d6].


type: ci
user: drh
comment:
  Increase the maximum length of an sqlite3_log() result string.  Provide more
  details on the statement abort log message.


type: ci
user: dan
comment:
  Fix for [9abd6aa831]. Do not overread a buffer used for an %q or %w conversion with a precision specifier.


type: t
user: dan
brief: Closed ticket [9abd6aa831].
comment:
  Closed ticket [9abd6aa831]: <i>buffer overread in sqlite3_printf functions.</i> plus 2 other changes


type: g
user: drh
comment:
  Edit [1a0fa8d19d69d4ec]: Change branch background color to "#ffc0d0". Move to branch [/timeline?r=mistake&nd&dp=1a0fa8d19d69d4ec | mistake]. Marked "Closed". Edit check-in comment. Timestamp 2010-03-04 22:36:45.


type: t
user: dan
brief: New ticket [aa92c76cd4].
comment:
  New ticket [aa92c76cd4] <i>Problem with GROUP BY and the distinction between real and integer values</i>.


type: ci
user: drh
ecomment:
  Adjustments to #ifdefs so that the #include of &lt;sys/mount.h&gt; is not included
  twice, because that confuses the amalgamation builder.

comment:
  Adjustments to #ifdefs so that the #include of <sys/mount.h> is not included
  twice, because that confuses the amalgamation builder.


type: ci
user: drh
comment:
  Adjust some #ifdefs so that the build works on Mac both with and without
  SQLITE_ENABLE_LOCKING_STYLE.


type: ci
user: dan
comment:
  Modify the vdbe so that the comparison operator opcodes do not modify the data type of operands. Fix for [aa92c76cd4].


type: ci
user: dan
comment:
  Change a condition in sqlite3VdbeMemShallowCopy() to avoid accessing an unitialized variable (doing so was not dangerous, but caused a valgrind error).


type: ci
user: drh
comment:
  Make sure the dbFileVers field in the Pager object is properly initialized
  even if there is an I/O error while reading its content off of disk.


type: g
user: drh
comment:
  Edit [4ae453ea7be69018]: Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2010-03-09 19:31:43. Add tag "release".


type: ci
user: drh
comment:
  Add the SQLITE_DBSTATUS_CACHE_SIZE verb for sqlite3_db_status().  The 
  highwater mark does not yet work on this verb.


type: ci
user: drh
comment:
  Move the ctime.c source module near the beginning of the list of files
  inserted into the amalgamation so that #defines that are overridden in
  other modules will not effect the values returned by
  sqlite3_compiletime_used().


type: ci
user: drh
comment:
  Add assert()s to mem2.c (activated by SQLITE_MEMDEBUG) which verify that
  memory alloctions that might have come from lookaside are always freed
  using a lookaside-aware free routine.


type: ci
user: drh
comment:
  Store the database size in pages in bytes 28..31 of the header.  Currently
  this is for forensic use only, but it might be used in the future.


type: ci
user: drh
comment:
  Fix FTS3 so that it does not run illegal SQL and cause a spurious log
  message.  Ticket [42d45a693e6].


type: ci
user: drh
comment:
  Improved error message when the right-hand operand of MATCH in FTS3 is
  not a valid search expression.  Ticket [170872f1c3].


type: t
user: drh
brief: Fixed ticket [170872f1c3].
comment:
  Fixed ticket [170872f1c3]: <i>Unmatched double-quote causes problems for FTS3</i> plus 2 other changes


type: ci
user: dan
comment:
  Rewrite a couple of queries used internally by FTS3 to take advantage of the "SELECT max(x) FROM ..." optimization.


type: ci
user: drh
ecomment:
  Do not create, open, or initialize the rollback journal until something actually
  needs to be written into the journal.  That way, expensive filesystem
  operations are avoided if the transaction ends up being a no-op.

comment:
  Do create, open, or initialize the rollback journal until something actually
  needs to be written into the journal.  That way, expensive filesystem
  operations are avoided if the transaction ends up being a no-op.


type: ci
user: drh
comment:
  Make sure the in-journal boolean vector is cleared and released when ending
  a transaction.  This fixes an obscure problem with the previous check-in.


type: ci
user: dan
comment:
  Have the xUpdate() method of the rtree module virtual table implementation set the *pRowid output variable when inserting a row. Fix for [dd3ba6063a].


type: ci
user: drh
comment:
  Put an ALWAYS() around a condition in pcache.c that must always be true in
  the current implementation.


type: t
user: dan
brief: Closed ticket [dd3ba6063a].
comment:
  Closed ticket [dd3ba6063a]: <i>rtree module does not support last_insert_rowid()</i> plus 2 other changes


type: ci
user: dan
comment:
  Change the formatting of the preprocessor macros surrounding the compileoption interface in sqlite.h.in. This is so the documentation produced by parsing this part of sqlite.h.in is formatted similarly to the docs for the deprecated interfaces (with the #ifndef visible on the webpage).


type: ci
user: dan
ecomment:
  After a rollback that writes or truncates the database file, sync the database file before invalidating the journal contents. Fix for [015d3820f2].

comment:
  After a rollback that writes or truncates the database file, sync the database file before invalidating the journal contents.


type: t
user: dan
brief: Ticket [015d3820f2]: 2 changes
comment:
  Ticket [015d3820f2] <i>Missing call to xSync() following rollback.</i> status still Open with 2 other changes


type: ci
bgcolor: #c0ffc0
user: drh
ecomment:
  The btree layer now tracks when a database is empty at the start of a
  transaction and rolls back to that state.

comment:
  The btree layer now tracks when a database is empty at the start of a
  transaction and rolls back to that state.


type: ci
user: drh
comment:
  Fix up obsolete comments in FTS3 to conform to the latest nomenclature.
  Add new comments to better explain FTS3 operation.


type: t
user: dan
brief: New ticket [9861b74ab9].
comment:
  New ticket [9861b74ab9] <i>Fts3 offsets() function may report SQLITE_CORRUPT with empty string.</i>.


type: ci
user: dan
comment:
  Increase the estimated cost of using a virtual table as the outer loop of a join when there exists an ORDER BY clause that is not satisfied by the virtual table. Fix for [775b39dd3c].


type: t
user: shane
brief: Ticket [cbd054fa6b]: 3 changes
comment:
  Ticket [cbd054fa6b] <i>"out of memory" in ANALYZE with SQLITE_ENABLE_STAT2</i> status still Open with 3 other changes


type: ci
bgcolor: #60b0ff
user: drh
comment:
  Correctly handle strings with zero-length tokens in the FTS3 offsets()
  function.  This is a cherrypick of [d37034f7fc].


type: ci
bgcolor: #60b0ff
user: drh
comment:
  After any rollback that modifies the database file, sync the database
  before deleting the rollback journal.  This is a cherry-pick merge
  of check-ins [b21b911f23] and [f2326dad4e]


type: t
user: dan
brief: Ticket [775b39dd3c]: 3 changes
comment:
  Ticket [775b39dd3c] <i>Poor query planning with virtual tables, joins and ORDER BY.</i> status still Open with 3 other changes


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  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.


type: t
user: anonymous
brief: Ticket [7d96113ff0]: 1 change
comment:
  Ticket [7d96113ff0] <i>SQLite fails to build when TCL isn't installed</i> status still Fixed with 1 other change


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Fix issues with the io.test script.  There is still a problem with a
  ROLLBACK TO not working on an initially empty database files.  And much
  more testing is needed.


type: ci
user: dan
comment:
  Do not crash when compiling an "INSERT INTO tbl DEFAULT VALUES" when tbl has either BEFORE or INSTEAD OF triggers attached to it. Ticket [f3162063fd].


type: t
user: dan
brief: New ticket [f3162063fd].
comment:
  New ticket [f3162063fd] <i>Crash compiling &quot;INSERT INTO tbl DEFAULT VALUES&quot; if tbl has BEFORE or INSTEAD OF triggers.</i>.


type: t
user: drh
brief: Ticket [f3162063fd]: 3 changes
comment:
  Ticket [f3162063fd] <i>Crash compiling "INSERT INTO tbl DEFAULT VALUES" if tbl has BEFORE or INSTEAD OF triggers.</i> status still Open with 3 other changes


type: t
user: dan
brief: Closed ticket [f3162063fd].
comment:
  Closed ticket [f3162063fd]: <i>Crash compiling "INSERT INTO tbl DEFAULT VALUES" if tbl has BEFORE or INSTEAD OF triggers.</i> plus 1 other change


type: t
user: anonymous
brief: Ticket [e063139eb3]: 2 changes
comment:
  Ticket [e063139eb3] <i>Download .zip excludes shell but .tar includes it</i> status still Open with 2 other changes


type: ci
bgcolor: #60b0ff
user: drh
comment:
  Disable the corruptE test which SQLITE_OVERSIZE_CELL_CHECK is enabled.
  This is a cherrypick merge from check-in [1dc4f9fe9b83467ba].


type: t
user: drh
brief: Fixed ticket [e063139eb3].
comment:
  Fixed ticket [e063139eb3]: <i>Download .zip excludes shell but .tar includes it</i> plus 1 other change


type: ci
user: drh
comment:
  Clarification of the implementation of SQLITE_STMTSTATUS_FULLSCAN_STEP.
  No logical code changes - just commenting and layout changes to improve
  readability.


type: t
user: dan
brief: Ticket [883034dcb5]: 1 change
comment:
  Ticket [883034dcb5] <i>Column cache problem with aggregate queries</i> status still Closed with 1 other change


type: ci
user: drh
comment:
  Report corruption if a database contains a reference that is out of range
  according to the filesize-in-header database size.


type: ci
user: drh
comment:
  Do not journal the content of freelist leaf pages.  This restores an
  optimization that was accidently undone by check-in [12f7346c13] on
  [2009-01-20].


type: ci
user: drh
comment:
  Zero the filesize-in-header word for bigfile.tcl.  Remove bigfile.tcl from
  the journaltest permutation.


type: ci
user: drh
comment:
  If the size of the database according to the header is larger than the 
  actual database file size, report that the database is corrupt.


type: ci
user: drh
comment:
  Take care to avoid a buffer over-read when adding a KEYINFO structure 
  to the P4 parameter of an opcode.


type: ci
user: drh
comment:
  Check for a failure in the call to sqlite3PagerPagecount() from within
  sqlite3PagerWrite().  (Error discovered by valgrind.)


type: t
user: anonymous
brief: Ticket [775b39dd3c]: 1 change
comment:
  Ticket [775b39dd3c] <i>Poor query planning with virtual tables, joins and ORDER BY.</i> status still Open with 1 other change


type: t
user: anonymous
brief: Verified ticket [775b39dd3c].
comment:
  Verified ticket [775b39dd3c]: <i>Poor query planning with virtual tables, joins and ORDER BY.</i> plus 6 other changes


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Automatically generate transient indices for tables in joins that would
  otherwise have to use a full table scan.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Runs quicktest without hitting an assert now.  Some tests get unexpected
  results still and there is a memory leak.


type: ci
user: drh
comment:
  When rolling back a savepoint to the beginning of the transaction, make sure
  to initialize the database size in the btree layer correctly even if the
  database size field of the header is zeroed.


type: ci
user: dan
comment:
  Add file test_demovfs.c, containing a simple VFS implementation that demonstrates how writes to the journal file may be safely buffered by the VFS layer to improve performance on some embedded systems.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Enhance comments on the SrcList object definition to better explain the
  operation of the SrcList.a[].colUsed field.  No changes to code.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Make sure that all automatic indices are covering indices.  Otherwise, the
  table and index might be used together in a query but the table could get
  out of sync with the automatic index through out-of-band changes.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Wrap all automatic index changes inside SQLITE_OMIT_AUTOMATIC_INDEX.  Add
  the automatic_index PRAGMA to turn it on and off.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Add an interface to the SQLITE_STMTSTATUS_AUTOINDEX status information
  to the TCL bindings.  Add some simple automatic index test cases.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Fix a problem in the result set size estimation logic of the query planner - 
  a problem introduced by the two previous changes.


type: ci
user: drh
comment:
  Make sure F_OK, R_OK, and W_OK are defined in test_demovfs.c.  Define them manually
  if they are not.  This is necessary to get the module to compile on some systems.


type: ci
user: drh
comment:
  Fix an integer overflow bug in the automatic index logic.  The bug was
  detected by the testcase() macros added in the previous check-in.  Also
  add some more testcase() macros, since this issue points up their importance.


type: ci
user: drh
comment:
  Fix issues and clarify the operation of pager_playback_one_page().
  A block comment in pager.c identifies 13 invariants on the pager subsystem.
  Ticket [9d68c883132c8].


type: ci
user: drh
comment:
  Reset the simulated device in the test harness to its default
  configuration whenever it is restarted.


type: ci
user: dan
ecomment:
  Fix a problem where a process in exclusive mode could delete a hot-journal file without rolling it back from within sqlite3_close() or DETACH. This problem was introduced by commits from the past few days; it is not present in any release.

comment:
  Fix a problem where a process in exclusive mode could delete a hot-journal file without rolling it back from within sqlite3_close() or DETACH. This problem was introduced by the previous commit, it is not present in any releases.


type: ci
user: drh
comment:
  Recent changes cause the xSync method of the memory journal implementation
  to be used, so remove the assert(0).


type: ci
user: drh
comment:
  Add e_fts3.test to the set of tests excluded from the inmemory_journal
  exclusion list, since it does simulated OOM errors which trigger I/O errors
  and SQLite is unable to recover from I/O errors without a persistent journal.


type: ci
user: dan
comment:
  Test that the rollback-hook is invoked if a commit-hook implementation returns non-zero (causing a rollback). Remove documentation comment that says otherwise from sqlite.h.in.


type: ci
user: drh
comment:
  The query planner uses non-indexable WHERE clause terms to reduce the
  estimated number of output rows, then uses the estimated number of output
  rows as a tie-breaker when choosing table order.


type: ci
bgcolor: #c0ffc0
user: drh
ecomment:
  It is possible for sqlite3.pUnlockConnection to be non-NULL when
  sqlite3.pBlockingConnection is NULL, as the notify1.test script
  demonstrates.

comment:
  It is possible for sqlite3.pUnlockConnection to be non-NULL when
  sqlite3.pBlockingConnection is NULL, as the notify1.test script
  demonstrates.


type: ci
user: drh
comment:
  Disable query flattening when the outer query is a compound SELECT and
  the inner query has a LIMIT clause.  Ticket [02a8e81d44].


type: t
user: dan
brief: New ticket [02a8e81d44].
comment:
  New ticket [02a8e81d44] <i>LIMIT clause on sub-select in FROM clause of a SELECT in a UNION ALL interpreted incorrectly</i>.


type: t
user: drh
brief: Ticket [02a8e81d44]: 3 changes
comment:
  Ticket [02a8e81d44] <i>LIMIT clause on sub-select in FROM clause of a SELECT in a UNION ALL interpreted incorrectly</i> status still Open with 3 other changes


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Fix bug in log recovery (last frame in log was being ignored). Also remove an incorrect assert statement.


type: ci
bgcolor: #c0ffc0
user: shaneh
ecomment:
  Changes for branch coverage of notify.c.   Fixed quirk of 
  unlock_notify() where it would still think it was blocked
  after a callback was cleared (even after the transaction
  on the blocking connection was closed).

comment:
  Changes for branch coverage of notify.c.   Fixed quirk of 
  unlock_notify() where it would still think it was blocked
  after a callback was cleared (even after the transaction
  on the blocking connection was closed).


type: t
user: drh
brief: Fixed ticket [02a8e81d44].
comment:
  Fixed ticket [02a8e81d44]: <i>LIMIT clause on sub-select in FROM clause of a SELECT in a UNION ALL interpreted incorrectly</i> plus 2 other changes


type: g
user: drh
comment:
  Edit [c54e8dad01b0ecaf]: Change branch background color to "#c0ffc0". Move to branch [/timeline?r=experimental&nd&dp=c54e8dad01b0ecaf | experimental]. Edit check-in comment. Timestamp 2010-04-16 22:05:32.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  In synchronous=normal mode, do not sync the log after every transaction. In synchronous=full mode, sync the log and add any extra frames required to avoid blast-radius related problems after each transaction.


type: ci
user: shaneh
comment:
  Merge of notify.c changes from experimental.  
  Reset stored blocking connection when registered unlock_notify callback is cleared.


type: ci
user: drh
comment:
  Change sqlite3_step() so that it automatically calls sqlite3_reset() instead
  of returning SQLITE_MISUSE when invoked on a prepared statement that
  previously returned any value other than SQLITE_ROW.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Do not sync any files in wal mode if "PRAGMA synchronous=off" is set. If files are synced, pass either SQLITE_SYNC_FULL or SQLITE_SYNC_NORMAL to the xSync() callback as configured by "PRAGMA fullfsync".


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Add the xShmRelease() method to the VFS.  The os_unix.c implementation of
  the shared memory logic is still non-functional.


type: t
user: rogerb
brief: Ticket [bb1977f6e9]: 3 changes
comment:
  Ticket [bb1977f6e9] <i>Concatenation can create very invalid strings</i> status still Open with 3 other changes


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Use the read and write version fields of the database header to mark a database as operating in wal-mode.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Minor changes to test cases to account for the fact that databases with read/write versions of 2 are now understood.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  If, after obtaining a SHARED lock, there exists a *-wal file in the file-system, use WAL mode. This is necessary to recover from a crash that damages the first page of the database file.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Create a version of the log checksummer that works on big-endian platforms. Remove the 512KB size limit on the log-summary.


type: t
user: drh
brief: Closed ticket [bb1977f6e9].
comment:
  Closed ticket [bb1977f6e9]: <i>Concatenation can create very invalid strings</i> plus 2 other changes


type: ci
user: drh
comment:
  When commands such as ALTER TABLE and VACUUM use SQL internally, make sure
  they use only the built-in functions and not application-defined overrides
  for those functions.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Begin moving WAL-specific I/O into the VFS.  This checkin contains VFS
  infrastructure but it is untested and is not yet hooked up to the WAL.
  The version number is bumped to 3.7.0 because of the VFS extension.


type: ci
user: drh
comment:
  Enhancements to the showdb.c utility program.  Automatically detect the
  page size and adjust the display accordingly.  Add the "dbheader" display
  option.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Add the "wal" permutation to run existing test files savepoint.test and savepoint2.test in WAL mode.


type: ci
user: drh
comment:
  Further enhancements to the showdb utility:  A page number followed by "b"
  causes a btree decoding to occur on the page.


type: ci
user: drh
comment:
  Optimization: Convert an ORDER BY clause into a no-op if the query also
  contains a GROUP BY clause that will force the same output order.


type: ci
user: dan
comment:
  Zero the "immediate FK constraint counter" associated with a statement object when sqlite3_reset() is called. Fix for [c39ff61c43].


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Fix a problem that occurs when one process causes the log-summary file to grow and then a second process attempts to read the database.


type: ci
bgcolor: #ffd0c0
user: dan
ecomment:
  Add a test to check that a checkpointer releases its locks before returning, even if it has been prevented by a conflicting lock from checkpointing the database.

comment:
  Add a test to check that a checkpointer releases its locks before returning, even if it has been prevented by a conflicting lock from checkpointing the database.
  Add a test to check that a checkpointer releases its locks before returning, even if it has been prevented by a conflicting lock from checkpointing the database.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Change the SHM interface so that it does not take the name of the shared
  object but rather the name of the WAL file and derives its own name from
  that.  Remove the xShmDelete method from the VFS and replace it with a
  delete flag on xShmClose.


type: ci
bgcolor: #ffd0c0
user: dan
ecomment:
  Fix a bug in the WAL checkpoint code causing SQLite to use an inconsistent cache in a subsequent transaction.

comment:
  Fix a but in the WAL checkpoint code causing SQLite to use an inconsistent cache in a subsequent transaction.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Progress towards a VFS that will support WAL.  Locking code is in place
  but is untested.  Still no support for the DMS.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Refactor wal.c to use the VFS.  This check-in compiles and links and works
  ok as long as you leave WAL turned off, but WAL does not work.


type: t
user: dan
brief: Closed ticket [c39ff61c43].
comment:
  Closed ticket [c39ff61c43]: <i>Erroneous FK constraint failure when reusing statement</i> plus 2 other changes


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Fix a couple of assert() statements in os_unix.c and wal.c. Combine sqlite3WalIsDirty() with sqlite3WalUndo().


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Add a missing walIndexUnmap() call to the checkpoint code. Change a couple of SQLITE_CANTOPEN constants to SQLITE_CANTOPEN_BKPT.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Separate the concepts of underlying storage size and mapped size in the
  VFS shared-memory implementation.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  If a reader attempts to upgrade to a writer, but is not reading the most recent database snapshot, return SQLITE_BUSY.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  When closing a WAL connection, attempt an exclusive lock on the database file. If the lock is obtained, checkpoint the database and delete the wal and wal-index files.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Fix a couple uninitialized variables in the xShmLock method of the unix VFS.
  Improved debugging logic for xShmLock.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Correctly record the fact that the SHM lock reached PENDING if it did so
  but failed to reach CHECKPOINT.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Fix a bug whereby upgrading from a READ_FULL to a WRITE lock, and then back to a read lock was dropping all WAL locks.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Fix a problem in the previous commit. Both unixShm.lockState and unixShm.readLock should be set to READ when downgrading from a WRITE to a READ lock


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  In the debugging output for SHM-LOCK in os_unix.c, use symbolic names
  for the lock states rather than raw numbers.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Fix a problem with resizing the wal-index mapping after the mapping has been extended by an external process.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Change the SHM VFS logic in os_unix.c so that it does not hold an exclusive
  lock n the mapped memory when also holding a CHECKPOINT lock.  This
  improves concurrency between readers and checkpointers.


type: t
user: drh
brief: Fixed ticket [3dbdcdb14e].
comment:
  Fixed ticket [3dbdcdb14e]: <i>Assertion fault using indices with redundant columns</i> plus 2 other changes


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Fix the sqlite3_mutex_alloc() interface to return NULL (not segfault) when
  operating in threadsafe mode.  (This is a general-purpose bug fix which
  really ought to be ported to trunk.)


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Define an invariant to guarantee deadlock-free operation of SHM in os_unix.c
  and check that invariant with assert() statements.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  If the sqlite3_wal_checkpoint() API is passed a NULL pointer in place of a database name, attempt to checkpoint all attached databases.


type: ci
bgcolor: #ffd0c0
user: dan
comment:
  Have sqlite3_wal_checkpoint() populate the database handle error message and error code (as returned by sqlite3_errmsg() and sqlite3_errcode()).


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Make sure the mutex is held while calling sqlite3ApiExit() in 
  sqlite3_wal_checkpoint().  Other cleanup of WAL logic.


type: ci
user: drh
comment:
  Use VFS method xCurrentTimeInt64 instead of xCurrentTime when it is available.
  Provide an implementation of xCurrentTimeInt64 for os_unix.c.


type: ci
user: dan
comment:
  Have sqlite3_wal_checkpoint() handle a zero-length string in the same way as a NULL pointer. Fix "PRAGMA wal_checkpoint" so that it checkpoints all attached databases.


type: ci
user: drh
comment:
  Update the crash-test VFS in test6.c to pass-through the shared-memory
  methods to the real underlying VFS.  This fixes the walcrash.test script.


type: ci
user: drh
comment:
  Fix a bug in the computation of the current time for the alternative
  CURRENT_TIMESTAMP functions used when SQLITE_OMIT_DATETIME is defined.


type: ci
user: drh
comment:
  Unset some global TCL variables prior to use in test where prior tests can
  have those same variables set to an array value.


type: ci
user: dan
comment:
  Test that the correct number of padding frames are appended to the log file after committing a transaction in synchronous=FULL mode.


type: ci
user: dan
comment:
  Add a test case to verify that log files containing pages that are not a power-of-two bytes in size are handled correctly.


type: ci
user: drh
comment:
  When sqlite3PagerPagecount() is called without any locks, always return
  the physical file size, not the logical file size.


type: ci
user: drh
comment:
  When the in single-threaded mode, the sqlite3_mutex_alloc() interface
  still returns a non-NULL value.  The mutex doesn't do anything, but it
  tests non-NULL.  This way, extensions (or VFSes) that use sqlite3_mutex_alloc()
  can tell the difference between an OOM error and mutexes being disabled.


type: ci
user: drh
comment:
  Make sure the page size of the main database is fixed following a
  failed VACUUM attempt.  Otherwise, two consecutive failed VACUUM attempts
  with attempted page_size changes on encrypted or WAL databases could
  result in database corruption.


type: ci
user: dan
comment:
  When closing a WAL database, if the exclusive lock on the database file is obtained and the database successfully checkpointed, delete the wal-index file from the file system.


type: ci
user: drh
comment:
  Do not compare page sizes on source and destination of backup until
  transactions are started and the page sizes are locked.  This is a
  fix to check-in [7bd44794c4].


type: ci
user: drh
comment:
  Further simplifications to the SHM locking logic.  Remove the SQLITE_SHM_QUERY
  option.  Unify the WRITE to READ and RECOVER to READ transitions.


type: ci
user: drh
comment:
  Change the behavior of the sqlite3_wal_hook() callback.  It should now return
  SQLITE_OK or an error code and the error code is propagated back up the 
  stack.  If a checkpoint is desired, the callback should invoke
  sqlite3_wal_callback() itself.


type: ci
user: drh
comment:
  Remove the noop-mutex implementations of mutex_held() and mutex_notheld() 
  since they are both unreachable.


type: ci
user: drh
comment:
  After throwing an error to say that one cannot change into WAL mode within
  a tranactions, do not then go and change into WAL mode.


type: ci
user: dan
comment:
  Fix a bug whereby an old snapshot could be checkpointed (and subsequent transactions discarded) if the last connection to disconnect from a WAL database happended to be holding an out-of-date wal-index header.


type: ci
user: dan
comment:
  Only pass -1 as the size parameter to xShmGet when the caller does not care what size mapping is returned. Only call xShmSize when the underlying allocation (not the mapping) should be resized.


type: ci
user: dan
comment:
  If recovery is run before a checkpoint, change back to a CHECKPOINT lock before performing the actual checkpoint.


type: ci
user: dan
comment:
  Instead of transitioning to RECOVER state from CHECKPOINT when a recovery is required, perform the recovery while holding the CHECKPOINT lock.


type: ci
user: drh
comment:
  Make sure to do a clean shutdown of the library upon existing the shell
  in order to remove WAL files.


type: ci
user: drh
comment:
  The PRAGMA journal_mode=WAL; command now makes WAL the default journal mode
  for new databases added with ATTACH, so the behavior is consistent with the
  other journal modes.


type: ci
user: drh
comment:
  Remove savepoint6.test from the set of tests run by journaltest since 
  savepoint6.test uses journal_mode=WAL.


type: ci
user: drh
comment:
  Another attempt to fix permutations.test so that it excludes WAL tests
  from the journaltest permutation.


type: ci
user: dan
comment:
  Since walIndexTryHdr() can no longer encounter any error conditions, change tehe function signature so that it does not return an error code. This removes unreachable branches from other code.


type: ci
user: drh
comment:
  Change the xShmOpen() method of the VFS to take the database file name as
  its argument, not the WAL file name.  Also fix some unrelated compiler
  warnings.


type: ci
user: drh
comment:
  When running a checkpoint while in locking_mode=EXCLUSIVE, be sure to move
  the wal-index lock to UNLOCK from READ prior to promoting to CHECKPOINT.


type: ci
user: drh
comment:
  Enhance the OP_JournalMode opcode with an ignore-errors option and use that
  option the ATTACH command.


type: ci
user: drh
ecomment:
  If an ATTACH command fails due to OP_JournalMode but still attaches the
  database, make sure VACUUM still detaches it when done.

comment:
  If an ATTACH command files due to OP_JournalMode but still attaches the
  database, make sure VACUUM still detaches it when done.


type: ci
bgcolor: #c0ffc0
user: drh
ecomment:
  Change the xShmSize() implementation in os_unix.c so that it will only
  increase and never decrease the size of a shared-memory segment.

comment:
  Change the xShmSize() implementation in os_unix.c so that it will only
  increase and never decrease the size of a shared-memory segment.


type: ci
user: drh
comment:
  Fix an off-by-one error while constructing the name of the mmap file for
  the wal-index under os_unix.c.


type: ci
bgcolor: #c0f0ff
user: shaneh
comment:
  Updates to WAL support in os_win.c: pulled in latest changes from src/os_unix.c; updated tracing; misc. improvements.


type: ci
user: drh
comment:
  When an attempt to change journal_mode fails due to locks, be sure to
  leave internal structures in a consistent state.


type: ci
user: drh
comment:
  Remove the OP_Variable optimization of check-in [48b77b04935d894] since it
  can lead to malfunctions as described in ticket [26ff0c82d1e90].


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Refactoring the VFS-SHM methods used by WAL.  This version compiles and
  runs non-WAL test cases but crashes and burns on wal.test.


type: ci
bgcolor: #c0f0ff
user: drh
ecomment:
  Pull in all the latest changes from the trunk.
  Update the win32 SHM methods to work with the new interface design.

comment:
  Pull in all the latest changes from the trunk.
  Update the win32 SHM methods to work with the new interface design.


type: ci
bgcolor: #ffc0d0
user: dan
ecomment:
  (Moved to the mistake branch due to compile errors in test_osinst.c.)
  Change the vfs instrumentation code in test_osinst.c to make it easier to deploy. Add a vtab implementation for reading the binary log file format.

comment:
  Change the vfs instrumentation code in test_osinst.c to make it easier to deploy. Add a vtab implementation for reading the binary log file format.


type: ci
user: drh
comment:
  The refactored of VFS SHM primitives are now working so merge the 
  wal-refactor branch back into the trunk.


type: g
user: drh
comment:
  Edit [ee13c8849d234931]: Move to branch [/timeline?r=mistake&nd&dp=ee13c8849d234931 | mistake]. Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2010-05-12 19:02:36.


type: ci
user: drh
comment:
  Allow sqlite3WalCheckpoint() to be called even if the WAL is in the
  SQLITE_SHM_READ state, as sometimes happens after an error.


type: ci
user: drh
comment:
  Make debugging elements of the sqlite3_mutex object volatile and make them
  only appear when compiling with SQLITE_DEBUG.  Ticket [51914f6acd2cb462].


type: t
user: rogerb
brief: Ticket [51914f6acd]: 1 change
comment:
  Ticket [51914f6acd] <i>nRef and owner should be #ifdef SQLITE_DEBUG</i> status still Fixed with 1 other change


type: ci
user: dan
comment:
  Fix test_osinst.c so that it does not depend on gettimeofday() unless SQLITE_OS_UNIX is defined and NO_GETTOD is not defined.


type: ci
user: drh
comment:
  Change the OSTRACEn() macro to OSTRACE(()).  Also rename some internal fields
  and variables in os_unix.c to be more meaningful and searchable.


type: ci
user: drh
comment:
  Simplify os_unix.c by removing support for LinuxThreads.  Linux systems must
  either use NPTL or else not share database connections across threads.


type: ci
user: drh
comment:
  Simplifications to the SHM implementation in os_unix.c, taking advantage
  of the removal of the LinuxThreads mess.


type: ci
user: drh
comment:
  Make sure the value of an INTEGER PRIMARY KEY column supplied to triggers
  and especially to FK constraints really contains the ROWID and not the
  NULL that is stored in the column itself.  Ticket [dd08e5a988d00dec].


type: ci
bgcolor: #c0c0c0
user: drh
ecomment:
  Keep additional state information in the pager in an effort to reduce the
  number of SQLITE_FCNTL_SIZE_HINTs.
  (Note: This change was found to make no performance difference and so
  has been moved onto a side branch.  Use the parent check-in instead of
  this one.)

comment:
  Keep additional state information in the pager in an effort to reduce the
  number of SQLITE_FCNTL_SIZE_HINTs.


type: ci
user: drh
comment:
  Fix a typo that (by bad luck) was not a syntax error but which caused some 
  important lines of code to be skipped when SQLITE_DEBUG was not used.


type: t
user: drh
brief: Fixed ticket [dd08e5a988].
comment:
  Fixed ticket [dd08e5a988]: <i>Foreign key constraint fails to prevent consistency error.</i> plus 2 other changes


type: ci
user: dan
comment:
  Add a note to the documentation of sqlite3_wal_hook() to say not to return SQLITE_ROW or SQLITE_DONE. Or any other value that is not a valid SQLite error code.


type: ci
bgcolor: #f2dcdc
user: drh
comment:
  An improvement to the SQLITE_FCNTL_SIZE_HINT change that invokes the hint
  less often and only when really needed.


type: ci
user: drh
comment:
  Update the wal-index hash format so that hash-table space is reused following
  a rollback, thus preventing hash table overflows.  Add assert()s to verify
  that hash tables do not overfill.  Further refactoring of the wal-index code.


type: g
user: drh
comment:
  Edit [97d88a86e45e7a42]: Change branch background color to "#c0c0c0". Move to branch [/timeline?r=branch-3.6.1-exp&nd&dp=97d88a86e45e7a42 | branch-3.6.1-exp]. Edit check-in comment. Timestamp 2010-05-18 12:37:05.


type: ci
user: drh
comment:
  Fix a bug in the new checkpoint computation.  Also update the checkpoint
  algorithm in the test scripts to align with the new implementation.


type: ci
user: drh
comment:
  Add the SQLITE_FCNTL_SIZE_HINT operator to sqlite3_file_control() and use it
  to give the VFS hints about the ultimate size of a database file when the
  file is growing.


type: ci
bgcolor: #60b0ff
user: drh
comment:
  Cherry-pick the SQLITE_FCNTL_SIZE_HINT patch (check-in [2b7e3b4a30d6a7c4a8]
  and bump the version number to 3.6.23.2.


type: ci
bgcolor: #60b0ff
user: drh
comment:
  Pull the incremental_vacuum bug fix ([255f1eefa373153942c67b18b]) and the
  R-tree segfault bug fix ([7f2f71cc9e3c39093f09231f44]) into the 3.6.23
  branch.  Increase the version number to 3.6.23.3.


type: ci
user: drh
comment:
  Convert the wal-header and frame-header to 24 bytes.  Extra information in
  both headers is designed to enhance robustness after crashes, though the
  extra information is currently unused.  This is a snapshot of a work in
  progress.


type: ci
user: drh
comment:
  Add a new xShmBarrier method to the VFS - a shared-memory fence operation.
  Implement the same in both unix and win32.  Use it to make the WAL subsystem
  more robust.


type: ci
user: drh
comment:
  Fix the wal-index header read routine so that it correctly detects a zero
  header as being malformed and in need of a wal-index rebuild.


type: ci
user: drh
comment:
  Comment out the SQLITE_FCNTL_SIZE_HINT from os_unix.c since it does not 
  seem to provide any performance gain there.


type: ci
user: drh
comment:
  Add several EXPENSIVE_ASSERT code blocks to validate the wal-index hash table.
  Fix the bugs that these code blocks fine.  Rename walClearHash() to 
  walCleanupHash() and simplify its interface.


type: ci
user: dan
comment:
  Change the WAL file format to support two kinds of checksums - one that is fast to calculate on little-endian architectures and another that is fast on big-endian architectures. A flag in the wal-header indicates which the file uses.


type: ci
user: dan
comment:
  Change the checksum used in WAL files so that each frames checksum depends on the content of the WAL header and all frame headers and content up to and including the frame to which the checksum is attached.


type: ci
user: dan
comment:
  If a writer exits unexpectedly in the middle of a transaction, have the following writer remove any wal-index hash-table entries left by the interrupted transaction.


type: ci
user: drh
comment:
  Update header comments in wal.c to correctly describe the WAL file format.
  Update the locking region offsets in os_unix.c and os_win.c and add assert()
  statement to verify that the locking region offsets are correct.


type: ci
user: drh
comment:
  Change the semantics of xShmGet() such that it will never increase the size
  of shared memory.  xShmSize() must be used to grow the size of shared memory.
  A shared memory segment size cannot be shrunk (except by dropping it).


type: ci
user: drh
comment:
  Make sure the wal-index mapping is always large enough to cover the entire
  active area of the wal-index.


type: ci
user: dan
comment:
  Add tests to fkey2.test to check that ON CONFLICT clauses do not affect SQLite's behaviour when an FK constraint is violated.


type: ci
bgcolor: #d0c0ff
user: drh
comment:
  Initial code for incremental checkpoint in WAL mode.  This check-in compiles
  on unix and runs as long as you do not engage WAL mode.  WAL mode crashes and
  burns.  Consider this check-in a baseline implementation for getting the new
  capability up and running.


type: ci
user: drh
comment:
  The incremental checkpoint feature is not perfect yet, but it is working
  well enough to merge it into the trunk.


type: ci
bgcolor: #d0c0ff
user: drh
comment:
  Remove the tests that enable tracing based on the existance of the "vdbe_*"
  files when in SQLITE_DEBUG mode.


type: ci
bgcolor: #d0c0ff
user: dan
comment:
  Zero the checkpoint header as the last step of successful WAL recovery. Avoid an unnecessary lock/unlock in WalBeginReadTransaction.


type: ci
bgcolor: #d0c0ff
user: drh
comment:
  Fix an inconsistent #ifdef in wal.c.  Fix os_unix.c so that it does not allow
  moving an SHM lock directly exclusive to shared without going through unlocked.


type: ci
bgcolor: #d0c0ff
user: drh
comment:
  Add an "isInit" field in the wal-index header that must be non-zero for
  a valid header.  Use this to detect an uninitialized wal-index.


type: ci
bgcolor: #d0c0ff
user: dan
comment:
  If the checkpoint fails to obtain an exclusive lock on one of the read-lock bytes, do not consider this an error.


type: ci
bgcolor: #d0c0ff
user: drh
comment:
  Fix a bug introduced by the previous check-in but only seen if
  SQLITE_ENABLE_EXPENSIVE_ASSERTS is turned on.


type: ci
bgcolor: #d0c0ff
user: dan
comment:
  If an attempt to get a read-lock on the WAL fails with SQLITE_BUSY_RECOVER, call the busy-handler at the btree level.


type: ci
user: dan
comment:
  Delay the decision to restart the log file until data is actually ready to be written to the log file (instead of at the start of a write transaction).


type: ci
user: dan
comment:
  Change the OOM and IO error test cases in walfault.test so that each test case runs both types of error simulation.


type: ci
user: drh
comment:
  The shared-memory used by WAL on linux now really is shared memory in /dev/shm.
  On other unix flavors, the file is in a temporary directory rather than in the
  same directory as the database.


type: ci
user: drh
comment:
  Undo one of the "const" markers from the previous check-in because the
  value needs to be changable, even if it is not actually ever changed in
  the current implementation.


type: ci
user: drh
comment:
  When walTryBeginRead() encounters an I/O error trying to set a lock
  (as opposed to SQLITE_BUSY) be sure to propagate that error back up
  the call stack.


type: ci
user: drh
comment:
  Make sure the directory used by os_unix.c for shared-memory files is always
  the same, regardless of individual client permissions and environment
  variable settings.


type: ci
user: dan
comment:
  If an error occurs while writing frames to the log to commit a transaction, do not mark the pages as clean in the cache. Otherwise, the subsequent rollback does not roll them back (leaving the client to continue with a cache that makes it appear that the transaction was committed - inconsistent with the database on disk).


type: ci
user: dan
comment:
  Fix a problem with rolling back to a savepoint opened before the writer decided to wrap the log file.


type: ci
user: dan
comment:
  If a malloc fails while allocating a savepoint object at the pager level, do not try to roll that savepoint back later on.


type: ci
user: dan
ecomment:
  If an error (OOM or SQLITE_FULL error) occurs while executing an SQL statement and a statement-transaction is automatically rolled back as a result, if a second error occurs during the statement rollback do a full transaction rollback instead. Otherwise the client can be left with an inconsistent cache. This can affect both WAL and rollback modes.

comment:
  If an error (OOM or SQLITE_FULL error) occurs while executing an SQL statement and a statement-transaction is automatically rolled back as a result, if a second error occurs during the statement rollback do a full transaction rollback instead. Otherwise the client can be left with an inconsistent cache.


type: g
user: drh
comment:
  Edit [4c3e137803f86ec5]: Change branch background color to "#ffc0d0". Timestamp 2010-05-13 09:32:31.


type: ci
user: dan
comment:
  Fix a problem where an SQLITE_BUSY in the checkpoint code was being treated as an IO error (abandoning, instead of just limiting, the checkpoint).


type: ci
user: dan
comment:
  If an attempt to sync the database file as part of a checkpoint fails, do not update the shared "nBackfill" variable. Otherwise, another process could wrap the log and overwrite content before it is synced into the database.


type: ci
user: dan
comment:
  Remove a condition from sqlite3WalRead() that is unreachable as of the changes to clear entries out of the wal-index hash tables on transaction or savepoint rollback.


type: ci
user: dan
comment:
  Change all.test, quick.test and permutations.test so that they use a separate interpreter for each test file.


type: ci
user: dan
comment:
  In os_unix.c, call munmap() to unmap a shared-memory region prior to closing the associated file descriptor.


type: ci
user: dan
comment:
  Changes to wal3.test to support small default cache size settings. And builds that create autovacuum databases by default.


type: ci
user: dan
comment:
  Close database opened by tester.tcl when it is sourced in all.test. Because test scripts are now run in slave interpreters, this connection was not being closed by the first script run as it was previously.


type: ci
user: drh
comment:
  Shift the meaning of aReadMark[] back so that +1 offset from mxFrame is
  removed.  Add the new READMARK_NOT_USED value (0xffffffff) instead of
  zero to signal an aReadMark[] that is not in use.


type: g
user: drh
comment:
  Edit [7c102c7b5f90717f]: Change branch background color to "#ffc0d0". Move to branch [/timeline?r=mistake&nd&dp=7c102c7b5f90717f | mistake]. Marked "Closed". Timestamp 2010-06-09 11:02:13.


type: ci
user: dan
ecomment:
  When restarting (wrapping) a log file, set all unused <nowiki>aReadMark[]</nowiki> slots to READMARK_NOT_USED instead of 0. Setting them to 0 does not cause a problem, but may cause SQLite to obtain and release a few more file locks than would otherwise be necessary.

comment:
  When restarting (wrapping) a log file, set all unused aReadMark[] slots to READMARK_NOT_USED instead of 0. Setting them to 0 does not cause a problem, but may cause SQLite to obtain and release a few more file locks than would otherwise be necessary.


type: t
user: drh
brief: Fixed ticket [f973c7ac31].
comment:
  Fixed ticket [f973c7ac31]: <i>Incorrect affinity for indexed range constraint</i> plus 2 other changes


type: ci
user: dan
comment:
  Store the MemPage structure in memory following, instead of preceding, the page data for cached pages. This reduces the likelihood of a corrupt database page image causing SQLite to read past the end of a buffer.


type: ci
user: drh
comment:
  Add the SQLITE_TESTCTRL_PGHDRSZ verb for sqlite3_test_control() used to get
  the size of pcache headers for testing purposes.


type: g
user: drh
comment:
  Edit [eade8bc238df5804]: Change branch background color to "#c0ffc0". Timestamp 2010-06-12 12:02:36.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Remove xShmGet/Size/Release from the sqlite3_vfs structure. Change the name of xShmPage to xShmMap. Remove some code that is now unused from os_unix.c and some of the test VFS implementations.


type: ci
user: drh
comment:
  Move the xShmMap method to in between xShmLock and xShmBarrier, since it seems
  to fit in there logically.


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  Experimental change: On systems where it is not possible to unlink a file while one or more processes has it open (i.e. not unix), avoid closing the journal file each time the database is unlocked and reopening it at the start of each transaction.


type: ci
user: drh
comment:
  Bug fix:  Only trust the database size number at offset 28 if the change
  counter at offset 24 matches the version number counter at offset 92.
  This prevents corruption in the case of two applications writing to the
  database where one is an older version of SQLite and the other is a newer
  version.


type: g
user: dan
comment:
  Edit [bede8c8a148fb9be]: Change branch background color to "#c0c0c0". Timestamp 2010-06-16 19:04:23.


type: t
user: dan
brief: New ticket [fc62af4523].
comment:
  New ticket [fc62af4523] <i>Executing &quot;PRAGMA journal_mode&quot; may delete journal file while it is in use.</i>.


type: t
user: dan
brief: Ticket [fc62af4523]: 4 changes
comment:
  Ticket [fc62af4523] <i>Executing "PRAGMA journal_mode" may delete journal file while it is in use.</i> status still Open with 4 other changes


type: ci
user: drh
comment:
  Fix the tkt-fc62af4523.test to work around non-randomness of the
  randomblob() function when in testing mode.


type: t
user: dan
brief: Ticket [fc62af4523]: 1 change
comment:
  Ticket [fc62af4523] <i>Executing "PRAGMA journal_mode" may delete journal file while it is in use.</i> status still Open with 1 other change


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  A different fix to [fc62af4523]. When changing from journal_mode=PERSIST or TRINCATE to some other rollback mode, delete the journal file only if a RESERVED lock can be obtained on the database file first.


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  Change the implementation of the unix implementation of xAccess() so that it returns 0 (does not exist) to an SQLITE_ACCESS_EXISTS query on a file that exists but is zero bytes in size.


type: ci
user: drh
comment:
  Change the unix VFS to always allocate shared-memory using a file in the
  same directory as the database.  Otherwise, a chroot might cause different
  processes to use different shared memory files resulting in database
  corruption.


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  Rearrange some code in OP_JournalMode to avoid incorrect returns from subsequent invocations of "PRAGMA journal_mode" following an IO error.


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  Change the name of IOCAP_SAFE_DELETE to IOCAP_UNDELETABLE_WHEN_OPEN. Have the xDeviceCharacteristics() method of the win32 VFS return this flag.


type: ci
user: drh
comment:
  Fix comment inside the pager_unlock() routine.  Always close the master
  journal file before trying to delete it.


type: ci
user: drh
comment:
  Minor tweaks to get the pager working for corner cases when the
  SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN flag is set.


type: ci
user: dan
comment:
  Add a version number to the wal-index header. If SQLite encounters a version number in either the wal or wal-index files that it does not understand, the operation is abandoned and SQLITE_CANTOPEN returned.


type: ci
user: drh
comment:
  Adjust the shared-memory locking range to account for the new version number
  values in the wal-index header.


type: ci
user: dan
comment:
  Add test case for SQLITE_FULL errors to pagerfault.test. Remove a NEVER macro in pager.c that this hits.


type: ci
user: drh
comment:
  Make sure the wal-index reader detects an incorrect version number even if
  it had to hold a lock in order to read the wal-index.  Also, expand and enhance
  various comments in wal.c.


type: ci
user: dan
comment:
  Add coverage tests. Remove a NEVER macro from pager.c, as the condition can now be true in wal mode.


type: ci
user: drh
comment:
  Revert to allowing a cache spill during writes of multiple pages within a
  single sector as long as the spill does not require a journal sync and a
  new journal header.


type: ci
user: drh
comment:
  Change the name of the shared-memory file on windows from *-wal-index to
  *-shm, for consistency with unix.


type: ci
user: drh
comment:
  Fix up a branch in sqlite3ValueFromExpr() so that we can achieve full
  branch test coverage regardless of whether or not SQLITE_ENABLE_STAT2 is
  used.


type: ci
user: dan
comment:
  Reduce the size of the large allocation (approx 8KB for every 4000 frames in the log) that occurs during checkpoint. Use the 'scratch' memory for this allocation instead of the general purpose allocation.


type: ci
user: dan
comment:
  When synchronous=NORMAL, use the same journal file format as with synchronous=FULL (i.e. multiple journal headers within the one journal). Fix for [d11f09d36e].


type: t
user: dan
brief: Ticket [d11f09d36e]: 3 changes
comment:
  Ticket [d11f09d36e] <i>Cache corruption caused by ROLLBACK with synchronous=NORMAL</i> status still Open with 3 other changes


type: t
user: dan
brief: Ticket [d11f09d36e]: 1 change
comment:
  Ticket [d11f09d36e] <i>Cache corruption caused by ROLLBACK with synchronous=NORMAL</i> status still Open with 1 other change


type: ci
user: drh
comment:
  Fix two asserts on the scratch allocator to allow for up to two outstanding
  scratch allocations per thread.


type: ci
user: dan
comment:
  Currently, if SQLite cannot find a table or index referred to by a query, it reloads the database schema from disk to see if the table or index has been added since the schema was cached in memory. Extend this behaviour to columns (which may have been added using ALTER TABLE) and fix some obscure cases related to tables and indexes (INDEXED BY, DROP TABLE etc.).


type: t
user: dan
brief: Closed ticket [d11f09d36e].
comment:
  Closed ticket [d11f09d36e]: <i>Cache corruption caused by ROLLBACK with synchronous=NORMAL</i> plus 1 other change


type: ci
user: dan
comment:
  Add coverage test cases. Have sqlite3_backup_step() transform SQLITE_IOERR_NOMEM to SQLITE_NOMEM before returning.


type: ci
user: dan
comment:
  Do not call pager_open_journal() from within PagerBegin() if the connection is in exclusive-access mode. It will be called from within PagerWrite() just as it is for non-exclusive mode anyway.


type: ci
user: drh
comment:
  If you delete a database file but not its *-wal file, then open the database
  (thus creating a new empty database file) the *-wal file is automatically
  deleted.


type: ci
user: drh
comment:
  Add a NEVER to sqlite3PagerCommitPhaseTwo() because it is now no longer
  possible to invoke that function without holding a RESERVED lock.


type: ci
user: dan
comment:
  Add initializers for the xShmXXX() members to an sqlite3_io_methods structure in journal.c. This doesn't fix any real problem, just prevents a compiler warning.


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Take out the incomplete initializer on the constant "dummy" in
  sqlite3VdbeGetOp().  Add a comment that the MSVC warning there should
  be ignored.


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  Change code in OP_Rewind to avoid a valgrind warning following an error in the btree layer. This change does not fix any bug, just a warning.


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  Do not attempt to open a WAL file for an in-memory or temporary database. Even if the database header suggests that it is a WAL database.


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  Fix an assert() in pager.c added by the previous commit. And various problems with test scripts in autovacuum and in-memory journal mode.


type: ci
user: drh
ecomment:
  Cherry-pick the correct changes out of the recent "mistake" branch while
  omitting the bugs.

comment:
  Cherry-pick the correct changes out of the recent "mistake" branch while
  omitting the bogus changes.


type: g
user: drh
comment:
  Edit [708338773919fa02]: Change branch background color to "#ffc0d0". Move to branch [/timeline?r=mistake&nd&dp=708338773919fa02 | mistake]. Timestamp 2010-07-02 17:05:03.


type: g
user: drh
comment:
  Edit [708338773919fa02]: Change branch background color to "#c0c0c0". Timestamp 2010-07-02 17:05:03.


type: ci
user: drh
comment:
  Remove the unused xRename() method from the sqlite3_vfs object.
  Add better documentation on the xCurrentTimeInt64() method.


type: ci
user: dan
comment:
  Add any files specified as part of the QUICKTEST_INCLUDE environment variable to the set of test files run as part of "make test". Release testing uses this trick.


type: ci
user: dan
comment:
  Call Tcl_ExitThread() from within threads created using Tcl_CreateThread(). Not doing so causes notifier related errors on OSX.


type: ci
user: dan
comment:
  Do not report an error if the open-file-count is not as it should be after running a multi-threaded test. The counter instrumentation is not thread-safe.


type: ci
user: drh
comment:
  When rolling back page 1 from a journal, restore the "nReserve" setting
  in case it has been corrupted by a prior crash.


type: ci
user: dan
comment:
  Allocate a buffer containing the full path-name to the associated WAL file when a pager is created. This saves having to construct a new buffer each time a new read-transaction is opened and SQLite checks for the existance of a WAL file.


type: ci
user: drh
comment:
  Modify the VFS xAccess() method on winNT so that it returns false for
  an exists test of a zero-length file.  This makes the windows VFS work
  the same as the unix VFS.


type: ci
user: dan
comment:
  Ensure the correct error code is returned if an attempt to parse a database schema made by an ATTACH statement fails.


type: ci
user: drh
comment:
  Reorder variable declarations in the previous check-in to avoid putting code
  before declarations when not testing.


type: ci
user: dan
comment:
  Before calling Tcl_ExitThread() in a multi-threaded test, call Tcl_DoOneEvent() as many times as necessary to handle any queued events.


type: ci
user: drh
comment:
  Remote the SQLITE_OMIT_GLOBALRECOVER macro - it is subsumed by 
  SQLITE_OMIT_DEPRECATED.  Add support to sqlite3_compileoption_used()
  for SQLITE_OMIT_WAL.


type: ci
user: dan
comment:
  Change the async-IO extension to return SQLITE_IOERR_SHORT_READ when appropriate. This prevents a valgrind warning in the test suite.


type: ci
user: dan
comment:
  Make sure the schema is loaded before preparing a "PRAGMA journal_mode" command. This helps it return meaningful results when it is the first command executed by a new database connection.


type: ci
user: drh
comment:
  Avoid the need for a NEVER() from pager_write_pagelist() by passing in
  pPager as an extra parameter.


type: ci
user: shaneh
comment:
  Fixed a new error introduced by last check-in of os_win.c.  Updated xAccess() to support SimulateIOError().


type: ci
user: dan
comment:
  Do not make the SQLITE_FCNTL_SIZE_HINT call if an error has already occurred during transaction commit.


type: ci
user: shaneh
comment:
  When using MSVC to build test code, suppress the popup dialog when abort is called from the sqlite_abort() test function.


type: ci
user: drh
comment:
  Change the journal_mode pragma to remove the "default journal mode" concept.
  The journal_mode pragma only effects currently attached databases and does 
  not change the behavior of future attachments.


type: g
user: drh
comment:
  Edit [8a5811ea80e8415f]: Change branch background color to "#c0ffc0". Timestamp 2010-07-08 16:30:44.


type: ci
user: drh
comment:
  Reformat WAL code for clearer presentation.  Update comments for correctness.
  Add checks to ensure that corruption in shared-memory does not result in
  an infinite loop.


type: ci
user: dan
comment:
  In the async-IO module, do not increment the open file-counter until after an "open file" event has been added to the event queue. Otherwise, an OOM may cause the system to increment the counter even though no file was successfully opened.


type: ci
user: drh
comment:
  Fix makefiles so that they build sqlite3_analyzer again.  Tweaks to comments
  in test_stat.c.  Fix tclsqlite.c to build the sqlite3_analyzer again.


type: ci
user: dan
comment:
  Fix test_stat.c so that it does not cause compilation errors if SQLITE_OMIT_VIRTUALTABLE is defined.


type: ci
user: shaneh
comment:
  Updates to comments and code organization to reflect changes in os_unix.c;  
  Updated winShmLock() with logic changes from unixShmLock(); 
  Modified IO error returns in winShmMap() to match those in unixShmMap();


type: ci
bgcolor: #c0ffc0
user: drh
ecomment:
  Improved documentation for the SQLITE_ACCESS_* constants that are used
  with the xAccess() method of the VFS.

comment:
  Improved documentation for the SQLITE_ACCESS_* constants that are used
  with the xAccess() method of the VFS.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Changes so that the xShmOpen VFS method is no longer required. Its job can be done by the first call to xShmMap. Rename xShmClose to xShmUnmap.


type: g
user: drh
comment:
  Edit [3d4bb65f10ed0297]: Change branch background color to "#c0ffc0". Edit check-in comment. Timestamp 2010-07-13 14:48:27.


type: g
user: dan
comment:
  Edit [52577bb5e723d8de]: Change branch background color to "#ffc0d0". Timestamp 2010-07-13 14:33:49.


type: ci
user: drh
comment:
  Fix the unix driver to return an I/O error if unlink fails for any reason
  other than the file not existing in the first place.


type: ci
user: drh
comment:
  Remove the xShmOpen method from the VFS.  Shared-memory is opened automatically
  by a call to xShmMap.  Rename the xShmClose method to xShmUnmap.


type: ci
user: dan
comment:
  On unix, try to create the *-wal and *-shm files with the same permissions as the associated database file.


type: ci
user: dan
ecomment:
  Test the libraries response to read-only or unreadable database, WAL and wal-index files. If a WAL file cannot be opened in read/write mode, return SQLITE_CANTOPEN to the caller.

comment:
  Test the libaries response to read-only or unreadable database, WAL and wal-index files. If a WAL file cannot be opened in read/write mode, return SQLITE_CANTOPEN to the caller.


type: ci
user: drh
comment:
  Make the result of an IN or NOT IN expression with an empty set on the 
  right-hand side always either false or true, respectively, even if the
  left-hand side is NULL.  Ticket [80e031a00f45dc]


type: ci
user: drh
comment:
  Additional test cases and evidence marks for the empty RHS bug on the IN
  operator - ticket [80e031a00f45dca877]


type: t
user: drh
brief: Fixed ticket [80e031a00f].
comment:
  Fixed ticket [80e031a00f]: <i>Result of IN should never be NULL if the RHS is empty</i> plus 2 other changes


type: ci
user: drh
comment:
  The expression list on the RHS of an IN operator can no longer be empty
  because an empty expression list is now optimized out by changes in
  check-in [c288ac644d0bf].  Therefore add ALWAYS() macros around tests
  for the expression list being non-empty.


type: ci
user: dan
comment:
  When creating a journal file on unix, attempt to create it with the same permissions as the associated database file.


type: ci
user: dan
comment:
  Changes to wal.c so that SQLite can read even if the WAL file is opened read-only, provided the wal-index (shm file) is opened read/write.


type: ci
user: drh
comment:
  Optionally support shared-memory in /dev/shm or other tmpfs directory
  using an unsupported compile-time option.


type: ci
user: drh
comment:
  Previous check-in [534aab837e] accidently reverted some
  changes from [a121cd80c5].  This check-in restores those changes.


type: ci
user: drh
comment:
  Add the -p option to lemon to cause conflicts resolved by precedence rules
  to appear in the parse.out file.


type: ci
user: drh
comment:
  Improvements to the formatting of parse.out file from Lemon.  Add the -r option
  to Lemon to disable the state sorting, making debugging easier.


type: t
user: rogerb
brief: Closed ticket [30349e0f68].
comment:
  Closed ticket [30349e0f68]: <i>Yet more FTS3 symbols need to be made private</i> plus 3 other changes


type: ci
user: dan
comment:
  Re-introduce the prefix-search optimization of [feef1b15d6], which was lost in a reorganization of FTS3 code.


type: ci
user: dan
comment:
  Use exit(255) instead of abort() in the tcl [sqlite_abort] test command. This stops testfixture from creating dozens of core files each time tests are run.


type: ci
user: dan
comment:
  Fix a race condition in os_unix.c that may occur when one thread is opening a connection to a shared-memory block and another is either closing or locking the same shared-memory.


type: ci
user: drh
comment:
  Tweaks to the virtual table documentation contained in comments of sqlite3.h.
  No changes to actual code.


type: t
user: aswift
brief: New ticket [4711020446].
comment:
  New ticket [4711020446] <i>should use collate nocase index even if column isn't declared nocase</i>.


type: t
user: drh
brief: Ticket [4711020446]: 3 changes
comment:
  Ticket [4711020446] <i>should use collate nocase index even if column isn't declared nocase</i> status still Open with 3 other changes


type: t
user: drh
brief: Ticket [e090183531]: 3 changes
comment:
  Ticket [e090183531] <i>like should use index when pattern has no wildcard</i> status still Open with 3 other changes


type: g
user: drh
comment:
  Edit [b36b105eab6fd319]: Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2010-07-21 16:16:28. Add tag "release".


type: t
user: rogerb
brief: Ticket [5e0423b058]: 3 changes
comment:
  Ticket [5e0423b058] <i>xAccess behaviour is not documented, changed in Windows 3.7.0</i> status still Open with 3 other changes


type: t
user: drh
brief: Fixed ticket [e090183531].
comment:
  Fixed ticket [e090183531]: <i>like should use index when pattern has no wildcard</i> plus 1 other change


type: ci
user: drh
comment:
  Enhance the LIKE/GLOB query optimization so that it works as long as there
  is an index with the appropriate collating sequence and even if the default
  collating sequence of the column is different.
  Ticket [4711020446da7d93d99].


type: t
user: drh
brief: Fixed ticket [4711020446].
comment:
  Fixed ticket [4711020446]: <i>should use collate nocase index even if column isn't declared nocase</i> plus 1 other change


type: ci
user: drh
comment:
  Strenghten an assert() in malloc.c that helps to ensure that allocated memory
  is freed by the appropriate routine.


type: ci
bgcolor: #c0ffc0
user: drh
ecomment:
  Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree()
  and all memory from sqlite3_malloc() is freed by sqlite3_free().

comment:
  Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree()
  and all memory from sqlite3_malloc() is freed by sqlite3_free().


type: ci
bgcolor: #a0c0f0
user: drh
comment:
  Add infrastructure to support a hierarchy of memory allocations with
  automatic deallocation of substructure.


type: ci
bgcolor: #a0c0f0
user: drh
comment:
  Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree() and
  all memory from sqlite3_malloc() is freed by sqlite3_free().


type: ci
bgcolor: #a0c0f0
user: drh
comment:
  Additional malloc sanity changes.  Use sqlite3MemLink() on Index.zColAff and
  Table.zColAff as a proof of concept.


type: ci
bgcolor: #c0ffc0
user: dan
ecomment:
  When calculating schema memory, use the actual allocated size of hash elements, not sizeof(HashElem). Also fix a bug in dbstatus.test.

comment:
  When calculating schema memory, use the actual allocated size of hash elements, not sizeof(HashElem). Also fix a bug in dbstatus.test


type: g
user: drh
comment:
  Edit [629e38a8c9e31111]: Change branch background color to "#c0ffc0". Edit check-in comment. Timestamp 2010-07-26 11:07:21.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Change the way SubProgram objects are deleted so that the code is the same for deletion and measurement.


type: ci
user: drh
comment:
  Fix a bug in the SQLITE_STATUS_MALLOC_COUNT counter.  Add an ALWAYS() around
  a condition in the SQLITE_DBSTATUS_SCHEMA_USED logic that is always true.


type: ci
user: drh
comment:
  Do not allow automatic indices for the RHS of IN expressions which are not
  correlated subqueries.  Ticket [8011086c85c6c404014c9]


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Add experimental unix-only file-control to grow and truncate the database file by a configurable chunk size.


type: g
user: dan
comment:
  Edit [621824092d443425]: Change branch background color to "#c0ffc0". Timestamp 2010-07-27 18:36:38.


type: t
user: drh
brief: Fixed ticket [8011086c85].
comment:
  Fixed ticket [8011086c85]: <i>Query planner creates unnecessary and expensive automatic index</i> plus 2 other changes


type: ci
user: drh
comment:
  Lookaside memory is not used to store schemas.  Change the
  SQLITE_DBSATUS_SCHEMA_USED documentation to reflect this fact.


type: ci
user: drh
comment:
  Record the pcache allocation size statistics even for pcache overflow
  allocations.  Adjust the wording on one of the stat output lines in
  the shell.


type: ci
user: drh
comment:
  Adjust the shell test script "shell4.test" to account for changes in the
  ".stat on" display format from the previous checkin.


type: ci
user: drh
comment:
  Correct handling of compound foreign key constraints that include the 
  integer primary key as one of the columns.  
  Ticket [ce7c133ea6cc9ccdc1]


type: ci
user: drh
comment:
  Change the profile timer units back to nanoseconds and update the
  sqlite3_profile() documentation.
  Ticket [c43940c49b74c70a69]


type: t
user: drh
brief: Ticket [ce7c133ea6]: 4 changes
comment:
  Ticket [ce7c133ea6] <i>Foreign key constraint fails when it should succeed.</i> status still Open with 4 other changes


type: t
user: drh
brief: Fixed ticket [ce7c133ea6].
comment:
  Fixed ticket [ce7c133ea6]: <i>Foreign key constraint fails when it should succeed.</i> plus 1 other change


type: t
user: rogerb
brief: New ticket [c43940c49b].
comment:
  New ticket [c43940c49b] <i>sqlite3_profile gives milliseconds (was nanoseconds in earlier releases)</i>.


type: t
user: rogerb
brief: Ticket [c43940c49b]: 3 changes
comment:
  Ticket [c43940c49b] <i>sqlite3_profile gives milliseconds (was nanoseconds in earlier releases)</i> status still Open with 3 other changes


type: t
user: drh
brief: Fixed ticket [c43940c49b].
comment:
  Fixed ticket [c43940c49b]: <i>sqlite3_profile gives milliseconds (was nanoseconds in earlier releases)</i> plus 1 other change


type: t
user: dan
brief: New ticket [f3e5abed55].
comment:
  New ticket [f3e5abed55] <i>Problems retrying COMMIT after SQLITE_BUSY on multi-file transaction</i>.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Make sure a connection has an exclusive lock on all database files involved in a multi-file transaction before writing the master-journal pointer into any journal files. Fix for [f3e5abed55].


type: ci
user: dan
comment:
  Changes to the comments describing the Pager.setMaster variable in pager.c. Add an assert() statement to verify that two master journal pointers are not written to a single journal file.


type: ci
user: drh
comment:
  Remove a test from sqlite3PagerCommitPhaseOne which is now always true
  after the multi-file transaction fix.


type: t
user: drh
brief: Fixed ticket [f3e5abed55].
comment:
  Fixed ticket [f3e5abed55]: <i>Problems retrying COMMIT after SQLITE_BUSY on multi-file transaction</i> plus 2 other changes


type: ci
user: drh
comment:
  If a database becomes corrupted such that an index is out of sync with its
  table, make sure the corruption is detected and reported back.  Do not assume
  that indices always contain rowids for valid table rows.


type: t
user: anonymous
brief: Open ticket [ce7c133ea6].
comment:
  Open ticket [ce7c133ea6]: <i>Foreign key constraint fails when it should succeed.</i> plus 1 other change


type: t
user: anonymous
brief: Ticket [ce7c133ea6]: 1 change
comment:
  Ticket [ce7c133ea6] <i>Foreign key constraint fails when it should succeed.</i> status still Open with 1 other change


type: t
user: drh
brief: Fixed ticket [168d0f7176].
comment:
  Fixed ticket [168d0f7176]: <i>Segfault while reading database with a corrupt index</i> plus 3 other changes


type: ci
user: dan
comment:
  In shared-cache mode, do not allow one connection to checkpoint a database while a second connection is reading or writing the same shared-cache.


type: ci
user: drh
comment:
  Fix the REPLACE conflict resolution so that it falls back to ABORT when
  a CHECK constraint fails.  Ticket [c38baa3d969eab794].


type: t
user: drh
brief: Fixed ticket [c38baa3d96].
comment:
  Fixed ticket [c38baa3d96]: <i>REPLACE on a CHECK constraint does not work as advertised</i> plus 2 other changes


type: ci
user: dan
comment:
  When opening a write-transaction on a database file that has been appended to or truncated by a pre-3.7.0 client, update the database-size field in the database header. Fix for [51ae9cad31].


type: ci
user: drh
comment:
  If the outer loop of a join must be a full table scan, make sure that an
  incomplete ANALYZE does not trick the planner into use a table that might
  be indexable in an inner loop.  Ticket [13f033c865f878]


type: t
user: dan
brief: Ticket [51ae9cad31]: 3 changes
comment:
  Ticket [51ae9cad31] <i>Database corruption by alternating writes from 3.7.0 and 3.6.23</i> status still Open with 3 other changes


type: t
user: dan
brief: Fixed ticket [51ae9cad31].
comment:
  Fixed ticket [51ae9cad31]: <i>Database corruption by alternating writes from 3.7.0 and 3.6.23</i> plus 1 other change


type: t
user: dan
brief: Ticket [51ae9cad31]: 1 change
comment:
  Ticket [51ae9cad31] <i>Database corruption by alternating writes from 3.7.0 and 3.6.23</i> status still Fixed with 1 other change


type: ci
bgcolor: #ffb67c
user: drh
comment:
  Backport fix [267492d3a7eff7b] for the performance regression caused by
  automatic indexing and reported by ticket [8011086c85c6c4040].


type: g
user: drh
comment:
  Edit [042a1abb030a0711]: Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2010-08-04 12:31:11. Add tag "release".


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Fixes for error handling with temp databases. And for errors that occur within OS locking primitives.


type: ci
user: drh
ecomment:
  Fix the query planner so that when it has a choice of full-scan tables to
  move to the outer loop, it chooses the one that is likely to give the fewest
  output rows.  Ticket [13f033c865f878].

comment:
  Fix the query planner so that when it has a choice of full-scan tables to
  move to the outer loop, it chooses the one that is likely to give the fewest
  output rows.


type: ci
user: drh
comment:
  Do not read the database file size on a SAVEPOINT rollback any more since
  after checkin [65b8636ac6e5] the in-header-size field is always valid.


type: ci
user: drh
comment:
  Make the size of a Bitvec object 512 bytes on all platforms, instead of
  having the size depend on the size of a pointer.  This makes testing easier.


type: ci
user: drh
comment:
  Change two automatic array variables into static constant arrays.
  Update and reformat some comments for cleaner presentation.


type: ci
user: dan
comment:
  Do not run some tests in notify3.test with the inmemory_journal permutation. They do not pass as the tests assume that the database schema is not loaded until the first invocation of [db eval]. This is not true with the inmemory_journal permutation.


type: ci
user: drh
comment: Remove all vestiges of ctype.h from FTS3.
ecomment:
  Remove all vestiges of ctype.h from FTS3.
  This addresses ticket [991789d9f3136a] among other bug reports.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Add test case 'cgt_pager_1', intended for use with callgrind to detect performance regression in the pager module, to threadtest3.c.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Fix a problem wherein changing the journal-mode immediately after leaving exclusive-locking mode could lead to the database being unlocked without clearing the changeCountDone flag.


type: ci
user: adam
comment:
  Updating apple-osx with minor source fixes, database truncate and replace private calls and a bunch of conditionalization for tests running in different environments


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  In WAL mode, ignore any error returned by an xFileControl(FCNTL_SIZE_HINT) call. This matches the behaviour in rollback mode.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Add variable pager.dbHintSize, used to limit the number of calls made to the xFileControl(FCNTL_SIZE_HINT) method.


type: ci
user: dan
comment:
  Use sqlite3DbFree() instead of sqlite3_free() to free any error message reported by the parser layer while attempting to parse a CREATE TABLE statement passed to sqlite3_declare_vtab().


type: ci
user: dan
comment:
  Update an r-tree extension test case to account for recent changes to the query planner. Also fix a comment in rtree.c.


type: ci
user: dan
comment:
  If an error occurs in PagerSetPagesize(), set the output variable to the unmodified page-size before returning.


type: t
user: dan
brief: Closed ticket [e4b8a2ba6e].
comment:
  Closed ticket [e4b8a2ba6e]: <i>Problem with DISTINCT in sub-queries in a FROM clause.</i> plus 3 other changes


type: ci
user: dan
comment:
  Test that it is possible to drop a trigger while there are active statements belonging to the same connection.


type: ci
user: drh
comment:
  Change sqlite3PagerPagecount() to return void, since the return value was
  always SQLITE_OK and was never used.


type: ci
user: drh
comment:
  Add ALWAYS() macros in wal.c to cover branches that are no longer reachable
  following the pager refactoring.


type: ci
user: dan
comment:
  Fix some non-ANSI C code in test_demovfs.c. Also change the same file so that attempting to delete a file that does not exist does not return an error.


type: ci
user: dan
comment:
  If an SQLITE_FULL error occurs during rollback or journal finalization, treat it in the same way as SQLITE_IOERR (i.e. require that the pager internals be completely reset before it is next read from or written to).


type: ci
user: drh
comment:
  It is no longer possible to reach pagerStress() while in the error state,
  so put a NEVER() around the error state test of that routine.


type: ci
user: drh
comment:
  Cherrypick the incremental_vacuum bug fix ([255f1eefa373153942c67b18b]) into
  the apple-osx 3.6.23 branch.


type: ci
user: drh
ecomment:
  Cherrypick the changes for enhancement requests [e090183531fc27474] 
  (use indices on LIKE with no wildcards) and [4711020446da7d93d993]
  (use nocase index for LIKE even if the column is binary) into the
  3.6.23.1 release of the Apple-OSX branch.

comment:
  Cherrypick the changes for enhancement requests [e090183531fc27474] 
  (use indices on LIKE with no wildcards) and [4711020446da7d93d993]
  (use nocase index for LIKE even if the column is binary) into the
  3.6.23.1 release of the Apple-OSX branch.


type: ci
user: dan
comment:
  Disable the SQLITE_MAX_PAGE_SIZE compile time option (it is now always set to 65536). Fix some other problems in test files.


type: ci
user: drh
comment:
  Fix two asserts in the btree logic so that they work correctly even for
  maximum-size index entries for 32K and 64K pages.


type: ci
user: drh
comment:
  Do not attempt run backwards compatibility tests if no historical 
  "testfixture" binaries are available.


type: ci
user: dan
comment:
  Modify the code for reading hot-journal files so that it can handle journals generated by versions 3.5.7 and earlier.


type: ci
user: dan
comment:
  Add new test script backcompat.test, for testing database/journal/wal file compatibility against previous versions.


type: ci
user: drh
comment:
  Fix the sqlite3_release_memory() interface so that it does not attempt
  to free SQLITE_CONFIG_PAGECACHE memory.


type: ci
user: drh
comment:
  Disable the MEMSYS2 auxiliary routines if MEMSYS2 is changed to an alternative
  memory allocator using SQLITE_CONFIG_MALLOC.


type: ci
user: drh
ecomment:
  Update the "showdb" debug utility to handle 64K pages and with
  extra options to decode the freelist structure.

comment:
  Update the "showdb" debug utility to handle 64K page database and with
  extra options to decode the freelist structure.


type: g
user: drh
comment:
  Edit [3613b0695a5e9909]: Change background color to "#d0c0ff". Edit check-in comment. Timestamp 2010-08-23 01:25:03. Add tag "release".


type: t
user: drh
brief: Fixed ticket [5e10420e8d].
comment:
  Fixed ticket [5e10420e8d]: <i>Free-list corruption in incremental-vacuum mode</i> plus 5 other changes


type: ci
user: drh
comment:
  The R-tree module should not assume that its shadow tables are consistent.
  If a problem is found in a shadow table, return SQLITE_CORRUPT.


type: g
user: drh
comment:
  Edit [42537b60566f2881]: Change background color to "#d0c0ff". Edit check-in comment. Timestamp 2010-08-24 00:40:48. Add tag "release".


type: ci
user: drh
comment:
  The merge for check-in [415c448dc4] did not do exactly write, resulting in
  a subtle bug in the SQLITE_FCNTL_SIZE_HINT logic.  This check-in is the
  fix.


type: ci
user: drh
comment:
  Cherrypick the R-tree invalid shadow-table big fix of
  [7f2f71cc9e3c39093f09231f44] into the apple-osx 3.6.23 branch.


type: ci
user: drh
comment:
  Backport the very lastest R-Tree in order to take advantage of its enhanced
  robustness to corrupt databases.


type: ci
bgcolor: #60b0ff
user: drh
comment:
  Backport the RTree implementation from the trunk into the 3.6.23 branch.
  The code for the application-defined query boxes is still present but
  is disabled.  The reason for this backport is to take advantage of recent
  enhancements to robustness to database corruption.


type: ci
user: drh
comment:
  Change sqlite3_open_v2() to return SQLITE_MISUSE if the combination of bits
  in the flags parameter is invalid.  The documentation says the behavior in 
  this situation is undefined - the documentation is unaltered by this code 
  change.


type: ci
user: drh
comment:
  Reinstate the "sqlite" alias for backwards compatibility (but leave 
  it undocumented) but remove the PackageProvide for "sqlite".


type: ci
user: drh
ecomment:
  Add EXTERN macros before entry points in tclsqlite.c.  These EXTERN macros
  were inexplicably removed by [1f680cb37584baa106cee05] a few days ago.

comment:
  Add EXTERN macros before entry points in tclsqlite.c.  This undoes the
  change [b4d3e0d528c7d17fa3d05] on [2006-03-06 23:30:52].


type: ci
user: drh
comment:
  Remove unnecessary code from malloc.c.  Enhance pcache1.c so that is tries
  to reuse existing pages, rather than create new pages, when SQLite is under
  memory pressure.  "Memory pressure" means that SQLITE_CONFIG_PAGECACHE memory
  is nearly exhausted or sqlite3_soft_heap_limit() has been reached.


type: ci
user: drh
comment:
  Refactor the implementation of the scratch memory allocator.  Add the
  SQLITE_TESTCTRL_SCRATCHMALLOC interface to facilitate testing.


type: ci
user: dan
comment:
  Add the sqlite3_create_function_v2() API, a version of create_function that allows a destructor to be specified.


type: ci
user: drh
comment:
  Make sqlite3_create_function() a special case of sqlite3_create_function_v2()
  in order reduce the number of code paths and simplify testing.


type: ci
user: drh
comment:
  Remove the sqlite3BtreeFactor() wrapper routine. All modules now call
  sqlite3BtreeOpen() directly.

ecomment:
  Remove the sqlite3BtreeFactory() wrapper routine.  All modules now call
  sqlite3BtreeOpen() directly.


type: ci
user: drh
ecomment:
  Provide hints to the btree layer during the creation of transient tables for
  when it is possible for those tables to use a hash rather than a binary tree.
  No use is currently made of those hints, though assert() statement verify
  their accuracy.

comment:
  Provide hints to the btree layer during the creation of transient tables
  when it is possible for those tables to use a hash rather than a binary tree.
  No use is current made of those hints, though assert() statement verify
  their accuracy.


type: ci
user: drh
comment:
  Add evidence mark comments to source code.  Add additional information to the
  documentation of sqlite3_release_memory().  Fix a minor inefficiency in mem1.c
  that was discovered while writing requirements tests.


type: ci
user: dan
comment:
  Do not clear the internal "schema has changed" flag when performing a savepoint rollback. The schema changes may not have taken place within the savepoint being rolled back.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Update the quota shim so that when the same file is opened multiple times,
  its size only counts against the quota once.


type: g
user: drh
comment:
  Edit [383eb87bbf560b20]: Change branch background color to "#c0ffc0". Timestamp 2010-09-01 11:40:05.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Add the sqlite3_quota_dump test command.  Add a destructor argument on
  the sqlite3_quota_set() interface.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Make all private routines in test_quota.c begin with "quota".
  Fix a test_quota.c segfault when setting a zero-quota.


type: ci
user: dan
comment:
  If MEM_STATUS is disabled, avoid holding the STATIC_MEM mutex when calling the user-defined xMalloc method. Holding the mutex causes problems for memsys3 and memsys5.


type: ci
user: drh
comment:
  Fix the computation of the offset on the mmap() for the Nth shared memory
  region.  Because of the way shared memory is accessed, the old computation,
  though wrong, still happened to always get the right answer.  Nevertheless,
  it is good to do the computation correctly.


type: ci
user: drh
comment:
  Use sqlite3_mutex_notheld() instead of !sqlite3_mutex_held() inside
  of assert() statements since the former works when mutexing is disabled
  while the latter does not.


type: ci
user: dan
comment:
  Move the test for an (illegal) scalar sub-query that returns more than one column to earlier in SELECT processing in order to avoid an assert() that can happen later on.


type: ci
user: drh
comment:
  Fix a discrepancy between the documented behavior of SQLITE_DBCONFIG_LOOKASIDE
  and what it actually does.  Also add evidence marks on the DBCONFIG_LOOKASIDE
  implementation.


type: ci
user: drh
comment:
  Documentation enhancements for sqlite3_db_status().  Evidence marks on
  the SQL function call intrface.


type: ci
user: drh
comment:
  In the test scripts, changes instances of the TCL interface 
  option "-has_codec" into the correct "-has-codec".


type: ci
user: drh
comment:
  Revised documentation for sqlite3_limit().  Added some evidence marks and
  assert() statements to verify sqlite3_limit() behavior.


type: ci
user: drh
comment:
  Updates to the documentation of the sqlite3_column_xxxx() family of 
  interfaces.  Enhance sqlite3_column_blob() so that it always returns
  a NULL pointer for a zero-length blob.


type: ci
user: drh
comment:
  Further updates to the sqlite3_pcache_methods documentation, plus the addition
  of a few evidence marks related to pcache.


type: ci
user: dan
comment:
  When building from the amalgamation with ENABLE_RTREE defined, do not try to include sqlite3rtree.h.


type: ci
user: drh
comment:
  Add assert() statements to demonstrate that memory allocations are always
  aligned to an 8-byte boundary (unless SQLITE_4_BYTE_ALIGNED_MALLOC is defined).


type: ci
user: drh
comment:
  Additional evidence marks on the malloc() implementation.  Update the 
  documentation to explain that mallocs are not necessarily 8-byte aligned
  if the SQLITE_4_BYTE_ALIGNED_MALLOC compile-time option is used.


type: ci
user: dan
comment:
  Alter some configurations in releasetest.tcl. Print out the wall-clock time taken for each test after it is executed.


type: ci
user: dan
comment:
  Run the multi-threaded tests in test/threadtest3.c as part of releasetest.tcl. Remove the OMIT_BUILTIN_TEST symbol from the "Device-Two" configuration.


type: ci
user: drh
comment:
  Clarify the documentation to better explain when an automatic re-prepare can
  be induced by rebinding parameters.  Add evidence marks to the automatic
  re-prepare logic.


type: ci
user: dan
comment:
  Add trivial test case to make sure shared-cache mode does not automatically turn on exclusive-locking mode.


type: ci
user: drh
comment:
  Added the sqlite3_soft_heap_limit64() interface.  Deprecate the older
  sqlite3_soft_heap_limit() interface.


type: ci
user: dan
comment:
  Have all FTS3 queries obtain a read or write table-lock at the shared-cache level before doing anything else.


type: ci
user: drh
comment:
  Make sure the pager cache is cleared if there is any difficulty starting
  a new read transaction in WAL mode.  Ticket [313723c356483eff2a4c4bdd2c].


type: t
user: drh
brief: Fixed ticket [313723c356].
comment:
  Fixed ticket [313723c356]: <i>Database corruption following an I/O error on xShmLock</i> plus 2 other changes


type: ci
user: dan
comment:
  Add new file rtreeA.test, to test that the r-tree extension doesn't crash if it encounters a corrupt or inconsistent database.


type: g
user: drh
comment:
  Edit [c1ebcacd9b31239a]: Change branch background color to "#c0ffc0". Timestamp 2010-09-24 09:32:45.


type: ci
user: drh
comment:
  Enhance the ANALYZE command so that it gathers statistics in the sqlite_stat1
  table even for tables that are empty or have no indices.


type: ci
user: drh
comment:
  Simplifications to the expression code generator.  Remove about 80 lines of
  older and obsolete code.


type: ci
bgcolor: #ffc0d0
user: drh
ecomment:
  Add assert() statements that fail when a shallow copy is accessed after the
  original has been modified.  These assert() statements should detect the kinds
  of subtle SCopy bugs such as caused the fault
  in ticket [b351d95f9cd5ef17e9d9dbae18f].

comment:
  Add assert() statements that fail when a shallow copy is accessed after the
  original has been modified.  These assert() statements should detect the kinds
  of subtle SCopy bugs such as caused the fault
  in ticket [b351d95f9cd5ef17e9d9dbae18f].


type: ci
bgcolor: #ffc0d0
user: drh
comment:
  Use OP_Copy rather than OP_SCopy at one point in aggregate processing where
  it is needed to avoid shallow-copy misuse.


type: g
user: drh
comment:
  Edit [8b8e1732e8410efd]: Move to branch [/timeline?r=bug-b351d95f9c&nd&dp=8b8e1732e8410efd | bug-b351d95f9c]. Edit check-in comment. Timestamp 2010-09-27 21:09:32.


type: t
user: drh
brief: Fixed ticket [b351d95f9c].
comment:
  Fixed ticket [b351d95f9c]: <i>Bug in "INSERT INTO ... SELECT" statements that use CASE</i> plus 3 other changes


type: ci
user: dan
comment:
  Add tests to e_createtable.test. Allow a table to be created if there is an index of the same name in a different attached database.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Rework the text to numeric conversion routines so that they work with either
  UTF8 or UTF16 and do not require a NULL terminator.  This allowed text to
  numeric conversion without reallocating the string.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Fix the handling of default values for ALTER TABLE ADD COLUMN columns so
  that is able to deal with negative numbers, including large negative numbers.
  Ticket [8454a207b9fd2243c4]


type: t
user: drh
brief: Fixed ticket [8454a207b9].
comment:
  Fixed ticket [8454a207b9]: <i>ALTER TABLE ADD COLUMN with negative DEFAULT value</i> plus 2 other changes


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Do correct affinity transformations on floating point values which have
  a decimal point at the beginning or end of the mantissa.
  Ticket [3998683a16a7076e08f5].


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Remove unnecessary calls to memAboutToChange() in vdbe.c.  An affinity
  change no longer invalidates shallow copies.


type: t
user: drh
brief: Fixed ticket [3998683a16].
comment:
  Fixed ticket [3998683a16]: <i>Some valid floating-point literals are not recognized.</i> plus 2 other changes


type: ci
user: drh
comment:
  Merge experimental into trunk:  Refactor the text-to-numeric conversion
  routines to work without zero-terminators and in UTF16 as well as UTF8.
  Avoid invalidating strings with doing affinity conversions.


type: ci
bgcolor: #ffc0d0
user: drh
ecomment:
  <i>Not true:  For a zeroblob, the Mem.z pointer can be null:</i>
  The Mem.z pointer can never been NULL for a string or blob, even
  a zero-length string or blob.  Assert this fact.

comment:
  The Mem.z pointer can never been NULL for a string or blob, even
  a zero-length string or blob.  Assert this fact.


type: g
user: drh
comment:
  Edit [efda3104800c1e10]: Move to branch [/timeline?r=mistake&nd&dp=efda3104800c1e10 | mistake]. Edit check-in comment. Timestamp 2010-10-01 15:11:09.


type: g
user: drh
comment:
  Edit [efda3104800c1e10]: Change background color to "#ffc0d0". Marked "Closed". Timestamp 2010-10-01 15:11:09.


type: g
user: drh
comment:
  Edit [220cca50da08c516]: Move to branch [/timeline?r=apple-osx-3623&nd&dp=220cca50da08c516 | apple-osx-3623]. Edit check-in comment. Timestamp 2010-08-17 23:13:42.


type: ci
user: drh
comment:
  Fix a performance regression (relative to version 3.6.23.1) caused by the
  query planner taking into account non-indexable WHERE clause terms to select
  the outermost join loops when it should be selecting tables for the outermost
  loop that do not benefit from being in an inner loop.


type: ci
user: drh
comment:
  Avoid all memory allocation (and hence the possiblitity of OOM failure)
  in sqlite3_value_double() and sqlite3_column_double().


type: ci
user: drh
comment:
  If walLockExclusive() fails for reasons other than SQLITE_BUSY inside of
  walRestartLog() then propagate that error back up to the application.


type: ci
user: dan
comment:
  Have the pager change to at least WRITER_CACHEMOD state before marking any pages as dirty (instead of immediately after). Otherwise, if an error occurs, the pager may be left in WRITER_LOCKED state with dirty pages in the cache.


type: ci
user: drh
comment:
  Fix long-standing bugs with the handling of LIMIT clausing in
  compound SELECT statements with FROM clause subqueries.
  Ticket [38cb5df375078d3f9].


type: t
user: drh
brief: Ticket [38cb5df375]: 3 changes
comment:
  Ticket [38cb5df375] <i>LIMIT ignored on compound query with subqueries</i> status still Open with 3 other changes


type: t
user: drh
brief: Fixed ticket [38cb5df375].
comment:
  Fixed ticket [38cb5df375]: <i>LIMIT ignored on compound query with subqueries</i> plus 1 other change


type: g
user: drh
comment:
  Edit [2677848087c9c090]: Change background color to "#d0c0ff". Timestamp 2010-10-08 02:34:02. Add tag "release".


type: ci
user: drh
comment:
  Make sure the sqlite3_create_collation() interfaces always return an error
  code if they fail.  Ticket [a04e42a3fcacaffa3133436].


type: ci
user: drh
comment:
  Fix the sqlite3_bind_blob() interface (and its kin) so that the destructor
  is invoked if the binding fails.  Ticket [860399cc408f2dd5f41aed44b]
  Update the documentation to explain which interfaces invoke their
  destructors on failure and which do not.


type: ci
user: drh
comment:
  Check-in [d3c95e3a4e08d0] was incorrect.  This is the correct fix for
  sqlit3_bind_blob().  Ticket [860399cc408f2dd5f4]


type: ci
user: drh
comment:
  Add new WHERETRACE macros for better diagnostics of the query planner.
  Added a new test case for the performance regression fixed by the previous
  check-in.


type: ci
user: drh
comment:
  Fix the query planner so that it uses the multi-index OR-clause solution if
  that is the lowest cost estimate.  A prior bug cause the multi-index solution
  to be ignored in some circumstances.


type: ci
user: drh
comment:
  Fix a typo-bug that prevented --disable-amalgamation from working in
  Makefile.in.  Also fix an overly long line in Makfile.in.


type: ci
user: dan
comment:
  Fix some segfaults that could occur in obscure circumstances where error messages contained characters that could be mistaken for printf format specifiers.


type: ci
user: drh
comment:
  Make sure the estimated row count for ephemeral tables is initialized so that
  automatic indices can be used on those tables.


type: ci
user: dan
comment:
  Prevent an assert from failing when opening a zero-length database file with an apparently hot journal with locking_mode=exclusive set.


type: ci
bgcolor: #ffc0d0
user: dan
comment: Add new "dynamic_triggers" test case to threadtest3.c.
ecomment:
  This was suppose to go on "trunk" but got committed to the wrong branch.
  Add new "dynamic_triggers" test case to threadtest3.c.


type: ci
user: dan
comment:
  Avoid trying to allocate a negative number of bytes of memory in the test wrapper for sqlite3_blob_read().


type: ci
bgcolor: #ffc0d0
user: drh
ecomment:
  Add tail recursion to the sqlite3ExprDelete() routine in order to keep
  down stack space usage for really, really large expressions.
  <b>Later:</b> The tail recursion is dangerous since the recursion
  might happen after the expression has been freed.

comment:
  Add tail recursion to the sqlite3ExprDelete() routine in order to keep
  down stack space usage for really, really large expressions.


type: g
user: drh
comment:
  Edit [7324c7f2f87af637]: Move to branch [/timeline?r=mistake&nd&dp=7324c7f2f87af637 | mistake]. Change background color to "#ffc0d0". Edit check-in comment. Timestamp 2010-10-27 19:23:13.


type: g
user: drh
comment:
  Edit [d9e588ef17ea4393]: Change branch background color to "#ffc0d0". Marked "Closed". Edit check-in comment. Timestamp 2010-10-28 15:49:54.


type: ci
user: dan
comment:
  If a database file with the WAL flag set is opened in exclusive-locking mode, use heap memory to store the wal-index instead of shared-memory.


type: ci
user: drh
comment:
  Add evidence marks for the sqlite3_blob_reopen() interface.  Fix compiler
  warnings in test1.c.  Fix incorrect evidence marks on e_select.tcl.


type: ci
user: dan
comment:
  Changes to allow FTS4 tables to be created without the underlying %_docsize table (in order to save space).


type: g
user: drh
comment:
  Edit [dd4dc8a4269e23ff]: Change branch background color to "#c0ffc0". Move to branch [/timeline?r=experimental&nd&dp=dd4dc8a4269e23ff | experimental]. Timestamp 2010-11-04 20:50:27.


type: g
user: drh
comment:
  Edit [cc9d9a12c3b19320]: Change branch background color to "#c0ffc0". Move to branch [/timeline?r=experimental&nd&dp=cc9d9a12c3b19320 | experimental]. Timestamp 2010-11-04 20:46:09.


type: ci
user: dan
ecomment:
  Add "PRAGMA checkpoint_fullfsync". Similar to "PRAGMA fullfsync", but enables full fsyncs only during checkpoint operations.
  Update: This change was added to the trunk by check-in [a069867301de3ca2e17]

comment:
  Add "PRAGMA checkpoint_fullfsync". Similar to "PRAGMA fullfsync", but enables full fsyncs only during checkpoint operations.


type: ci
user: shaneh
comment:
  Changes to the multiplex VFS to optionally (compiler define) allow 
  the "chunk extension" to overwrite the right-most chars of the filename 
  instead of simply being appended.


type: ci
user: drh
comment:
  Back out the prior attempt to enable full-fsync for WAL and attempt the same
  thing using a completely different approach.


type: g
user: dan
comment:
  Edit [73c93f5a2a32ee8c]: Change branch background color to "#c0ffc0". Timestamp 2010-11-09 14:49:00.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Change the EXPLAIN QUERY PLAN output to use "USING INDEX" instead of "BY INDEX", and to use "SEARCH" instead of "SCAN" for loops that are not full-table scans.


type: ci
user: dan
comment:
  Change the test_multiplex.c code to use wrapper functions for all sqlite3_vfs methods (instead of copying function pointers from the underlying vfs into the multiplex vfs). This is required to work with test_osinst.c.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Add a row of EXPLAIN QUERY PLAN output for each composite select operation (UNION, EXCEPT etc.) in the query.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Use "COMPOUND" instead of "COMPOSITE" in the EXPLAIN QUERY PLAN output to describe UNION, UNION ALL, EXCEPT and INTERSECT operations.


type: ci
bgcolor: #c0ffc0
user: drh
comment:
  Reduce the number of branches that need to be tested in the
  explainIndexRange() function of where.c.


type: ci
user: drh
comment:
  Change the EQP output for the min/max optimization from "SCAN" to "SEARCH".
  Other changes in where.c in support of full branch coverage testing.


type: ci
user: drh
comment:
  Use the estimated number of rows computed for subqueries in the cost
  computations for outer queries.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Add experimental command "PRAGMA wal_blocking_checkpoint", which uses the busy-handler to block until all readers have finished in order to ensure the next writer will be able to wrap around to the start of the log file.


type: g
user: dan
comment:
  Edit [7e3fc2c833a5baa0]: Change branch background color to "#c0ffc0". Timestamp 2010-11-16 18:56:51.


type: ci
user: drh
comment:
  Restrict the scope of the sqlite3_stmt_readonly() interface to a specific
  subset of prepared statement types.


type: ci
user: drh
comment:
  Prevent a possible segfault when the sqlite3_value_numeric_type() interface is
  misused to try to determine the numeric type of the NULL value returned
  from sqlite3_column_value() with an invalid column number.


type: ci
bgcolor: #c0fff0
user: icculus
comment:
  Lemon: correcting previous win32 access() fix.

  The previous fix caused link errors when compiled as C++.


type: ci
bgcolor: #90a0f0
user: dan
comment:
  Add file test_superlock.c with example code for obtaining an exclusive lock on either rollback or wal mode databases.


type: ci
bgcolor: #c0ffc0
user: dan
comment:
  Add file test/tt3_checkpoint.c that adds a multi-threaded test for blocking checkpoints to threadtest3.


type: ci
bgcolor: #c0ffc0
user: drh
ecomment:
  Merge the checkpoint_fullfsync pragma and the superlock demonstration into
  the checkpoint-v2 experimental branch.

comment:
  Merge the checkpoint_fullfsync pragma and the superlock demonstration into
  the checkpoint-v2 experimental branch.


type: ci
user: drh
comment:
  Add the checkpoint_fullfsync pragma which enables F_FULLFSYNC on checkpoint
  operations only, not during ordinary commit fsyncs.


type: ci
user: drh
comment:
  Fix the max_page_count pragma so that it will not set to a value smaller
  than the current database size, as the documentation requires.  Also,
  remove all occurances of atoi() from the core.


type: ci
user: drh
comment:
  The previous check-in with changes to the max_page_count pragma was not
  quite correct.  This check-in fixes the problem.


type: g
user: dan
comment:
  Edit [9cf0f2b76bc68c16]: Change branch background color to "#c0ffc0". Timestamp 2010-11-23 19:16:48.


type: ci
user: drh
comment:
  Fix a couple of compiler warnings in test_superlock.c.  Add superlock.c
  to the Makefile.in used by the configure script.


type: ci
bgcolor: #c0ffc0
user: drh
ecomment:
  Add additional DBSTATUS options for measuring the hit and miss rates against
  the lookaside memory pool - information useful in tuning the lookaside size.
  Currently experimental pending analysis of performance impact.

comment:
  Add additional DBSTATUS options for measuring the hit and miss rates against
  the lookaside memory pool - information useful in tuning the lookaside size.
  Currently experimental pending analysis of performance impact.


type: ci
user: dan
comment:
  On *BSD systems, reduce the number of open connections used by wal3.test to avoid running out of file-descriptors.


type: ci
user: dan
comment:
  Change the type of a variable in struct SrcList so that it fits in a 100 byte lookaside buffer on a 64-bit architecture.


type: ci
user: shaneh
comment:
  Added TCL test case for converting to WAL mode with multiple connections.  
  Added exception to the test case for Windows for not being able to delete the open journal file.


type: ci
user: dan
comment:
  Add the "valgrind" permutation. This is the same as veryquick.test except that it omits the multi-process tests that do not work under valgrind. No changes to production or existing test code.


type: ci
user: drh
comment:
  Remove an over-zealous call to memAboutToChange() from OP_MustBeInt.
  OP_MustBeInt will never invalidate the Mem.z pointer so the memAboutToChange()
  call is not necessary.


type: ci
user: drh
comment:
  Initialize all constants at the very beginning of a prepared statement.
  Do not allow constant initialization to occur once control flow has a chance
  to diverge, to avoid the possibility of having uninitialized registers.
  Ticket [80ba201079ea60807].


type: ci
user: drh
comment:
  Back out part of the previous change that was not really necessary in order
  to fix [80ba201079ea60], and which in fact serves no useful purpose.


type: ci
user: drh
comment:
  Add the ability to disable constant factoring using sqlite3_test_control().
  Add a TCL interface to this new capability and add tests cases to the TCL
  test scripts to actually use the new capability.


type: t
user: drh
brief: Fixed ticket [80ba201079].
comment:
  Fixed ticket [80ba201079]: <i>Bug involving subqueries and the OR optimization</i> plus 2 other changes


type: g
user: drh
comment:
  Edit [a586a4deeb253300]: Change background color to "#d0c0ff". Edit check-in comment. Timestamp 2010-12-07 20:14:09. Add tag "release".


type: ci
user: drh
comment:
  Changes to the shell which should, in theory, allow it to work with
  libeditline as an alternative to libreadline.


type: ci
user: drh
comment:
  Update the sqlite3_stmt_readonly() interface so that its output is 
  well-defined for all prepared statements, and so that it gives the 
  correct result for VACUUM.


type: ci
user: drh
comment:
  Mention the SQLITE_DEFAULT_WAL_AUTOCHECKPOINT compile-time option in the
  documentation for the sqlite3_wal_autocheckpoint() interface.


type: ci
user: drh
comment:
  When registering the built-in LIKE and GLOB functions, make sure that they
  are tagged with SQLITE_UTF8 so that if other application-defined LIKE and
  GLOB implementations are provided for UTF16, then the appropriate function
  will be selected.


type: ci
user: drh
comment:
  Enhanced comments in wal.c and declare some procedure parameters "const".
  No changes to the generated code.


type: ci
user: drh
comment:
  Make wal_checkpoint a no-op if a prior checkpoint has already copied all 
  WAL content into the database.  This prevents a concurrent write to the
  database from resetting the wal-index out from under the WalIterator of
  the checkpoint as it is initializing.


type: ci
user: drh
comment:
  Fix an assertion fault that can only occur if SQLITE_ENABLE_STAT2 is defined
  and the constant folding optimization is disabled using sqlite3_test_control().
  Problem introduced by [ad8bc68197f2b4] but we missed it prior to the 3.7.4
  release due to taking shortcuts and skipping tests in the release checklist.


type: ci
user: drh
comment:
  Add the "-heap" option to the command-line shell - to allocate a fixed heap
  for use with SQLITE_ENABLE_MEMSYS5.


type: ci
bgcolor: #8eb2a1
user: drh
comment:
  Cherrypick the WAL error logging from the pre-3.7.5 line into a branch
  for version 3.7.2.  Include the sqlite3_vsnprintf() interface.  This
  checkin is intended for debugging and not for release.


type: ci
user: drh
comment:
  Rearrange a variable declaration in the proxy locking code to avoid a harmless
  compiler warning on recent MacOS versions.


type: ci
user: drh
comment:
  Remove the obsolete compile-time option SQLITE_THREAD_OVERRIDE_LOCK
  from the autoconf makefile.  Needed only for LinuxThreads, which we no
  longer support.


type: ci
user: drh
comment:
  Merge into the trunk the experimental enhancements to sqlite3_db_status() 
  for measuring lookaside memory allocator performance.


type: ci
user: drh
comment:
  Add test cases for the new lookaside hit and miss status outputs.  Add
  the output of lookaside hit and miss to the command-line shell statistics.


type: ci
user: dan
comment:
  Reduce the number of calls to sqlite3_realloc() made by fts3 when querying for position information of a term prefix.


type: ci
user: dan
comment:
  Fix some off-by-one errors in the comments for API functions create_function() and value_blob(). No changes to code or tests.


type: ci
user: dan
comment:
  Have testfixture invoke C routine Zipvfs_Init() when creating a new interpreter if SQLITE_ENABLE_ZIPVFS is defined.


type: ci
user: drh
comment:
  The ANALYZE command now counts at all rows of an index, even those containing
  NULL values.  A valid sqlite_stat1 entry is created even if the index contains
  nothing but NULLs.


type: ci
user: drh
comment:
  Fix the ANALYZE command so that it takes collating sequences into account
  when gathering index statistics.


type: ci
user: drh
comment:
  Fix a null-pointer dereference that can occur on an OOM error while running
  ANALYZE with SQLITE_ENABLE_STAT2.


type: ci
bgcolor: #8eb2a1
user: drh
comment:
  Add detailed error logging to WAL in an effort to track down an obscure
  SQLITE_PROTOCOL problem.  This code is intended for debugging and not
  for release.


type: ci
bgcolor: #d3b5a8
user: drh
ecomment:
  A proposed change to the sqlite3_step() API such that it will only auto-reset
  following an SQLITE_BUSY or SQLITE_LOCKED error.  Calls after any other result
  other than SQLITE_ROW will return SQLITE_MISUSE.

comment:
  A proposed change to the sqlite3_step() API such that it will only auto-reset
  following an SQLITE_BUSY or SQLITE_LOCKED error.  Calls after any other result
  other than SQLITE_ROW will return SQLITE_MISUSE.


type: ci
user: drh
comment:
  Enhance the showdb tool to show a btree page layout.  Add limit checks so that
  overflow content does not overflow the buffer.


type: ci
user: drh
comment:
  Reorder the fields in private structures in an effort to reduce alignment
  gaps and thus make the structures smaller, and to put frequently accessed
  fields first.  Also update some obsolete comments.  Valgrind shows a very
  slight performance improvement.


type: ci
user: drh
comment:
  Change the page size of the destination database in a backup, if it is
  changeable, prior to starting the backup.


type: ci
user: dan
comment:
  If a rollback is attempted in journal_mode=off mode, force SQLite to discard the contents of the pager cache before processing any subsequent queries.


type: ci
user: drh
comment:
  Fix the sqlite3.h generator script so that it generates the correct
  SQLITE_SOURCE_ID string with the latest versions of Fossil that 
  include fractional seconds on the date/time stamp.


type: ci
bgcolor: #a8d3c0
user: drh
ecomment:
  Provide an alternative and experimental pcache implementation that avoids
  the use of mutexes at the expense of using more memory.

comment:
  Provide an alternative and experimental pcache implementation that avoids
  the use of mutexes at the expense of using more memory.


type: ci
user: drh
comment:
  Do not raise an SQLITE_CORRUPT error in Recoverymode 
  if the database size in the header is larger than the physical file
  size.  This facilitates recovery of a database in which the database size
  field has been corrupted.


type: ci
user: dan
comment:
  Fix a segfault that can occur in matchinfo if an fts4 table contains mostly zero-length documents. Specifically, if the table contains more rows than it does bytes of text.


type: ci
bgcolor: #d3b5a8
user: drh
ecomment:
  Fix the change-counter increment for WAL pages so that it works even when
  invoked from xStress.  Ticket [5d863f876ee9561b95e2].

comment:
  Fix the change-counter increment for WAL pages so that it works even when
  invoked from xStress.  Ticket [5d863f876ee9561b95e2].


type: ci
bgcolor: #d3b5a8
user: drh
ecomment:
  Increment the change counter and update the SQLite version number whenever
  page 1 is added to the WAL.  Ticket [5d863f876ee9561b9]

comment:
  Increment the change counter and update the SQLite version number whenever
  page 1 is added to the WAL.  Ticket [5d863f876ee9561b9]


type: g
user: drh
comment:
  Edit [c1e0d09cd3f5feae]: Change branch background color to "#d3b5a8". Move to branch [/timeline?r=bug-5d863f87&nd&dp=c1e0d09cd3f5feae | bug-5d863f87]. Edit check-in comment.


type: ci
user: drh
comment:
  Make sure the change-counter and SQLite-version fields of the header are
  set correctly even when doing a VACUUM with locking_mode=EXCLUSIVE.
  Ticket [5d863f876ee9561b].


type: ci
user: drh
comment:
  Make sure the change counter and SQLite version numbers in the header are
  set correctly, even when running in WAL mode and when VACUUMing in WAL mode.
  Ticket [5d863f876ee9561b9].


type: ci
user: drh
comment:
  On a backup from a smaller to a larger page size, do not begin committing
  the transaction until the source pages after the pending byte have been
  copied.


type: ci
user: drh
comment:
  Add the SQLITE_OMIT_AUTORESET compile-time option which if enabled causes
  the sqlite3_step() routine to return SQLITE_MISUSE if it is called after
  it has previously returned anything other than SQLITE_ROW, SQLITE_BUSY, or
  SQLITE_LOCKED.


type: ci
bgcolor: #a8d3c0
user: drh
comment:
  Here is a completely new implementation of the mutex-free-pcache.  This
  one uses a common code base and automatically selects whether or not to 
  use mutexes depending on compile-time and start-time options.


type: t
user: drh
brief: Ticket [5d863f876e]: 3 changes
comment:
  Ticket [5d863f876e] <i>DB corruption following rollback-WAL-VACUUM-rollback</i> status still Open with 3 other changes


type: ci
bgcolor: #a8d3c0
user: drh
comment:
  Do not use SQLITE_MUTEX_STATIC_MEM2 since it has been reused as STATIC_OPEN.
  Instead, create a new static mutex STATIC_PMEM which is an alias for the
  unused STATIC_LRU2.


type: ci
bgcolor: #b0b28e
user: dan
comment:
  Ensure that if a deferred FK constraint is violated by a statement that creates its own implicit transaction, the statement is not an "active-write" after sqlite3_step() returns.


type: ci
user: drh
comment:
  Do not use mutexes in the pcache implementation unless
  SQLITE_ENABLE_MEMORY_MANAGMENT is defined.  This is a performance enhancement.
  A side effect is that pcaches will not steal pages from one another unless
  ENABLE_MEMORY_MANAGEMENT is set, or unless SQLITE_THREADSAFE=0.


type: ci
bgcolor: #a8c7d3
user: drh
comment:
  The first of a planned series of enhancements to the query planner that
  enable it to make better use of sqlite_stat2 histograms when the table
  has many repeated values.


type: ci
bgcolor: #a8c7d3
user: drh
comment:
  Make use of histogram data to make better estimates for the number of rows
  that will be returned from "x IN (v1,v2,v3,...)" constraints.


type: ci
bgcolor: #a8c7d3
user: drh
comment:
  Adjustments to the result row estimator for the IN operator so that it gives
  the same estimates as the equivalent OR operator.  Test cases for the same.


type: ci
bgcolor: #a8c7d3
user: drh
comment:
  Add the ability to use indices for constraints of the form "x IS NOT NULL"
  when sqlite_stat2 is available and most entries for column x are NULL.


type: ci
user: dan
comment:
  Modify the trace callback mechanism so that SQL commands executed from within virtual table or user function callbacks are passed to the trace callback without parameter expansion and enclosed in SQL comments.


type: ci
bgcolor: #a8c7d3
user: drh
comment:
  Change the cost estimator in the query planner to take into account the
  logN rowid lookup cost when going from an index to a table.


type: ci
bgcolor: #a8c7d3
user: drh
comment:
  Restructuring and generalizing analyze5.test.   The whole script is
  currently disabled and will need to be reenabled prior to merging with trunk.


type: ci
bgcolor: #a8c7d3
user: drh
comment:
  Change the weighting of binary searches on tables to 1/10th the cost of a
  search on an index.  Change the assumed reduction in search space from a
  indexed range constraint from 1/3rd to 1/4th.  Do not let the estimated 
  number of rows drop below 1.


type: ci
user: drh
comment:
  Change the name of SQLITE_FCNTL_SYNC to SQLITE_FCNTL_SYNC_OMITTED and only
  send it when PRAGMA synchronous=OFF.  Add better documentation to explain
  what that file-control opcode is used for.


type: ci
user: drh
comment:
  Make sure the return code from doing an xSync is correctly initialized
  so that a valid return code is produced regardless of the path taken through
  the logic.


type: ci
user: drh
comment:
  Fix new compiler warnings in pcache1.c that were introduced by the recent
  performance enhancement patches of [e14649301138b684].


type: ci
user: drh
comment:
  Rename the PCache1.mxPinned field to n90pct (since it is 90% of nMax) in order
  to distinguish it from PGroup.mxPinned.  Fix the computation of n90pct so that
  it does not overflow adversely on excessively large cache sizes.


type: ci
user: dan
comment:
  Update mutex1.test so that it works with the memsubsys1 permutation (pagecache memory). Change a few instances of SQLITE_MUTEX_STATIC_LRU2 in comments and test code to STATIC_PMEM.


type: ci
user: drh
comment:
  Add a mutex around an sqlite3StatusAdd() call to prevent the pagecount
  overflow measurements from getting off in multithreaded applications.


type: ci
user: drh
comment:
  Update all built-in VFSes to return SQLITE_OK for the
  SQLITE_FCNTL_SYNC_OMITTED file-control operation.  Also change the 
  xFileControl methods to return SQLITE_NOTFOUND for unrecognized
  operation codes.


type: g
user: drh
comment:
  Edit [7e3fc2c833a5baa0]: Move to branch [/timeline?r=blocking-checkpoint&nd&dp=7e3fc2c833a5baa0 | blocking-checkpoint].


type: t
user: drh
brief: Fixed ticket [5d863f876e].
comment:
  Fixed ticket [5d863f876e]: <i>DB corruption following rollback-WAL-VACUUM-rollback</i> plus 1 other change


type: ci
user: dan
comment:
  When extending a database file, do so by writing one or more page-size chunks of data to the file, instead of just a single byte to the end.


type: ci
user: drh
comment:
  Change pager_truncate() to a different method for extending files while
  also ensuring that writes are page-size and page-aligned.


type: ci
bgcolor: #a8c7d3
user: dan
comment:
  Add virtual table module "fts4aux", used to inspect the full-text index of an fts4 table directly. Also add the "compress" and "uncompress" fts4 options.


type: g
user: drh
comment:
  Edit [38ca1daa2347eedb]: Move to branch [/timeline?r=mistake&nd&dp=38ca1daa2347eedb | mistake]. Change background color to "#d3b5a8". Marked "Closed". Edit check-in comment.


type: g
user: drh
comment:
  Edit [ed759d5a9edb3bba]: Change background color to "#d0c0ff". Edit check-in comment. Timestamp 2011-02-01 00:04:29. Add tag "release".


type: ci
bgcolor: #a8c7d3
user: dan
comment:
  Remove extra instances of the text "checked out." from sqlite.h.in. Also add new file fts3_aux.c to mksqlite3c.tcl.


type: g
user: drh
comment:
  Edit [b010ddcc52889160]: Change branch background color to "#a8c7d3". Move to branch [/timeline?r=fts4aux&nd&dp=b010ddcc52889160 | fts4aux].


type: ci
user: drh
comment:
  Merge in the blocking-checkpoint enhancement, including the new
  sqlite3_wal_checkpoint_v2() interface and the
  PRAGMA wal_checkpoint(full) statement.


type: ci
user: drh
comment:
  Fix the ATTACH command so that the filename argument can be any expression
  and so that if authorizer callback gets a NULL pointer for the filename
  if the filename argument is anything other than a string literal.
  Ticket [9013e13dba5b58c7]


type: ci
user: drh
comment:
  If a deferred foreign key constraint fails on a statement that is not part
  of a larger transation, make sure that the statement fully ends so that
  subsequent invocations of the same statement will not pass the constraint
  because they think the transaction is not closed.  This is a merge of
  the deferred-fk-quirk branch together with a test case.


type: t
user: drh
brief: Fixed ticket [9013e13dba].
comment:
  Fixed ticket [9013e13dba]: <i>ATTACH authorization fails when database name is not a literal</i> plus 2 other changes


type: ci
user: drh
comment:
  Significant changes have occurred since the 3.7.5 release so go ahead and
  increase the version number to 3.7.6.


type: ci
user: dan
comment:
  Change blocking-checkpoint tests so that they run once using "PRAGMA wal_checkpoint" and once using calls to sqlite3_wal_checkpoint_v2(). Also fix edge cases surrounding the output variables set by wal_checkpoint_v2().


type: ci
user: dan
comment:
  Fix some test cases in walfault.test. Extend one test case to restore code coverage. Add wal5.test to the "coverage-wal" permutation.


type: ci
user: drh
comment:
  Use macros to define the relative costs of search and seek operations when
  computing costs in the query planner.  Current constants seems wrong and
  need to be fixed, but doing so will alter test results.  Need more
  experimentation to determine accurate relative costs.


type: ci
user: dan
comment:
  Do not report corruption if the the db size header field is greater than the file size on disk unless the two change-counter header fields are identical. Fix for ticket [89b8c9ac54].


type: t
user: dan
brief: New ticket [89b8c9ac54].
comment:
  New ticket [89b8c9ac54] <i>False reports of corruption after writing db with two different versions (3.7 and 3.6).</i>.


type: t
user: drh
brief: Ticket [89b8c9ac54]: 3 changes
comment:
  Ticket [89b8c9ac54] <i>False reports of corruption after writing db with two different versions (3.7 and 3.6).</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  Refactor the cost function in the query planner.  Give extra cost (thus
  reduce likelihood of selection) to full table scans.


type: ci
user: drh
comment:
  Prevent a segfault when automatic indices try to use a column with an
  unknown collating function.  Ticket [77aa3b1e6592582e38605d36].  This
  check-in also removes some stray \r characters unrelated to the problem.


type: ci
user: drh
comment:
  Fix the expected output on tests so that it corresponds to the new query
  planner results.  All of veryquick.test is now passing with
  SQLITE_ENABLE_STAT2.


type: ci
user: drh
comment:
  Split the documentation for sqlite3_wal_checkpoint_v2() and its constants
  onto separate pages.  No changes to code.


type: t
user: drh
brief: Fixed ticket [77aa3b1e65].
comment:
  Fixed ticket [77aa3b1e65]: <i>Segfault on automatic index using unknown collating function</i> plus 2 other changes


type: t
user: drh
brief: Fixed ticket [89b8c9ac54].
comment:
  Fixed ticket [89b8c9ac54]: <i>False reports of corruption after writing db with two different versions (3.7 and 3.6).</i> plus 1 other change


type: ci
user: drh
ecomment:
  Allow an index paired with an IS NULL constraint to be used for sorting
  under the condition that the index be treated as a non-unique index.

comment:
  Allow an index paired with a NOT NULL constraint to be used for sorting
  under the condition that the index be treated as a non-unique index.


type: ci
user: drh
comment:
  Fix a bug in the new WHERE-clause processing that tries to use an
  index to resolve IS NOT NULL constraints when SQLITE_ENABLE_STAT2 is
  defined.  The bug could cause memory overruns and segfaults.  The bug
  was new to the code and has not appeared in an official release.
  Found during structural testing.


type: t
user: shane
brief: Fixed ticket [752e1646fc].
comment:
  Fixed ticket [752e1646fc]: <i>Wrong result if DISTINCT used on subquery which uses ORDER BY.</i> plus 2 other changes


type: ci
user: drh
comment:
  Fix problems in the backport, reducing the number of errors in the TCL tests
  to just a few dozen.  Most of the remaining errors seem to be real and
  desirable changes of behavior.


type: ci
user: drh
ecomment:
  This is the beginning of an attempt to backport recent query planner
  enhancements to version 3.7.2.  The code in this version builds and runs and
  seems to give correct answers, but it generates suboptimal query plans and
  hence many of the test cases fail.  The test script gives up after 1000 errors.

comment:
  This is the beginning of an attempt to backport recent query planner
  enhancements to version 3.7.2.  The code in this version builds and runs and
  seems to give correct answers, but it generates suboptimal query plans and
  hence many of the test cases fail.  The test script gives up after 1000 errors.


type: ci
user: shaneh
comment:
  Add "do_not_use_codec" logic to some of the TCL based test cases that read/write directly to the DB.


type: ci
user: drh
comment:
  Remove a no-op code path from sqlite3ExprIsInteger().  Replace it with an
  assert() that proves it always does nothing.


type: ci
user: drh
comment:
  Fix the sqlite3ValueFromExpr() routine so that it returns SQLITE_NOMEM
  on an OOM when trying to extract a NULL.


type: ci
bgcolor: #ffc0d0
user: drh
comment: Fix a typo in the robust_flock() macro for systems without EINTR.
ecomment:
  The robust_flock() fix that accidently included some unrelated, though
  harmless changes.  <i>I should follow my own checklist!</i>


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Backport the changes of checkin [cf86affcb7d308949]
  ("Make wal_checkpoint a no-op if a prior checkpoint has already copied
  all WAL content into the database.") to the 3.7.4 release.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Backport the sqlite3.h generator fix so that it works with newer versions
  of Fossil.  See [3513bf6ee090d9b] for the original.


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Do not raise an SQLITE_CORRUPT error in Recoverymode if the database size
  in the header is larger than the physical file size.  This is a cherrypick
  of checkin [114640d920e16c8]


type: ci
bgcolor: #ffd0c0
user: drh
ecomment:
  Make sure the change-counter and SQLite-version fields of the header are
  set correctly even after vacuuming.  This is a backport of changes
  [0be92a7576] and [04fa1e1690] to address ticket [5d863f876ee].

comment:
  Make sure the change-counter and SQLite-version fields of the header are
  set correctly even after vacuuming.  This is a backport of changes
  [0be92a7576] and [04fa1e1690] to address ticket [5de63f876cc].


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Do not report the database corruption if the the db size header field is 
  greater than the file size on disk unless the two change-counter header
  fields are identical.  Fix for ticket [89b8c9ac54].  Backport by cherrypick
  of [00c4596f0b270].


type: t
user: rogerb
brief: Ticket [eebb8a2803]: 3 changes
comment:
  Ticket [eebb8a2803] <i>Inconsistent amalgamation zip archive file names</i> status still Open with 3 other changes


type: t
user: dan
brief: Ticket [89b8c9ac54]: 2 changes
comment:
  Ticket [89b8c9ac54] <i>False reports of corruption after writing db with two different versions (3.7 and 3.6).</i> status still Open with 2 other changes


type: t
user: dan
brief: Ticket [eebb8a2803]: 1 change
comment:
  Ticket [eebb8a2803] <i>Inconsistent amalgamation zip archive file names</i> status still Open with 1 other change


type: t
user: dan
brief: Closed ticket [eebb8a2803].
comment:
  Closed ticket [eebb8a2803]: <i>Inconsistent amalgamation zip archive file names</i> plus 3 other changes


type: ci
user: drh
comment:
  When a stale schema-cookie is seen, expire only the one statement that
  encountered the bad cookie, not every statement on the database 
  connection.  Ticket [b72787b1a7cea1f]


type: t
user: rogerb
brief: Ticket [eebb8a2803]: 1 change
comment:
  Ticket [eebb8a2803] <i>Inconsistent amalgamation zip archive file names</i> status still Closed with 1 other change


type: t
user: drh
brief: Fixed ticket [b72787b1a7].
comment:
  Fixed ticket [b72787b1a7]: <i>Expiry mechanism causes incorrect collateral damage</i> plus 3 other changes


type: t
user: rogerb
brief: Ticket [b72787b1a7]: 1 change
comment:
  Ticket [b72787b1a7] <i>Expiry mechanism causes incorrect collateral damage</i> status still Fixed with 1 other change


type: ci
bgcolor: #ffd0c0
user: drh
comment:
  Automatically retry system calls that fail with EINTR.  This is a backport
  of the changes from [b9d29ea385bafc] and [af9ba2a6d2c379].


type: g
user: drh
comment:
  Edit [e701efbd1ddfa329]: Move to branch [/timeline?r=mistake&nd&dp=e701efbd1ddfa329 | mistake]. Change background color to "#ffc0d0". Marked "Closed".


type: ci
user: drh
comment:
  Log all error from close() in os_unix.c to sqlite3_log() but do not attempt to
  report errors back up to the application.  Update the unix error logging to
  put the most important information earlier in the message.


type: ci
bgcolor: #a8d3c0
user: drh
comment:
  Add more system calls to the set that can be overridden in os_unix.c.
  Also merge in recent fixes from trunk.


type: ci
user: drh
comment:
  Make sure the rtreenode() testing and analysis routine in the RTREE extension
  can handle 64-bit rowids.  This fix is in response to a message on the
  mailing list.


type: ci
bgcolor: #a8d3c0
user: drh
comment:
  Add additional VFS methods to retrieve system call pointers and to get a
  list of all changeable system calls.


type: ci
user: drh
comment:
  Do a better job of choosing the join table order when the tables having
  very different numbers of rows.


type: ci
user: drh
comment:
  Fix an instance of signed arithmetic overflow and an one bit-shift overflow.
  Mark six other signed arithmetic overflow locations that need fixing.


type: ci
user: drh
comment:
  Fix all known instances of signed-integer overflow.  Within SQL expressions,
  integer overflow now forces coercion to floating point.  The shift operators
  work with any integer right-hand operand with negative values reversing
  the direction of the shift.


type: ci
user: drh
comment:
  Simplifications to the overflow-free multiplier.  Also remove some commented-out
  code that was left in that subroutine by mistake on the previous check-in.


type: ci
bgcolor: #f2dcdc
user: drh
comment:
  Backport a fix from [6b0cabd017ed25] (version 3.6.16 - [2009-03-05]) to the
  3.6.1 branch, a fix that prevents a null pointer deref if one of the
  column access routines such as sqlite3_column_int() is called with a
  NULL first parameter.


type: ci
user: drh
comment:
  Unix errno integer can vary from one system to the next.  So do not
  depend on specific errno values in test cases.


type: ci
user: drh
comment:
  Omit unnecessary OP_Next and OP_Prev operators when uniqueness constraints
  guarantee that the code will only make one pass through the loop.


type: ci
bgcolor: #aaa8d3
user: drh
comment:
  Add the new optional "unix-excl" VFS.  This VFS grabs an exclusive lock on
  the database preventing other processes from accessing it, but continues to
  allow other database connections from the same process.


type: ci
bgcolor: #aaa8d3
user: drh
ecomment:
  In the "unix-excl" VFS, use the heap for shared memory, since only a single
  process is able to read or write the database.

comment:
  In the "unix-excl" VFS, use the heap for shared memory, since only a single
  process is able to read or write the database.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Fix handling of return values from the conflict handler. Document the conflict handler arguments and return codes in sqlite3session.h.


type: ci
user: drh
comment:
  Merge the unix-excl VFS into the trunk.  This merge also adds the -vfs
  option to the command-line shell.


type: ci
bgcolor: #aaa8d3
user: shaneh
ecomment:
  Allow multiplex file names to be preceeded by prefix of the form ":multiplex:chunksize:maxchunks:" 
  Still work to be done, though it compiles and prefixes are ignored.

comment:
  Allow multiplex file names to be preceeded by prefix of the form ":multiplex:chunksize:maxchunks:" 
  Still work to be done, though it compiles and prefixes are ignored.


type: ci
bgcolor: #aaa8d3
user: shaneh
comment:
  In-progress changes - do not use; Removed prefix support; Added file control interface to enable/disable and adjust chunk size;
  added app-def function for same;


type: g
user: shane
comment:
  Edit [cfa4a2f7ea948be0]: Move to branch [/timeline?r=multiplex-enhancements&nd&dp=cfa4a2f7ea948be0 | multiplex-enhancements]. Change background color to " #CC60CC ". Edit check-in comment.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Add the sqlite3_preupdate_new() API, for retrieving the new.* values from within a pre-update callback.


type: ci
user: drh
comment:
  Enhances to the query planner such that "x IS NULL" constraints take the
  STAT2 statistics into account, just like "x=VALUE" constraints.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Change to the session module to use user-defined primary keys instead of rowids when collecting changes.


type: ci
user: drh
comment:
  Provide hints to the btree layer Next and Previous primitives to let them 
  know if they can be no-ops if the underlying index is unique.


type: ci
user: drh
comment:
  Update the implementation of ".testctrl" in the command-line shell to use
  a look-up table rather than a long sequence of if-elses.  Shorten source
  code lines of shell.c to 80 characters or less.


type: ci
user: drh
comment:
  Add a generation counter to the Schema object and enhance OP_VerifySchema
  to also check the Schema generation.  Fix for
  ticket [f7b4edece25c99].


type: ci
bgcolor: #b1d3a8
user: drh
comment:
  Fix a memory allocation issues in the preupdate hook so that the hook.test
  script runs clean in valgrind.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Hold the database mutex for the duration of an sqlite3changeset_apply() call. Also for the duration of all sqlite3session_xxx() calls.


type: ci
user: drh
comment:
  Add the ability to enable and disable foreign key constraints and triggers
  using calls to sqlite3_db_config().


type: t
user: drh
brief: Fixed ticket [f7b4edece2].
comment:
  Fixed ticket [f7b4edece2]: <i>sqlite3_update_hook gives incorrect table name with shared cache</i> plus 2 other changes


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Clarify handling of NULL values in PK columns in sqlite3session.h. Add tests and fixes for the same.


type: ci
bgcolor: #b1d3a8
user: drh
comment:
  Merge in the sqlite3_db_config() enhancements for enabling and disabling
  FKs and triggers from trunk.


type: ci
user: dan
comment:
  Change the rtree module to support queries with multiple comparison operators (i.e. > or <) of the same type on a single column.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  If a NULL pointer is passed to sqlite3session_attach() in place of a table name, attach all database tables to the session object.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Add API function sqlite3_preupdate_depth(), for determining the depth of the trigger stack from within a pre-update callback.


type: ci
bgcolor: #b1d3a8
user: drh
comment:
  Merge in all the latest changes from the trunk, and especially the interface
  changes to the SystemCall methods of the VFS.


type: ci
user: drh
comment:
  Change the xSetSyscall methods of the VFS so that they do not cast object
  pointers into function pointers.  Fix other unrelated compiler warnings.


type: ci
user: drh
comment:
  Update the test_vfstrace.c shim to conform to the new VFS interface for
  xSetSystemCall and xGetSystemCall.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Store primary key definitions for modified tables in changesets. Add the sqlite3changeset_pk() API to extract this data from a changeset iterator.


type: ci
user: drh
comment:
  The changes to fix [f7b4edece25c9948] mean that the schema is always loaded
  whenever a prepared statement is running.  This means that a couple of
  branches can be eliminated and one operand of OP_ParseSchema can be removed.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Fix handling of schema mismatches in sqlite3session.c so that it matches the docs in sqlite3session.h.


type: ci
user: shaneh
comment:
  Minor change to sqlite3Utf8Read() to make consistent with READ_UTF8() usage and avoid implementation defined usages of <<.  
  Added some additional UTF-8 test cases.


type: ci
bgcolor: #b0b28e
user: drh
comment:
  Added most of the logic.  Simple test runs without segfaulting but does not
  give the correct answer.


type: ci
bgcolor: #b0b28e
user: drh
comment:
  Further improvements to the fuzzer.  It still is not quite working.  Pausing
  to work on other things....


type: ci
user: drh
comment:
  Fix the documentation for the sqlite3_column_*_name() functions to describe
  that the information can be invalidated when a prepared statement is 
  reprepared by the first invocation of an sqlite3_step() for a particular
  execution cycle.


type: ci
user: dan
comment:
  Add test infrastructure (and some tests) to inject faults into os_unix.c using the new xSetSystemCall interface.


type: ci
user: dan
comment:
  Fix a problem in the unix VFS implementation of xNextSystemCall(). Also some typos that prevent compilation when HAVE_POSIX_FALLOCATE is defined.


type: ci
bgcolor: #c0c0c0
user: drh
ecomment:
  If the keyword "unordered" appears at the end of the SQLITE_STAT1.STAT
  column for an index, then use that index for equality lookups only, never
  for range queries or sorting.

comment:
  If the keyword "unordered" appears at the end of the SQLITE_STAT1.STAT
  column for an index, then use that index for equality lookups only, never
  for range queries or sorting.


type: ci
user: dan
comment:
  Fix a problem whereby following an IO error in CommitPhaseTwo() of a multi-file transaction the b-tree layer could be left in TRANS_WRITE state, causing problems later on.


type: ci
user: drh
comment:
  Do not generate sqlite_stat1 entries for empty tables when running
  ANALYZE.  Ticket [83ea97620bd31016451]


type: t
user: drh
brief: Fixed ticket [83ea97620b].
comment:
  Fixed ticket [83ea97620b]: <i>ANALYZE on empty tables prevents the use of indices</i> plus 2 other changes


type: ci
bgcolor: #ab8eb2
user: drh
comment:
  Change the ANALYZE command so that it will accept an index name as its
  argument and only reanalyze that one index.  A quick smoke-test works.
  Need to study the implications to the query planner and test corner cases.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  If the sessions module is being built as part of the amalgamation, do not try to include sqliteInt.h and vdbeInt.h.


type: ci
bgcolor: #aaa8d3
user: shaneh
ecomment: Add tests and fixes for SELECT multiplex_control(op, val);
comment:
  Tests and bug fixes for SELECT multiplex_control(op, val);
  Add tests and fixes for SELECT multiplex_control(op, val);


type: ci
user: drh
comment:
  Make sure the left-hand side of the IS NOT NULL operator is a simple column
  and not a general expression before applying the IS NOT NULL
  optimization.  This is a backport of check-in [543f75a6abe3].


type: ci
user: dan
comment:
  Fix some problems in os_unix.c when compiled with ENABLE_LOCKING_STYLE on OSX. Also some minor issues with test scripts.


type: ci
user: dan
comment:
  In os_unix.c, do not return SQLITE_BUSY to SQLite following an error in fcntl(F_UNLCK), regardless of the value of errno.


type: ci
user: dan
comment:
  When simulating an error in the close() system call, close the file descriptor anyway. Otherwise long running tests leak too many file-descriptors and crash.


type: ci
user: drh
comment:
  Add a script that will break the amalgamation source file up into 4 or 5
  smaller source files, each 32K lines or fewer, and a single "sqlite3-all.c"
  source file that #includes the others.


type: ci
user: drh
comment:
  Add the "wholenumber" virtual table module to the test suite - useful in
  populating tables with many rows of content prior to a test.


type: ci
user: dan
comment:
  Do not attempt to run tests that use the 'wholenumber' virtual table if the build does not support virtual tables.


type: ci
bgcolor: #d3a8bc
user: drh
comment:
  Begin a series of changes designed to reduce the scope and frequency of
  invalidating schemas.  Design goals are that the internal schema should
  never be deleted out from under a prepared statement that is running and
  that all prepared statements should be expired if the schema is invalidated.
  At the same time, minimize the number of schema invalidations.  This change
  merely revises the sqlite3ResetInternalSchema() function to use -1 as the
  wildcard for "all" rather than 0, so that we can reset the main schema
  independently of all the others.


type: ci
bgcolor: #d3a8bc
user: drh
comment:
  When resetting any non-TEMP schema, also reset the TEMP schema since it might
  be holding references to the non-TEMP schema that just got reset.


type: ci
user: dan
comment:
  Avoid returning SQLITE_NOTFOUND when the unix xSetSystemCall interface is invoked with NULL passed as the second argument, even if all the default system calls are already installed.


type: ci
user: drh
comment:
  Make sure that the constant 1 is cast to yDbType before shifting to create
  an attached database mask.  This check-in is a follow-up and fix to the
  [7aaf8772274422] change that increases the maximum number of attached databases
  from 30 to 62.


type: ci
user: drh
comment:
  Remove the BtreeMutexArray object - use the Vdbe.btreeMask field to accomplish
  the same result.  Add a generation counter to btree mutexes in order to assert
  that mutexes are never temporarily dropped over a range of instructions in order
  to do deadlock avoidance in some subroutine.  Lock all btrees in any Vdbe
  program that uses OP_ParseSchema.


type: ci
user: dan
comment:
  Changes to oserror.test and syscall.test so that they work with the in-memory journal permutation test.


type: ci
user: drh
comment:
  Move the expired-statement test for OP_Function until after all memory has
  been freed.  The test is still commented out, however.


type: ci
user: dan
comment:
  Have test_syscall.c include "sqliteInt.h". Otherwise the SQLITE_OS_UNIX symbol may not be defined correctly.


type: ci
user: drh
comment:
  Pull the latest changes from trunk (and hence from schema-parse-refactor)
  into the apple-osx branch.


type: ci
bgcolor: #b1d3a8
user: drh
comment:
  Pull the latest trunk changes (and hence the schema-parse-refactor changes)
  into the sessions branch.


type: ci
user: dan
ecomment:
  <nowiki>Add the "--start=[permutation:][testfile]" option to tester.tcl. For starting quick.test or all.test at the nominated permutation and/or test file.</nowiki>

comment:
  Add the "--start=[permutation:][testfile]" option to tester.tcl. For starting quick.test or all.test at the nominated permutation and/or test file.


type: ci
bgcolor: #d3a8bc
user: drh
comment:
  Add a description of access rules for the Schema object and lots of asserts
  to verify that the access rules are followed.


type: ci
bgcolor: #d3a8bc
user: drh
comment:
  Additional schema mutex checks for sqlite3RootPageMoved().
  Reduce the scope of sqlite3ResetInternalSchema() in a few places.


type: ci
bgcolor: #d3a8bc
user: drh
ecomment:
  Add a comment to the VACUUM implementation explaining when all schemas are
  reset and not just the "main" schema.

comment:
  Add a comment to the VACUUM implementation explaining when all schemas are
  reset and not just the "main" schema.


type: ci
user: drh
comment:
  Fix the P4_TRANSIENT constant so that it works correct - so that it really
  makes a copy of the string for the P4 argument.  Use P4_TRANSIENT wherever
  appropriate.  Change P4_STATICs of schema names to P4_TRANSIENT.


type: ci
user: drh
comment:
  Merge the scheme-parse-refactor changes into trunk: (1) added
  sqlite3SchemaMutexHeld() asserts, (2) Use -1 instead of 0 to mean
  "all" in sqlite3ResetInternalSchema(), and other cosmetic changes.


type: ci
user: dan
comment:
  When committing a WAL transaction, do not write any pages to the WAL file with page numbers greater than the size of the database image in pages.


type: ci
user: drh
comment:
  Remove the mutex counter and the logic that attempts to verify that btree
  mutexes are held continuously.  We are not making that assumption at this
  time.


type: ci
user: drh
ecomment:
  Remove dead code from the OP_JournalMode opcode in the VDBE.
  This code seems to have been useless since [f88c6367d2] on [2010-08-07].

comment:
  Remove dead code from the OP_JournalMode opcode in the VDBE.
  This code seems to have been useless since [f88c6367d2] on [20010-08-07].


type: ci
user: drh
comment:
  Simplifications to the sqlite3BtreeEnterAll() and LeaveAll() routines.
  Just have them call BtreeEnter and BtreeLeave() repeatedly rather than
  trying to be clever.


type: ci
user: drh
comment:
  Suppress many harmless compiler warnings, mostly signed/unsigned comparisons 
  within asserts or unused parameters in extensions.


type: ci
user: dan
comment:
  Add configurations featuring the -ftrapv switch and large values for SQLITE_MAX_ATTACHED to releasetest.tcl.


type: ci
user: drh
comment:
  Fix a performance regression:  Keep two btree masks in each prepared
  statement; one for btrees used and another for btrees that require locks.
  Only try to lock the btrees identified by the second mask.


type: ci
user: dan
comment:
  Fix test script attach4.test so that it works with type 1 VFS implementations (no wal). And wal.test so that it work with a small default pager cache size.


type: ci
user: drh
comment:
  When searching a list of freelist trunk pages looking for a specific page
  to allocate, avoid unnecessary journalling of the unchanged trunk pages towards
  the start of the list.


type: ci
user: drh
ecomment:
  Always make sure the left-hand side of the IS NOT NULL operator is a
  simple column, not a general expression, before applying the IS NOT NULL
  query optimization.

comment:
  Always make sure the left-hand side of the IS NOT NULL operator is a
  smiple column, not a general expression, before applying the IS NOT NULL
  query optimization.


type: ci
user: drh
comment:
  Do not do a backup if the number of reserved bytes in the source and
  destination do not match.  Try to make the match, but if unable fail.


type: ci
user: drh
comment:
  Make sure the query planner is able to correctly analyze NULL value
  samples in the sqlite_stat2 table.  This is a backport of changes
  from check-in [f73a167b434f]


type: ci
user: drh
comment:
  Backport test cases from trunk that seek to prove that the IS NOT NULL
  query optimization is working.


type: ci
user: drh
comment:
  When ATTACH-ing a new database to an existing database with a codec, do
  not enable the codec in the attached database if it is not enabled in the
  existing database and it is not requested by the USING clause.


type: ci
user: drh
comment:
  If the keyword "unordered" appears at the end of the SQLITE_STAT1.STAT 
  column for an index, then use that index for equality lookups only, never 
  for range queries or sorting.  This feature is currently undocumented and
  my change or be removed in a future release.


type: ci
user: dan
comment:
  Add an OP_VerifyCookie instruction to "CREATE XXX IF NOT EXISTS" commands. This way, if the specified database object existed when the statement was compiled but removed from the database before sqlite3_step() was called, the statement still works as expected (and creates the object).


type: ci
user: drh
comment:
  Backport check-in [9f9f32882501ac9] to provide EXPLAIN QUERY PLAN output for
  the count(*) optimization.  Also backport check-in [a8761a9128de945aa] to
  prevent unordered indices from being used on a full table scan.  The first
  backport was necessary in order to test the second.


type: ci
user: dan
comment:
  Add VerifyCookie instructions to "DROP XXX IF EXISTS" statements if the specified database object does not exist when the statement is prepared.


type: ci
user: drh
comment:
  Updates to the OS/2 patches.  This change also move the location of a global
  variable declaration in shell.c which might effect other build targets.


type: ci
user: drh
comment:
  Do not override the fchmod system call in unix unless the
  SQLITE_ENABLE_LOCKING_STYLE compile-time option is engaged.


type: ci
user: drh
comment:
  Make sure the array of overloadable system calls is always correctly
  sized, regardless of the compile-time configuration.
  Ticket [bb3a86e890c8e96ab].


type: ci
user: drh
comment:
  Add new extended error codes for I/O errors on seek and shared-memory map.
  Add sqlite3_log() calls in the windows backend to record details of errors.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Have sqlite3changeset_concat() return SQLITE_SCHEMA if an attempt is made to concatenate changesets based on incompatible database schemas.


type: ci
user: drh
comment:
  Fix #ifs involving SQLITE_ENABLE_LOCKING_STYLE so that they check the value of
  that macro and not whether it is defined.


type: ci
user: drh
comment:
  Backport check-ins [0900e35348f4b9bf3] and [4fead8e714c7e50] to the 3.7.2
  branch.  These check-ins provide hints to the btree layer for when it is
  possible to use a hash table rather than a btree to implement an index.
  The SQLite BTree layer does not use these hints, but alternative btree layers
  might.


type: ci
user: shaneh
comment:
  Updates to test code in os_win to bring winSync inline with unixSync (test code only).  
  Updated a few test scripts to account for dirsync counting issues on Windows.


type: ci
user: drh
comment:
  Change the prototype for the open() system call to agree with Posix.  Though
  a faulty function prototype in a pointer cast is a seemingly innocuous error, 
  the correct prototype is necessary for pthreads to work correctly on NetBSD.


type: ci
bgcolor: #80bbd6
user: drh
comment:
  Change the prototype for the open() system call to agree with Posix. 
  Though a faulty function prototype in a pointer cast is a seemingly innocuous
  error, the correct prototype is necessary for pthreads to work correctly
  on NetBSD.


type: ci
bgcolor: #ffc0d0
user: drh
comment:
  Provide the ability to specify an alternative mutex subsystem at
  compile-time.

ecomment:
  Provide the ability to specify an alternative mutex subsystem at 
  compile-time.  -  This check-in should have gone on the trunk, not
  on the 3.7.6 branch.


type: ci
user: drh
comment:
  Disable the transfer optimization if the destination table contains
  any foreign key constraint and foreign key constraints are enabled.
  Ticket [6284df89debdf].


type: ci
bgcolor: #d69b80
user: dan
comment:
  Have the ATTACH command do URI interpretation in the same way as sqlite3_open() and sqlite3_open_v2() do.


type: ci
user: drh
comment:
  Invoke the unix open() system call through a wrapper to avoid problems 
  resulting from differing declarations to that function in various systems.


type: t
user: drh
brief: Fixed ticket [6284df89de].
comment:
  Fixed ticket [6284df89de]: <i>INSERT INTO ... SELECT bypasses foreign key constraint checks</i> plus 3 other changes


type: ci
bgcolor: #d680a6
user: dan
comment:
  Add documentation for the newly introduced sqlite3_vtab_config() and on_conflict() API functions. Test that encountering an SQLITE_MISMATCH in fts3 does not corrupt the full text index.


type: ci
bgcolor: #d69b80
user: dan
comment:
  Allow only "localhost" and "" as authorities in URIs. Do not allow escapes (%HH) in the authority part of a URI.


type: ci
bgcolor: #d680a6
user: dan
comment:
  Fix a performance problem in queries that use "ORDER BY rowid DESC" and one or more FTS auxiliary functions.


type: ci
bgcolor: #d69b80
user: dan
comment:
  Fix a problem in the URI code preventing the amalgamation from building. Add comments describing SQLITE_CONFIG_URI and SQLITE_OPEN_URI to sqlite.h.in.


type: ci
bgcolor: #d69b80
user: dan
comment:
  Have the xFullpath method in os_win.c discard the initial "/" if a filename begins with "/X:", where X is any alphabetic character. Also fix some test issues in uri.test.


type: ci
user: drh
comment:
  Change sqlite3_create_module() so that it avoids resetting the schema as
  long as preexisting modules are unchanged.


type: ci
user: drh
comment:
  Bump the version number to 3.7.7 on account of the new sqlite3_vtab_config()
  and sqlite3_vtab_on_conflict() interfaces.  Updates to the documentation on
  those interfaces.


type: ci
bgcolor: #b1d3a8
user: drh
comment:
  Merge all the latest trunk changes into the sessions branch, especially
  the disappearing WAL transaction fix.


type: ci
bgcolor: #95b28e
user: drh
comment:
  Pull in the patches to support read-only WAL databases into a new branch
  off of the apple-osx branch.  This also pulls in all the other pending
  3.7.7 changes such as URI support.


type: ci
bgcolor: #d69b80
user: dan
comment:
  Update comments and documentation associated with new URI parsing code. Add test file e_uri.test, containing tests mapped to documentation regarding URI filenames.


type: ci
user: drh
comment:
  Increase the iVersion for sqlite3_module needed for the xSavepoint,
  xRelease, and xRollbackTo methods from 1 to 2.  This is so that it will
  conform to published documentation.


type: ci
user: drh
comment:
  Fix an incorrect assert() in sqlite3_value_config().  Updates to the
  sqlite3_value_config() documentation.


type: ci
bgcolor: #d69b80
user: dan
comment:
  Remove some unnecessary modifications from the uri branch. Add a test to show that ATTACH only interprets its argument as a URI if the connection was opened with SQLITE_OPEN_URI (or URI interpretation is globally enabled).


type: ci
user: drh
comment:
  Return SQLITE_MISUSE from the sqlite3_open_v2() function if the 3rd parameter
  is not a valid set of bit-values.


type: ci
user: drh
comment:
  Return a suitable error message if the mode= argument to a URI specifies
  a higher mode than what is allowed by context.  Other minor cleanups for
  the URI parsing logic.


type: ci
bgcolor: #c0c0c0
user: dan
comment:
  Only open a read-only connection to shared-memory if the "readonly_shm=1" option is specified as part of the database file URI (and if a read-write connection fails).


type: ci
user: dan
comment:
  Have flags passed to sqlite3_open_v2() apply to the main and any attached databases. And change things so that any "mode=xxx" or "cache=xxx" options specified as part of a URI for the main database do not also apply to attached databases.


type: ci
user: drh
comment:
  Improvements to documentation hyperlinks.  Change the value of
  SQLITE_OPEN_URI to an unreserved value.


type: ci
bgcolor: #95b28e
user: drh
comment:
  Bring the apple-wal-readonly branch up to date with the latest changes
  in apple-osx, and especially the fix for disappearing WAL transactions.


type: ci
bgcolor: #ffc0d0
user: drh
ecomment:
  Rather than document goofy behavior, it seems better to make the behavior
  less goofy.  (Was: <i>
  Updates to the sqlite3_last_insert_rowid() documentation - to make it clear
  that the function does not work for virtual tables.</i>)

comment:
  Updates to the sqlite3_last_insert_rowid() documentation - to make it clear
  that the function does not work for virtual tables.


type: g
user: drh
comment:
  Edit [f88dfac383fca828]: Move to branch [/timeline?r=mistake&nd&dp=f88dfac383fca828 | mistake]. Change background color to "#ffc0d0". Marked "Closed". Edit check-in comment.


type: ci
user: drh
comment:
  Enhance WAL mode so that the WAL file honors the journal size limit set
  by PRAGMA journal_size_limit.


type: ci
user: drh
comment:
  Make arrangements so that virtual table inserts into shadow tables do
  not modify the sqlite3_last_insert_rowid() return.  Document that this
  is how sqlite3_last_insert_rowid() works.


type: ci
user: drh
comment:
  Avoid exceeding array bounds when reading a corrupt database file in
  autovacuum mode.  Fixes a problem discovered by John Regehr and Peng Li
  using a customized clang compiler.


type: ci
user: dan
comment:
  Add extended return code SQLITE_CORRUPT_VTAB. Returned when the tcontents of the sqlite tables used internally by a virtual table module are invalid or inconsistent.


type: ci
user: drh
comment:
  Add the ability to limit filenames to 8+3 using the
  SQLITE_ENABLE_8_3_NAMES compile-time option together with a URI
  parameter of "8_3_names=1".


type: ci
user: shaneh
comment:
  Update multiplex VFS to handle empty filenames which can occur for during vacuuming (temp file names.)


type: ci
user: drh
comment:
  Enable URI filenames in the command-line shell.  Add a check to the
  beginning of the shell to make sure it is compiled with the same
  SQLite source and header.


type: ci
user: drh
comment:
  When committing a WAL transaction, make sure at least one page is
  written to the WAL file so that the WAL subsystem will have a page
  on which to set the commit flag.
  Ticket [2d1a5c67dfc236].


type: ci
bgcolor: #80bbd6
user: drh
ecomment:
  Backport the [67bf1c9a88] fix for vanishing WAL transactions due to small
  cache spillage.  Ticket [2d1a5c67dfc236].  Also bump the version number
  to 3.7.6.3 in preparation for patch release.

comment:
  Backport the [67bf1c9a88] fix for vanishing WAL transactions due to small
  cache spillage.  Ticket [2d1a5c67dfc236].  Also bump the version number
  to 3.7.6.3 in preparation for patch release.


type: g
user: drh
comment:
  Edit [489c453d4ebb0358]: Change branch background color to "#ffc0d0". Move to branch [/timeline?r=mistake&nd&dp=489c453d4ebb0358 | mistake]. Marked "Closed". Edit check-in comment.


type: ci
user: drh
comment:
  Merge the latest trunk changes, including the read-only shared memory
  enhancement, into the apple-osx branch.


type: ci
user: drh
comment:
  Pull all the latest trunk changes, and especially the fix for WAL cache
  spills causing transactions to disappear, into the apple-osx branch.


type: g
user: drh
comment:
  Edit [ed1da510a239ea76]: Change background color to "#ffc0ff". Edit check-in comment. Add tag "release".


type: ci
user: drh
comment:
  Minor cleanups to the header comments on various test_*.c file, to make
  the suitable for programmer-level documentation.


type: ci
user: drh
comment:
  Do not invoke the xRollbackTo or xRelease methods of a virtual table without
  having first invoked an appropriate xSavepoint method.  Add assert() statements
  to FTS3/4 to verify that this is happening in all cases.


type: ci
bgcolor: #a8d3c0
user: dan
comment:
  If the fts4 option prefix=1 is specified, have the fts4 module maintain an index of prefixes as well as terms.


type: ci
bgcolor: #a8d3c0
user: dan
comment:
  Change fts4 so that the prefix= parameter is passes a comma-separated list of integers. For each integer N, a separate index of all prefixes of length N bytes is created.


type: ci
user: dan
comment:
  Fix a case where a malloc() error could lead to mismatched virtual-table xBegin/xCommit/xRollback callbacks.


type: ci
bgcolor: #a8d3c0
user: dan
comment:
  If a prefix index of size N is not present, use a prefix index of size N+1 along with the terms index for queries for prefixes of length N.


type: ci
bgcolor: #a8d3c0
user: dan
comment:
  Changes to improve performance and support LIMIT clauses on fts3 tables. This branch is unstable for now.


type: ci
user: drh
comment:
  Make sure the P5 argument to the OP_VUpdate opcode is always set to a
  valid conflict resolution code.


type: ci
user: drh
comment:
  Update the documentation to state that any parameter that is optimized out
  of a prepared statement becomes an anonymous parameter for which
  sqlite3_bind_parameter_name() returns NULL.


type: ci
user: drh
comment:
  Fix a problem in the sqlite3TestErrorName() function (used only for testing)
  that appears to have originated from a bad merge.


type: ci
user: drh
comment:
  Refactor the SQL parameter processing so that parameter names for values
  that are optimized out of the prepare statement are not forgotten.


type: ci
bgcolor: #8ea7b2
user: drh
ecomment:
  Toward version 3.7.5.1.  This check-in updates the version number and also
  patches the pager so that it never spills cache while in WAL mode.  The
  latter patch fixes ticket [2d1a5c67dfc23] and also prevents excessive WAL
  file sizes if the pager cache starts thrashing.  A few test cases fail.

comment:
  Toward version 3.7.5.1.  This check-in updates the version number and also
  patches the pager so that it never spills cache while in WAL mode.  The
  latter patch fixes ticket [2d1a5c67dfc23] and also prevents excessive WAL
  file sizes if the pager cache starts thrashing.  A few test cases fail.


type: ci
user: drh
comment:
  Merge the read-only shared memory branch into trunk.  After this merge, an
  unprivileged process can open WAL-mode databases owned by another user as
  long as a database connection with write permission exists on the database
  file and if the readonly_shm=1 URI query parameter is supplied.


type: ci
bgcolor: #c0c0c0
user: drh
comment:
  Simplify the wal-readonly branch so that it does not require changes to
  anything other than os_unix.c and wal.c and a couple of new error codes.


type: ci
bgcolor: #c0c0c0
user: drh
ecomment:
  Make use of the sqlite3GetBoolean() interface for more robust processing
  of the readonly_shm query parameter inside of unixShmMap().

comment:
  Make use of the sqlite3GetBoolean() interface for more robust processing
  of the readonly_shm query parameter inside of unixShmMap().


type: ci
bgcolor: #a8d3c0
user: dan
comment:
  FTS changes: Remove unreachable code. Fix bugs. When processing a large doclist incrementally, read from disk incrementally too.


type: ci
user: drh
comment:
  Add shell scripts used for testing compiler warnings (tool/warnings.sh),
  for verifying that the library exports the correct symbols (tool/symbols.sh),
  and to demonstrate building a full-featured command-line shell
  (tool/build-shell.sh).


type: ci
user: drh
comment:
  Create and use a function especially for adding the ParseSchema opcode.
  This gives a small reduction in code and a small performance increase.


type: ci
bgcolor: #a8d3c0
user: dan
comment:
  Allow the "order=DESC" and "order=ASC" parameters in FTS4 "CREATE VIRTUAL TABLE" statements. Tables created with "order=DESC" store all doclists in descending order, which allows optimizations normally applied to "ORDER BY docid ASC" queries to be used with "ORDER BY docid DESC" queries instead.


type: ci
user: drh
comment:
  Performance improvements on memory copies inside of btree by moving 2 bytes
  at a time instead of just 1 byte at a time.


type: ci
user: drh
comment:
  Add assert() statements to verify that u16 pointers associated with
  the enhancement in [897f56a158] are always 2-byte aligned.


type: ci
bgcolor: #a8d3c0
user: dan
comment:
  Modify fts3rnd.test to run tests for both "ORDER BY docid ASC" and "ORDER BY docid DESC" with both order=ASC and order=DESC FTS tables. Fixes for some bugs found.


type: ci
user: dan
comment:
  Fix a line in pcache1.c where a global data structure is accessed without using the GLOBAL() macro. This causes a subtle malfunction on test systems that use SQLITE_OMIT_WSD.


type: ci
user: dan
comment:
  Fix minor problems with foreign key constraints where the parent table is the same as the child table.


type: ci
user: dan
comment:
  When updating a field that requires foreign key constraints be checked, ensure that the indexes and tables are consistent when the FK logic is run. Otherwise, it may detect the inconsistency and report database corruption.


type: ci
user: drh
comment:
  Use only unsigned values in the implementatin of LIKE and GLOB so that
  values won't overflow to negative when dealing with malformed UTF8.


type: ci
bgcolor: #ffc0d0
user: dan
comment:
  Add an interface to better test incremental loading of doclists by FTS4. Also some tests for this and term prefix queries.


type: g
user: drh
comment:
  Edit [7a3813138d1a5c5d]: Change branch background color to "#ffc0d0". Move to branch [/timeline?r=broken-build&nd&dp=7a3813138d1a5c5d | broken-build].


type: ci
user: drh
comment:
  Merge the improved incremental doclist loading test from the
  broken-build branch (which is now fixed) into trunk.


type: ci
user: drh
comment:
  Changes to #ifdefs so that the build goes correctly if the only FTS macro
  defined is SQLITE_ENABLE_FTS4.


type: ci
user: drh
comment:
  Do not run test tkt-2d1a5c67d.test in the inmemory_journal permutation
  since that test requires WAL mode which does not work with inmemory_journal.


type: ci
user: dan
comment:
  Fix a problem where FTS test code was not being included in the testfixture build when SQLITE_ENABLE_FTS4 was defined.


type: ci
user: shaneh
ecomment:
  Update a couple test scripts to account for more floating point display variation in Windows-based versions of TCL.

comment:
  Update a couple test scripts to account for more floating point variation under various Windows-based versions of TCL.
  Update a couple test scripts to account for more floating point display variation in Windows-based versions of TCL.


type: ci
user: drh
comment:
  Fix compiler warnings in lemon by removing some of the code added by
  Ryan Gordon in [1e8b842039cc0].


type: ci
user: drh
comment:
  Add a new AWK script in the tool/ folder for converting text files into
  C string literals.  Use it for building sqlite3_analyzer.


type: ci
user: dan
ecomment:
  Fix an error made in the previous commit. The parameters to localtime_s() were accidentally reversed.  Ticket [bd484a090c807].

comment:
  Fix an error made in the previous commit. The parameters to localtime_s() were accidentally reversed.


type: ci
user: dan
comment: Change the error message returned when localtime_r() fails to "local time unavailable".
ecomment:
  Change the error message returned when localtime_r() fails to "local time unavailable".  Ticket [bd484a090c8077]


type: t
user: dan
brief: Ticket [bd484a090c]: 4 changes
comment:
  Ticket [bd484a090c] <i>Date/time functions do not detect failure of localtime_r()</i> status still Open with 4 other changes


type: ci
user: drh
comment:
  Simplifications to the localtime() interface.  Fix the case where
  localtime_r() is available so that it works.  Ticket [bd484a090c8077].


type: ci
user: drh
comment:
  Rework the localtime logic yet again in order to make all branches reachable
  and to follow GNU standards for HAVE_LOCALTIME_R-type macros.
  Ticket [bd484a090c8077].


type: ci
user: dan
comment:
  Initialize a variable introduced as part of the fix for [bd484a090c8077] in order to silence a compiler warning.


type: ci
user: drh
comment:
  Backport the fixes for Coverity-discovered problems 
  in [1c27d84216], [676acce274], and [f9c4a7c8f4] from trunk to the
  3.7.6 branch.


type: ci
user: dan
comment:
  Modify the implementation of the test code in test_vfs.c so that test VFS objects may be invoked recursively.


type: ci
user: drh
comment:
  Provide the SQLITE_MAX_SCHEMA_RETRY compile-time parameter for adjusting the
  number of reparse attempts after a schema change.


type: ci
user: drh
comment:
  Do not do affinity transformations on inserts into an index for the
  manifestation of a view or subquery.  Fix for ticket [91e2e8ba6ff2e2].


type: t
user: drh
brief: Fixed ticket [91e2e8ba6f].
comment:
  Fixed ticket [91e2e8ba6f]: <i>Automatic indices cause undesirable type conversions</i> plus 2 other changes


type: ci
user: drh
comment:
  Add a bit to the SQLITE_TESTCTRL_OPTIMIZATIONS setting that will disable
  affinity when writing to any index, regardless of whether or not the index
  is on a manifestation of a view.  This allows better testing of the fix
  for ticket [91e2e8ba6ff2e2].


type: ci
user: dan
comment:
  Explicitly cast an argument to printf() to (int), in case the result of the pointer arithmetic expression is a 64-bit integer on some platforms.


type: ci
user: mistachkin
comment:
  Support using nmake via cmd.exe, allow Tcl related variables to be overridden via the environment, and add 'dll' to the 'all' target.


type: ci
user: drh
comment:
  Modifications to the "like.test" script in order to expose the problem
  reported by ticket [25ee81271091ec27a8c5].


type: ci
user: drh
comment:
  Make sure all new statements begin life unexpired, even if they registered
  functions or did other actions during preparation that would have expired
  all statements.  Fix for ticket [25ee81271091]


type: ci
user: dan
comment:
  Add a case to permutations.test to run the veryquick test suite using sqlite3_prepare() instead of sqlite3_prepare_v2(). This helps to test the fix for bug [25ee812710].


type: ci
bgcolor: #80bbd6
user: drh
comment:
  Create a branch that contains just the fix for the case_sensitive_like
  pragma bug, ticket [25ee81271091ec].


type: g
user: dan
comment:
  Edit [af0d91adf497f5f3]: Change background color to "#d0c0ff". Edit check-in comment. Add tag "release".


type: ci
user: drh
comment:
  Ignore the database name on the target table when parsing a CREATE TABLE
  statement out of the sqlite_master table.  This is a fix for
  ticket [d6ddba6706353] that preserves backwards compatibility.


type: ci
user: dan
comment:
  Add a target to main.mk that will fail if the amalgamation contains any exported symbols that do not begin with "sqlite3_". Run this target from within releasetest.tcl. Add "static" to a couple of private functions in mem3.c.


type: t
user: dan
brief: New ticket [54844eea3f].
comment:
  New ticket [54844eea3f] <i>Incorrect caching of sub-query results in the FROM clause of a scalar sub-query.</i>.


type: t
user: dan
brief: Ticket [54844eea3f]: 3 changes
comment:
  Ticket [54844eea3f] <i>Incorrect caching of sub-query results in the FROM clause of a scalar sub-query.</i> status still Open with 3 other changes


type: ci
user: drh
comment:
  Change the default chunk size on test_multiplex.c to 2147418112 bytes
  (formerly 1073741824 bytes) and make the default configurable at compile-time
  using SQLITE_MULTIPLEX_CHUNK_SIZE and at run-time using the "chunksize"
  URI query parameter.  Add support fo test_multiplex to the shell.


type: ci
user: drh
comment:
  In where.c::findIndexCol - make sure that the Expr.op is TK_COLUMN before
  accessing the Expr.iColumn and Expr.iTable fields.  Also fix a couple of
  unreachable branches.


type: t
user: drh
brief: Ticket [54844eea3f]: 1 change
comment:
  Ticket [54844eea3f] <i>Incorrect caching of sub-query results in the FROM clause of a scalar sub-query.</i> status still Open with 1 other change


type: ci
bgcolor: #c0ffc0
user: drh
ecomment:
  Here is an attempted enhancement to the query planner that didn't work out.
  But it seems good to save this change for historical reference, even if it
  does not belong on the trunk.

comment:
  Here is an attempted enhancement to the query planner that didn't work out.
  But it seems good to save this change for historical reference, even if it
  does not belong on the trunk.


type: ci
user: drh
comment:
  Update the TCL commands for setting windows manditory locks.
  Add test cases for manditory lock delays under windows.


type: ci
user: drh
ecomment:
  Change the windows backend to retry read and write requests if the encounter
  ERROR_LOCK_VIOLATION and ERROR_SHARING_VIOLATION errors - which we think
  sometimes happens due to aggressive anti-virus software.

comment:
  Change the windows backend to retry read and write requests if the encounter
  ERROR_LOCK_VIOLATION and ERROR_SHARING_VIOLATION errors - which we think
  sometimes happens due to agressive anti-virus software.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Add the xFilter callback to the sqlite3changeset_apply() function. This callback allows the application to accept or reject changes on a per-table basis when applying a changeset.


type: ci
bgcolor: #d0c0ff
user: drh
ecomment:
  Update the anti-virus retry logic for DeleteFile().  Invoke sqlite3_log()
  for each anti-virus retry.  Make the retry delay configurable at
  compile-time.

comment:
  Update the anti-virus retry logic for DeleteFile().  Invoke sqlite3_log()
  for each anti-virus retry.  Make the retry delay configurable at
  compile-time.


type: g
user: drh
comment:
  Edit [89f1848d7f7d98b4]: Change branch background color to "#d0c0ff". Move to branch [/timeline?r=av-defense&nd&dp=89f1848d7f7d98b4 | av-defense]. Edit check-in comment.


type: ci
user: drh
comment:
  Added the SQLITE_FCNTL_WIN32_AV_RETRY file control for configuring the
  retry counts and delays in the windows VFS.


type: ci
user: drh
comment:
  Cherrypicked from trunk:  Do not try to use STAT2 for row estimates if the
  index is unique or nearly so.


type: ci
user: drh
comment:
  Do not try to use STAT2 to refine the row estimate of a query that
  uses a unique or nearly-unique index.


type: t
user: anonymous
brief: New ticket [534aa198e1].
comment:
  New ticket [534aa198e1] <i>Build error: missing manifest.uuid file in 3.7.4 downloadable source code</i>.


type: t
user: drh
brief: Closed ticket [534aa198e1].
comment:
  Closed ticket [534aa198e1]: <i>Build error: missing manifest.uuid file in 3.7.4 downloadable source code</i> plus 3 other changes


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Note in the documentation that when iterating through a changeset, all changes to a single table are grouped together. Also add the sqlite3session_isempty() function.


type: ci
bgcolor: #b1d3a8
user: dan
comment:
  Fix the sqlite3session_isempty() method so that it returns, as documented, non-zero when no changes have been recorded by the session object.


type: ci
user: drh
comment:
  Formatting changes on the multiplexor code - make sure no lines exceed 80
  characters.  No logical changes.


type: ci
user: drh
comment:
  When the multiplexor opens an auxiliary file, it now persists the name of that
  file until it is closed, as it should.  Remove the limit on the number of
  auxiliary files used by the multiplexor.


type: ci
user: drh
comment:
  For an existing multiplexed database, try to set the chunk size automatically
  based on the sizes of the preexisting pieces.


type: ci
user: drh
comment:
  Compile with the SQLITE_ENABLE_8_3_NAME macro set to 2 to force 8+3 filenames
  to be on all the time.


type: ci
bgcolor: #d0c0ff
user: drh
ecomment:
  Add retry logic for AV defense to winAccess().  Also allow OS tracing to be
  enabled by a compile-time option.

comment:
  Add retry logic for AV defense to winAccess().  Also allow OS tracing to be
  enabled by a compile-time option.


type: ci
user: drh
comment:
  Prototype change for a new sqlite3_file_control() that will cause the
  -wal and -shm files to persist after the last database connection closes.


type: ci
bgcolor: #b1d3a8
user: drh
comment:
  Avoid segfaulting on an incremental blob write if SQLITE_ENABLE_PREUPDATE_HOOK
  set but no pre-update hooks are defined.


type: ci
user: mistachkin
comment:
  Remove redundant sub-expression from retry loop invariant in winAccess.  Also, make check for SQLITE_ACCESS_READWRITE formally correct.


type: ci
user: mistachkin
comment:
  Merge changes for the new sqlite3_file_control() that will cause the -wal and -shm files to persist after the last database connection closes.


type: ci
user: mistachkin
comment:
  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.


