Commit Graph

4984 Commits

Author SHA1 Message Date
drh ed13d98c8c Add the sqlite3_test_control() API. Use it to control the fault injector. (CVS 4758)
FossilOrigin-Name: 413ddade6a13f993cddc57389d1107d82fa19972
2008-01-31 14:43:24 +00:00
drh 820a90694e Version number to 3.5.5. Include FTS3 in the amalgamation by default
(but disabled unless compiled with -DSQLITE_ENABLE_FTS3).  Fix a memory
allocation problem. (CVS 4757)

FossilOrigin-Name: 72411043e60d5358d5a7adf566d662d65d3b3336
2008-01-31 13:35:48 +00:00
drh 21ac7f9dcd Additional API documentation updates in sqlite.h.in. (CVS 4756)
FossilOrigin-Name: 9b6ab9faad39dd20d761efa68f137c596fbcd7a5
2008-01-31 12:26:49 +00:00
drh 33c1be3962 Improvements to the API documentation found in comments in the sqlite.h.in
source file. (CVS 4755)

FossilOrigin-Name: 0b8b5c2e833c90aec1c14d16c12334e01b50f35f
2008-01-30 16:16:14 +00:00
drh 4bbf464fe0 Disable the likely() and unlikely() macros as they do not work some
older versions of GCC. (CVS 4754)

FossilOrigin-Name: e01f9ed9450d3e23fc052e1b779c7a1965e76f7e
2008-01-30 16:14:23 +00:00
aswift ee99b90def Committed changes for ticket #2909 (CVS 4753)
FossilOrigin-Name: 29ce204dbf2ccd051032f23f175b5c225f209fda
2008-01-28 22:09:23 +00:00
drh 9d36b4da99 Fix an incorrect comment on the Mem object in vdbeInt.h. (CVS 4752)
FossilOrigin-Name: 50c9cf9bbbe858d53697b4d3a0c1ec2d63ff5b18
2008-01-28 15:19:26 +00:00
rse d18eef5c57 remove an unused variable (CVS 4751)
FossilOrigin-Name: 88846195474e620d0c3029d464d074aea6e82a22
2008-01-27 10:35:56 +00:00
drh ca4241140c Error messages says "no such view" instead of "no such table" when
trying to DROP a VIEW that does not exist. (CVS 4750)

FossilOrigin-Name: 50815a82e0ec9a5c1399f5fe6ef416434b55a821
2008-01-25 15:04:48 +00:00
danielk1977 cdf3020ca3 Fix a segfault that may follow a malloc failure during compilation of an INSTEAD OF trigger. (CVS 4749)
FossilOrigin-Name: c6635a71dbb2a06d56a0cfce7f0383325e12dc01
2008-01-24 14:27:44 +00:00
danielk1977 ac559264e3 Fix another segfault that can occur following a malloc failure in the SQL compiler. (CVS 4748)
FossilOrigin-Name: 9d98a3f0dded4ee7ed53872f48ee8592ff077f92
2008-01-23 17:13:40 +00:00
danielk1977 15cdbebe08 Fix a couple of segfaults that could occur after a malloc() failure in the SQL compiler. (CVS 4747)
FossilOrigin-Name: 6bd8db3839d57a738cae2196679819186968b40e
2008-01-23 15:44:51 +00:00
drh d2b3e23bc3 Testing coverage enhancements to sqlite3_get_table() and to the SELECT
code generator. (CVS 4746)

FossilOrigin-Name: 45c59802f6d35c7745b96c578ab43d5a336fe822
2008-01-23 14:51:49 +00:00
drh 01495b9921 Improvements to test coverage in the lemon-generated parser and in the
sqlite3_get_table() interface. (CVS 4745)

FossilOrigin-Name: 9f95d79daeb5e7f6fd62f3c896dae4d332121d1c
2008-01-23 12:52:40 +00:00
drh 7e8b848a60 Make sqlite3SafetyOn() and sqlite3SafetyOff() macros which disappear when
compiling without -DSQLITE_DEBUG=1. (CVS 4744)

FossilOrigin-Name: 5375ad6b4b652f388469b0ce4e8e78b3f49169bd
2008-01-23 03:03:05 +00:00
drh 4b2f9368cb Improved test coverage for the tokenizer and sqlite3_complete() interface.
Fix bugs in parsing blob literals and SQL variables beginning with $. (CVS 4743)

FossilOrigin-Name: c82033faf8bdb83ce43f0dd1611408e7796d53de
2008-01-22 23:37:09 +00:00
drh 643167ff21 Add the fault injector module in fault.c. Use it as a basis for memory
allocation failure testing. (CVS 4742)

FossilOrigin-Name: 1a335e180183b414fcc3510ce28b98b21cd134a6
2008-01-22 21:30:53 +00:00
drh 02cd2b80c1 Fix a bug introduced by checkin (4739). (CVS 4741)
FossilOrigin-Name: c8394ac24b87707fa7f2e3cb43ad8efb65d2595e
2008-01-22 19:34:27 +00:00
drh 101716d398 Detect and report a particular type of database corruption that would
formerly cause a segfault. (CVS 4740)

FossilOrigin-Name: f47cf3cc5c70ffb70795e9412e6eaeaf044c3559
2008-01-22 16:35:36 +00:00
drh c046f4000b Detect and report a particular type of database corruption that would
formerly cause a segfault. (CVS 4739)

FossilOrigin-Name: 6ed2d9f82e2c81d5f6c22a4e05c1a2cb5eedd10c
2008-01-22 16:35:36 +00:00
drh 5517625960 Remove dead code from the lemon-generated parser. Better testing
of the sqlite3_file_control() interface, and in particular make sure
the interface works on :memory: databases. (CVS 4738)

FossilOrigin-Name: 83ca4fc7dc18d6deca58fe4181905eb9754e03da
2008-01-22 14:50:16 +00:00
danielk1977 bf2609781b Move the test (sqlite3_simulate_device) functionality out of the main code and into a test vfs. (CVS 4737)
FossilOrigin-Name: 17e7bd6c3f507ffc6b56f54ae8c70730e8246f39
2008-01-22 11:50:13 +00:00
drh c4dd3fd280 Changes to lemon to generate additional comments in the output file and
to remove unreachable code.  Additional test cases for improved test
coverage. (CVS 4736)

FossilOrigin-Name: 2a0bc1e186532a0bfe36ca18fda74a5e7a199227
2008-01-22 01:48:05 +00:00
drh 1df81a8b50 Additional test cases for the RTRIM collation. (CVS 4735)
FossilOrigin-Name: 51452d20f99ecbe0fdb73cfafde5270711aeacad
2008-01-21 16:47:16 +00:00
drh 60a713c66b Miscellaneous test coverage improvements. (CVS 4734)
FossilOrigin-Name: 720bc20a11275ffe139df9203f23e0683b9b4db1
2008-01-21 16:22:45 +00:00
danielk1977 a55e93555e Remove some unused branches from internal function sqlite3PagerDontRollback(). (CVS 4733)
FossilOrigin-Name: 3d4252b06b42151874ee437c3a484e818232a5c9
2008-01-21 13:04:34 +00:00
drh 9b5adfa220 Add the RTRIM collating sequence. Only implemented for UTF8. Still
considered experimental and may be removed if we find adverse impact
elsewhere in the system. (CVS 4732)

FossilOrigin-Name: 0bf4e7fefdbbf7be4e32195473563158f22f1869
2008-01-20 23:19:56 +00:00
drh de4fcfdd7a Additional test coverage improvements. Test coverage now stands at 98.73%. (CVS 4731)
FossilOrigin-Name: 010f7b780cb9c8f21af9ce810494fbd2be98a13f
2008-01-19 23:50:26 +00:00
drh 91fd4d46ad Miscellaneous code simplifications and cleanup and test coverage
enhancements. (CVS 4730)

FossilOrigin-Name: af129b6d158cc90ce9752dd6383c1de47f7b3e43
2008-01-19 20:11:25 +00:00
drh a05a722f23 Cleanup and simplification of constraint processing. Simplifications
to the VM for better test coverage. (CVS 4729)

FossilOrigin-Name: d9ebe9d78c558af050c44ac4437ce0ef8193a4a8
2008-01-19 03:35:58 +00:00
drh 1527ff4e52 Fix test instrumentation problems on shared_err.test. (CVS 4728)
FossilOrigin-Name: 5aef5b0dd8e44a56f84fbc6f843016bca5101987
2008-01-18 17:03:32 +00:00
danielk1977 5ba7cac1d8 Remove an absolute path from crash5.test. (CVS 4727)
FossilOrigin-Name: 42d8a377551baef01fb4e80f35fc12f9454a3cd4
2008-01-18 14:17:20 +00:00
drh ca48c90f60 Remove the OP_HexBlob instruction and code OP_Blob directly. Reduce
the amount of memory allocation required to encode blob literals.
Remove the "out2" instruction type.  Other minor optimizations. (CVS 4726)

FossilOrigin-Name: 0e50c0200a3c1c04e63cbb55a7255cdbbd225347
2008-01-18 14:08:24 +00:00
danielk1977 a98d7b4797 Add a test (and fix) for possible corruption if malloc() fails during a CREATE INDEX statement, the application continues with the transaction, then crashes. (CVS 4725)
FossilOrigin-Name: 65245d9904db19568d5092926b27f0c193c9ef0b
2008-01-18 13:42:54 +00:00
danielk1977 87c29a94fc Add a couple of missing calls to pagerLeave(). (CVS 4724)
FossilOrigin-Name: 87534dfff9e7a37c624a83c79f4074f29ff16c9e
2008-01-18 11:33:16 +00:00
drh c5531beb56 Fix a bug in the test scripts that was preventing many scripts from
running with all.test.  Lots of hidden failures now come to light. (CVS 4723)

FossilOrigin-Name: 251c78a982a33194a052897c37a2a79ae9654452
2008-01-18 02:31:56 +00:00
drh 008e476c28 Test coverage for date.c. (CVS 4722)
FossilOrigin-Name: a676f949b68c968d7e71aceb060c1639b42ba680
2008-01-17 22:27:53 +00:00
drh 3334e948cf Improved test coverage in date.c. Report an error if a malloc
fails within strftime(). (CVS 4721)

FossilOrigin-Name: 495fb41626dfbfbeeb748675b9476a4f7cec6c7a
2008-01-17 20:26:46 +00:00
drh 127b0a6105 Remove unused p4 element from the {quote: VdbeOpList} object. (CVS 4720)
FossilOrigin-Name: 1c37d7b69b672987a6974f4193f933666f4f0c3a
2008-01-17 17:27:30 +00:00
drh d847eaad91 Reuse registers better in the inner loop of a SELECT statement. (CVS 4719)
FossilOrigin-Name: 5ba4e5adf638c6812a2813961ea30a11a670409c
2008-01-17 17:15:56 +00:00
drh 9cbf3425fb Registerification of the VDBE is complete. The operand stack has been
removed from the code.  All instructions operate out of registers only. (CVS 4718)

FossilOrigin-Name: 706b41b70bd1e2030e6fa44358c38a26c5cf0985
2008-01-17 16:22:13 +00:00
drh 07a518ebf6 Registerification of the WHERE clause logic. (CVS 4717)
FossilOrigin-Name: 5581160f43c60825d03de58e67aa66904d9d8964
2008-01-17 02:36:28 +00:00
drh 1db639cef3 Registerification of the WHERE clause logic. (CVS 4716)
FossilOrigin-Name: b3a141b2b0c09bf3c7704deeade290d71b7c9b77
2008-01-17 02:36:28 +00:00
danielk1977 24acd8f939 Use 1<<$x instead of pow(2,$x) in the test suite code. (CVS 4715)
FossilOrigin-Name: 3a289b6d28bcf399845586b15f100d7c3a78b550
2008-01-16 18:20:41 +00:00
drh 93aed5a177 Get all tests running without memory leaks. (CVS 4714)
FossilOrigin-Name: 5807921f5a6e2e08f2c9e79aa91d8c587d64de74
2008-01-16 17:46:38 +00:00
danielk1977 db4e8867a4 Work around using (regexp) in the (ifcapable) function of the test suite. So that simpler versions of tcl can call it. (CVS 4713)
FossilOrigin-Name: 3aa5606bd4bd750a365454f42ab07826320f5b98
2008-01-16 08:24:46 +00:00
drh 8cc7432280 Fix for a couple of minor memory leaks. (CVS 4712)
FossilOrigin-Name: a13d3e953f1a3e451e8708a8ef064aa1d72cb4e9
2008-01-15 02:22:24 +00:00
drh d0e7788706 Fix for ticket #2883. (CVS 4711)
FossilOrigin-Name: 187f41f54d7cfbaa9f6ce3be4d213a454b600749
2008-01-14 15:20:08 +00:00
drh 0e359b30a9 Fix some issues with out-of-memory recovery. (CVS 4710)
FossilOrigin-Name: 23181f86896e7c9e993e00032e735e67ee6b2e71
2008-01-13 19:02:11 +00:00
drh 949f9cd565 The sqlite3_trace() callback now prints a message as each trigger fires
within a statement. (CVS 4709)

FossilOrigin-Name: 110c000d86bd4a0b4b946c62d11a435426b02d16
2008-01-12 21:35:57 +00:00
drh 2dcef11bb9 Continuing work toward converting the VM to a register machine. (CVS 4708)
FossilOrigin-Name: 426f31ecdd05d1179a2e49c2ca1666011cede9c6
2008-01-12 19:03:48 +00:00
drh b765411161 Continuing work toward converting the VM into a register machine. (CVS 4707)
FossilOrigin-Name: a6dddebcc5ccbbf3009c9d06163a8b59036331de
2008-01-12 12:48:07 +00:00
drh d8c303fe0a Do explicit range tests before attempting to convert a 64-bit float
into a 64-bit integer.  Some systems (windows) seem to throw exceptions
if the conversion is out of range.  Ticket #2880. (CVS 4706)

FossilOrigin-Name: 4744257d3cd2dd96485fde6d9f60542714383421
2008-01-11 15:27:03 +00:00
drh efe3d656b6 Attempt to work around a bug in the Borland BCC 5.5.1 compiler. Ticket #2880. (CVS 4705)
FossilOrigin-Name: 6de0ee49073c7a47d5e10495b569b33df76d1448
2008-01-11 00:06:10 +00:00
drh 2d401ab8f9 More work toward converting the VM into a register-based machine. (CVS 4704)
FossilOrigin-Name: 8cbd46517f407b3b1ce187b623db10f00aa415ea
2008-01-10 23:50:11 +00:00
drh 892d317990 Continuing work toward registerizing the code generator. (CVS 4703)
FossilOrigin-Name: 173698c963473ab1b9db88b23a2de82e4097b96d
2008-01-10 03:46:36 +00:00
drh 3de120b032 Fix mixing quote excapes in an awk script. Ticket #2877. (CVS 4702)
FossilOrigin-Name: 05fbca91085cb1b271a05e62181596b4f6f1bb9e
2008-01-10 00:08:43 +00:00
drh 7d67f321d4 Fix a test script problem associated with the new crash4.test file.
Ticket #2882. (CVS 4701)

FossilOrigin-Name: 1134c5ea7116bb2f342ccf09548d075c308c427b
2008-01-09 23:21:25 +00:00
drh 98757157ee All essential opcodes can now operate out of registers and completely
avoid the stack.  Many still optionally use the stack to support legacy
code generation, but the stack is not required.  The next step is to
update all code generation to avoid using the stack. (CVS 4700)

FossilOrigin-Name: e3cf1c1c114bcda8fe577beb5ee55b4a651b96db
2008-01-09 23:04:12 +00:00
drh c920628f26 Fix the build for AIX and other systems where "char" is unsigned by default. (CVS 4699)
FossilOrigin-Name: 47672af0c658573c6b305d224c6901058b8c0e00
2008-01-09 18:31:45 +00:00
drh 3c84ddff3e Continued work toward converting to a register-based VM. (CVS 4698)
FossilOrigin-Name: 92deff07bba2089bbe011f44defb3a0ac1362d56
2008-01-09 02:15:38 +00:00
drh 3557335658 Registerify the comparison opcodes. (CVS 4697)
FossilOrigin-Name: 8862ce9ceefba4f5d1ffbd51d824c05f42a58c22
2008-01-08 23:54:25 +00:00
drh 04adf4161d Finish registerizing the core logic of INSERT and UPDATE. (CVS 4696)
FossilOrigin-Name: 5fd1036788dbbc48ff1c746d2e1ba12b04a7e58c
2008-01-08 18:57:50 +00:00
drh f858740ce9 Add crash4.test with additional crash testing. (CVS 4695)
FossilOrigin-Name: 87b4ac4b73fb84411ced9e9a859dd0e2d211c4b3
2008-01-08 16:03:49 +00:00
drh cb1f0f6c26 Add additional randomness to crash tests. (CVS 4694)
FossilOrigin-Name: 3ccce1f58be46787f8a35f0fa6d738ed126c0f07
2008-01-08 15:18:52 +00:00
drh aa9b8963b5 Progress toward registerification of the constraint checking logic for
INSERT and UPDATE. (CVS 4693)

FossilOrigin-Name: b9bf509e39f5ac38c2149d2a648f68e5df5ae9e3
2008-01-08 02:57:55 +00:00
drh 6a288a33f9 Registerify the AUTOINCREMENT processing and the OP_IsNull and OP_NotNull
operators. (CVS 4692)

FossilOrigin-Name: aa48867cfa04da265b906e5b583bc7ac6b6a1157
2008-01-07 19:20:24 +00:00
danielk1977 738bdcfbf8 Comment changes in select.c. (CVS 4691)
FossilOrigin-Name: 38020592f15c072e0d221ae2e0df13508ac4bd49
2008-01-07 10:16:40 +00:00
drh 1013c9320d Registerify the SRT_Subroutine destination for SELECT results. (CVS 4690)
FossilOrigin-Name: 8201f71729c3afbb41764cea3cda65b03150cb0c
2008-01-06 00:25:21 +00:00
drh 477df4b3ac Modify OP_RegMakeRec to take a base register and count and optionally
store results in the register specified by P3. (CVS 4689)

FossilOrigin-Name: 6bb1b1bc1858028b743a4f660d42d5e9595dc022
2008-01-05 18:48:24 +00:00
danielk1977 dba0137e1e Fix a memory leak introduced with #4687. (CVS 4688)
FossilOrigin-Name: 2b98b0fca82e285ae6b38384587aafa27985fa34
2008-01-05 18:44:29 +00:00
danielk1977 a9d1ccb9b0 First pass at optimizing max()/min() as described in #2853. Some refinements to come. (CVS 4687)
FossilOrigin-Name: c449e04f1870b1ff726c95c0bf1c6c6a22ca588a
2008-01-05 17:39:29 +00:00
drh 5b6afba924 Registerify binary operators. Add register tracing to debugging output. (CVS 4686)
FossilOrigin-Name: 66396d2f0289e36b5fc0af5078c08d1b17f342ae
2008-01-05 16:29:28 +00:00
drh 9de221dff5 Expression code generator takes advantage of recent opcode changes. (CVS 4685)
FossilOrigin-Name: 6c78d2a49a3e6ee8bc31f16488a430cba9eda59d
2008-01-05 06:51:30 +00:00
drh 41c2bf0388 Register-ify the OP_ForceInt opcode. (CVS 4684)
FossilOrigin-Name: 32380dcabcd3839e79f91430b0c250d6e02d9243
2008-01-05 05:38:21 +00:00
drh 8558cde1ab Register-ify the OP_AddImm and all casting opcodes. Omit the
OP_MemIncr opcode. (CVS 4683)

FossilOrigin-Name: 3e8a07dd3cc9921ad39e379576abb0b485a42202
2008-01-05 05:20:10 +00:00
drh b1fdb2adea Get rid of OP_Dup, OP_MemStore, OP_MemLoad, and OP_MemMove. Replace
with OP_Copy, OP_SCopy, and OP_Move.  Add the infrastructure for
operation properties in1, in2, in3, out2, and out3 but do not yet
use any of these. (CVS 4682)

FossilOrigin-Name: cc149eb9ca3c672cc6fea3528353234ac2ed5745
2008-01-05 04:06:03 +00:00
drh 4c583128bd Implement the out2-prerelease opcode design pattern. (CVS 4681)
FossilOrigin-Name: fe057a88d0038ac349ea41883b979ceba6ae410a
2008-01-04 22:01:03 +00:00
drh d298151587 Allow the P2 operand to be negative on opcodes that are not jumps. (CVS 4680)
FossilOrigin-Name: 717bcd11a222fe100e25c5b2eb6de8b6b9930de1
2008-01-04 19:33:49 +00:00
drh 4aeb7bf778 Fix mkopcodeh.awk so that it works on a mac. (CVS 4679)
FossilOrigin-Name: 59d3dfa41f99e99b836649a0870cbfc1c275a654
2008-01-04 19:12:35 +00:00
danielk1977 287fb61c6b Some modifications to insert.c to work without using the stack. (CVS 4678)
FossilOrigin-Name: d9ac6beef538376d0ea0a1daa95cf1dfe36143cf
2008-01-04 19:10:28 +00:00
drh 3a40f696d4 Replace the NOPUSH_MASKs with a bit-vector mechanism that can contain
several different properties about each opcode. (CVS 4677)

FossilOrigin-Name: 042dcb9621934d0318a7c6e9cd08b20a569db367
2008-01-04 16:50:09 +00:00
danielk1977 dd2fb29be8 Modify FifoRead and FifoWrite to work exclusively with memory cells. (CVS 4676)
FossilOrigin-Name: 2c913908a47e7ace7d964067e3566d232ee2d494
2008-01-04 13:57:26 +00:00
danielk1977 96cb76fc7a Modify the code generated for a DELETE to use registers instead of the vdbe stack. (CVS 4675)
FossilOrigin-Name: 173f281334d340290e1978abea5d1ea804141910
2008-01-04 13:24:28 +00:00
danielk1977 a29f18cdfc Add OP_MemSet, for setting a memory cell to a string value. (CVS 4674)
FossilOrigin-Name: 8bb9f970dd71cbf19e45774fc822aa1efebc1724
2008-01-04 11:01:03 +00:00
drh 389a1adbd7 Change the sqlite3ExprCode() function so that callers can request that
the result of the expression be left on the stack or in a register. (CVS 4673)

FossilOrigin-Name: 61bfb77c4267b99ac8a8ef49355bcbc395a1a37b
2008-01-03 23:44:53 +00:00
danielk1977 890947e253 Fix typo in comment. Ticket #2870. (CVS 4672)
FossilOrigin-Name: e97e4578671d85b634072b8931cf55516bbd4ca8
2008-01-03 18:56:25 +00:00
drh 2133d82287 Update OP_Rowid, OP_Column and related opcodes to use registers. (CVS 4671)
FossilOrigin-Name: 4f3967073d2df9eae5a61b9770d5de2e1af47b4c
2008-01-03 18:44:59 +00:00
danielk1977 6dbee8185c Modify VFilter and VRename to use registers instead of the vdbe stack for inputs. (CVS 4670)
FossilOrigin-Name: 253ed40aa36247fc846cc41c8612cd29899d9f8f
2008-01-03 18:39:41 +00:00
drh 0a07c107a6 Registers (aka memory cells) in the VM are now numbered starting with 1
instead of 0.  A register number of 0 means "no such register". (CVS 4669)

FossilOrigin-Name: 0b849805c3a0f562d50623f406279b400d335639
2008-01-03 18:03:08 +00:00
danielk1977 2a339ff677 Modify OP_VUpdate to read arguments from a range of memory cells instead of from the stack. (CVS 4668)
FossilOrigin-Name: 955b15a020e9ea6401fe03a36f5139a03ea80b8a
2008-01-03 17:31:44 +00:00
danielk1977 2dca4ac1d3 Change the VdbeOp.p4 union to include specific pointer types for the various values of VdbeOp.p4type. (CVS 4667)
FossilOrigin-Name: 7e8330c8044dc7718e720dbd33f6e2fe970ead77
2008-01-03 11:50:29 +00:00
danielk1977 1f4aa337cd Change the OP_Insert opcode to read the key and data to insert from memory cells, not the stack. (CVS 4666)
FossilOrigin-Name: 46501f490a5f5577ea31c758df749e02c7c65f39
2008-01-03 09:51:55 +00:00
danielk1977 11641c1136 Change the output of vdbe_trace etc. to include operands p3 and p5. (CVS 4665)
FossilOrigin-Name: 76f2040b051e1d4d8033e354dffe277b549f7962
2008-01-03 08:18:30 +00:00
danielk1977 60585ddc7d Combine the OP_Column and OP_DfltValue opcodes. (CVS 4664)
FossilOrigin-Name: c30f8206353f32a08ef0b323c9fd0bdbeaa28b02
2008-01-03 08:08:40 +00:00
danielk1977 207872a488 Change OP_OpenRead and OP_OpenWrite so that the database number is read from the P3 operand, not the stack. (CVS 4663)
FossilOrigin-Name: 35da261daf602b1e938f05bbad1ff99213d9f4b9
2008-01-03 07:54:23 +00:00
danielk1977 0d78bae377 Fix EXPLAIN and EXPLAIN query plan to work with new opcode format. (CVS 4662)
FossilOrigin-Name: b166c33a7b9a58d571619d2248019eda09651dd2
2008-01-03 07:09:48 +00:00
drh 2400345a32 Revamp sqlite3VdbeAddOpList() so that the structure holds integer values
for P1, P2, and P3. (CVS 4661)

FossilOrigin-Name: 4dc507d87b242619fe32606452227900e16a6de7
2008-01-03 01:28:59 +00:00
drh 66a5167b47 Refactoring the VM. The P3 parameter is changed to P4. A P5 parameter is
added (though not currently used.)  Add routines sqlite3VdbeAddOpX() where
X is one of 0, 1, 2, 3, or 4. (CVS 4660)

FossilOrigin-Name: 027875e4d4c4bd7686dc880c6917a968049b2fec
2008-01-03 00:01:23 +00:00
drh 119a531de4 Add operands p4 and p5 to the VdbeOp structure. (CVS 4659)
FossilOrigin-Name: ad528735e41ce2ec2e680b12e562d4ddb6650985
2008-01-02 17:25:54 +00:00
danielk1977 9ed1dfa802 Minor optimizations for sub-selects in EXISTS(...) expressions: Discard any DISTINCT or ORDER BY clauses and do not calculate any column values. (CVS 4658)
FossilOrigin-Name: fbd17a8976cc9b4dd7c7c903d8beade9a7ef095f
2008-01-02 17:11:14 +00:00
danielk1977 6c8c8ce0e2 Combine the eDest and iParm arguments to sqlite3Select() into a single type - "SelectDest". (CVS 4657)
FossilOrigin-Name: 86dcdfe6d7d629618ccb3c3ff0ca09f2da2d06c7
2008-01-02 16:27:09 +00:00
drh a2a49dc9df Add opcodes OP_ResultRow and OP_RegMakeRec which are register-based
equivalents to OP_Callback and OP_MakeRecord.  Use the new opcodes. (CVS 4656)

FossilOrigin-Name: 4c7f35da7751c61a9b61b1d95adddcc37fff3266
2008-01-02 14:28:13 +00:00
drh 2f6751f91e Remove a surplus OP_Close from delete.c. Fixes a problem with (4654). (CVS 4655)
FossilOrigin-Name: 03cc91b3b0ff9be192532f8a404b3c7b827e1449
2008-01-02 13:05:51 +00:00
danielk1977 e448dc4abf Take advantage of the fact that b-tree cursors need not be closed while other cursors modify their tables to simplify trigger program generation code. (CVS 4654)
FossilOrigin-Name: f1966a8a47fca85f7862c0797a527ab01ac8b0c1
2008-01-02 11:50:51 +00:00
danielk1977 eb9ae90137 Add some extra tests for the recent trigger compilation optimization. (CVS 4653)
FossilOrigin-Name: de54dad800f0b62740ad4ebb3780464b44eb6dff
2008-01-02 04:41:24 +00:00
drh d4e70ebd6f Begin setting a foundation on which to convert the VM from a stack-based
to a register-based machine.  Everything is still mostly stack based with
this check-in.  This change merely begins adding infrastructure to support
a register-based architecture. (CVS 4652)

FossilOrigin-Name: 051ec01f2799e095516015f2ef0180e50fac387c
2008-01-02 00:34:36 +00:00
danielk1977 8f2c54e6e2 Optimize trigger compilation to avoid populating the OLD.* and NEW.* pseudo-tables with data that will never be used. Some testing to come. (CVS 4651)
FossilOrigin-Name: e08a33ed7255c22ce2805363f44a1d7770acb2dd
2008-01-01 19:02:09 +00:00
danielk1977 8ea1cfaa9a Silence a harmless unitialised variable warning in btree.c. Ticket #2862. (CVS 4650)
FossilOrigin-Name: b51782ccac28598eec7adc9302fe7d1986bfdaf8
2008-01-01 06:19:02 +00:00
danielk1977 7c9aaa7058 Define SQLITE_CORE=1 at the start of the amalgamation file for the benefit of any extension source code (i.e. fts3) appended to it. Ticket #2858. (CVS 4649)
FossilOrigin-Name: 6dea8c16384443ed4ab59d1e2694534992ec3118
2008-01-01 05:49:07 +00:00
pweilbacher 2a51576298 fix case in os2GetTempname() where none of the usual environment variables are set to not overwrite two unrelated bytes (CVS 4648)
FossilOrigin-Name: 9719a063942256e34395868d974ed2d53b81b697
2007-12-30 23:38:00 +00:00
pweilbacher ce3dc640f5 simplify os2FullPathname() and at the same time make the allocations more robust (CVS 4647)
FossilOrigin-Name: 6f8952a8366065c9baa48cacc9c36743788210db
2007-12-30 23:35:15 +00:00
pweilbacher efd9eff475 move variable declaration to be able to compile sqlite3_mutex_alloc() with older compilers (like EMX/gcc 2.8.1) (CVS 4646)
FossilOrigin-Name: a568a9cf3705f45c4734f212eb359cadd3b0c897
2007-12-30 23:29:06 +00:00
danielk1977 41c58b78b9 Add experimental pragma "quick_check", a reduced version of integrity_check that runs without most of the overhead of the full integrity_check. (CVS 4645)
FossilOrigin-Name: 2ddc8d72723e5a294e850491fcd9c1fb7474a9c3
2007-12-29 13:39:19 +00:00
drh 71f971b2da Mem3.c enhanced so that an allocation of N bytes only requires (N+11)&~7 bytes
instead of (N+15)&~7 bytes of heap storage.  Minimum heap usage per
allocation is still 16 bytes.  8-byte alignment is preserved. (CVS 4644)

FossilOrigin-Name: d027f91cea0a6fd1e04d2b3853f21348da601a17
2007-12-29 13:18:22 +00:00
danielk1977 4eab8b7b41 Fix a race condition that can occur when reloading the database schema in shared-cache mode. (CVS 4643)
FossilOrigin-Name: b37babef913fcceae7f0bd461a3105e184518d62
2007-12-27 15:12:16 +00:00
danielk1977 641b0f4ffa Fix for #2854. "BEGIN EXCLUSIVE" excludes other shared cache users from using the database. (CVS 4642)
FossilOrigin-Name: 2e59b1d07ee422bd799b5b7aeea44ebc998d9481
2007-12-21 04:47:25 +00:00
drh 9892c5d1f4 Fix some issues with lemon. Tickets #2852 and #2835. (CVS 4641)
FossilOrigin-Name: 5283e0d1467e0fc0ebbd1be553b5a8762e9c7975
2007-12-21 00:02:11 +00:00
danielk1977 fc02882ba9 Add the ioerr3.test file, that found an error in br3317. The error is not present in this branch. (CVS 4640)
FossilOrigin-Name: d3efec148968538e225f5716359a6a25e8941362
2007-12-19 09:20:41 +00:00
drh be69bf6686 Fix a problem with SQLITE_MAX_SQL_LENGTH introduced by check-in (4636).
Ticket #2851 (CVS 4639)

FossilOrigin-Name: cdd866f59797b81b573c68d5c625f9bd9f0f6fde
2007-12-18 17:50:33 +00:00
drh c85375d598 In the CLI, quote strings that contain the separator character.
Ticket #2850. (CVS 4638)

FossilOrigin-Name: 493a17c46a66d2febc11205c052bf949a3f22bd8
2007-12-18 15:41:44 +00:00
danielk1977 315e6697f8 Fix for typo in main.mk: the output of target sqlite3 was testcli. (CVS 4637)
FossilOrigin-Name: 15675dc518dbcf2ce2daa0bbcaf8daf3329ead75
2007-12-18 11:19:35 +00:00
drh cbd2da9ce9 When SQLITE_MAX_SQL_LENGTH is 0, disable the limit. Make the default 0.
Once again build the sqlite3 CLI from individual source files so that
it can be built on systems that lack tclsh.  Tickets #2845 and #2846. (CVS 4636)

FossilOrigin-Name: 07aeca3b9c51e538ba7939950a970f62e51bd3ea
2007-12-17 16:20:06 +00:00
drh 92e3e09467 Version 3.5.4 (CVS 4635)
FossilOrigin-Name: cf4a11b2a8afcbc9cdcf5fa907ddb9865847ed11
2007-12-14 17:39:23 +00:00
drh 9265e6ec8c Update library version number to 3.5.4. (CVS 4634)
FossilOrigin-Name: 5c653bfc7ffafcd3572d399aba05e39ea839068a
2007-12-14 17:24:59 +00:00
drh 8f0ecaae78 Fix a C++-ism in recent changes to select.c. (CVS 4633)
FossilOrigin-Name: 4a00805014a5f4ad862bde0bb55fac934bab41dd
2007-12-14 17:24:39 +00:00
drh a018dc777b Change to the crash simulator to give better diagnostics in case it
runs out of memory while using the mem3.c allocator. (CVS 4632)

FossilOrigin-Name: 0d5747dbad97bf09cf9050e44efbcf5d6b812fbd
2007-12-14 17:22:23 +00:00
drh ef0bea9220 Fix a typo in the previous check-in. Also simplify a line in select.c. (CVS 4631)
FossilOrigin-Name: 86f45d7bb6f7d9e5c177be76d8a7ace754d52bcd
2007-12-14 16:11:09 +00:00
drh 49df6b749c Fix an out-of-memory NULL pointer defer in the code generator. Ticket #2843. (CVS 4630)
FossilOrigin-Name: b821b6ed176b4259e1d4b56c8eb548933b6f530a
2007-12-14 15:12:21 +00:00
drh 85b623f2f9 Change all instances of "it's" in comments to either "its" or "it is",
as appropriate, in case the comments are ever again read by a pedantic
grammarian.  Ticket #2840. (CVS 4629)

FossilOrigin-Name: 4e91a267febda572e7239f0f1cc66b3102558c36
2007-12-13 21:54:09 +00:00
danielk1977 31da1d796b Fix a memory leak that can occur following a malloc() failure. (CVS 4628)
FossilOrigin-Name: 993a213024964f4411a9c25c10810543c8089d07
2007-12-13 19:15:02 +00:00
drh f78fbded4c Fix the location of a #include in test_thread.c. ticket #2826. (CVS 4627)
FossilOrigin-Name: 6129fce873da5adb05473129e610198a30e43ac8
2007-12-13 18:29:35 +00:00
danielk1977 b9fdb2c2f7 Add test cases for errors in "IN(SELECT ...)" expressions where the SELECT statement is a compound SELECT. No faults found. (CVS 4626)
FossilOrigin-Name: 49b67adfe9f15dfac34cb30f965920bf61bceee7
2007-12-13 18:24:21 +00:00
drh c9a67a8c0f Add new makefile target for "testcli" that builds a CLI using individual
source files instead of the amalgamation.  Ticket #2838. (CVS 4625)

FossilOrigin-Name: b6f04e5b93bb65287bfb697f2f059dd34c13102a
2007-12-13 18:20:46 +00:00
drh 43f6e06460 Additional test cases for tkt2822. Fix a related bug in printf(). (CVS 4624)
FossilOrigin-Name: 8f184e40ff79c3c5ef98337615f58a4a6d0249dd
2007-12-13 17:50:22 +00:00
danielk1977 61116ae1ca Return an error if the user attempts to rename a view. Related to (but not a fix for) #2831. (CVS 4623)
FossilOrigin-Name: 19d56d997f50be81ac2baace16b7e7a1b674301a
2007-12-13 08:15:30 +00:00
danielk1977 01874bfc51 Adjust the test suite to account for recent changes related to #2822. Most changes are related to English language error messages only. (CVS 4622)
FossilOrigin-Name: 2f88b9b3e3c9abc3ae4a5dcef82707dd74f8aace
2007-12-13 07:58:50 +00:00
drh 1e281291fb ORDER BY in a compound SELECT will first match against the left-most SELECT.
If there is no match there, it begins working its way to the right. (CVS 4621)

FossilOrigin-Name: 56063ec84b130bcdb0e90bc76fabca394d0d867f
2007-12-13 03:45:07 +00:00
drh 9a99334d54 Towards getting ORDER BY to match against the correctin columns.
This version only looks at the left-most column in a compound SELECT.
That is the correct thing to do, but not what SQLite has historically done. (CVS 4620)

FossilOrigin-Name: bbddf16ac9539c7d48adfc73c5a90eecb8df6865
2007-12-13 02:45:31 +00:00
drh 9019f4a65f Minor cleanup changes on the OP_StackDepth opcode. Added the
sidedelete test for additional testing of ticket #2832. (CVS 4619)

FossilOrigin-Name: c0689409320de1532be0c0cae12b4b716f6bffb9
2007-12-12 22:24:12 +00:00
danielk1977 c32a93fe95 Remove an (explain) accidentally left in tkt2832.test. (CVS 4618)
FossilOrigin-Name: 48947e2b75d39c5be0d08fe1c7b888d9065f9116
2007-12-12 18:05:20 +00:00
danielk1977 997a904016 Try to find some more stack leaks by adding OP_StackDepth to loops in DML statements. None were found. (CVS 4617)
FossilOrigin-Name: 12c3029b1edcff4435177c709fb2584323f8c515
2007-12-12 17:42:53 +00:00
danielk1977 6811e399ff Remove a couple of lines in delete.c that weren't doing anything. (CVS 4616)
FossilOrigin-Name: 86332c79aedb64842e589ff941c637f8e1aabd41
2007-12-12 17:19:27 +00:00
danielk1977 967573d56a Fix some problems similar to #2832, but caused by triggers instead of an OR REPLACE clause. (CVS 4615)
FossilOrigin-Name: ee98ae17187296f7b0181c3d4d2b942d5cd4bc8f
2007-12-12 16:06:23 +00:00
danielk1977 2d78617d66 Test file containing minimal example of bug #2832. (CVS 4614)
FossilOrigin-Name: ed2e61a9fab6a9a102031c10bc6f89e78b4c7447
2007-12-12 14:46:58 +00:00
drh 89e0dde1c9 Fix database corrupting code generation error for UPDATE OR REPLACE.
ticket #2832.  Still need to add test cases and additional defensive
logic to avoid future occurrences of similar problems. (CVS 4613)

FossilOrigin-Name: 18e10f816782ca7842f651e9b2a23da1aab645c8
2007-12-12 12:25:21 +00:00
drh a99e881176 Add a new OP_StackDepth opcode to help detect VDBE stack leaks early,
before they cause damage.  For diagnostics in ticket #2832. (CVS 4612)

FossilOrigin-Name: 3fd6a267533cedcca9b8ba3533c107d7341a06c6
2007-12-12 12:00:45 +00:00
danielk1977 ae271d6a38 Fix test numbering in tkt2822.test. Ticket #2830. (CVS 4611)
FossilOrigin-Name: 8fe8e9c460e0f8ebc4267de96b0c971cb6370861
2007-12-12 04:38:26 +00:00
drh 6e41aa0be0 Fix a comment on the SQLITE_SQL_MAX_LENGTH definition. (CVS 4610)
FossilOrigin-Name: 9335c940504f5979066b70ec445b57acfb251713
2007-12-11 20:04:14 +00:00
drh d919fe17e0 Build the CLI using the amalgamation. Relax the limit on SQL statement
length when building the CLI. (CVS 4609)

FossilOrigin-Name: a5d81cd371913dff4b1337a9586645f967371ab9
2007-12-11 19:34:44 +00:00
danielk1977 bc67da48af Fix a 'const' issue in trimFunc(). (CVS 4608)
FossilOrigin-Name: 64787d78b99a549a87bc2baeff8ae87691612b77
2007-12-11 04:23:19 +00:00
drh 64c1ea60cd Make sure the windows driver responds correctly to the
SQLITE_OPEN_DELETEONCLOSE flag.  Ticket #2829. (CVS 4607)

FossilOrigin-Name: 19db91fd683c465b8c8a862143a01178682da445
2007-12-10 21:11:31 +00:00
danielk1977 70517ab9a1 Further modifications to do with ORDER BY and compound SELECT queries. Related to ticket #2822. (CVS 4606)
FossilOrigin-Name: 0d9b0e6e3a8f8a66956878084085842e94c3cb2f
2007-12-10 18:51:47 +00:00
drh 6ed4b78123 Fix a macro in func.c that causes problems for the amalgamation. (CVS 4605)
FossilOrigin-Name: 6adbe91efffc6b3f53dae87494430ede61d40ecc
2007-12-10 18:07:20 +00:00
drh ea4ee79046 Fix a bug in the compilation procedures for the Linux shared library
that includes the TCL bindings. (CVS 4604)

FossilOrigin-Name: d384810a95c97b868a87d090f8dcb903cc82cbf7
2007-12-10 17:55:16 +00:00
danielk1977 284f4aca32 Fix compilation/testing with OMIT_SUBQUERY defined. Ticket #2828. (CVS 4603)
FossilOrigin-Name: 0b34a18651764e650faba983be8593992ab2f4a9
2007-12-10 05:03:46 +00:00
drh 4c77431448 Better resolution of ORDER BY terms in compound queries. Candidate
solution for ticket #2822.  Needs more testing and documentation
before going final. (CVS 4602)

FossilOrigin-Name: 62a78d212c53a9cb1759d03134653a75f3a086b6
2007-12-08 21:10:20 +00:00
drh 9213d9e5fb Strengthen the tests for aggregate functions in GROUP BY clauses.
Changes to test cases only.  No changes to code. (CVS 4601)

FossilOrigin-Name: 4be8e6765bf8bc48747b2542f2ed77066fb9dcb9
2007-12-08 18:01:30 +00:00
drh bed8e7e565 Fix a bug in the debugging printf logic. (CVS 4600)
FossilOrigin-Name: 1d6a9f5fafb862fb31c8589fa118a5672bad6abd
2007-12-08 17:55:35 +00:00
shess b6a75606ed Change prefix search from O(N*M) to O(NlogM). The previous code
linearly merged the doclists, so as the accumulated list got large,
things got slow (the M term, a fucntion of the number of documents in
the index).  This change does pairwise merges until a single doclist
remains.  A test search of 't*' against a database of RFC text
improves from 1m16s to 4.75s. (CVS 4599)

FossilOrigin-Name: feef1b15d645d638b4a05742f214b0445fa7e176
2007-12-07 23:47:53 +00:00
drh e5fe690d75 In shared-cache mode, make sure the busy hander invoked is the
busy handler associated with the database connection that caused
the lock contention in the first place. (CVS 4598)

FossilOrigin-Name: c9eb65912f61ce0a6b66fe253652a1827e46b12a
2007-12-07 18:55:28 +00:00
drh b9175aed38 Get the LIKE and GLOB operators working again on systems using the
EBCDIC character set. (CVS 4597)

FossilOrigin-Name: 754298a74e3d889f3767daba058262613d20a601
2007-12-07 18:39:04 +00:00
drh 464fc33a82 Fix a leaking database connection in the vacuum2 test script.
Ticket #2827. (CVS 4596)

FossilOrigin-Name: f29deb5f0bfcd6d00795aeb66dece717a6c1768a
2007-12-06 17:41:27 +00:00
drh 3c7f2dc4ca Use the specified buffer length, not the maximum buffer length in
unixFullPathname() and related functions. (CVS 4595)

FossilOrigin-Name: f015a38771d98996366d66787b9b066f9ef5e248
2007-12-06 13:26:20 +00:00
drh f5befa0339 Continuing work on the C/C++ interface requirements that appears as
comments in sqlite.h.in. (CVS 4594)

FossilOrigin-Name: 2130e7125187ca46df3f65237f933b0e568a36ed
2007-12-06 02:42:07 +00:00
drh fddfa2d863 Begin adding requirements numbers to the C/C++ interface documentation. (CVS 4593)
FossilOrigin-Name: ae1936aadf00bec91750d41be7507cf1b81fc411
2007-12-05 18:05:16 +00:00
drh ddac25c732 Add the ability to change the autovacuum status of an existing database
by setting the auto_vacuum pragma then running the VACUUM command. (CVS 4592)

FossilOrigin-Name: bdfc19e838b369a8c5d5d23663fad690f55ba3d7
2007-12-05 01:38:23 +00:00
drh 77658e2f0d Make sure statement journals are initiated when doing DROP operations
(since the DROP might fail after sqlite_master changes).  Also make
sure statement journals are initiated if there are pending SELECT
statements.  Ticket #2820. (CVS 4591)

FossilOrigin-Name: bf34284ff0c60ae6e735e09bb29cd48b158e8dce
2007-12-04 16:54:52 +00:00
drh 0349688fbc Fix a bug in the TCL code for sqlite3_analyzer. (CVS 4590)
FossilOrigin-Name: 7c2cf4542852a81daf29a930ab103c52bb678326
2007-12-04 13:41:51 +00:00
drh 2dd62be503 Clarify the operation of sqlite3_blob_close() in the API documentation.
Ticket #2815. (CVS 4589)

FossilOrigin-Name: 78f359dffa6f4af4d5b7e4523f451e0e405350c0
2007-12-04 13:22:43 +00:00
drh 275ac343df Do not require os_other.h if compiling with -DOS_OTHER=1. (CVS 4588)
FossilOrigin-Name: 96ec39031e0b0b9a69e7b5647580326a87f94d2e
2007-12-03 21:52:09 +00:00
danielk1977 fe91033907 When parsing CREATE INDEX statements from the sqlite_master table, do not search the temp database schema for the corresponding table. Only consider the database for which the schema is being parsed. Ticket #2817. (CVS 4587)
FossilOrigin-Name: e6f02aa5ae6da0befdf98fdd5884345f3cb7f5ea
2007-12-02 11:46:34 +00:00
drh 0c1cddbe86 Another fix to Makefile.in for mingw. (CVS 4586)
FossilOrigin-Name: cfaeb02554ab86fffbfb8eb2a78c7d8a59a9cba5
2007-12-01 19:25:17 +00:00
drh 4dd022aba8 Beginning attempts at casting the sqlite.h.in documentation into
formal requirements. (CVS 4585)

FossilOrigin-Name: 2ea78d2cbd86edda6f998fbb364800d3ecf76479
2007-12-01 19:23:19 +00:00
drh afbd06bb93 Bug fix to Makefile.in to allow it to work with mingw. (CVS 4584)
FossilOrigin-Name: fdca98d1eb44c05ffb3c42acb9f87f57460c4cc8
2007-12-01 09:32:53 +00:00
drh 5fc102eac1 Add a few function requirements numbers to interfaces in the comments
of sqlite3.h.in.  This is experimental. (CVS 4583)

FossilOrigin-Name: b829a64515e88e83aecd339342bad3b140c86bb0
2007-11-30 01:06:16 +00:00
drh 7fe3f7e918 Make sure we never try to "truncate" a file to a larger size. (CVS 4582)
FossilOrigin-Name: 7d2f6a1d6c5ab89a3b65fbcaf172abf6d81e206b
2007-11-29 18:44:27 +00:00
drh ace03d1b3a Add the optional (and experimental) mmap() memory allocator in the
mem4.c module. (CVS 4581)

FossilOrigin-Name: cfd683ac80fd043343e0f0af90805058daa3818d
2007-11-29 18:36:49 +00:00
danielk1977 21de2e755c When using an index to scan a database table, read column data from the index in preference to the table. This increases the likelihood that the table will not be required at all. (CVS 4580)
FossilOrigin-Name: 061608c72ac0a96eacf3b64d638235e4739f96ba
2007-11-29 17:43:27 +00:00
danielk1977 9a96b66810 Optimisations for expressions of the form "<value> IN (SELECT <column> FROM <table>)". (CVS 4579)
FossilOrigin-Name: 56d0e32677744df8570b519fae1c04da4ea4984d
2007-11-29 17:05:18 +00:00
drh ade8648301 Add the {quote: StrAccum} object
for accumulating strings.  Revamp xprintf to use
the new object.  Rewrite the group_concat() function to use the new object.
Productize and test the group_concat() function. (CVS 4578)

FossilOrigin-Name: 221aee72be040769e8026b91648f03c6366a8821
2007-11-28 22:36:40 +00:00
drh 26b7994a97 Change the BTree so that it uses the Pagers temporary page space when
reorganizing the rows on a page, rather than mallocing for space of
its own.  In this way, we avoid having to deal with a malloc failure
deep down inside the page reorganizer.  Ticket #2806 (CVS 4577)

FossilOrigin-Name: 98960132dc082da61652201f4bd2b559725350c0
2007-11-28 16:19:56 +00:00
drh 0167f28508 Reorganize the code for the homegrown recursive mutexes. Fix a place
in the previous check-in where the #ifdef label was incorrect.
Ticket #2804. (CVS 4576)

FossilOrigin-Name: 542e11f954983ae26fef4ea850c8b2a20f738edd
2007-11-28 14:04:57 +00:00
drh 5f3d652394 Clarify the conditions under which homegrown recursive mutexes work
(they require a coherent cache) and only enable them if there is an
explicit #define so as to avoid accidental use on platforms that do
not meet the constraints.  Ticket #2805. (CVS 4575)

FossilOrigin-Name: 80299eebddba9aac4c1bc36ffa2b440bffbf1751
2007-11-28 13:55:55 +00:00
drh 4aa2bfe67d Preset the legacy_file_format pragma to the value of the primary
database so that a VACUUM will not unknowingly alter the setting.
Ticket #2804. (CVS 4574)

FossilOrigin-Name: f731fa6bb398d8af621af17dc0677dd0f715c4a7
2007-11-28 13:43:16 +00:00
drh ed05efbf7b Add an implementation of recursive mutexes for unix systems that
lack pthreads recursive mutexes (ex: Solaris 2.6).  Modern unix
systems continue to use the recursive mutexes provided by pthreads. (CVS 4573)

FossilOrigin-Name: f366a776c1b2dda42b4f10fdb8be66029165d084
2007-11-28 00:51:34 +00:00
drh f32fabfd75 Add test cases to verify that the file format is preserved across
VACUUM.  Ticket #2804. (CVS 4572)

FossilOrigin-Name: 57400f50c600a59b56ba6eadfdc740235c194cd6
2007-11-27 23:36:59 +00:00
drh 039edbb479 Use the hexio test utility rather than TCL's binary I/O to avoid
32/64-bit problems in io.test.  Ticket #2803.  (This is a change
to the test harness only - not to SQLite.) (CVS 4571)

FossilOrigin-Name: 07f7dde8a636aa05b917daa6b248c6f98654aab8
2007-11-27 23:11:45 +00:00
drh aa71367a7e Remove superfluous -lpthread from publish_osx.sh. Ticket #2801.
Fix a bug in mkdll.sh. (CVS 4570)

FossilOrigin-Name: 8d6e8fd381d26b9f14464f545c37363218206391
2007-11-27 21:44:30 +00:00
drh f042f51ea7 Omit the superfluous -lpthread option in publish.sh. Ticket #2800. (CVS 4569)
FossilOrigin-Name: 4f09f233f0603696aac80f1a4f86bcc803a00daf
2007-11-27 18:45:31 +00:00
drh 7771c541dd Add the publish_osx.sh script for building binaries for OSX (CVS 4568)
FossilOrigin-Name: 9bd7c31496d1d2959761c09a4cfa94662891b81c
2007-11-27 18:30:38 +00:00
drh e0d5e34623 Update the "publish.sh" scripts used to build the binaries for the website. (CVS 4567)
FossilOrigin-Name: 2f748318fbb8ac4614c07629506b3955ce4fe20d
2007-11-27 17:38:14 +00:00
drh b3a95cd1af Version 3.5.3 (CVS 4566)
FossilOrigin-Name: a39007d5b1f0d8925153ab3aac44fd655ed2536e
2007-11-27 17:12:10 +00:00
drh d3cf2473eb Fix a bug that can cause a segfault on win32 systems following an
I/O error. (CVS 4565)

FossilOrigin-Name: eeec8d27c4533f62b4f7e739d9c895552ddb69ff
2007-11-27 16:55:07 +00:00
drh 0b47d34020 Bug fix in the configure script. Ticket #2799.
The configure script is a real mess and
needs to be completely rewritten. (CVS 4564)

FossilOrigin-Name: 9d15f0330d685e62fbf4a1a1ad18dfecdc511bf8
2007-11-27 14:50:06 +00:00
drh 543165ef97 Update the version number to 3.5.3. Fix some minor testing problems. (CVS 4563)
FossilOrigin-Name: f4c8f2d1918f24514f02cae9172c77f6957d32c1
2007-11-27 14:46:41 +00:00
drh b6dbc00078 Add likely() and unlikely() macros to the header file. They are not
yet used for anything. (CVS 4562)

FossilOrigin-Name: 485add38a1ef224732575f9998f06466dcc9742d
2007-11-27 02:38:00 +00:00
drh 454ad58c3f Use macro __DARWIN__ rather than __MACOS__ for conditional
compilation of MacOSX specific features.  Ticket #2780. (CVS 4561)

FossilOrigin-Name: d0a4c2a36385c03dfadbb844823d0ed2458bf619
2007-11-26 22:54:27 +00:00
drh f998b730dd Additional out-of-memory testing. Fix bugs caused by malloc failures in
where.c.  Tickets #2794, #2795, #2796, and #2797. (CVS 4560)

FossilOrigin-Name: 5e02dbabcfa42173adff234c086df1e962824c92
2007-11-26 13:36:00 +00:00
drh ade6c9c513 Declare the invalidateCursorsOnModifiedBtrees function to be static.
Ticket #2792. (CVS 4559)

FossilOrigin-Name: 94f25fc1129c7fb8697a67e509ab9de54a173a58
2007-11-24 10:23:44 +00:00
drh 8255feca02 The FTS3 amalgamation can now be appended to the SQLite amalgamation to
generate a single source file that contains both components. (CVS 4558)

FossilOrigin-Name: 0fc61f99b54bd269fcc011f448b9b971e902cb01
2007-11-24 00:41:52 +00:00
drh 0f31c45c10 Fix a typo in a change to all.test from earlier today. (CVS 4557)
FossilOrigin-Name: 8c0b2157f2a2f8ecfa641a041279faf21aedd4e0
2007-11-23 18:19:22 +00:00
drh a6f46e991e Do not require SQLITE_ENABLE_BROKEN_FTS2 if FTS2 is not enabled.
The same for FTS1.  Ticket #2777. (CVS 4556)

FossilOrigin-Name: f94cdcfd1171fd110ed9cd4c47f1fb5fa7e99ca9
2007-11-23 18:06:23 +00:00
drh ac320cc14a Add a #include of sqlite3.h to fts3_hash.c. Tickets #2762 and #2777. (CVS 4555)
FossilOrigin-Name: c8485eb8bc62c810ec9f73e103468c57116fd94c
2007-11-23 18:01:07 +00:00
drh 613a0fe455 Changes fts3 to use only sqlite3_malloc() and not system malloc.
Ticket #2762. (CVS 4554)

FossilOrigin-Name: 460af6bb668094c99a1d4dc1540b44b6d1d036b6
2007-11-23 17:31:17 +00:00
drh 22db44b00d Remove most documentation from the source code repository.
Documentation configuration management is now handled by a
separate repository at http://www.sqlite.org/docsrc. (CVS 4553)

FossilOrigin-Name: b20f3a6fed1027fc8faf886c8998dcb5dc0917c6
2007-11-23 15:12:44 +00:00
drh 48d1178ad8 Make sure that INSERT INTO ... SELECT ... always uses an ephemeral
intermediate table if the SELECT clause refers to the destination table,
even if the SELECT clause is compound or uses the destination table
in a subquery.  This fixes a long-standing bug that can cause an
infinite loop for some SQL statements. (CVS 4552)

FossilOrigin-Name: 492b39b6a8bf4ad8792d7a7949f77827a5047fd8
2007-11-23 15:02:19 +00:00
drh f4ce8ed048 Avoid a double-free in an out-of-memory situation with a USING
clause or NATURAL JOIN.  Ticket #2789. (CVS 4551)

FossilOrigin-Name: 596694752c5935ae50ad38d3b41bbda39ca999d8
2007-11-23 13:42:51 +00:00
drh 2e6037cd23 Change to sqlite3.pc.in recommended by ticket #2786. (CVS 4550)
FossilOrigin-Name: 247fa2eac0789be48cae3587643ab07576ae7b76
2007-11-22 00:47:41 +00:00
drh cfa063b377 Handle out-of-memory situations inside the query flattener.
Ticket #2784. (CVS 4549)

FossilOrigin-Name: 2655a3f2d18fe16a36a6cf3776261ee0507e6912
2007-11-21 15:24:00 +00:00
drh e9cf59e344 Fix a bug in the grammar. We were giving the ones-complement operator ~
the same precedence as the NOT operator, which is incorrect. (CVS 4548)

FossilOrigin-Name: b48a4bfd3288906dfb7659c37f76d345011c91a0
2007-11-17 22:23:27 +00:00
danielk1977 932083c60f Fix a crash that can occur after a malloc failure. Ticket #2775. (CVS 4547)
FossilOrigin-Name: c91bc8d33306881cb2501070dccced92c82cf165
2007-11-16 14:55:46 +00:00
shess cd7274ceb0 Don't do anything when input doclists are both empty. Ticket #2774 (CVS 4546)
FossilOrigin-Name: 75cb46f82a6a95dbe9e279dede299bafa2e91cae
2007-11-16 00:23:07 +00:00
danielk1977 a185ddbfba Return SQLITE_MISUSE instead of crashing if NULL is (incorrectly) passed to sqlite3_step(). Ticket #2773. (CVS 4545)
FossilOrigin-Name: 3bfee76fa6191c6e3aaa4632949b53253c612f36
2007-11-15 16:04:15 +00:00
danielk1977 b8b4bfa061 Fix a segfault that can occur after a malloc failure in an ANALYZE statement. Ticket #2772. (CVS 4544)
FossilOrigin-Name: d05eb67dd6e171cfe8b9528aa3c7c953780d8c82
2007-11-15 13:10:22 +00:00
danielk1977 d0e2a85436 Add an experimental API for retrieving the SQL source from a compiled statement: sqlite3_sql(). Ticket #2769. (CVS 4543)
FossilOrigin-Name: d31f1e0d74a871d66cf7d3ef35faae5171d5cbc3
2007-11-14 06:48:48 +00:00
danielk1977 8e556520e9 Modify the Tcl interface to use sqlite3_prepare_v2(). (CVS 4542)
FossilOrigin-Name: 7bb00c7df672cb8988121f30e3bbdea9ad951603
2007-11-13 10:30:24 +00:00
chw 65d3c13cad Various changes to enable compilation of SQLite library and command
line shell with the Windows CE cross compiler from cegcc.sourceforge.net (CVS 4541)

FossilOrigin-Name: 8ad0ab8cb374bd34e47af9e71b2aad9dd9af0d1b
2007-11-12 21:09:10 +00:00
drh 1c96cac1cc Another attempt at fixing a memory leak in the TCL interface.
See check-in (4338) for the first attempt.  Ticket #2597. (CVS 4540)

FossilOrigin-Name: 68a43c99f1b02b8a93bfdcd5c8426b2b4199d68f
2007-11-12 17:56:42 +00:00
danielk1977 0318d4414d Fix a code comment in select.c. No code changes. (CVS 4539)
FossilOrigin-Name: cf41d6a00f658d2cd64ff9811a3b1270ad1a580b
2007-11-12 15:40:41 +00:00
danielk1977 3c4809a201 Where possible, transform the DISTINCT qualifier to a GROUP BY clause. GROUP BY clauses may be optimized by indices, DISTINCT qualifiers cannot. (CVS 4538)
FossilOrigin-Name: e56331234791cf3d830a30e4cfa66682bdf2eed1
2007-11-12 15:29:18 +00:00
danielk1977 390025053e Allow collation sequence names to be quoted. Ticket #2744. (CVS 4537)
FossilOrigin-Name: 06749ac7afeea4adbdeb9315f3819d5224534c66
2007-11-12 09:50:26 +00:00
danielk1977 6c9240938f Modify the order of assert() macros in vdbe.c as per the suggestion in #2768. (CVS 4536)
FossilOrigin-Name: af5af5dc2608f369f0f4274ca06974b365424e72
2007-11-12 08:09:34 +00:00
drh 95c0775484 Fix the code generation for UPDATE and DELETE so that
BEFORE triggers that use RAISE(IGNORE) do not leave extra
values on the stack.  Ticket #2767 (CVS 4535)

FossilOrigin-Name: 3391f4139ccfe62cc27739a06567c422ddae9c69
2007-11-11 18:36:34 +00:00
drh bc674334e5 Add asserts on sqlite3_mutex_held() to the zero-malloc memory allocator,
in order to prove that the mutex is held when it is needed. (CVS 4534)

FossilOrigin-Name: 31eb4abc89e9c0fd90fde5486d4008f9d09fdf4e
2007-11-07 15:13:25 +00:00
drh 40a7178132 Changes the asynchronous I/O test module so that it can be appended to the
end of the amalgamation. (CVS 4533)

FossilOrigin-Name: c1fe27de7b6f0080466cc3f827979db9997e22a4
2007-11-07 01:23:12 +00:00
drh f024f0bb9b In the windows VFS, make sure we do not return an error if attempting
to delete a file that does not exist. (CVS 4532)

FossilOrigin-Name: 08a685abc149cd29c3595a61c9bc1a04e6d95c4d
2007-11-07 01:19:07 +00:00
drh 84a6892f17 Version 3.5.2 (CVS 4531)
FossilOrigin-Name: 60da01630ab3668541aea7d303fc5d52fe3ee281
2007-11-05 20:49:21 +00:00
drh e08fe712fd Preparing documentation for the release of version 3.5.2. (CVS 4530)
FossilOrigin-Name: b985328ad98669cbf2fb9a56b015a1db35657004
2007-11-05 18:11:17 +00:00
drh d64621d68d Drop support for the SQLITE_OMIT_MEMORY_ALLOCATION compile-time option. (CVS 4529)
FossilOrigin-Name: b57c89fed0b74c2e8fb68ccfdf5e5e7d4b2603a1
2007-11-05 17:54:17 +00:00
danielk1977 7eb42c8204 Reset the writer-thread halt criteria after halting the thread. (CVS 4528)
FossilOrigin-Name: ecbff972a1f5c7d846c322c435fa73584655b7f0
2007-11-05 17:01:08 +00:00
danielk1977 662278e4de Fix some minor problems with malloc failure and in-memory databases. (CVS 4527)
FossilOrigin-Name: b752906e708e1c8c76084152f5829e16e8988ef2
2007-11-05 15:30:12 +00:00
drh 0152123730 Fix a bug in the misc1 test script. (CVS 4526)
FossilOrigin-Name: fa16996d99cdce9f652508e3a70b7e5747810823
2007-11-05 14:58:23 +00:00
drh f54cc03585 Make sure the default page size never exceeds the maximum page size. (CVS 4525)
FossilOrigin-Name: 9c2731f143d52f8bf27f309612c38a1be22e3019
2007-11-05 14:30:22 +00:00
danielk1977 d949fd3b34 Use malloc to obtain space for sqlite3_aggregate_context(). Ticket #2751. (CVS 4524)
FossilOrigin-Name: bf75058f5777ce4b03f2287406805236470f70d0
2007-11-05 12:46:04 +00:00
danielk1977 6d64307b03 Handle "IS NULL" constraints on virtual table scans. IS NULL constraints are not passed to the virtual table layer. Ticket #2759. (CVS 4523)
FossilOrigin-Name: 7027368c15b3270a139bea5612d7c03c2288dcc4
2007-11-05 05:12:53 +00:00
drh 3b1a9881e7 Add the ".timer" command to the CLI. (CVS 4522)
FossilOrigin-Name: 56680360d3b14a66a077ebb735f4594ed524a4bb
2007-11-02 12:53:03 +00:00
drh 7b12d46146 Fix building of sqlite3_analyzer on Mac. (CVS 4521)
FossilOrigin-Name: a616b6cb646a35a68bebc7d013c13185a9a6f47d
2007-11-02 12:52:39 +00:00
danielk1977 fa166726a4 Add some assert() statements to the asychronous backend demo to enforce the strategy used to avoid deadlock. Also a minor change to avoid a potential deadlock. (CVS 4520)
FossilOrigin-Name: 6340ca5eee3d398a9ef4f37a442efad37c9bf547
2007-11-02 09:07:57 +00:00
drh b0689696f2 Add a prototype "group_concat()" aggregate function to func.c.
Disabled by default.  No documentation nor test cases.  No effort
to make it efficient. (CVS 4519)

FossilOrigin-Name: 61987a89d1c4af59c745d1c5f17bab3301588b6c
2007-11-01 17:38:30 +00:00
danielk1977 7c055b9b7c Avoid leaking a file descriptor after a malloc failure on unix. (CVS 4518)
FossilOrigin-Name: c249d5da721b32f6fe409a5b55a5d49a58994fec
2007-10-30 17:28:51 +00:00
danielk1977 5f0f253315 Remove a debugging assert() that went in by accident with the previous commit. (CVS 4517)
FossilOrigin-Name: 4ad60bdba0f1aa068dcc42fb58b80d7912e36b1b
2007-10-30 15:38:12 +00:00
danielk1977 5be7d5d139 Fix a race condtion in test_async.c. (CVS 4516)
FossilOrigin-Name: 5e3f7c3dec3e8d92b28a74293387b390fe6fc1fa
2007-10-30 15:29:42 +00:00
drh dc1d9f1bd4 Clarify the behavior of sqlite3_last_insert_rowid() when using
INSERT OR IGNORE. (CVS 4515)

FossilOrigin-Name: c0fa0c8ba80f4cd60bd06da7a032c6424ffd16f8
2007-10-27 16:25:16 +00:00
shess adafd5747f Be a bit more susicious of invalid results from the tokenizer. (CVS 4514)
FossilOrigin-Name: deb8f56d3adea0025d28b8effabec7c7b7fe3026
2007-10-24 23:24:22 +00:00
pweilbacher 71be8e692b Fix os2CurrentTime() to give correct results for negative timezones. (CVS 4513)
FossilOrigin-Name: a3b82548cb51431569aafacf38e3391a8a1b697b
2007-10-24 23:04:32 +00:00
pweilbacher 99295b4933 Fix os2GetTempname() to actually work: DosScanEnv() wants an empty PSZ as argument and we obviously don't need to test for file existence any more. (CVS 4512)
FossilOrigin-Name: 8a233845f61080cca24da3672444f3e5b985da67
2007-10-24 23:03:25 +00:00
shess b6d78dc7bb fts3.c buildTerms() passes -1 for nInput. (CVS 4511)
FossilOrigin-Name: e87c883a1235ac47ee340a31051dcd5deb369d4e
2007-10-24 21:52:37 +00:00
drh 0cf19ed817 Add comments, assertions, and test cases to demonstrate that the
problem described in ticket #2742 is not a real problem. (CVS 4510)

FossilOrigin-Name: c085d6dfc0f5849113986cb2a25e64d0c95b3dfb
2007-10-23 18:55:48 +00:00
drh 9e0ebbfa41 Add comments to the code warning that _XOPEN_SOURCE might need to be
defined manually if using USE_PREAD or USE_PREAD64. (CVS 4509)

FossilOrigin-Name: d7ed7cd077fe5f9ffba2bca48b84b231ccfd85b0
2007-10-23 15:59:18 +00:00
drh 71674ce9ce Make sure the _LARGEFILE_SOURCE macro occurs before any system
includes.  Ticket #2739. (CVS 4508)

FossilOrigin-Name: 36465aeb1f8f92d336faf16c25608c9a8a6585d3
2007-10-23 15:51:26 +00:00
drh 598f134020 Floating point and 64-bit integer constants store in the virtual
machine opcodes in binary, not as text.  Performance improvement.
Ticket #2733. (CVS 4507)

FossilOrigin-Name: 7e30fd6a09899842c922b044714dc66796e545d4
2007-10-23 15:39:45 +00:00
drh 55bfeb10cb Fix limit assertions in vdbe.c. Ticket #2740. (CVS 4506)
FossilOrigin-Name: 27f846d089ebe9e4970a2499ad4e2e98773d2e78
2007-10-23 14:55:06 +00:00
drh 9bc5449f9d Make sure the sqlite3_vfs_register() and sqlite3_vfs_unregister() APIs
work right even if not VFS is currently registered.  Ticket #2738. (CVS 4505)

FossilOrigin-Name: c36500871e85b55cb0804d5c9e88fa6861a507a9
2007-10-23 14:49:59 +00:00
danielk1977 0d6e7a00d6 Add speed4.test, with some speed tests for triggers, sub-selects, views and joins. (CVS 4504)
FossilOrigin-Name: 3e3475b9e0f996841aa40419693c7c3eaa6c71aa
2007-10-23 10:25:30 +00:00
danielk1977 191fadcf23 Fix an error message in the tcl interface. (CVS 4503)
FossilOrigin-Name: 2449e08069ef830f119203c4a3737d6756e73c63
2007-10-23 08:17:48 +00:00
danielk1977 1c1764ae66 Add the NEAR operator to fts3. (CVS 4502)
FossilOrigin-Name: aef7720e0bb49d52332ddebe6f698feb926ef7d7
2007-10-22 18:02:20 +00:00
pweilbacher 0663dd2f75 We need an extra define to activate OS/2 semaphores for compiling/linking. (CVS 4501)
FossilOrigin-Name: 0604dace0e22297bafcf90f4485d3c07383f876e
2007-10-21 22:59:12 +00:00
pweilbacher b36dc73cbc Finally bring OS/2 to the 3.5 level. This at least is a first draft version that survives very basic tests. It still contains a lot of debugging stuff... (CVS 4500)
FossilOrigin-Name: 46b2d1034b3d25ded71085c901301ad64b5aaba2
2007-10-21 22:47:03 +00:00
drh a21a929e81 Use the 2-argument version of substr() in the SQL contained in the
VACUUM and ALTER TABLE commands.  Ticket #2737. (CVS 4499)

FossilOrigin-Name: 82b08a3dc2366007bcac4d9e451ef61c8c018fa5
2007-10-20 20:58:57 +00:00
drh 979aeaa395 Add the new memory allocator to the amalgamation. Improvements to
out-of-memory handling. (CVS 4498)

FossilOrigin-Name: b58c2b37a5deb19ce0ef78629989016743a46bb3
2007-10-20 16:36:31 +00:00
drh c0ad3e8df6 Bug fix in the realloc algorithm of the static memory allocator. (CVS 4497)
FossilOrigin-Name: 50db16be5025f6d5efc51e3354615059da7e8611
2007-10-20 16:11:39 +00:00
drh a4e5d58f02 Simplify the mem3.c memory allocator. Have it call sqlite3_release_memory()
automatically, without having to specify the soft heap limit. (CVS 4496)

FossilOrigin-Name: ca51b2f54076fcf73a8857aecf4b45d66ef0c7b6
2007-10-20 15:41:57 +00:00
drh 1e3af33436 Go back to allocating each page and its header with a single memory
allocation.  This undoes the change of (4409). (CVS 4495)

FossilOrigin-Name: f56c9884be796dee3f267aca6021eb1846d8527c
2007-10-20 13:17:54 +00:00
drh 80ca2d0935 Fix a mutex leak in the new malloc-free memory allocator. (CVS 4494)
FossilOrigin-Name: 30f014d3d0231a668c40508ff4a6b90ce622c857
2007-10-20 12:34:00 +00:00
drh 9c7a60dfb2 Added an experimental malloc-free memory allocation subsystem, intended
for use on embedded systems.  Runs 7% faster than when using system
malloc() on Linux. (CVS 4493)

FossilOrigin-Name: 8487ca82fade60b9fa63abf74e10f6ebcb48b98e
2007-10-19 17:47:24 +00:00
drh f1bfe9a8bd Reorder some tests at the beginning of sqlite3_step() to work around
misuse by python.  Ticket #2732. (CVS 4492)

FossilOrigin-Name: e8d591e8c369794921a4acbba5b17fddca730ee7
2007-10-17 01:44:20 +00:00
drh 51f015eb9c A cosmetic changes to btree.c which (we are told) works around a bug
in MSVC++. (CVS 4491)

FossilOrigin-Name: 329dd014b0d851f21ff6690b6149e9d73c92302d
2007-10-16 19:45:29 +00:00
drh d2bb3278e0 Add a malloc size histogram to the debugging malloc implementation
in mem2.c. (CVS 4490)

FossilOrigin-Name: 3e51696cb878063e4ebfdcc2a61ba94c9bebdfe3
2007-10-15 19:34:32 +00:00
danielk1977 db2d286b59 Fix for OMIT_AUTHORIZATION builds. (CVS 4489)
FossilOrigin-Name: 260711a14d5ab2d7c9888c7c46c33a28a3da0415
2007-10-15 07:08:44 +00:00
drh a6d0ffc359 Do not invoke the authorizer when reparsing the schema after a schema
change or when trying to figure out the result set of a view. (CVS 4488)

FossilOrigin-Name: e756bc9b74ef357c088b3044527c41e6834ba1a2
2007-10-12 20:42:28 +00:00
drh 7d97efbe57 Convert a K&R style function to ANSI style. Ticket #2548. (CVS 4487)
FossilOrigin-Name: e1b2e7c24ce0f838687a503dc98188a0e67c79de
2007-10-12 19:35:48 +00:00
drh 64f31519b7 Make the 3rd parameter of the SUBSTR() function optional. Ticket #2579. (CVS 4486)
FossilOrigin-Name: 4a807d48ea9923c1e3df4a5ad503710e62ae29f8
2007-10-12 19:11:55 +00:00
drh 0a99ded1ba Add an explicit type conversion in an AWK script to work around
bugs in cygwin.  Ticket #2713. (CVS 4485)

FossilOrigin-Name: 043cee2fd9319f24bb5c70d6619bfe8f8e2e3b91
2007-10-12 18:36:26 +00:00
drh 4145f83275 Update documentation to talk about the SQLITE_UTF16_ALIGNED option
for sqlite3_create_collation(). Ticket #2722 (CVS 4484)

FossilOrigin-Name: a7292c14ded6cfca65850ef8169799d2d5f35a61
2007-10-12 18:30:12 +00:00
drh 36bc402ee2 Fix to the main.mk makefile. (CVS 4483)
FossilOrigin-Name: e4527dd6ed81f5cb7862b76305be7d7b6d31016d
2007-10-12 00:23:44 +00:00
drh fc3afb6a98 Still more tweaks to the wince interface. Ticket #2711. (CVS 4482)
FossilOrigin-Name: b2bdb476858c6e4b8977ea06be68b2331d1d84df
2007-10-09 15:36:10 +00:00
drh e825609ac0 Fix a typo in the wince driver. Ticket #2710. See also ticket #2702. (CVS 4481)
FossilOrigin-Name: beb91af7061a3950636064bf60946132a884cd7b
2007-10-09 15:20:39 +00:00
danielk1977 5a8f9374ab Fixes to the test suite (no code changes) so that quick.test runs with OMIT_ATTACH builds. #2706. (CVS 4480)
FossilOrigin-Name: 07c00fffe50e8380748f7ae02328531a75d64610
2007-10-09 08:29:32 +00:00
drh 0cd1ea5e44 More untested changes for wince contributed by users. Ticket #2702. (CVS 4479)
FossilOrigin-Name: ccd709e1791b1c1091a61139633b972b378c1816
2007-10-08 15:06:03 +00:00
drh 7229ed434f Reverting check-in (3836) at the request of winCE users. We no ability
to test this change.  Presumably this is a fix for tickets #2698, #2533,
and #2598.  It is unclear if this causes #2294 to be reopened or not. (CVS 4478)

FossilOrigin-Name: 27346fa55ed9b5c20016d07a37268fbd42dc097f
2007-10-08 12:29:17 +00:00
drh aab2e6d271 Fix a bug in code for winCE. Ticket #2700. (CVS 4477)
FossilOrigin-Name: a36fca4cdef162c87ce47a50ededdea19a8865f9
2007-10-08 12:22:57 +00:00
drh 496936c881 In windows, always open files using FILE_FLAG_RANDOM_ACCESS. Ticket #2699. (CVS 4476)
FossilOrigin-Name: 5cdbc0972fe94c13dffee1f908a77f903e580449
2007-10-08 12:21:10 +00:00
drh e31de778e1 Fix a memory leak in the sqlite3_realloc() implementation of the
non-debugging memory allocator. (CVS 4475)

FossilOrigin-Name: 7e9b886dabf10557bc1aa80caad411809ce5a39f
2007-10-06 01:40:35 +00:00
drh d560305d84 Remove #include <math.h> from all source files. It is no longer needed but
causes compile problems when -DSQLITE_OMIT_FLOATING_POINT is defined.
Ticket #2696. (CVS 4474)

FossilOrigin-Name: 4424357d17f615fab922780616eac6773535923a
2007-10-05 16:23:55 +00:00
drh b496099751 Changes lemon so that the generated parser does not accept prior to
seeing the EOF token.  This is a lemon change only and does not
effect SQLite.  Ticket #2550. (CVS 4473)

FossilOrigin-Name: 1c68d93412a608f5164ad984ff290ab3b832bf7a
2007-10-05 16:16:36 +00:00
danielk1977 382e28fa0c Changes to a couple of test scripts to handle the tcl 8.5 version of (file attributes -readonly) on mac. (CVS 4472)
FossilOrigin-Name: a51946e66badab37cd54982265631bbc5e414f8e
2007-10-05 15:53:29 +00:00
drh 865050681a Do not attempt to use TryEnterCriticalSection() under win32. It causes
too many compiler problems.  Ticket #2685. (CVS 4471)

FossilOrigin-Name: f795431c725d88bd4011f20cf63cac630de842f1
2007-10-05 15:08:01 +00:00
danielk1977 20e987a140 Fix problem building testfixture on mac. Ticket #2689. (CVS 4470)
FossilOrigin-Name: fe067d706b40d9756433eac9896660514d1c8216
2007-10-05 15:04:12 +00:00
drh 8f685dc8b7 The sqlite3internal.h file obsolete as of version 3.5.0. Remove
legacy procedures and makefile targets for building this file.
Tickets #2693 and #2694. (CVS 4469)

FossilOrigin-Name: e65842a9d4c779d24207e8a7934fe3bf35ff228b
2007-10-05 14:54:08 +00:00
drh ee8683e1a8 Use FormatMessageA() instead of FormatMessage() in the w32 VFS.
Ticket #2687. (CVS 4468)

FossilOrigin-Name: 38674fd287e0ca67e27c46a3ad0db4dcc8ed1e0c
2007-10-05 14:49:45 +00:00
drh 7795207b1f Correct the name on the new test script for ticket #2686. (CVS 4467)
FossilOrigin-Name: d261e2c731ef97d86fa9dc3caa1ce31ee9ce78ae
2007-10-04 18:52:15 +00:00
danielk1977 b5258c3db3 Fixes for OMIT_AUTHORIZATION builds. #2691. (CVS 4466)
FossilOrigin-Name: 755fcaf7e355042d88fed6b9b49669300b010695
2007-10-04 18:11:15 +00:00
drh 8954d4ca45 Version 3.5.1 (CVS 4465)
FossilOrigin-Name: 81cf518646b277b08e04079c67053450a259542b
2007-10-04 00:30:53 +00:00
drh 8a65057eda Updates to the documentation index page. (CVS 4464)
FossilOrigin-Name: 837fc86166bfc789a53de1853043044f5e8ae3ac
2007-10-04 00:29:28 +00:00
drh c2ded2afe0 Get io.test to work even if auto_vacuum is on by default and we are
running with a reduced maximum page size. (CVS 4463)

FossilOrigin-Name: 0d05f3fbaad44a0d3723cd543b865326acddf883
2007-10-03 21:18:19 +00:00
drh e0ea9bf4a4 Fix a syntax error that comes up when memory debugging is disabled. (CVS 4462)
FossilOrigin-Name: 96dd3c336b5bbf9da6ba9ace85dbe7c4b1ff2bcb
2007-10-03 21:10:58 +00:00
drh acb6dd7e50 Update documentation in preparation for the release of 3.5.1. (CVS 4461)
FossilOrigin-Name: a57b25a2e4127bb3d9dc83031db117664c10d4ea
2007-10-03 20:32:17 +00:00
drh 7c3472a37b Update documentation to talk about the response to errors
within an explicit transaction. (CVS 4460)

FossilOrigin-Name: 84616a13af633700635ad2f91e92c2f7271e96d1
2007-10-03 20:15:28 +00:00
drh d181704ec5 Simplify the vdbeHalt logic slightly. (CVS 4459)
FossilOrigin-Name: b59f7bcbabcccde9d2519e10e65e121343f2af7a
2007-10-03 18:45:04 +00:00
drh 71b890a3f6 Rollback the transaction if an SQLITE_FULL error is encountered.
This is a preliminary fix for ticket #2686.  More testing and
analysis is needed before we close the ticket. (CVS 4458)

FossilOrigin-Name: 0fb6d5a5773c282882e7283e6f8f8c009e238ff4
2007-10-03 15:30:52 +00:00
danielk1977 c4f6f62900 Fix a memory leak that could occur during error-state recovery. (CVS 4457)
FossilOrigin-Name: 3d1d13d1eb5817c22956e6e7792783116a828962
2007-10-03 15:22:25 +00:00
danielk1977 2a180ff9c5 Add a test case to malloc.test. (CVS 4456)
FossilOrigin-Name: 7d3f0b149bd2b9c7c12aabb93d022c0ea26f0d74
2007-10-03 15:02:40 +00:00
danielk1977 8da6021be9 Fix a problem in test script malloc5.test. (CVS 4455)
FossilOrigin-Name: 028ec36c71d6ac43c8f1cda77578d844c6955f68
2007-10-03 09:43:54 +00:00
danielk1977 ae72d98252 Add automatic recovery from the pager "error-state". Also add a new error code - SQLITE_IOERR_NOMEM. (CVS 4454)
FossilOrigin-Name: 12eca32a6a3d68d5b20eed03afdffe7599e66014
2007-10-03 08:46:44 +00:00
pweilbacher ae1463b941 Use local variables instead of #defines for the mutex name and length in OS/2's sqlite3_mutex_alloc(). (CVS 4453)
FossilOrigin-Name: 272959cc91d0c9299d6fca8a962eb563650af87b
2007-10-02 19:56:04 +00:00
drh e5e7a901bd Additional #ifdefing around _XOPEN_SOURCE. Ticket #2681. (CVS 4452)
FossilOrigin-Name: eb5d78451ee2a5d8480537530f30fbb305bf7632
2007-10-01 17:47:00 +00:00
drh d94a6d3622 Document that END TRANSACTION is an alias for COMMIT. Ticket #2656 (CVS 4451)
FossilOrigin-Name: ebe3e6913c35bebb0e78dac995527d5da97a9377
2007-10-01 17:45:39 +00:00
drh 6708061770 Omit the _XOPEN_SOURCE 500 define on Mac OS-X. Ticket #2673 (CVS 4450)
FossilOrigin-Name: 0bbf654b6745058a705ef5c320bdd5fb06735271
2007-10-01 14:30:14 +00:00
drh 3bbbd7d6f0 Update the build process so that it includes sqlite3ext.h with the
amalgamation ZIP archive.  Ticket #2678. (CVS 4449)

FossilOrigin-Name: 6232ee6750562b2cb913af4bb26111a097dd1192
2007-10-01 13:59:48 +00:00
drh 7a64b6a31c Use sqlite3_int64, not sqlite_in64, consistently in the documentation.
Ticket #2680. (CVS 4448)

FossilOrigin-Name: f7a2647033817c73f40010e145e4c29173a55689
2007-10-01 13:54:11 +00:00
drh 98c948048b Fix comment typos in sqlite3.h. Ticket #2666. (CVS 4447)
FossilOrigin-Name: 2ea278a2af5b3e94acf5321375cc33d1f58c3885
2007-10-01 13:50:31 +00:00
drh afd6a43283 Add text to the load_extension SQL function documentation that
explains limitations in the use of that function.  Ticket #2672. (CVS 4446)

FossilOrigin-Name: b2befc84c360dde42c6dd10cbcc9572e37852438
2007-10-01 13:45:04 +00:00
drh 6cca08c274 Remove "const" keywords from the sqlite3_index_info structure definition.
The use of this keyword is suspected to be causing problems for some
compilers. (CVS 4445)

FossilOrigin-Name: 005d780de6e9e377ee296ff576e58cf1b512f245
2007-09-21 12:43:16 +00:00
danielk1977 aaa40c1c8f Another comment typo. Also #2660. (CVS 4444)
FossilOrigin-Name: 0c1e6f69cd55ced4af5dcfbeff04820ba0d5b051
2007-09-21 04:28:16 +00:00
danielk1977 6eb91d20a4 Fix a typo in comments. Ticket #2660. (CVS 4443)
FossilOrigin-Name: 02c8d60bea36825c1c763bbf2c6107869915aafd
2007-09-21 04:27:02 +00:00
pweilbacher ec70b6b02f Initial attempt of the new OS/2 mutex implementation. (Compiles and an attempt to create a new table does not crash in mutex_os2 any more.) (CVS 4442)
FossilOrigin-Name: aa61b244252399cce3b9c1ece9c6816ae9cb6717
2007-09-20 21:40:23 +00:00
drh c51250a56b Replace "i64" with "sqlite3_int64" in the w32 VFS. (CVS 4441)
FossilOrigin-Name: 138d3fcc5a74eb570107ae1299184a318b5417df
2007-09-20 14:39:23 +00:00
drh 8a07c7a414 Cleanup the hash functions in FTS3. (CVS 4440)
FossilOrigin-Name: ac645c8f30aac0d98fc481260084c9bd3975a845
2007-09-20 12:53:27 +00:00
rse 38514a9fb2 get rid of remaining GCC 4.3 -Wall compiler warnings by initializing two variables and one structure properly (although the code path was already rather safe) (CVS 4439)
FossilOrigin-Name: d748694f8d9b14d98b6fe7ceb404754692761705
2007-09-20 11:34:17 +00:00
rse b72e88d71c fix typo in comment (CVS 4438)
FossilOrigin-Name: c2ac43a4ef674c0202d5bd1ec57fc25c89d0554e
2007-09-20 11:32:18 +00:00
drh 777b17af7e Fixes for uninitialized variables. Tickets #2658 and #2659. (CVS 4437)
FossilOrigin-Name: 27fe1288336665c4d47c5d7ddcbeacc451ec4a9d
2007-09-20 10:02:54 +00:00
rse 25c0d1a18a The code is correct as it contains an assert(3) in the "default" switch
case, but GCC 4.3 is not able to detect this and instead complains
with "warning: 'amode' may be used uninitialized in this function".
Hence, although the assert(3) already protects the code here, get rid of
this compiler warning by doing a simple initialization of the "amode"
variable. (CVS 4436)

FossilOrigin-Name: 91831ff2922666b39d8f4ba448982c6763030633
2007-09-20 08:38:14 +00:00
drh 78d1ef1a51 Add disabled test cases for ticket #2652. We will enable these test cases
after #2652 is fixed.  The fix will be difficult and will probably take
a while.  On the other hand, correlated aggregate queries have never
worked in SQLite and the problem is just now coming to light, so it is
probably not a pressing issue. (CVS 4435)

FossilOrigin-Name: 5c41619e292699c72231cff10e26dfbe9a363a00
2007-09-18 16:53:52 +00:00
drh 728b577934 Remove unneeded pSchema field from the Expr structure. (CVS 4434)
FossilOrigin-Name: b2d605a2714245febb316a24edc7a076e21a3849
2007-09-18 15:55:07 +00:00
danielk1977 adfb9b0501 Add a parameter to specify the size of the output buffer passed to xGetTempname() and xFullPathname(). This, and the previous commit, are changes to the public vfs API introduced in 3.5.0. (CVS 4433)
FossilOrigin-Name: 8b29f5fbfc723cdf67cf3410cd01f7c17ea39a4b
2007-09-17 07:02:56 +00:00
danielk1977 76ee37f9bb Change the names of xGetTempName and sqlite3OsGetTempName to xGetTempname. To be consistent with xFullPathname and sqlite3OsFullPathname. (CVS 4432)
FossilOrigin-Name: ad3687b16e9420d8bbaa3a645aaf803813b36061
2007-09-17 06:06:39 +00:00
drh 6ac164d708 Corrections to the winCE code. Untested. (CVS 4431)
FossilOrigin-Name: 8cc51e0a817115c4eb667f7257a3f5a4a39d0a4a
2007-09-14 20:32:18 +00:00
danielk1977 a15db35304 Minor fixes for the OMIT_INCRBLOB compilation option. (CVS 4430)
FossilOrigin-Name: 87e37eabf0ddef252bbc12f6857d33c2b136dcd3
2007-09-14 16:20:00 +00:00
danielk1977 b61c16d987 Add demo code for a vfs that operates on a single pre-allocated file. (CVS 4429)
FossilOrigin-Name: 15680ca4821ec0652dfbe863199b4c3f2afad4ba
2007-09-14 16:19:27 +00:00
drh 326c3fca85 Add tests to prevent a regression of the short read problem discovered
in version 3.2.2. (CVS 4428)

FossilOrigin-Name: 995c63b561e935b6a1da34590cb40582f5c30cee
2007-09-14 01:48:11 +00:00
shess 961303c1e7 Drop the forced error from fts3.c and add forced errors to fts2.c and
fts1.c. (CVS 4427)

FossilOrigin-Name: fec6567a0f8a868cda9bba2a473491dfb17b6c88
2007-09-13 18:16:08 +00:00
shess d83ae45639 Add an implicit (HIDDEN) docid column. This works as an alias to
rowid, similar to how things work in SQLite tables with INTEGER
PRIMARY KEY.  Add tests to verify operation. (CVS 4426)

FossilOrigin-Name: c8d2345200f9ece1af712543982097d0b6f348c7
2007-09-13 18:14:49 +00:00
shess 0ec85ae216 Mark the table-named column HIDDEN. Add tests to make sure it's
working as expected. (CVS 4425)

FossilOrigin-Name: ca669eaf1b4af441741129bee4af02f32a7c74b8
2007-09-13 18:12:09 +00:00
drh 8e70e34a28 Fix incorrect index cost assumptions that occur after an ANALYZE.
Ticket #2643. (CVS 4424)

FossilOrigin-Name: 2cfdbfe6543bac42961deecec7d085d806e604b5
2007-09-13 17:54:40 +00:00
danielk1977 4152e677b8 Fixes for compilation/testing when the various OMIT macros are defined. (CVS 4423)
FossilOrigin-Name: c8405b15c074c94dab5e33272cf1471f458d11df
2007-09-12 17:01:45 +00:00
drh a430ae8e54 In the query optimizer, make sure table dependencies from all terms
of a compound SELECT statement are recognized so that subqueries in
a WHERE clause are not evaluated too early.  Fix for ticket #2640. (CVS 4422)

FossilOrigin-Name: 9c9c2a1da2b6235b3b0541d1f55a02a1f350567f
2007-09-12 15:41:01 +00:00
danielk1977 076f1c0d63 Add a missing semi-colon to os_win.c. Ticket #2642. (CVS 4421)
FossilOrigin-Name: c6ee5929e7d1f9b7c351f57ee8886f71ea0b6619
2007-09-12 14:09:23 +00:00
danielk1977 c15f0b3df7 Fix a problem in the noop-mutexes used for testing. (CVS 4420)
FossilOrigin-Name: 4dbeb915b3138194abd5554b52003162235f9a5f
2007-09-10 16:12:59 +00:00
danielk1977 e9dcd5e6e3 Add another test file to help verify thread-safety. (CVS 4419)
FossilOrigin-Name: c758cc1d885b4528c0b0ef6382119f20956d4816
2007-09-10 10:53:01 +00:00
danielk1977 49e439d934 Enhance thread001.test again, this time to also test in shared-cache mode. (CVS 4418)
FossilOrigin-Name: 54f87899033ddd892bfd3a16310f64fb42d807ae
2007-09-10 07:35:47 +00:00
danielk1977 d9b5b1177d Upgrade thread001.test to test with multiple database handles. (CVS 4417)
FossilOrigin-Name: 6ee2b8ffc4310c8e329f634f3ade058b33c53a2a
2007-09-10 06:23:53 +00:00
danielk1977 667a6c98e9 Fix an undeclared identifier in an IOTRACE (debugging) block. (CVS 4416)
FossilOrigin-Name: 48e59c747f2be08102f16290fa57dfffc2ae920d
2007-09-10 06:12:04 +00:00
danielk1977 570f7e2505 Modify test_thread.c to use tcl apis for creating threads. (CVS 4415)
FossilOrigin-Name: 9b7bab7fc28201b62159e959651acb980095ad06
2007-09-07 18:40:38 +00:00
drh b9ee493971 Fix a segfault that could occur while attempting to add new pages
to the freelist in a corrupt database. (CVS 4414)

FossilOrigin-Name: c8e85fff7ede68f0b8c8ebfe3df4b26a630abeff
2007-09-07 14:32:06 +00:00
danielk1977 44918fa036 Add the beginning of the thread-safety tests. There are more to come. (CVS 4413)
FossilOrigin-Name: 753908e8411024abd5c3da1b8c62f70e35f8734d
2007-09-07 11:29:25 +00:00
drh 91a66398f1 Modify the CLI so that it will ignore whitespace at the end of lines.
Ticket #2631 (CVS 4412)

FossilOrigin-Name: f780a17f4b0e679479c2b368d8659a0ee61c343d
2007-09-07 01:12:32 +00:00
drh 7dc385ee85 Throw an error on an attempt to open a database where the page
size is larger than SQLITE_MAX_PAGE_SIZE.  Ticket #2628. (CVS 4411)

FossilOrigin-Name: 4881f7cb37e35dcf5da358464ac858a508128e47
2007-09-06 23:39:36 +00:00
drh 334b299462 Base the name of the statement journal on the original database filename.
Remember the statement journal name for the lifetime of the Pager so
that the name pointer passed to xOpen persists as long as the file
exists. (CVS 4410)

FossilOrigin-Name: 44d8d1e92d93a5bb28bd10281b4d87e89586ef58
2007-09-06 23:28:23 +00:00
drh bf4bca541e Allocate page cache headers and page cache data buffers separately.
The data buffer will be a power of two in size and this gives some
malloc implementation additional optimization opportunitites. (CVS 4409)

FossilOrigin-Name: 2b755defe51a565a2b6ace58381d6e91f6f17db8
2007-09-06 22:19:14 +00:00