Commit Graph

10718 Commits

Author SHA1 Message Date
mistachkin
46af59e96c In the async VFS, treat the new error code SQLITE_IOERR_DELETE_NOENT as success for xDelete.
FossilOrigin-Name: c507ca4a8eb255923ff32001a1903dc85960f485
2012-12-06 23:16:58 +00:00
drh
ae80ddea9f Remove the Expr.pColl field and compute the collating sequence as it is needed.
This fixes the test script "shared9.test", though there is still a memory leak.
And there are other problems.  Consider this a work-in-progress.

FossilOrigin-Name: fd011cb22f2d899d94ec7ce22641d7a8f5e19972
2012-12-06 21:16:43 +00:00
dan
fd4d47053d Merge the constant-refactoring-in-triggers branch with the trunk.
FossilOrigin-Name: 79ef8e3c7798dfdf37359ac816e886a43ba9d98d
2012-12-06 19:41:44 +00:00
dan
f78baafe41 Apply the same restrictions on constant refactoring to statements within a trigger program as top-level statements. Candidate fix for [ae3c5670b6].
FossilOrigin-Name: 0c31a46801746191d1a53332d75beda880fe1fd7
2012-12-06 19:37:22 +00:00
drh
696b33e622 Add the SQLITE_FCNTL_TEMPFILENAME file control that asks the underlying VFS
to return a new temporary filename.  Per request from NSS team at Mozilla.

FossilOrigin-Name: 1a63b1d5fa5d79f96eddbda6d94bc10248863710
2012-12-06 19:01:42 +00:00
drh
74358f0c77 Add a test case that demonstrates ticket [71e333e7d2e642].
FossilOrigin-Name: cc6e0785df3c2342376351e19ba7dba7b8d2f6a3
2012-12-06 15:15:15 +00:00
mistachkin
48dd9deffe For the sqlite3-all.c target, use backslashes when calling the splitter script via the MSVC makefile.
FossilOrigin-Name: d507648d820cfea70e17f3d21c35c932a2d20367
2012-12-06 04:33:13 +00:00
mistachkin
f44d4b41bd Bring the ancient malloc3.test file closer into relevance with the latest core code.
FossilOrigin-Name: 9793a21c13a1188383b4be64df86629f196ca330
2012-12-06 04:19:24 +00:00
drh
0590552811 Stop using the TCL_LIBS configuration variable when linking with Tcl.
Remove superfluous 'rm' command from the "clean" target.

FossilOrigin-Name: 1551277208048cb24887928f2f971e47a942c849
2012-12-06 02:56:05 +00:00
drh
e6f1e760d5 Remove obsolete comments from the definition of the CollSeq object.
FossilOrigin-Name: 7b6951016f5bf4c21f843f09769ba176c709e785
2012-12-06 01:03:15 +00:00
mistachkin
f344a5e70e Stop using the TCL_LIBS configuration variable when linking with Tcl. Remove superfluous 'rm' command.
FossilOrigin-Name: e1feab9834fe829d43ae895cc575ad269a36668c
2012-12-06 00:16:51 +00:00
dan
e825831ee4 Disable a couple of tests in where.test when running the "no_optimization" permutation.
FossilOrigin-Name: 5e961e37c5357776bcb44c473cb5ee4b59561f07
2012-12-05 19:04:32 +00:00
dan
97305a7ccb Modify a query in test/thread001.test to ensure that results are returned in the order expected by the test.
FossilOrigin-Name: 51cbddd51d02bcd954be411ecc83556c049a2680
2012-12-05 16:44:13 +00:00
dan
9ccaefb172 Fixes to a test case in shared_err.test. The fix is to prevent sqlite3_prepare() from being called when the test intends to test the response of sqlite3_step() to an OOM condition.
FossilOrigin-Name: 40c143955ebe75f8e73119f9103f36a3c8ac4514
2012-12-05 14:37:55 +00:00
drh
7f5febc729 Make sure memory is freed using a routine that is compatible with the
routine used to allocate the memory.  The SQLITE_MEMDEBUG compile-time
option enforces this.

FossilOrigin-Name: 9f6c68856b694373b7ffb124abd996e519ba5921
2012-12-05 14:31:13 +00:00
dan
44c4fcb9d8 Since errors are ignored anyway, use sqlite3OsFileControlHint() instead of OsFileControl() to invoke the SQLITE_FCNTL_BUSY_HANDLER file-control.
FossilOrigin-Name: bdceca2738eb3e8acc44d0384cf2a3a969ee8170
2012-12-05 11:30:28 +00:00
dan
3de0f18476 If the atomic-write property is enabled, a transaction may be committed in journal_mode=DELETE mode without ever actually creating a journal file on disk. In this case, do not attempt to unlink() the journal file when committing the transaction.
FossilOrigin-Name: 11aa47b0a837858b644c304638e1cbbf482de2f0
2012-12-05 10:01:35 +00:00
dan
8411b25c59 Update a couple of test scripts so that they work in auto-vacuum mode.
FossilOrigin-Name: 04ab2dc6914e4d6fe2682eba08fc1cd1148a44a1
2012-12-05 09:12:58 +00:00
drh
68c804b9ab Fix a harmless compiler warning.
FossilOrigin-Name: 12693deba9b8a47ad02ca4e32d5fba6006b0401c
2012-12-04 11:03:11 +00:00
dan
ec6b07b27b Add a test to ensure that the fix in [b0c1ba655d] has worked.
FossilOrigin-Name: 41806de5c88e924e306ca737192755c011517426
2012-12-04 05:24:21 +00:00
drh
d483dfa4b4 Improvements to the 'tcl' shell output mode. Escape doublequotes,
set separator to space when mode is set, and skip separator after final 
column.

FossilOrigin-Name: 487ba753139c256b911f16aee9586144faea846f
2012-12-04 00:59:05 +00:00
drh
7b6be6f7bf Fix an uninitialized variable detected by valgrind.
FossilOrigin-Name: ffd1e51490286abfaea68fd4b4b4cb967d87b04b
2012-12-04 00:53:08 +00:00
mistachkin
a359b5eea4 Fix an out-of-order function declaration when compiled with MEMDEBUG.
FossilOrigin-Name: 6d31557837fef2c8fad6f009ac6dd97dd4af0a54
2012-12-04 00:37:58 +00:00
mistachkin
585dcb251b Improvements to the 'tcl' shell output mode. Escape double quotes, set separator to space when mode is set, and skip separator after final column.
FossilOrigin-Name: 41fd9dd29034b2269e4b7f2626350124d37b5303
2012-12-04 00:23:43 +00:00
drh
5f53aac2e7 Remove an unreachable condition. Replace it with an assert().
FossilOrigin-Name: 7d5fc1a339cf4f3597ab6a5f3e7101884d2d7673
2012-12-03 19:42:39 +00:00
drh
fc5e546641 Make sure that the optimization that set the maximum column that will be used
on a particular query does not mistakenly change an opcode other than
OP_OpenRead or OP_OpenWrite.  In particular, make sure it does not overwrite
the P4 field of an OP_SorterOpen.

FossilOrigin-Name: b0c1ba655d69c0c46c16ea2aef4e6c9a3e6ce3fb
2012-12-03 17:04:40 +00:00
drh
4d15a0d6d5 Do not exist the command-line shell if a ".read" command invokes a script that
contains two errors.  But reported on the mailing list.

FossilOrigin-Name: 2e5e65152758bc37439584ccba4c1b1c5ceb24f8
2012-12-01 20:21:22 +00:00
drh
c5c0707970 Mark the "async" module as deprecated as its functionality has been
superceded by WAL mode.  This closes ticket [f46ca03b55ae0e]

FossilOrigin-Name: 3d548db7eb14a4133afa6a94530f61fb3ef4a052
2012-11-29 14:26:11 +00:00
drh
dac07e14c8 Add the SQLLOG capability to trunk.
FossilOrigin-Name: f0843f885ab3337f83fe3b304aab80bb7b5dd0a3
2012-11-27 21:22:54 +00:00
drh
f40c858757 Improved detection of file-does-not-exist in winDelete.
FossilOrigin-Name: 92e9b5bc05887c47bc964828447a76ce29aa255c
2012-11-27 21:12:39 +00:00
drh
7d1f0c79cf Get SQLLOG working on windows. Fix a couple of compiler warnings.
FossilOrigin-Name: b3809c937b230b34e5bc6ce4909c04ceef72fb85
2012-11-27 16:39:31 +00:00
dan
bba44d0d1b Fix a problem causing the "number-of-documents" field maintained by FTS4 to be set incorrectly.
FossilOrigin-Name: e38fb02d5ea5daa6992df4dfbbeec92bf7b525f6
2012-11-27 15:56:38 +00:00
dan
71ba10d3c9 Fix problems in test_sqllog.c. Clarify the experimental SQLITE_CONFIG_SQLLOG interface. Handle at least the more likely error conditions in test_sqllog.c.
FossilOrigin-Name: 429c5b2056d7b7c644ca53bc97b8e0b9cb89ab04
2012-11-27 10:56:39 +00:00
dan
ac45593931 Add an option to register global hooks used for logging all SQL executed by an application.
FossilOrigin-Name: cd501bbccf3e62b002317592cc331770b32c129a
2012-11-26 19:50:41 +00:00
mistachkin
55fbc86981 In winDelete, determine that a file does not exist by checking for a last error of ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND.
FossilOrigin-Name: 692ad3c02b1af83f0419283fab9b800e361cdf31
2012-11-21 02:10:20 +00:00
drh
6d405c2cb7 Have the windows implementation of xDelete return SQLITE_IOERR_DELETE_NOENT
if the file to be deleted does not exist.  The unix implementation was
previously modified to behave this way.  The current changes simply brings
the two implementations into alignment.

FossilOrigin-Name: d4c36d4991b048133efb21b251ab57fa66764d9d
2012-11-20 15:06:57 +00:00
drh
224d64690e Strive to use posix_fallocate() rather than ftruncate() when
posix_fallocate() is available.  Ticket [5eaa61ea18].

FossilOrigin-Name: 29980b08ec591f695386b715df72d4afb6ffc3fb
2012-11-13 11:16:04 +00:00
drh
6033e15aa2 Use preprocessor macros to automatically detect whether or not
posix_allocate() is available.  (It is generally available on Linux
but not on Mac.)  Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3]

FossilOrigin-Name: 597333f1024092b94bcd8772541e19a0f707bd40
2012-11-13 11:08:49 +00:00
drh
0fbb50ee15 When available, use posix_fallocate() rather than ftruncate() to allocate
space for mmap()ed -shm files, since posix_fallocate() gives an error if
no disk space is available whereas ftruncate() is silent and leaves the system
vulnerable to a SIGBUS upon first write to the mmap()ed region.
Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3]

FossilOrigin-Name: 356259617cfad04492a02912fdf781f54a2b4494
2012-11-13 10:54:12 +00:00
drh
b43081675d Only log unlink() errors if the error is something other than
SQLITE_IOERR_DELETE_NOENT.  The error is still reported up the stack, it
is simply not added to the sqlite3_log().

FossilOrigin-Name: 5a3b07f0f5dfae7eea870303f52f37d6a17f1da2
2012-11-09 21:40:02 +00:00
dan
9fc5b4a539 Change os_unix.c to propagate ENOENT errors back to sqlite as SQLITE_IOERR_DELETE_NOENT. Have SQLite ignore these where they are benign and propagate them back to the caller where they may indicate a file-system malfunction of some description.
FossilOrigin-Name: bed9c172ce624ab7b5b9de9ad42444891717ad9a
2012-11-09 20:17:26 +00:00
drh
9c0a8ee57c Take into account the cost of inner loops when selecting which table of a join
to use for the next outer loop.

FossilOrigin-Name: 3f87f4593b631819609248c8f1370c1e19465eb0
2012-11-09 18:32:05 +00:00
drh
ada796bbaa Disable the table selection rule that tried to prevent full table scans from
migrating to the outer loop unless they were optimal.  The new scaling of 
outer-loop costs by cost of inner loops obviates the need for that step.  And,
in fact, that step causes problems with the new inner-loop cost accounting.

FossilOrigin-Name: 51bfd63b7f9fe53831570ad124c932cb3582b104
2012-11-09 18:22:26 +00:00
drh
782d68a4cd Try to take into account the cost of inner loops when selecting which table
of a join to use for the outer loop.

FossilOrigin-Name: 942556342a332b04a11169bb04f387d741ef9488
2012-11-09 17:59:26 +00:00
mistachkin
70cb28fc0e Adjust the SQLITE_DBSTATUS_STMT_USED calculation to take the modified usage of sqlite3VdbeClearObject() into account.
FossilOrigin-Name: 82eb7eadb8c76b3af8c811d791f87a634c35935f
2012-11-06 20:39:11 +00:00
drh
46f7d98c0c In test_quota.c, provide a work-around for the missing _chsize_s() function
in mingw.

FossilOrigin-Name: 6b4979e86c05f2da2c5fff67ea7feec5fa56756a
2012-11-06 18:41:41 +00:00
drh
24aeee17a1 Add the INSTR() SQL function.
FossilOrigin-Name: a4c181cbcf9b8baa6e07501a93ef81603d91ba7d
2012-11-05 13:51:58 +00:00
drh
8b229f1983 Merge the fix for ticket [bfbf38e5e9956ac6] into trunk.
FossilOrigin-Name: 4f7dfc32aad1c552d09dc8fefb40cc3656d74883
2012-11-02 23:42:50 +00:00
drh
e0b2d5dabb Adding test cases for ticket [bfbf38e5e9956a]
FossilOrigin-Name: 62ebfa747635a5593759ea2a28166d054c8eee8a
2012-11-02 19:08:31 +00:00
drh
6e83a57f43 Proposed fix for ticket [bfbf38e5e9].
FossilOrigin-Name: 18ae030dad30303129186738c27cdc4ba06362b9
2012-11-02 18:48:49 +00:00