Commit Graph

5775 Commits

Author SHA1 Message Date
danielk1977 281d8bd3ac 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)
FossilOrigin-Name: dc5308c7629abe6a3bad21489c8e97087c264e5a
2008-10-29 07:01:56 +00:00
drh d1370b6d92 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)

FossilOrigin-Name: 4651f590f0b8bf13938b2b15d5082136e763af8d
2008-10-28 18:58:20 +00:00
drh 27c3bd7b73 Add data structure description comments to memjournal.c. (CVS 5847)
FossilOrigin-Name: e9c2adbcbf5c28837b06e0fbba93f1764cc3607f
2008-10-28 18:12:36 +00:00
danielk1977 0f3f072d9f Avoid exposing internal interfaces sqlite_attach() and sqlite_detach() as SQL scalar functions. Ticket #3466. (CVS 5846)
FossilOrigin-Name: 679c0b35aaa1ea488a205cc03802e7078a2bcf29
2008-10-28 17:52:39 +00:00
danielk1977 52bd7912af If an SQLITE_DELETE authorization callback returns SQLITE_IGNORE, proceed with the delete operation but disable the truncate optimization. (CVS 5845)
FossilOrigin-Name: 65a2e131732399f0f14f982eb0689482fdb87b6c
2008-10-27 15:34:32 +00:00
danielk1977 c7af484b4b Make sqlite3_count_changes() and total_changes() work with "DELETE FROM <table-name>". (CVS 5844)
FossilOrigin-Name: e68e4282adb9003aa297d033aeb5d9cadee215cd
2008-10-27 13:59:33 +00:00
danielk1977 9a02fb444c Remove some if() conditions that are always true from delete.c. (CVS 5843)
FossilOrigin-Name: 297ad90dd3a69002e6e4175e9e3938b3a627574d
2008-10-27 08:24:38 +00:00
danielk1977 a7435e31ab Remove unused parameter from function rtreeInit() (part of the r-tree extension). (CVS 5842)
FossilOrigin-Name: 3224ea59812d0f3b5685bd92751054b81e3b681e
2008-10-25 17:10:10 +00:00
drh 31daa63f3e 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)

FossilOrigin-Name: 1fa3bbd8220ce073e91935ea362b6f5d5d6d2859
2008-10-25 15:03:20 +00:00
danielk1977 a2f8c24ca3 Add file tkt3461.test with a few examples of bug #3461. Because these tests currently fail they are disabled for now. (CVS 5840)
FossilOrigin-Name: f2cc159159278201809022706c28bc53b6c3c859
2008-10-25 09:34:59 +00:00
danielk1977 f96a3778f9 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)
FossilOrigin-Name: 0e448bc6096c7ee3b21dbd22dc4ca9470ae7ba31
2008-10-23 05:45:07 +00:00
shane b1cd7308dc 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)
FossilOrigin-Name: acb106e51f8bb7449a0e214075c559cc66497277
2008-10-22 18:27:31 +00:00
shane 891adeac5c Removed some more dead code and fixed some unresolved externals for WINCE. Ticket #3420. (CVS 5837)
FossilOrigin-Name: 5276e31d42070e7b94bd6050c4fa484dfbfe98ca
2008-10-22 16:55:47 +00:00
shane 049fc21db9 Make sure variable declarations occur first in code blocks. (CVS 5836)
FossilOrigin-Name: b78f44c91fcf3920e69c11a6f72e8f032905a3c7
2008-10-22 16:26:47 +00:00
shane 3ed4e64cd8 Test cases for ticket #3442. (CVS 5835)
FossilOrigin-Name: a8bb5acf708c8f7e52d3f67b85094116386f10fa
2008-10-22 16:04:42 +00:00
danielk1977 d207d8084e Fix an assert() failure that can occur following a malloc() failure. Ticket #3455. (CVS 5834)
FossilOrigin-Name: e0d3aa75b4fa0e706185a3058b5962916e30d066
2008-10-22 10:45:37 +00:00
danielk1977 6553c5c81a Update the autoconf build system to include memjournal.c. (CVS 5833)
FossilOrigin-Name: a3c810f0c80e3e9dfe60a0ffd8688d7c76a30d50
2008-10-21 04:30:31 +00:00
drh 1885d1c201 When a name in double quotes falls back to being a string literal,
make sure it has no affinity.  Ticket #3442. (CVS 5832)

FossilOrigin-Name: 81cfee5c14f241f5ae7f607d73b0b5cb821cda24
2008-10-19 21:03:27 +00:00
danielk1977 39281b4b42 Add the memjournal.c file that should have been with the previous checkin. (CVS 5831)
FossilOrigin-Name: 0509eff0e6b5cdeeb52c12c0574ea63e9715bcb5
2008-10-17 19:13:04 +00:00
danielk1977 b3175389c7 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)
FossilOrigin-Name: 39ebf01addf9d0867daafd06a38719e725128f9c
2008-10-17 18:51:52 +00:00
drh 7b228b3e39 Fix a typo in documentation. Ticket #3447. (CVS 5829)
FossilOrigin-Name: 5ce2ddffea807d45318619cc9e259a99dfa14346
2008-10-17 15:10:37 +00:00
danielk1977 d39fa70c79 Fix an error in (5826). (CVS 5828)
FossilOrigin-Name: 8065a92f705dfa04863ba4a828f5bd2803901be8
2008-10-16 13:27:40 +00:00
drh 9e885cd885 Fix a naming problem when SQLITE_MUTEX_NOOP is used. (CVS 5827)
FossilOrigin-Name: 35ce71c6f19953a17aa37abe1c0c97685070e2f6
2008-10-15 19:03:02 +00:00
danielk1977 d138dd8687 Do not open and sync the directory in unixDelete() if the SQLITE_DISABLE_DIRSYNC option is defined. (CVS 5826)
FossilOrigin-Name: 8ef141644edc5182785c6a554222c2ffbe92fef5
2008-10-15 16:02:48 +00:00
drh 3ad92f1b64 Version 3.6.4 (CVS 5825)
FossilOrigin-Name: cd73cffab39d80393f26a20c90aa97cb73d595ea
2008-10-15 11:59:23 +00:00
danielk1977 ab7bee892b 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)
FossilOrigin-Name: 9283478e69d84aa99b2d4636587c8c0b34e7c4da
2008-10-15 11:43:55 +00:00
danielk1977 4bd3ce69ac Disable the page-cache at the end of pcache2.test. (CVS 5823)
FossilOrigin-Name: 3d2d05b6286e2a22a711e02f37748065b3b7f86e
2008-10-14 19:21:51 +00:00
drh 9965a04a63 Fix the amalgamation generator to recognize indented #include directives.
Ticket #3438. (CVS 5822)

FossilOrigin-Name: 494510d8f25c69f5a5f5937b92f505849def6745
2008-10-14 18:21:11 +00:00
drh 72cbd078c3 Fix the xRandomness() method on the unix VFS to return the number of bytes
of randomness obtained. (CVS 5821)

FossilOrigin-Name: b7687e2f2dfa5b0a01ba87ae0bf13684cda50499
2008-10-14 17:58:38 +00:00
drh 7cd30bd3d0 Make sure malloc3.test runs even if a CREATE TABLE transaction commits
prior to the last OOM error. (CVS 5820)

FossilOrigin-Name: 603c40e5b47e4798136af5420a1fa1511791a934
2008-10-14 15:54:08 +00:00
danielk1977 a0042db80f Update main.mk so that a couple of fts3 files are compiled with SQLITE_TEST when building testfixture. (CVS 5819)
FossilOrigin-Name: 8eb315ee5c2a15919171b7d495ac4f1c851b2da9
2008-10-14 14:56:01 +00:00
danielk1977 376687518e Modifications to main.mk so that -DSQLITE_ENABLE_FTS3 works. (CVS 5818)
FossilOrigin-Name: a06d226dee0df0df1aedb9c17353332c6a6e712f
2008-10-14 14:28:35 +00:00
pweilbacher ab88e17ce3 fix a few return codes in the OS/2 VFS (CVS 5817)
FossilOrigin-Name: 4e978a40f7ee93b09093e82173edc74a992aadeb
2008-10-13 21:46:46 +00:00
drh 104d74c752 Get the load extension tests working on amd64. Needed for test coverage. (CVS 5816)
FossilOrigin-Name: 119b69fba0c27c4c479749360176b6eb69d2e70f
2008-10-13 17:09:11 +00:00
drh 21717ed6f0 Fix the SQLITE_OMIT_DATETIME_FUNCS compile-time option so that it builds
successfully. (CVS 5815)

FossilOrigin-Name: c3f91645159511250c9f86c2a97d819f0253d182
2008-10-13 15:35:08 +00:00
drh 1554262148 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)

FossilOrigin-Name: df2c28dc7310510bada292a2e8c1be073803858c
2008-10-13 14:16:11 +00:00
danielk1977 30629571f6 Use one less temporary table in genfkey.c. The retired table was being used to workaround the bug fixed by (5812). (CVS 5813)
FossilOrigin-Name: 73efca985a05930df761b42886a3ba1c5199f32a
2008-10-13 10:56:48 +00:00
danielk1977 d0ffa1e815 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)
FossilOrigin-Name: b055bfc4e5268d8a66d6a4f5e8aec1285fe4b8e7
2008-10-13 10:37:49 +00:00
shane a3465f2d78 Check for failures in winTruncate. Ticket #3415. (CVS 5811)
FossilOrigin-Name: 500c50561fba88948aad21d1aef1e1e96ab8c3aa
2008-10-12 02:27:38 +00:00
shane e5447f5c1c Added -DSQLITE_ENABLE_RTREE=1 to the mkdll.sh script. Ticket #3427. (CVS 5810)
FossilOrigin-Name: 66f57ecb1626f3c5292070c1b9a9c1a9a9164d4f
2008-10-12 02:03:37 +00:00
shane b0650c26a5 Add gcov compile options to link line when GCOV option enabled. (CVS 5809)
FossilOrigin-Name: 3ddda111867f64d9dfd729c50c4d0555cac1499d
2008-10-12 01:49:41 +00:00
shane eec556d3b7 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)
FossilOrigin-Name: ba3711acee6f4659bbf133a23d8f9f37e14d0f38
2008-10-12 00:27:53 +00:00
drh 189077f376 Add macros tests so that the compiler always recognizes that x86_64 is little endian. (CVS 5807)
FossilOrigin-Name: b201e7093c7c47b23b0f17a0890a344f3792d6d3
2008-10-11 18:11:21 +00:00
danielk1977 9ff3f3f772 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)
FossilOrigin-Name: 311003aff85e6b6c47e854d33f46eee31da6f30c
2008-10-11 17:51:38 +00:00
drh 419fcf66db Conditionally omit prototypes in pcache.h when the corresponding routines
are not used.  Ticket #3430. (CVS 5805)

FossilOrigin-Name: 977ae12c365846e1bc582fd17146151953b5ed68
2008-10-11 17:42:28 +00:00
drh ddecae7995 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)

FossilOrigin-Name: 63dd8be70d333c56171dfd254406abb1af685b0f
2008-10-11 17:35:16 +00:00
drh 8867e38aab 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)

FossilOrigin-Name: 2a21d52c651ba113c472b6686dcf8ba009924305
2008-10-11 17:06:04 +00:00
danielk1977 435f29d6eb Add "nolookaside" case to permutations.test. (CVS 5802)
FossilOrigin-Name: 56fb7a22864774fcbd8cd00195359dc0f223ec8b
2008-10-11 17:04:04 +00:00
drh 10fe840e4d 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)

FossilOrigin-Name: d2c252d6bbde4ae14da6c9e6c2683d763d11c59f
2008-10-11 16:47:35 +00:00
drh 4150ebf86f 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)

FossilOrigin-Name: 0c4c66071a46cecc5f87afb8f8f01ae2c90ee9b3
2008-10-11 15:38:29 +00:00