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
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
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
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
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
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
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
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
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
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
26783a58e2
Use the DbMalloc() and DbRealloc() functions more consistently. (CVS 4323)
...
FossilOrigin-Name: c790c234c369c6b7610e67dcaaa9eee347df729c
2007-08-29 14:06:22 +00:00
danielk1977
a1644fd863
Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321)
...
FossilOrigin-Name: e38ef81b85feb5bff2ad8448f3438ff0ab36571e
2007-08-29 12:31:25 +00:00
danielk1977
31dad9da7e
Fix some more small problems introduced by recent refactoring. (CVS 4235)
...
FossilOrigin-Name: 5e2795d0eb8ea2a076b3014cfa9096aa7e8f69d7
2007-08-16 11:36:15 +00:00
danielk1977
1e5369531e
More work on refactoring of malloc() interfaces. There are still many errors. (CVS 4233)
...
FossilOrigin-Name: 77b1671351fe94b0ebc126a63140643deae2aa64
2007-08-16 10:09:01 +00:00
drh
174357527a
Half-way through a major refactoring of the memory allocation.
...
I have not even attempted to compile so I am certain there are
countless errors. (CVS 4231)
FossilOrigin-Name: deb7ecd65f7b83eaf0ba610eeef3b0ede61db1c3
2007-08-16 04:30:38 +00:00
danielk1977
eb5453d122
Fix a bug with explicit collation sequences attached to a column reference expression that is on the right-hand-side of a binary comparison operator. (CVS 4187)
...
FossilOrigin-Name: 7b69968618bfc19f0c1ab25c5f16c9fdff5af094
2007-07-30 14:40:48 +00:00
drh
9c86df5269
Fix a bug in the LIKE optimization that was causing the pattern string
...
to be dequoted twice. Ticket #2407 . (CVS 4056)
FossilOrigin-Name: abf64d1d0ae3e84c4482b38198eeb44b62cc5d9e
2007-06-11 12:56:15 +00:00
drh
f07b484449
Make sure rowid comparisons against NULL work correctly. Ticket #2404 . (CVS 4050)
...
FossilOrigin-Name: 11ee8ea43f20f6146f4e4fcd9299468b3a99f998
2007-06-08 08:39:01 +00:00
drh
0a168377ad
Fix the query optimizer so that it correctly handles constant expressions
...
in the ON clause of a LEFT JOIN. Ticket #2403 . (CVS 4049)
FossilOrigin-Name: 46fdd195483787eef209a9b8ad108eba147be6fa
2007-06-08 00:20:47 +00:00
danielk1977
39984cdc8b
Fix a vdbe stack leak that could occur where one side of a WHERE clause inequality evaluated to SQL null. (CVS 4045)
...
FossilOrigin-Name: 17152bf1a268e130f0c43046bb438b617a747ff5
2007-06-02 07:54:37 +00:00
danielk1977
bcbb04e501
Consider explicit collate clauses when matching WHERE constraints to indices. Fix for #2391 . (CVS 4040)
...
FossilOrigin-Name: f9a95e92dfaaa61ec0a44b9b7017b07929c94d26
2007-05-29 12:11:29 +00:00
drh
5bb3eb9b9a
Eliminate all uses of sprintf() and strcpy(). These were not being
...
misused. But getting rid of them removes a library dependency. And
it avoids warnings from the OpenBSD compiler. Ticket #2336 . (CVS 3916)
FossilOrigin-Name: ba4845b32bdf38e623c4f7246e6e327715bbba4b
2007-05-04 13:15:55 +00:00
drh
cad651e022
Remove the ARRAYSIZE macro from where.c to avoid a name conflict with
...
microsoft header files. Ticket #2311 (CVS 3863)
FossilOrigin-Name: 9389a15f35f854c88440e365d85b48af3ff76b00
2007-04-20 12:22:01 +00:00
drh
77a2a5e73c
Changes to increase test coverage. (CVS 3819)
...
FossilOrigin-Name: fd4da6b13499af2397d52cb0f25f8ff6f2192431
2007-04-06 01:04:39 +00:00
drh
b63a53dcf7
Fix memory leaks in WHERE clause processing and in TRIGGER parsing. (CVS 3775)
...
FossilOrigin-Name: 6736f4547c0cc2123d1a19ed2d6915712718d22e
2007-03-31 01:34:44 +00:00
danielk1977
780b1d9416
Coverage improvements for where.c. (CVS 3764)
...
FossilOrigin-Name: 7e0aa964129612e2bad6fa45139d124f19cacd48
2007-03-30 14:56:34 +00:00
danielk1977
935ed5eafd
Test coverage a few extra lines in where.c. (CVS 3756)
...
FossilOrigin-Name: ea49ddf64aa6073b8018dc2faaf199704d359412
2007-03-30 09:13:13 +00:00
drh
72e8fa42f9
Correctly handle NULLs in IN operators. Ticket #2273 .
...
The changes in where.c and in the WhereLevel.aInLoop structure are
not strictly necessary to fix this problem - they just make the code
easier to read. Only the change in OP_Next/OP_Prev operator of vdbe.c
is required. (CVS 3735)
FossilOrigin-Name: 26348556d824c032851e409ac510cddb55c200bf
2007-03-28 14:30:06 +00:00
drh
cf64372910
More strict aliasing fixes. The single source file library now runs
...
successfully with -fstrict-alias. (CVS 3725)
FossilOrigin-Name: c8a8a189a82500aab501e9949f5b197c0b80b3a9
2007-03-27 13:36:37 +00:00
drh
4f0c587819
Modify sources to that they can be combined into a single sqlite3.c source
...
file. Eliminate all type-pruned pointer warnings. (CVS 3722)
FossilOrigin-Name: 0b832e218ec12b0eb559e407d80aba6709e2ea85
2007-03-26 22:05:01 +00:00
danielk1977
8efe541f24
Handle the case where the estimated cost of a virtual table scan is larger than SQLITE_BIG_DBL. Ticket #2253 . (CVS 3670)
...
FossilOrigin-Name: 52885ed8b76a06588acf202a38b4feabfca1cfd1
2007-03-02 08:12:22 +00:00
drh
3e35580779
Disable the OR optimization if it would conflict with column
...
affinity coercions. Ticket #2249 . Additional cleanup and testing
of the OR optimization. (CVS 3658)
FossilOrigin-Name: 908daaa9ab86e0bd1da6d0807d6aaba240c3cee0
2007-02-23 23:13:33 +00:00
drh
7b4fc6a8cb
When optimizing out an ORDER BY clause due to uniqueness constraints, make
...
sure unused terms to the right in the ORDER BY clause to not reference other
tables in a join. Ticket #2211 . Additional test cases needed before
closing this ticket. (CVS 3629)
FossilOrigin-Name: 912faf18d86416b1a36660851f8a4554e6746875
2007-02-06 13:26:32 +00:00
drh
f2d315d0c2
Fix an additional problem with the IS NULL optimization on LEFT JOINs.
...
Ticket #2189 . See also ticket #2177 . (CVS 3602)
FossilOrigin-Name: 358dd82d3a921228155e2cf9e22aedd2b651ca9c
2007-01-25 16:56:06 +00:00
drh
c49de5d98c
Make sure the IS NULL optimization introduced by check-in (3494) correctly
...
handles a LEFT JOIN where the a term from the right table of the join uses
an IS NULL constraint. Ticket #2177 . This check-in also adds the new test
cases that were suppose to have been added with (3494) but which were
mistakenly omitted. (CVS 3595)
FossilOrigin-Name: 335863e4d16113fb9ecebce35d2db043771d98b1
2007-01-19 01:06:01 +00:00
drh
cc19254de9
The query optimizer does a better job of optimizing out ORDER BY clauses
...
that contain the rowid or which use indices that contain the rowid.
Ticket #2116 . (CVS 3536)
FossilOrigin-Name: f245f5c2c2d337fe6458824beb7f9e721837765f
2006-12-20 03:24:19 +00:00
drh
61dfc31d80
Query optimizer enhancement: In "FROM a,b,c left join d" allow the C table
...
to be reordered with A and B. This used to be the case but the capability
was removed by (3203) and (3052) in response to ticket #1652 . This change
restores the capability. (CVS 3529)
FossilOrigin-Name: 7393c81b8cb9d4344ae744de9eabcb3af64f1db8
2006-12-16 16:25:15 +00:00
drh
382765866b
Fix a bug in the optimizer that was causing it to miss an OR optimization
...
opportunity. (CVS 3502)
FossilOrigin-Name: 9bf153b54c6e9ba16914dedd9e2949f32d7550ea
2006-11-06 15:10:05 +00:00
drh
50b3996899
Enhance the optimizer so that IS NULL can use an available index. (CVS 3494)
...
FossilOrigin-Name: 64762a9d582e4655d6bc5989d8e0ad773d659a7d
2006-10-28 00:28:09 +00:00
drh
0660e26efe
Changes directed toward optimizing IS NULL terms in WHERE clauses. (CVS 3492)
...
FossilOrigin-Name: 4d336e9ef5f65b95959e7d01cd0357d46e9b1fa5
2006-10-27 14:06:57 +00:00
drh
28f4591466
Fix a problems that arise if malloc() fails while compiling SELECT
...
statements within a TRIGGER. (CVS 3478)
FossilOrigin-Name: ee4894b49995e4904db1991281563cfbb7b1c16d
2006-10-18 23:26:38 +00:00
drh
edb193b766
Changes so that it will build with SQLITE_OMIT_VIRTUALTABLE=1. (CVS 3309)
...
FossilOrigin-Name: 5612b287059c75488f995625d447c4e9521d1637
2006-06-27 13:20:21 +00:00
danielk1977
3851a65e3a
Fix bug in transfer of arguments from WHERE clause to virtual table xFilter() methods. (CVS 3305)
...
FossilOrigin-Name: cf41f2a33f94c6c94fb39ae6ffcd58bbf9ea88c8
2006-06-27 12:16:56 +00:00
drh
d2ca60d776
Make sure that MATCH terms that a virtual table says should be omitted
...
really are omitted. (CVS 3302)
FossilOrigin-Name: 3e1f5567dfd306bdb97275a32afd02ea693eaf58
2006-06-27 02:36:58 +00:00
drh
9861a9f065
Cleanup and refactor parts of the optimizer. (CVS 3301)
...
FossilOrigin-Name: 6609c25fbfa5ad7f55c356936abb1721686c47ca
2006-06-27 02:33:40 +00:00
drh
6d209d8b0d
Cache and reuse virtual table index information in the optimizer.
...
Improved diagnostics for virtual table index selection. (CVS 3300)
FossilOrigin-Name: 28413cf2b3f0e6f294e1f3c59fcce135b65c294f
2006-06-27 01:54:26 +00:00
danielk1977
65fd59f731
A few more test cases to improve coverage of virtual table module related code. (CVS 3292)
...
FossilOrigin-Name: 255aa9121a2ef4fec7fa5523e52969acc96f4b40
2006-06-24 11:51:33 +00:00
danielk1977
be71889703
Add tests and fixes for handling malloc() failures related to the virtual table feature. (CVS 3285)
...
FossilOrigin-Name: 5d1d907189ff3ca7afada83033280cf258984ac0
2006-06-23 08:05:19 +00:00
danielk1977
93626f4869
Fix some problems with virtual tables and joins in where.c. (CVS 3277)
...
FossilOrigin-Name: 3e19a7d8eabcd2fa71ced3f76c5f9bc1f3900b81
2006-06-20 13:07:27 +00:00
danielk1977
74cdba4fa8
Avoid returning MISUSE when sqlite is called recursively by an xBestIndex callback. (CVS 3274)
...
FossilOrigin-Name: 4339e1bf664c4287aabe0993a9c5a2b783019cb3
2006-06-19 12:02:58 +00:00
danielk1977
70b6d57373
Fix memory leak in where.c. (CVS 3271)
...
FossilOrigin-Name: 3d10e8f36113a189aa19ecd99007cd0a926b2f8a
2006-06-19 04:49:34 +00:00
drh
1a90e099f4
Bug fixes in the MATCH and ORDER BY processing of virtual tables. (CVS 3249)
...
FossilOrigin-Name: c996185a9e0671e46bed06e5803b1ca3b42d61e2
2006-06-14 22:07:10 +00:00
drh
4cbdda9e27
Added code to INSERT, DELETE and UPDATE virtual tables. The new code is
...
mostly untested. (CVS 3248)
FossilOrigin-Name: 32c97b884b104d120db3c0a87f5eab28f36851f8
2006-06-14 19:00:20 +00:00
drh
4be8b51ee1
The echo module test is now running. Added the tclvar module test but have
...
not yet done anything with it. (CVS 3234)
FossilOrigin-Name: 29199eeea4c46168ccaa7535d4941bd740479dee
2006-06-13 23:51:34 +00:00
drh
7f3759015a
The optimizer recognizes MATCH operators and allows virtual-tables to make
...
use of them. (CVS 3232)
FossilOrigin-Name: 136bed496b89943522310ec511199b78198d0844
2006-06-13 17:38:59 +00:00
danielk1977
be8a7835ea
Add the tentative sqlite3_allocate_queryplan() API. (CVS 3228)
...
FossilOrigin-Name: 7a3e97f76b1f4f97a04f7c5a9daa400402b2ff25
2006-06-13 15:00:54 +00:00
danielk1977
5fac9f86eb
Add simple tests for the xFilter and xBestIndex methods. (CVS 3227)
...
FossilOrigin-Name: 0f4657ea69314e49bc7c9faf9a653ef072f5082d
2006-06-13 14:16:58 +00:00
drh
a967e88645
Progress toward getting the virtual-table code generator to work. (CVS 3220)
...
FossilOrigin-Name: 3532f1340f939b0231c1d82a7b2d186cb096fb29
2006-06-13 01:04:52 +00:00
drh
9eff616750
Added code to iterate through virtual tables. All regression tests pass
...
but the new code is completely untested. (CVS 3219)
FossilOrigin-Name: 010965433140fbe508a907d861dbad79343bf7c2
2006-06-12 21:59:13 +00:00
drh
b9bb7c187e
Progress toward CREATE VIRTUAL TABLE. Still not even close to working... (CVS 3211)
...
FossilOrigin-Name: 898ec36b4102aaa03979f8f5c510936e57e2ae48
2006-06-11 23:41:55 +00:00
drh
df26fd5edd
In joins of the form "A left B, C" make sure they are not transformed into
...
"A left C, B". Ticket #1830 . See also #1652 . (CVS 3203)
FossilOrigin-Name: 2baa983653796e16d36739e37b0be1672bf59a92
2006-06-06 11:45:54 +00:00
drh
ffe0f8901e
Correctly handle multi-column indices where multiple columns are constrained
...
by IN operators with subqueries on the right-hand side. Ticket #1807 . (CVS 3184)
FossilOrigin-Name: b16541ba5e6a9514f9f317888117c68b6818f9cb
2006-05-11 13:26:25 +00:00
drh
e2b3909d63
Additional information about index sorting in EXPLAIN QUERY PLAN. (CVS 3176)
...
FossilOrigin-Name: 39dd969527a107b2a6bb94dfc35d93850917faa8
2006-04-21 09:38:36 +00:00
drh
4dd238a51d
Join optimizer enhancements. (CVS 3156)
...
FossilOrigin-Name: 0039888f9132dc7461af4ae448292a0ce9adf804
2006-03-28 23:55:57 +00:00
drh
74161705f1
Remove unused parameters on internal APIs. Suppress warnings from
...
CodeWarrior. (CVS 3110)
FossilOrigin-Name: 4b22e4b847f8d5c29830baea541194ef3a0c4811
2006-02-24 02:53:49 +00:00
drh
570b935c2a
In joins of the form: "A, B left C" make sure that the reordering optimization
...
does not put table A after table C. Ticket #1652 . (CVS 3052)
FossilOrigin-Name: 248b9be93d9532e31c640432b75c3310e180acb3
2006-02-01 02:45:02 +00:00
danielk1977
f011300000
Rename some variables to avoid hiding others. Also add "static" to two function signatures that were missing it. (CVS 3024)
...
FossilOrigin-Name: d86f18a4277ebffb644ba2e574e0b697c8bbf8e4
2006-01-24 12:09:17 +00:00
drh
b52076cd7a
Do not name variables "operator" because some compilers do not realize that
...
"operator" is not a reserved word in ANSI-C. Ticket #1625 . (CVS 2997)
FossilOrigin-Name: 1f42a338e2ee90f4c24a9eb19054c4b831dd661f
2006-01-23 13:22:09 +00:00
drh
d116739351
Fix additional compiler warnings. Tickets #1615 , #1616 , #1627 (CVS 2994)
...
FossilOrigin-Name: 6385628edd79187dff1687815d0101c31248e54f
2006-01-23 13:00:35 +00:00
drh
02afc86171
More compiler warnings fixed - or in some cases comments are added to explain
...
that the compiler is wrong. (CVS 2984)
FossilOrigin-Name: 507653a98cbd096f836a977408e373640c7cdb8f
2006-01-20 18:10:57 +00:00
danielk1977
9e12800dec
Use a global variable protected by a mutex instead of thread-specific-data to record malloc() failures. (CVS 2972)
...
FossilOrigin-Name: ac090f2ab3b5a792c2fdf897e10060f263e0d408
2006-01-18 16:51:35 +00:00
danielk1977
1576cd9251
Fixes for OMIT_SUBQUERY builds: Disable where clause OR->IN optimization. Include EXISTS keyword (for new CREATE TABLE syntax). Test file fixes. (CVS 2943)
...
FossilOrigin-Name: 8e79a0c24a03ccf960d6ccfb7c6b9b0f7c614e9b
2006-01-14 08:02:28 +00:00
danielk1977
9792eeff95
Avoid parsing an entire record header when it is not required. (CVS 2940)
...
FossilOrigin-Name: 0de729d9144afba144811799f65e32140c14ef8a
2006-01-13 15:58:43 +00:00
danielk1977
327bd59216
Fix a vdbe stack overflow problem that could occur with a correlated sub-query. (CVS 2938)
...
FossilOrigin-Name: caa7da807d6578f7d8848978a7d3175b6ea1743b
2006-01-13 13:01:19 +00:00
danielk1977
e725929686
Minor modification to restoreOrClearCursorPosition() to improve efficiency. Do not allocate the extra 8-bytes if memory-management is not enabled. (CVS 2936)
...
FossilOrigin-Name: dd705955429d847af85ffaf248976bcd1d861852
2006-01-13 06:33:23 +00:00
drh
6f7adc8a80
Automatically deallocate thread-specific data when it is no longer
...
being used. Ticket #1601 . Also implemented the suggestion of
ticket #1603 . Memory management is now off by default at compile-time.
The sqlite3_enable_memory_management() API has been removed. (CVS 2919)
FossilOrigin-Name: 5d9c6aa964305c3f36741ff0058da5b5f3ce0d24
2006-01-11 21:41:20 +00:00
danielk1977
b3bf556ef6
Store collation sequence names instead of pointers in sharable schema data structures. (CVS 2904)
...
FossilOrigin-Name: 0f0213be4d064b3d24e31ff93ec16f6862003d26
2006-01-10 17:58:23 +00:00
danielk1977
e501b89ada
Rename DbSchema to "Schema" and SqliteTsd to "ThreadData". (CVS 2893)
...
FossilOrigin-Name: 82b81f69c78cb3f54634d9aea4f6a838474dc5e5
2006-01-09 06:29:47 +00:00
danielk1977
c00da10565
In shared-cache mode, lock all required tables before beginning to execute the body of the statement program. (CVS 2881)
...
FossilOrigin-Name: 23b587b05b89727248805e6d9e5141e018cf2152
2006-01-07 13:21:04 +00:00
danielk1977
da18423620
Add the shared schema/pager modifications. Very few tests so far. (CVS 2859)
...
FossilOrigin-Name: deeda0dc06c1595aedd8d06a0c4e88a8abf78cf7
2006-01-05 11:34:32 +00:00
drh
0b2f3160d6
Bug fixes and additional testing of descending indices. (CVS 2841)
...
FossilOrigin-Name: 5638a11ed5618dd833d3daffc1715951091d72b2
2005-12-21 18:36:45 +00:00
drh
85eeb692f3
Progress toward decending indices. (CVS 2839)
...
FossilOrigin-Name: 112a34b8dcceb39540cb0cd629e264a867400bfb
2005-12-21 03:16:42 +00:00
danielk1977
00fd957b78
Add some tests for malloc() failure within the column_name() and column_decl() APIs. (CVS 2805)
...
FossilOrigin-Name: 78f10ca0a6a02e9e8e6811489841a19e213f3afb
2005-12-07 06:27:43 +00:00
danielk1977
261919cc16
Some elements of the new malloc() failure handling. Not all cases work properly yet. Also, library is not threadsafe if malloc() fails right now. (CVS 2800)
...
FossilOrigin-Name: e1606658f1b4530e3001db4779b5669c8d13c853
2005-12-06 12:52:59 +00:00
drh
9a5f7474e3
Disable the OR-clause optimization if it does not result in an index being
...
used that would not have been used otherwise. In other words, do not
convert OR clauses into an IN statement if it does not help the optimizer. (CVS 2789)
FossilOrigin-Name: 7e7cfce0f8ed2a6e04747736a2c68484f447cdfb
2005-11-26 14:24:40 +00:00
drh
54a167d1fe
Make sure left joins still work even when the OR clause optimization fires.
...
Ticket #1537 . (CVS 2788)
FossilOrigin-Name: cbbeb9de0019a0b81318158711590078fcb7e98a
2005-11-26 14:08:07 +00:00
drh
32daab6cb0
Less verbose output when EXPLAIN QUERY PLAN identifies use of the primary key. (CVS 2772)
...
FossilOrigin-Name: 5045f09933f57e4ae897969710b19d09b7af6022
2005-11-21 12:48:24 +00:00
drh
36d649303f
The EXPLAIN QUERY PLAN now identifies when tables use the integer primary key. (CVS 2771)
...
FossilOrigin-Name: 80721e2c9033abb2e9eed32892c4e486c293e1fa
2005-11-21 12:46:27 +00:00
drh
8a51256c0c
Create separate affinities for INTEGER and REAL. (CVS 2766)
...
FossilOrigin-Name: ce06c123d0c5663dbaf263c2e0aaf5d9cdeb2ccd
2005-11-14 22:29:05 +00:00
drh
b37df7b928
Attempt to fix the SQLite core so that no floating point operations are used
...
anywhere if SQLITE_OMIT_FLOATING_POINT is defined at compile-time. This
is useful to people who use SQLite on embedded processors that lack
floating point support. (CVS 2749)
FossilOrigin-Name: a0bdb584680ce6400d9e8c57db9d91197cc7b776
2005-10-13 02:09:49 +00:00
drh
d654be803f
Code cleanup and simplification. Three new Mem opcodes added.
...
The sqlite3VdbeJumpHere function added. (CVS 2730)
FossilOrigin-Name: 2471957feee57538e5e1e50a704a337f0927d10e
2005-09-20 17:42:23 +00:00
drh
b6fb62d9b4
Update comments in where.c. No code changes. (CVS 2727)
...
FossilOrigin-Name: bb84d27eda64479d65b13fbbcaeef6a00da4d103
2005-09-20 08:47:20 +00:00
drh
22d6a53a77
ON-clause terms in a LEFT JOIN that restrict only the left table, should not
...
really restrict the left table but instead rows that fail to meet the condition
to be joined with NULL rows from the right table. (CVS 2725)
FossilOrigin-Name: ea10f9785e3c5248dafcc297f3a2c5465b6e0dba
2005-09-19 21:05:48 +00:00
drh
549c8b68c7
The sqlite3_query_plan debugging variable now only appears with SQLITE_TEST=1. (CVS 2721)
...
FossilOrigin-Name: 41e226d2ff5c0021fd07388da13f6d750fac508b
2005-09-19 13:15:23 +00:00
drh
48083cee4c
Change some debugging #defines in order to get SSE working again after
...
recent upgrades. (CVS 2719)
FossilOrigin-Name: 86eb7d8363559c94bfcd7e48ff6270025ecacb7b
2005-09-19 12:37:27 +00:00
drh
36da52425b
Bug fix in the ORDER BY optimizer. Ticket #1435 . (CVS 2707)
...
FossilOrigin-Name: 553b7ba8f8ae4cb865494f2d301690149d7edb9f
2005-09-17 13:29:23 +00:00
drh
f5b1138bae
Make sure dependencies on the right-hand side of IN operators are checked
...
correctly. Ticket #1433 . (CVS 2706)
FossilOrigin-Name: 21740794ab81924442f358a6adbbe6d5590cf58d
2005-09-17 13:07:13 +00:00
drh
53f733c7ae
Fix a whole host of newly discovered memory leaks the occur after a
...
failure of realloc(). (CVS 2696)
FossilOrigin-Name: 4686d649756a0aa301ade901ac49c89a976c5402
2005-09-16 02:38:09 +00:00
drh
ecc9242f6f
Add the experimental EXPLAIN QUERY PLAN diagnostic capability. (CVS 2685)
...
FossilOrigin-Name: 986efb7b12643800805ad4b1f1e90e30fcf6d38a
2005-09-10 16:46:12 +00:00
drh
3dec223ca0
Use of the CROSS keyword in a join prevents table reordering. Ticket #1414 . (CVS 2683)
...
FossilOrigin-Name: 415b8b24629aa12756d8285c094b5f85d8a8e532
2005-09-10 15:28:09 +00:00
drh
4f26bb62a8
Remove a few unused variables detected by Borland C. Ticket #1412 . (CVS 2675)
...
FossilOrigin-Name: cdfe372a958fb446485913e860d52b87fffd34e4
2005-09-08 14:17:20 +00:00
drh
a21c8495f9
Fix over-aggressive optimization of ORDER BY as reported on the mailing list. (CVS 2655)
...
FossilOrigin-Name: efbb4bc83cd86b6a26d58c5818c58c2e3edaab18
2005-09-01 17:47:51 +00:00
drh
b46b57745d
Initialize a local variable to avoid a nuisance compiler warning.
...
Ticket #1394 . (CVS 2638)
FossilOrigin-Name: 9b914901a18f8ea39c39a51509c0b3b862c13d6a
2005-08-29 16:40:52 +00:00
drh
d64fe2f374
The LIKE optimization does the right thing when collating sequences are
...
present. LIKE expressions where the left-hand side has COLLATE NOCASE
are optimized in the default case. (CVS 2637)
FossilOrigin-Name: ef84ff795c85e9d28f1cac84ff42d8d4ef84cfc4
2005-08-28 17:00:23 +00:00
drh
9eb2028fbc
After calling realloc() on an array to resize it, be sure not to use pointers
...
into the old array. Ticket #1376 . (CVS 2617)
FossilOrigin-Name: 9f9a257123274779150cbc290b9f86a09b3b2c03
2005-08-24 03:52:18 +00:00
drh
0bbaa1ba9a
Increase test coverage of alter.c to 100%. Fix bugs found in the process. (CVS 2603)
...
FossilOrigin-Name: b550d04d43a92f33a01438ae03df14678db3cdee
2005-08-19 19:14:12 +00:00
drh
8b3d990b71
Bring testing coverage of the analyze.c file up to 100%. Bugs found and
...
fixed in the process. (CVS 2599)
FossilOrigin-Name: 2fe0ac4fa4d5911e266979021fa7e413d96c558d
2005-08-19 00:14:42 +00:00
drh
55ef4d9758
The case_sensitive_like pragma added.
...
Test cases added for the LIKE optimization. (CVS 2592)
FossilOrigin-Name: 72ee21c05e618b6f46f5460f8c85779c72fe32d7
2005-08-14 01:20:37 +00:00
drh
8718f52624
Disable an overzealous optimization the omitted sorting on a join if the first
...
table gave a unique result. The sort can only be omitted if all tables in
the join are unique. Ticket #1358 . (CVS 2589)
FossilOrigin-Name: 4f07661279fb11a06b3ddffeda672f077c0d306a
2005-08-13 16:13:04 +00:00
drh
d2687b7731
Optimize LIKE and GLOB operators in the WHERE clause. Code passes all
...
regression tests but still needs additional tests. (CVS 2581)
FossilOrigin-Name: 3edbe8d6217fd1180883e6b9f1e5b9011a39f80d
2005-08-12 22:56:09 +00:00
drh
45b1ee44a4
Minor refactoring of the new optimizer code. (CVS 2576)
...
FossilOrigin-Name: 868322f7b7176486dfb4b54d99cf6662b79e639d
2005-08-02 17:48:22 +00:00
drh
943af3cda1
Fix problems caused by over-agressive optimization of ORDER BY in joins.
...
Lots more testing needed. (CVS 2571)
FossilOrigin-Name: 1a4e526d46280970b43505a5c8a4090767c63043
2005-07-29 19:43:58 +00:00
drh
6c30be8e51
Optimizer now converts OR-connected WHERE-clause terms into an IN operator so
...
that they can be used with indices. There are known problems with the
ORDER BY optimization in this and in several prior check-ins. This
check-in is not recommended for production use. (CVS 2569)
FossilOrigin-Name: d23c8bf81e508722e92ff1b9c8bc98dc026a31f2
2005-07-29 15:10:17 +00:00
drh
ed37800693
The BETWEEN operator in a WHERE clause is now able to use indices. (CVS 2568)
...
FossilOrigin-Name: cdf8c9584b945212e065e044df801c207aedb675
2005-07-28 23:12:08 +00:00
drh
a611040eea
Test cases and tuning of the new optimizer code. (CVS 2567)
...
FossilOrigin-Name: 4b02703dec71aa78e5f8d8cab5b950966a4c6abc
2005-07-28 20:51:19 +00:00
drh
3adc9cedb0
The new optimizer now passes all regression tests. (CVS 2566)
...
FossilOrigin-Name: a21212843359fb9fdbd60799ae50ad3566f4399a
2005-07-28 16:51:51 +00:00
drh
28c4cf42da
More work on the new optimizer. Fewer tests fail now. (CVS 2565)
...
FossilOrigin-Name: ee3a08e353f563c36e904479393fcb56f96ee975
2005-07-27 20:41:43 +00:00
drh
51147baa6d
A new optimizer that breaks a lot of tests. But none of them critically, I
...
think. Nevertheless, there is a lot of work ahead to stabilize the code. (CVS 2564)
FossilOrigin-Name: 86ce56ccea8297b1fba2b9ee53b5f1a3f228662f
2005-07-23 22:59:55 +00:00
drh
e23399fc9c
Begin adding code to support multiple IN constraints on the same index. (CVS 2557)
...
FossilOrigin-Name: 103f8ccb9013689a480766ebffbf570d4aa8bac5
2005-07-22 00:31:39 +00:00
drh
29dda4ae65
Split the OP_Integer opcode into OP_Integer and OP_Int64. This allows
...
comments to be added to OP_Integer. Cleanup in the optimizer. Allow
terms of the FROM clause to be reordered automatically. (CVS 2556)
FossilOrigin-Name: e2f822ac82d0a5a59de0b63cce65d4fd6c178ff1
2005-07-21 18:23:20 +00:00
drh
7ec764a29e
Add comments to test cases. Improvements to the query plan test variable. (CVS 2555)
...
FossilOrigin-Name: ef3a157f469d72cbd2f713f997598ddf47f340d2
2005-07-21 03:48:20 +00:00
drh
fe05af87f8
In where.c, split out the code that selects an index into a separate
...
subroutine. (CVS 2554)
FossilOrigin-Name: c30cbba9ead1b4d07f225b1e8a65d5d5230ea45d
2005-07-21 03:14:59 +00:00
drh
e8b9727835
More refactoring in where.c. (CVS 2552)
...
FossilOrigin-Name: a35bd50af8961133adc66e40c38402e81a02bb56
2005-07-19 22:22:12 +00:00
drh
0fcef5e110
Refactoring of the query optimizer in advance of adding better optimization. (CVS 2551)
...
FossilOrigin-Name: 57c6bd3760163c174be4a2ece58f414e82b55938
2005-07-19 17:38:22 +00:00
drh
0aa74edd72
Allow an unlimited number of terms in the WHERE clause. The old limit was 100. (CVS 2550)
...
FossilOrigin-Name: ca69f36832d57775e73ac5cdbe0a32d7b759432b
2005-07-16 13:33:20 +00:00
drh
9042f395cc
Fix bugs in the new query plan instrumention logic. (CVS 2549)
...
FossilOrigin-Name: 578490c91331a386f84652db0b3bfd74c82046e1
2005-07-15 23:24:23 +00:00
drh
84bfda41db
Add test instrumentation that will be needed during the development of
...
forthcoming optimizer enhancements. (CVS 2548)
FossilOrigin-Name: dfd5fd77b0764853f847eeee3c1fe047d60fee7e
2005-07-15 13:05:21 +00:00
drh
9170dd7e1c
Change the name of the OpenTemp opcode to OpenVirtual which is more
...
descriptive of what it does. (CVS 2541)
FossilOrigin-Name: 3bb9ce5f20d0a6bc19df31df9b8e82044c3e6004
2005-07-08 17:13:46 +00:00
drh
392e597c8a
Add the EP_OptOnly flag on expressions for WHERE clause
...
terms that are added by the optimizer but should not be coded. (CVS 2540)
FossilOrigin-Name: f4a66ed04dfd8714746b766b4859682ea18e328f
2005-07-08 14:14:22 +00:00
drh
7bac700686
Fix typos in comments. No changes to code. (CVS 2535)
...
FossilOrigin-Name: d3b03495a46e79a9d82525a61bad99eef9469ad1
2005-07-01 11:38:44 +00:00
drh
f0863fe568
Update older opcode names to be more meaningful in light of the latest
...
code design. (CVS 2506)
FossilOrigin-Name: 36f2da1f8d8d434f861ecad55c9d86549751c954
2005-06-12 21:35:51 +00:00
drh
dd9f8b45ef
Fix an array index that is out of bounds. Ticket #1251 . (CVS 2462)
...
FossilOrigin-Name: bcf87e4d1681d6c2856e716aae0135c2b14989d8
2005-05-19 01:26:14 +00:00
drh
f8db1bc03b
Remove some vestigal code. Add the experimental sqlite3_transfer_bindings()
...
API. (CVS 2446)
FossilOrigin-Name: 88b39436f00d645cdb6333a7413c698c42227d3f
2005-04-22 02:38:37 +00:00
danielk1977
d5d565235b
Fix some memory leaks that can occur if a memory allocation fails. (CVS 2388)
...
FossilOrigin-Name: 9a358fc33d726d0b5782bf65b50f61f2bd096d56
2005-03-16 12:15:20 +00:00
danielk1977
3fdf826699
Fix bug reported on the mailing list for WHERE clauses like (rowid<'2'). (CVS 2357)
...
FossilOrigin-Name: b323f0f2832ac5d225d880db6f56314d2f766a25
2005-02-22 09:47:18 +00:00
danielk1977
d0a6932f70
Handle "rowid<=X ORDER BY rowid DESC" where X is an integer. Fix for ticket #1092 . (CVS 2307)
...
FossilOrigin-Name: 506088796c846243e24c4cba6be4ce6511fdb345
2005-02-02 01:10:44 +00:00
danielk1977
6c18b6e0f4
Have the optimization introduced in (2170) deal with OP_NullRow as well as OP_Column and OP_Recno. Fix for #1086 . (CVS 2290)
...
FossilOrigin-Name: 356d31e03fe856642c5637f5ea5665947ff681fc
2005-01-30 09:17:58 +00:00
danielk1977
b3bce66232
Modify sub-query handling. Tickets #1083 and #1084 . (CVS 2286)
...
FossilOrigin-Name: b1b50f315873a8614920d1e3af4a07fb29a7ff6a
2005-01-29 08:32:43 +00:00
drh
fe2093d73e
Bug fixes and enhancements entered while on jury recess. (CVS 2246)
...
FossilOrigin-Name: 38401dfbd5e3b50dd4e7a11562a7770347cebdf4
2005-01-20 22:48:47 +00:00
drh
1398ad3639
Continued refactoring of the name resolution logic and query optimizer. (CVS 2236)
...
FossilOrigin-Name: d8b2a7e09187564fe66a2b4bf0992c6a017146cf
2005-01-19 23:24:50 +00:00
drh
626a879a25
Infrastructure changes to handle name resolution differently. This is needed
...
to fix various long-standing problems with column names in joins. It will
also make the implementation of correlated subqueries easier. (CVS 2228)
FossilOrigin-Name: 4a7534396a72ccb300303df28798bb2c50293782
2005-01-17 22:08:19 +00:00
drh
ac931eb93b
Fix for ticket #1062 : Correctly handle redundant terms in a WHERE clause. (CVS 2198)
...
FossilOrigin-Name: 1bee1bb91d39ff8a33efe662b6cab6dbd2d50e3c
2005-01-11 18:13:56 +00:00
tpoindex
7a9b161587
add comment that table is accessed by primary key (CVS 2177)
...
FossilOrigin-Name: 707690c5f2e1340bbbb4cb06e6b2b76a2a3b5f0d
2005-01-03 18:13:18 +00:00
drh
7465a80899
Fix a typo in a comment. No code changes. Ticket #1052 . (CVS 2174)
...
FossilOrigin-Name: 9fb1402f0835b214c9174866653e95416b32f860
2005-01-03 01:28:51 +00:00
drh
acf3b988f6
Fix comment typos. no code changes. (CVS 2173)
...
FossilOrigin-Name: 4165217e5114f5377f0823c63ff2aba879927ce7
2005-01-03 01:27:18 +00:00
drh
e6f85e71e9
Fix ticket #1046 by removing code and simplifying the query optimizer.
...
Remarkably, this simplification also makes the optimizer do a better job.
Ticket #1051 was fixed as a side-effect. (CVS 2172)
FossilOrigin-Name: 5fd1f4711885e3dd6fb2c2700287f78bb0ea178a
2004-12-25 01:03:13 +00:00
drh
9012bcbc0a
The optimizer now uses only the index and ignores the table if it can get
...
away with doing so, thus saving a single BTree search per row of result.
This could potentially double the speed of certain queries. The
code passes all regression tests but new tests to exercise the new
functionality are yet to be added. (CVS 2170)
FossilOrigin-Name: e5aa489453bf31126da6473ef93c89ec27935cde
2004-12-19 00:11:35 +00:00
drh
51669863a8
Improvements to the query optimizer. This is a work in progress. (CVS 2169)
...
FossilOrigin-Name: 9b86993ff721b577b920c7c67fb41d3d4355fe88
2004-12-18 18:40:26 +00:00
drh
23bf66d6af
Minor code and comment cleanup. (CVS 2165)
...
FossilOrigin-Name: d012628a78edaa8d3cb438a7dcc3770b2eb8588b
2004-12-14 03:34:34 +00:00
drh
e4e7207248
More work on the implementation of cursors, but they are still not
...
functioning. (CVS 2142)
FossilOrigin-Name: 8b61d1ae1ca469b80f2b344d550c3b363448b193
2004-11-23 01:47:30 +00:00
drh
b6c29897eb
Add initial infrastructure for cursors. In where.c, optimize out clauses
...
of the form "ORDER BY rowid" if a table scan is being performed. Do a
reverse table scan if "ORDER BY rowid DESC" is present. (CVS 2141)
FossilOrigin-Name: fc8c1393c86017a816beb52725b68af3b973f979
2004-11-22 19:12:19 +00:00
danielk1977
299b187d76
Back out changes allowing writes to tables that have open cursors. (CVS 2133)
...
FossilOrigin-Name: 91acd87e52509a8f78894d0f4b625b54376cac21
2004-11-22 10:02:10 +00:00
danielk1977
ed326d7047
Perform deletes in a single pass. (CVS 2104)
...
FossilOrigin-Name: a2e1c35b327e33684ab19e5f65727c42c7b2949c
2004-11-16 15:50:19 +00:00
drh
9a43267ba2
More changes to take advantage of the TK_ and OP_ alignments to avoid
...
unnecessary translations. (CVS 1999)
FossilOrigin-Name: e8e972ba65fc36171f6b685e8a8f67f93452e031
2004-10-04 13:38:09 +00:00
drh
94a11211f5
Code simplifications and size reductions. (CVS 1983)
...
FossilOrigin-Name: cb631a135da92fd689ee40a8b7e2695a510eb765
2004-09-25 13:12:14 +00:00
drh
ad6d94607f
Add comments to unused P3 fields of selected instructions when NDEBUG is
...
not defined. This makes VDBE program dumps more readable during debugging. (CVS 1973)
FossilOrigin-Name: 4871c77f8fce36ff230e1f026f4e4e49492515e9
2004-09-19 02:15:24 +00:00
drh
9bb575fd72
Fix a naming conflict between sqlite versions 2 and 3. An open sqlite3
...
connection now *must* be called "sqlite3". You cannot call it "sqlite".
This might break existing code. (CVS 1941)
FossilOrigin-Name: 3ddf5a9d1c480a2e3aa32685879063b11afddbe1
2004-09-06 17:24:11 +00:00
drh
290c19482e
Optimizations to the code generator. (CVS 1899)
...
FossilOrigin-Name: bd6649c5aae1bf182610eb267b546c297a34481d
2004-08-21 17:54:45 +00:00
drh
193bd777aa
Simplify the where.c logic by flipping expression over so that the controlling
...
variable is always on the left. (CVS 1838)
FossilOrigin-Name: ec8bfa3891dbf0f3172e31cf322974c03f9af59a
2004-07-20 18:23:14 +00:00
drh
2ffb11855a
Fix for ticket #813 . (CVS 1818)
...
FossilOrigin-Name: 88e4bfa154e33c627ff2abb15cc55a100359d370
2004-07-19 19:14:01 +00:00
drh
c275b4ea91
Store schema cookies on the TEMP database. Ticket #807 . (CVS 1817)
...
FossilOrigin-Name: c6c13dc460094e6adea2b14849edf9f485238b99
2004-07-19 17:25:24 +00:00
drh
8feb4b1d9e
Correctly handle joins of more than 32 tables. Ticket #806 . (CVS 1812)
...
FossilOrigin-Name: 880644097004cba1e215a5697d0553b3b98c9884
2004-07-19 02:12:14 +00:00
danielk1977
ededfd5e83
Remove redundant opcodes OP_MakeKey and OP_MakeIdxKey. (CVS 1612)
...
FossilOrigin-Name: a71a9ff114f2162696d8d37fbc87b315568f6dcb
2004-06-17 07:53:01 +00:00
danielk1977
f7df9ccfe7
Trivial modifications to prevent compiler warnings. (CVS 1608)
...
FossilOrigin-Name: b3d5ad6f7832d46e34e99e4a1cb7e47c88f207a4
2004-06-16 12:02:47 +00:00
danielk1977
f9d19a6b3f
Check the value of the schema cookie before reading the sqlite_master table. (CVS 1585)
...
FossilOrigin-Name: 80c299f8839d920c61854f575498340b28db98d7
2004-06-14 08:26:35 +00:00
danielk1977
d2b65b9fad
Add the sqlite3_collation_needed() API and fix some error handling cases
...
involving unknown collation sequences. (CVS 1563)
FossilOrigin-Name: 518d82d3b1ab996d675f45c94d740c98578a04a6
2004-06-10 10:51:47 +00:00
danielk1977
0202b29ef7
Some progress on user-defined collation sequences. (CVS 1544)
...
FossilOrigin-Name: c634e71f1909819fb55c728bc410e5cc390428e3
2004-06-09 09:55:16 +00:00
drh
80242055e5
Start all transactions and verify all schema cookies near the beginning of
...
of each vdbe program. (CVS 1543)
FossilOrigin-Name: 1086196460e261718e78512d77e25dde021a117d
2004-06-09 00:48:12 +00:00
danielk1977
0f69c1e3ec
Transform OP_HexBlob and OP_String8 to OP_Blob and OP_String the first time they are executed. (CVS 1492)
...
FossilOrigin-Name: 3225de8902b0e7e60c4d9f3a5ef51bc74f57d364
2004-05-29 11:24:50 +00:00
drh
d3d39e939d
Add internal support for collating sequences. This breaks 244 tests. (CVS 1420)
...
FossilOrigin-Name: a6cb09d7af537726acc87b9133f68c81e839e047
2004-05-20 22:16:29 +00:00
drh
fec19aad44
Correctly handle 64-bit integers in SQL statements. (CVS 1408)
...
FossilOrigin-Name: 34f03ba6a9d6e2144d0c6cbbbeb37b4c69705f1f
2004-05-19 20:41:03 +00:00
drh
7cf6e4de35
Change opcode names and comments to better describe the operation of
...
the incrKey flag. OP_MoveTo becomes OP_MoveGe. (CVS 1407)
FossilOrigin-Name: 8f249c45cbc77f4320798ff1a830b55e5c74888a
2004-05-19 14:56:55 +00:00
drh
772ae62a82
Bug fixes in where.c. The where.test test works again. (CVS 1406)
...
FossilOrigin-Name: 7c31e257e2d109bfedf63dc307b422e1abd46d0e
2004-05-19 13:13:08 +00:00
danielk1977
b4964b723c
Omit the '\0' at the end of UTF-8 strings on disk (it is implied). Also
...
don't store the number of rows at the beginning of each table record. (CVS 1390)
FossilOrigin-Name: 202a470f2c1804a96e69f16709d1a92e405971f0
2004-05-18 01:23:38 +00:00
danielk1977
e014a83880
More changes to support the new types model. Compound SELECTs are currently
...
broken. (CVS 1389)
FossilOrigin-Name: 0f6c9b05e688e281fa168aacdd867db408df2863
2004-05-17 10:48:57 +00:00
danielk1977
a37cdde042
More changes to support the manifest type model. A few things are currently
...
broken. (CVS 1385)
FossilOrigin-Name: a4af838f8d1b81ec6c8db97655c6876aca0738d9
2004-05-16 11:15:36 +00:00
danielk1977
13dadd2798
Delete some code no longer in use (CVS 1376)
...
FossilOrigin-Name: f24aedc2b0c401d8b714ba39b604d7caa7f6a430
2004-05-14 11:16:56 +00:00
danielk1977
3d1bfeaa22
Implement type affinity for table and index records (CVS 1375)
...
FossilOrigin-Name: dbfe6e93166d9557d66cab9dca7977baa3501e5e
2004-05-14 11:00:53 +00:00
danielk1977
132872b37e
Change the names of external symbols from sqlite_XXX to sqlite3_XXX. (CVS 1339)
...
FossilOrigin-Name: 19b100ec0d088b2cca147c967a80d18403b7ee86
2004-05-10 10:37:18 +00:00
danielk1977
4adee20fcb
Change lots of internal symbols from sqliteXXX to sqlite3XXX so that the
...
library links again. It doesn't work yet, due to changes in the btree layer
calling convention. (CVS 1324)
FossilOrigin-Name: 8af6474c49263ae26216dff9465b33f76b500cf4
2004-05-08 08:23:19 +00:00
drh
701a0aebe2
Use sqliteVdbeOp3 instead of sqliteVdbeChangeP3 where applicable. (CVS 1266)
...
FossilOrigin-Name: 51f1e8f7539596b33bc3365ec8f34041602d049c
2004-02-22 20:05:00 +00:00
drh
f7a9e1ac87
Use sqliteErrorMsg instead of sqliteSetString whereever practical. (CVS 1264)
...
FossilOrigin-Name: 69aac043af7f93e7b3f036622c0ac9261cae1839
2004-02-22 18:40:56 +00:00
drh
751f41217e
Fix comparisons of ROWID against floating point numbers so that they work
...
correctly. Ticket #377 and #567 . (CVS 1178)
FossilOrigin-Name: c9ac3db8e08403398ec344757385334601a59374
2004-01-14 21:59:22 +00:00
drh
143f3c45a7
Rework the fix to ticket #461 so that we do not have to do redundant tests
...
of WHERE clause terms looking for NULLs. See also check-in (1103). (CVS 1167)
FossilOrigin-Name: 5fd581787e88173f0303f870fc956ec9285cca4e
2004-01-07 20:37:52 +00:00
drh
0f18bfa789
Fix the code generator to a void a VDBE stack overflow on 3-way joins.
...
Ticket #519 . (CVS 1129)
FossilOrigin-Name: 230a4ff2c8a3927533baf5b22edc9f25490d5443
2003-12-10 01:31:21 +00:00
drh
41743984bf
Always use "(char*)0" to terminate the argument list of sqliteSetString().
...
This is needed for 64-bit systems that use a 32-bit integer by default. (CVS 1126)
FossilOrigin-Name: 656c90387a4a714b4f31040ece9b0e15e30934af
2003-12-06 21:43:55 +00:00
drh
dab3518880
Remove support for the Oracle8 outer join syntax. (CVS 1106)
...
FossilOrigin-Name: 824430b3ce435386b83ceb882f1510ac9f27d8fa
2003-09-27 13:39:38 +00:00
drh
562528c480
Do all WHERE clauses tests, even if an index is used for lookup so that
...
we know the test cannot be FALSE. The test might end up being NULL in which
case it would need to be treated as false. Ticket #461 . (CVS 1103)
FossilOrigin-Name: 5aea81488b2d3bcdc009ccf0f0ffcda046e38d79
2003-09-27 00:41:27 +00:00
drh
d4f5ee2805
Initialize a variable to prevent an MSVC compiler warning. Ticket #394 . (CVS 1051)
...
FossilOrigin-Name: 96e3c539586bf86c4fe8de0ac25de6655f704035
2003-07-16 00:54:31 +00:00
drh
1dd59e0f94
Correctly handle comparing an INTEGER PRIMARY KEY against a floating point
...
number. Ticket #377 . (CVS 1045)
FossilOrigin-Name: 982aa3356bcc217003cd9e6a829619219c334797
2003-07-06 17:22:25 +00:00
drh
8bf8dc9208
Fix problems with TEMP indices that lead to corrupt databases. These
...
problems were discovered while working on ticket #317 . No sure yet if
that ticket is fixed. (CVS 981)
FossilOrigin-Name: 01398fb78bab7e5c6f439f2b743f26e82118468a
2003-05-17 17:35:10 +00:00
drh
6a3ea0e6ef
VDBE cursors numbers for tables in a join do not have to be consecutive.
...
This is one step on the road to fixing ticket #272 . (CVS 947)
FossilOrigin-Name: be7aed2011b4af868b6a0c370c3d41354ae0cdf4
2003-05-02 14:32:12 +00:00
drh
5cf590c128
Fix some issues with INSTEAD OF triggers. (CVS 930)
...
FossilOrigin-Name: 206b17397b1d2b55179c935927ff1d8215728c32
2003-04-24 01:45:04 +00:00
drh
b2fe7d8cb7
Added tests for the in-memory database backend. Also updated some comments
...
in other modules. (CVS 924)
FossilOrigin-Name: fb89adf4d1325c5ea471759ebfd8df7faa4f9a80
2003-04-20 17:29:23 +00:00
drh
37ea94b8c9
Bug in WHERE clause processing fixed. Ticket #298 . (CVS 919)
...
FossilOrigin-Name: 9b619c98b586a207a87942640d3a94220ff8ab02
2003-04-19 16:34:04 +00:00
drh
d24cc427b7
Changes to the "sqlite" structure that allow simultaneous operations on
...
multiple database files. Many regession tests pass - but not all of them.
Do not use this version except for debugging SQLite itself. (CVS 883)
FossilOrigin-Name: d2fb2bb50cf1e13feb90995079f291384abd6ba9
2003-03-27 12:51:24 +00:00
drh
001bbcbb8f
Modifications to the VDBE to support more than one database file. (CVS 878)
...
FossilOrigin-Name: 875da9eed981bfa27b98e95025f9fdbed74b4098
2003-03-19 03:14:00 +00:00
drh
dcd997ea2e
The sqlite_exec() function now returns SQLITE_AUTH when authorization fails.
...
Ticket #231 . (CVS 857)
FossilOrigin-Name: d93c1aeb544a5b1056424945eb43854213b30e50
2003-01-31 17:21:49 +00:00
drh
fa9e0df21b
Remove the aOrder() array from where.c. (CVS 824)
...
FossilOrigin-Name: b2c1edb47f481cafe6718bafcdb517cca160a44d
2003-01-11 15:02:44 +00:00
drh
fd15981daa
Fix two compiler warnings from OS-X. (CVS 823)
...
FossilOrigin-Name: 4c22da76ca91f3c59dac1c529e82ac3b04b767bd
2003-01-11 14:25:39 +00:00
drh
dd4852c3d1
Fixes to the logic that decides if the ORDER BY can be ignored due to the
...
use of an index. Tests updated. (CVS 796)
FossilOrigin-Name: bfb9a2aa939ecffc5dc2c7c23bddd57d357bdf13
2002-12-04 21:50:16 +00:00
drh
c045ec51be
Scan the table backwards if there is an ORDER BY ... DESC clause that can
...
be satisfied by an index. (CVS 795)
FossilOrigin-Name: c7a3487981de0ed5b43ea3ff4d46ab4437068dca
2002-12-04 20:01:06 +00:00
drh
174b619591
Honor ORDER BY clauses in VIEWs. Ticket #193 . (CVS 792)
...
FossilOrigin-Name: dbf7893234a6c5d6bb2d931e52080bb05784c0c9
2002-12-03 02:22:52 +00:00
drh
1f16230b5c
Minimal support for oracle8 outer join syntax. (CVS 771)
...
FossilOrigin-Name: 31df3690d0fe4bd4a293cbe8ca9a26c98c3ed3ce
2002-10-27 19:35:33 +00:00
drh
c8f8b632c3
Fix a bug in the left outer join logic. (CVS 758)
...
FossilOrigin-Name: 6c0f44bd6374010f7a4a091e585eb36e0665f96f
2002-09-30 12:36:26 +00:00
drh
142e30df99
Slightly faster INSERTs from a SELECT by avoiding an intermediate table.
...
But it didn't make nearly as much difference as I had hoped. (CVS 732)
FossilOrigin-Name: 723362e74f79c784314d042e3a8c8a9bf07cbd5e
2002-08-28 03:00:58 +00:00
drh
cb48588297
Fix for ticket #135 : Remove unused variables from three files. (CVS 719)
...
FossilOrigin-Name: 8cf17f2a24ee9bd5d1ea66484922819626c412dd
2002-08-15 13:50:48 +00:00
drh
c330af1dca
Disable sorting by indices if there is a COLLATE subclause in the
...
ORDER BY clause. (CVS 713)
FossilOrigin-Name: 2438da791afb53b4f1c7a9ff9705d393c86f3cbd
2002-08-14 03:03:57 +00:00
drh
a9e99aee95
Make the distinction between text and numeric data. (CVS 710)
...
FossilOrigin-Name: 310ac4fbaf0ed63f98bfacb55259960be03b0c8b
2002-08-13 23:02:57 +00:00
drh
7f09b3e36b
Bug fix to the left outer join logic. (CVS 1726)
...
FossilOrigin-Name: 957d908e6b84cd599b5cfd82af80c8fac79c1dbd
2002-08-13 13:15:49 +00:00
drh
f1351b6759
Fix for ticket #124 : Fix a stack VDBE overflow problem on joins on an
...
INTEGER PRIMARY KEY. (CVS 700)
FossilOrigin-Name: fe329e078fa209faf62e08599a00c7efa75b8501
2002-07-31 19:50:26 +00:00
drh
3b167c7583
Additional test cases added. The following bug fixed: A segfault was occurring
...
if a VIEW consisted of a join with a USING clause. (CVS 651)
FossilOrigin-Name: 96515b813eb57e1f48c28d357d1f38639b2fdcfa
2002-06-28 12:18:47 +00:00
drh
83dcb1ad37
Fix for ticket #84 : If the WHERE clause is too complex, issue an error message
...
and refuse to do the SELECT. The cutoff is a WHERE clause with 100 terms. (CVS 650)
FossilOrigin-Name: c07e493b62125e85eaea36b6945f1e146e2792b8
2002-06-28 01:02:38 +00:00
drh
e0bc4048a0
Added support for the "sqlite_temp_master" table. Increased the version
...
number to 2.5.2. (CVS 640)
FossilOrigin-Name: 9c1432bf7485258e485bd652e3acdaeabbfe8850
2002-06-25 01:09:11 +00:00
drh
1cc093c2b5
Partial fix for a problem with LEFT OUTER JOIN. It used to be that the test
...
for the right-hand table not matching the left table occurred after all
ON, USING, WHERE clause processing. The test should occur after ON and
USING clauses are checked but before the WHERE clause is check. This fix
works as long as the total number of "AND" separated terms in the ON, USING,
and WHERE clause does not exceed 32. To do: make this work for any number
of terms and add test cases.
that (CVS 639)
FossilOrigin-Name: 8b6574cfa86daaae910f8f3ee3c4723a21fb9e53
2002-06-24 22:01:57 +00:00
drh
bf5cd97ed7
Fix a VDBE stack leak in LEFT OUTER JOIN. Fix a bug in the code generator
...
for JOIN ... USING(...). (CVS 638)
FossilOrigin-Name: d861489e1f7dffd1105c271fe8597f73e5b1703c
2002-06-24 12:20:23 +00:00
drh
e31847449e
The query optimizer now attempts to satisfy an ORDER BY clause using
...
an index. Sorting is still used if there are no suitable indices. (CVS 628)
FossilOrigin-Name: f09e19b43ef61073713cf32282c90ea666229eba
2002-06-19 14:27:05 +00:00
drh
df199a25bd
Make the LIMIT clause work even if the destination of the SELECT is
...
something other than a callback. (Ticket #66 ) (CVS 619)
FossilOrigin-Name: 699cf362083043615eb88635a228bfa46a315c9c
2002-06-14 22:38:41 +00:00
drh
c27a1ce4bd
Improvements to comments. No code changes. (CVS 618)
...
FossilOrigin-Name: 7e10e60bb78b680bb822908a0b7763f8f5e3ee5a
2002-06-14 20:58:45 +00:00
drh
48185c15c7
Added tests for the new IN operator optimizer and fixed a bug that the
...
new tests found. This completes the implementation of enhancement #63 . (CVS 612)
FossilOrigin-Name: 2a710e18176c486525f0abb06644a511a2cd1d7a
2002-06-09 01:55:20 +00:00
drh
d99f70680f
Add optimizations for the IN operator in WHERE clauses. This is a partial
...
implementation of enhancement #63 . Still need to add test cases. (CVS 610)
FossilOrigin-Name: 8481e841ebdeabe07bf780246bda1aa053eb60b7
2002-06-08 23:25:08 +00:00
drh
f5905aa7be
NULL values are distinct. A comparison involving a NULL is always false.
...
Operations on a NULL value yield a NULL result. This change makes SQLite
operate more like the SQL spec, but it may break existing applications that
assumed the old behavior. All the old tests pass but we still need to add
new tests to better verify the new behavior. Fix for ticket #44 . (CVS 589)
FossilOrigin-Name: 9051173742f1b0e15a809d12a0c9c98fd2c4614d
2002-05-26 20:54:33 +00:00
drh
ad2d8307ac
Initial implementation of LEFT OUTER JOIN including the expanded SQL92 join
...
syntax. The basic functionality is there but there is still a lot of testing
to do. (CVS 587)
FossilOrigin-Name: 99bd1f5b9a1a20bfeefe15c00d96a34a5f40923e
2002-05-24 20:31:36 +00:00
drh
ad3cab52fe
Split the IdList structure into IdList and SrcList. SrcList is used to
...
represent a FROM clause and IdList is used for everything else. This change
allows SrcList to grow to support outer joins without burdening the other
uses of IdList. (CVS 584)
FossilOrigin-Name: a167b71d8c27e870bc3079c6132e483bffc83298
2002-05-24 02:04:32 +00:00
drh
1d1f30555d
Clean up some compiler warnings. (CVS 575)
...
FossilOrigin-Name: 3399b01219b9e75b93587b5634d199d9e6fb6e42
2002-05-21 13:18:25 +00:00
danielk1977
f29ce55958
Style fixes to triggers code in various *.c files (partial fix to ticket #39 ) (CVS 571)
...
FossilOrigin-Name: 8a4195c7466962291a296e8f53034ea8cb25005f
2002-05-19 23:43:12 +00:00
drh
9adf9ac4e4
Remove all tabs from the beginning of source code lines. Replace tabs with
...
the appropriate number of spaces. (CVS 565)
FossilOrigin-Name: 690f9a163173c4c7af7e8e92e942cee4184c7974
2002-05-15 11:44:13 +00:00
danielk1977
c3f9bad209
Added FOR EACH ROW triggers functionality (CVS 562)
...
FossilOrigin-Name: 794bf67b6b36fce8854d5daff12f21dbb943240c
2002-05-15 08:30:12 +00:00
drh
08192d5f76
Fix for ticket #31 : Do not attempt the flattening optimization if the
...
subselect does not contain a FROM clause. Handle the special case where
a WHERE clause is constant. (CVS 548)
FossilOrigin-Name: 24e4cf73d22bb41d26bf3c833f1854a9c90923e8
2002-04-30 19:20:28 +00:00
drh
3f6b548961
Fix for bug #8 : Correctly handle terms of a WHERE clause in a join where the
...
term does not use a comparison operator. (CVS 515)
FossilOrigin-Name: abb12259a09418eb6e3cf573ea718ac58c91ac7b
2002-04-02 13:26:10 +00:00
drh
dd579122da
Fix for bug #6 : Correctly handle functions in the WHERE clause of a join. (CVS 513)
...
FossilOrigin-Name: bdd8ce584e16fe288a7e8386f897cb36a60e8431
2002-04-02 01:58:57 +00:00
drh
832508b7ea
Subquery flattening is implemented and passes all regression tests.
...
We still need to add addition tests to the suite to further exercise
the flattener, however. (CVS 408)
FossilOrigin-Name: d5d3e79cc58da5bd315cc1fea1f7cbf46274da16
2002-03-02 17:04:07 +00:00
drh
a76b5dfca6
Code to implement CREATE VIEW is in place. A quick smoke test shows that
...
it works, but there are probably still many bugs. (CVS 387)
FossilOrigin-Name: 39fed2df11382b9855d518502a6c2ca200fa66b8
2002-02-23 02:32:10 +00:00
drh
0a36c57eb0
Bug fix: CREATE TABLE, followed by DROP TABLE within the same transaction is
...
working now. (CVS 378)
FossilOrigin-Name: 553579f936b3a4477c6adfd991adccd06280bfd2
2002-02-18 22:49:59 +00:00
drh
22f70c32f0
Add support for subqueries in the FROM clause of a SELECT. Still need
...
to add tests for this feature. (CVS 372)
FossilOrigin-Name: 89ffa9ff132858b62a91df1fb7fe49b2d58c01e7
2002-02-18 01:17:00 +00:00
drh
976658734c
Bug fix: if PRAGMA full_column_names=ON is set and you do a query like this:
...
"SELECT rowid,* FROM ...", then an assertion failed. Bummer. (CVS 368)
FossilOrigin-Name: df6bf627a51358e8b14297403feab7b888c38580
2002-02-13 23:22:53 +00:00
drh
6b12545f4f
Bug fix: The IN operator was not working if either side derived from
...
an INTEGER PRIMARY KEY. (CVS 354)
FossilOrigin-Name: dbcfe198fbaa155874ef82a96b6a4b993ccf3931
2002-01-28 15:53:03 +00:00
drh
74e24cd0fa
Working on a bug: Dropping and recreating a table within a transaction
...
causes an assertion failure. (CVS 342)
FossilOrigin-Name: b3656a5cfef91c89de2cbb9790087d0d53c03e6f
2002-01-09 03:19:59 +00:00
drh
aacc543e23
Comment updates most. Also some small changes to the VDBE. (CVS 339)
...
FossilOrigin-Name: 9b0be4fcc1cbca69f5fee906f86dfb36a323fe84
2002-01-06 17:07:40 +00:00
drh
c6b52df32d
An attempt to delete a single row using a WHERE clause that specifies
...
the rowid would result in an error if the rowid did not exist. This
problem has been resolved. (CVS 338)
FossilOrigin-Name: 011be9a9d2632d261489005d97c69b0a0bc5a108
2002-01-04 03:09:29 +00:00
drh
8aff10153e
Bug fixing in the new integer primary key code. (CVS 334)
...
FossilOrigin-Name: 29cab124b4f7eae9d9feb60d2f3a2c443fd9b9aa
2001-12-22 14:49:24 +00:00
drh
7900eaded1
Update change log prior to release of 2.1.0. (CVS 311)
...
FossilOrigin-Name: 6b3ccb37bf4c10b2d8f96ef8efc22ed8253f1886
2001-11-12 13:51:43 +00:00
drh
ce927065c2
Bug fixes. (CVS 306)
...
FossilOrigin-Name: 84997fda33fd6ce93b821d3da3a7251cf60e06ec
2001-11-09 13:41:09 +00:00
drh
487ab3ca18
The new code for taking advantage of inequalities in WHERE clauses
...
is in place. It appears to work. (CVS 305)
FossilOrigin-Name: 262bcd17df19f45def6144b5a7e0602ca5b03deb
2001-11-08 00:45:21 +00:00
drh
6b56344d4a
New Next opcode and indexing style implemented. (CVS 304)
...
FossilOrigin-Name: decbeb9151885fee473b3fa58c8cf78a2338d2d8
2001-11-07 16:48:26 +00:00
drh
80ff32f5be
Increase maximum row size to 1MB. (CVS 300)
...
FossilOrigin-Name: 7dd58fad398253608f55867cf1c7749eef005657
2001-11-04 18:32:46 +00:00
drh
99fcd718e1
Remove the P3 and label arguments from the internal sqliteVdbeAddOp()
...
function. This makes the code easier to read and perhaps smaller as
well. (CVS 286)
FossilOrigin-Name: 288ef1247b94c6c933451d120cdc78e471efc14e
2001-10-13 01:06:47 +00:00
drh
f57b339988
Support for temporary tables added. Still need more testing. (CVS 279)
...
FossilOrigin-Name: 9368c62e4097aae3081a325962c1dec167fd253d
2001-10-08 13:22:32 +00:00