drh
ae1a015c87
Merge trunk changes into the cursor-hints branch.
...
FossilOrigin-Name: fbe637620fb7f2c9395c9ddac77d26746d6d4178
2015-09-24 15:06:30 +00:00
drh
6230212f4a
Do not allow table-valued function syntax to be used on a view.
...
FossilOrigin-Name: 97cfe346e140e42a604375551f8168276bdbea11
2015-09-19 20:27:08 +00:00
drh
163c29c5f3
Merge enhancements from trunk.
...
FossilOrigin-Name: 25ee3000e94d60d8c1d7b980f416dcc33eb11105
2015-09-03 14:39:33 +00:00
drh
076e85f59c
Add the sqlite3VdbeLoadString() and sqlite3VdbeMultiLoad() routines to help
...
with code generation, especially on PRAGMAs. Rename sqlite3VdbeAddGoto()
to just sqlite3VdbeGoto().
FossilOrigin-Name: 847387ec8e6fef283899578fb232b2c23b00ee5b
2015-09-03 13:46:12 +00:00
drh
0ff287fb01
Add and use the sqlite3VdbeChangeOpcode() routine. Simplify the implementation
...
of the other sqlite3VdbeChange*() routines.
FossilOrigin-Name: 0a5b00e493efae58252f9fc7bde5a469645942d5
2015-09-02 18:40:33 +00:00
drh
2991ba050b
Add the sqlite3VdbeAddGoto(v,i) routine as a shorthand for
...
sqlite3VdbeAddOp2(v,OP_Goto,0,i).
FossilOrigin-Name: be78f413df1b0d874b44a866ef6bf17543d7e8a2
2015-09-02 18:19:00 +00:00
drh
4970d4032e
Merge enhancements from trunk.
...
FossilOrigin-Name: 29570a604806e2a60a8eef7eaf1dce022d2a7004
2015-09-01 18:31:19 +00:00
drh
5579d59fb3
Evaluate expressions only once when the same expression is used in both the
...
result set and in the ORDER BY clause.
FossilOrigin-Name: c2f3bbad778504681b39ab9399a1eb3c1a35ab3f
2015-08-26 14:01:41 +00:00
drh
0576bc59a7
Refactor With.a.zErr into With.a.zCteErr. No logic changes.
...
FossilOrigin-Name: 58ba73630ecc4bc58b03a7962dd45b305ef605ef
2015-08-26 11:40:11 +00:00
drh
8981b904b5
Enhance the CREATE VIEW syntax so that the names of columns of the view can
...
be specified after the view name.
FossilOrigin-Name: d794b34da6f9c77dfe17773b0b17b22de72cce7f
2015-08-24 17:42:49 +00:00
drh
38978dd4ed
Do not apply the WHERE-clause pushdown optimization to terms that originate
...
in the ON or USING clause of a LEFT JOIN. Fix for ticket
[6df18e949d3676290].
FossilOrigin-Name: 351bc22fa9b5a2e50da3583a882c5aa390bda19f
2015-08-22 01:32:29 +00:00
drh
c1bd84124b
Merge recent enhancements from trunk, including table-valued expressions.
...
FossilOrigin-Name: b9927c876c1d4e146cb6a603d82cd2489594084d
2015-08-20 23:45:59 +00:00
drh
8a48b9c0b1
Minor refactor of the SrcList object so that it is able to hold the argument
...
list to a table-valued-function in the FROM clause.
FossilOrigin-Name: b919376147597c4b73421abe5788f893baf1560b
2015-08-19 15:20:00 +00:00
drh
bec2476afc
Merge in all the trunk changes from the previous year. This breaks the
...
cursor-hint mechanism, but provides a baseline for trouble-shooting.
FossilOrigin-Name: 82a7a61bc0883b1e7432548e4890791717aa1bb3
2015-08-13 20:07:13 +00:00
mistachkin
89b31d73a6
Fix compilation issues with SQLITE_OMIT_COMPOUND_SELECT defined.
...
FossilOrigin-Name: 9c39d4644530ccc532f4ff26464106c6da43269a
2015-07-16 17:29:27 +00:00
drh
b63ce02f57
Do not allow recursive CTEs that use aggregate queries in the recursive part.
...
FossilOrigin-Name: 6d2999afbc25b9c238e4028f637c10eaaf0ec75e
2015-07-05 22:15:10 +00:00
mistachkin
c29cbb0bec
Fix harmless compiler warnings and one macro VVA_ONLY macro usage issue.
...
FossilOrigin-Name: bcc8a75509aafda61feb6dcc074668c79611a662
2015-07-02 16:52:01 +00:00
drh
9c7c913cd6
Cache the sqlite3_context structure in the P4 operand of VDBE programs
...
for faster SQL function dispatch.
FossilOrigin-Name: 2abc44eb3b9d489321baa50bc25e17dafbda3687
2015-06-26 18:16:52 +00:00
drh
2ec18a3cce
Mark some branches as unreachable after the recent change that recognizes
...
mismatch result set sizes on compound SELECT statements sooner.
FossilOrigin-Name: c8d1f305b6e9dfc36b8e3f4ab92de4457884d903
2015-06-23 23:31:52 +00:00
dan
923cadb1ae
Test that the left and right sides of a compound SELECT operator have the same number of expressions in the expanded expression list before beginning to generate code.
...
FossilOrigin-Name: 4df852ce26c95d5d23c83dbe9c59d2c3435acddf
2015-06-23 12:19:55 +00:00
drh
606f2344e9
Pervent the likelihood() function from moving ON clause terms of a LEFT JOIN
...
into the WHERE clause.
Fix for ticket [5f60b11fc8e23490e2]
FossilOrigin-Name: ed96e14adce4a4f94cc6838c46bc97937c4cb72a
2015-06-18 14:32:51 +00:00
drh
38b4149ca1
Factor out the TreeView parse tree printing module into a separate file.
...
FossilOrigin-Name: c32ce54ca46a4be4373983be6fd44b1f3a0250d1
2015-06-08 15:08:15 +00:00
drh
b121dd14ac
Code simplifications in select.c and where.c.
...
FossilOrigin-Name: 4f20ac90bce8bd7ba43ef59af5cc4ef7aa282fe8
2015-06-06 18:30:17 +00:00
drh
adc57f6834
Minor cleanup of the sqlite3Select() procedure.
...
FossilOrigin-Name: f4c90d06bb941453d8110680c7b279e471e8f034
2015-06-06 00:18:01 +00:00
drh
4490c40b90
Split FROM-clause subquery flattening and code generation into separate loops.
...
FossilOrigin-Name: be8e3fc70e4c13b28b07985df3457960f58ffddd
2015-06-05 22:33:39 +00:00
drh
bc8edba10a
Provide one final Select tree dump prior to WHERE clause analysis
...
when ".selecttrace 0x400" tracing bit is set with SELECTTRACE_ENABLED.
Analysis and debug changes only - normal builds are unaffected.
FossilOrigin-Name: 283bf0b64da7acc5aa5812fc659954965002d409
2015-06-05 20:27:26 +00:00
drh
d62fbb50e6
Change the name of SrcList.a[].zIndex to the more descriptive
...
SrcList.a[0].zIndexedBy.
FossilOrigin-Name: 6a9cf063379118dbb95c6cdc6d60af50e9867177
2015-06-04 12:08:53 +00:00
drh
4c393a82df
For FROM-clause subqueries that cannot be flattened, try to push relevant
...
WHERE clause terms of the outer query down into the subquery in order to help
the subquery run faster and/or use less memory.
FossilOrigin-Name: 6df18e949d3676290785143993513ea1b917d729
2015-06-02 18:09:18 +00:00
drh
05883a3409
Rename SQLITE_AFF_NONE to SQLITE_AFF_BLOB.
...
FossilOrigin-Name: bce3f04186cd2d69414a5a98b5b77dc8f060554a
2015-06-02 15:32:08 +00:00
drh
69b72d5a29
For FROM-clause subqueries that cannot be flattened, try to push WHERE clause
...
terms of the outer query down into the subquery in order to help the subquery
run faster and/or use less memory.
FossilOrigin-Name: 297fae7551a2af9e600d833801ff79fca0602ad5
2015-06-01 20:28:03 +00:00
drh
7cea7f95c7
Using "SELECT ALL" instead of just "SELECT" on a query that uses a single
...
unflattenable subquery or view in its FROM clause will force the subquery to
be manifested into a temporary table rather than run incrementally using a
co-routine. This is a stop-gap means of controlling the decision to manifest
while we try to work out a better to make that decision automatically.
FossilOrigin-Name: a29e117d7ecec05da949348689dbfb0d3acb1280
2015-05-29 01:35:19 +00:00
drh
fccda8a162
CTEs have never add working rowids. So disallow the use of the "rowid" column
...
within CTEs.
FossilOrigin-Name: 0055df0445932a43e42b318ef88672dcbe312c3a
2015-05-27 13:06:55 +00:00
drh
521d7bd214
Remove an incorrect and pointless assert().
...
FossilOrigin-Name: 8c3929bd42ff9c041df341aced5b7dbc0f563506
2015-05-25 09:33:48 +00:00
drh
e2248cfd2d
The SRT_Table type for the SelectDest object is now just an SRT_EphemTab for
...
which the ephemeral table has already been allocated.
FossilOrigin-Name: b9727e6bbfc3c62c601227e86e62f2f39792fd1d
2015-05-22 17:29:27 +00:00
drh
7f0cd09cdd
Enhance the selecttrace display by showing Select.selFlags.
...
FossilOrigin-Name: 45d3893c6142ee1dfed48e26a13cf547da12468a
2015-05-19 23:56:07 +00:00
drh
df553659ad
Make a hard copy of the results of a subquery lest the result of the
...
subquery be referenced after a change to the table that generated the subquery
result.
FossilOrigin-Name: 9c0d80907b4dee8ee8f205c2ebdb759f5ba1d771
2015-05-18 04:24:27 +00:00
drh
9af8646dce
Fix a faulty assert() in the SELECT code generator and add a test case
...
to prevent regression.
FossilOrigin-Name: 1421c8ffba179d6aafa2643012f80a2738779117
2015-05-04 16:09:34 +00:00
drh
c049057242
Cleanup of the sqlite3StrAccumInit() function. No functionality changes.
...
FossilOrigin-Name: 7952c32268aa650d9ee946d5bfe190f712e3bbe6
2015-05-02 11:45:53 +00:00
drh
1cb50c880e
Alternative fix for the double-initialization of type and collating sequence
...
problem that leaves the estimated table size intact.
FossilOrigin-Name: 623ddbdbf48d26dac58c593bcb9e7b184334ddfc
2015-04-21 17:17:47 +00:00
drh
dfb5e1cbc6
Make sure the datatype and collating sequence of transients tables are
...
not initialized more than once. Otherwise a memory leak results.
FossilOrigin-Name: 9e6beda2c8d879e438ee933e658f860d6eb42a20
2015-04-21 17:07:01 +00:00
drh
be360e1ed1
Fix a memory leak in the SELECT code generator tracing logic (code that is
...
omitted in non-debugging builds).
FossilOrigin-Name: b623ebd859dcb1d99398aa9953f6b113bad26304
2015-04-21 16:09:07 +00:00
dan
4b79bde7a2
Fix an obscure problem with "INSERT INTO tbl(cols) SELECT" statements where the SELECT is a compound with an ORDER BY and "cols" is a strict subset of tbl's columns.
...
FossilOrigin-Name: 718d5d0eab045a874107e078a857226a80ab912d
2015-04-21 15:49:04 +00:00
drh
7c052da54d
Change an assert() in the aggregate query code generator into a testcase().
...
FossilOrigin-Name: d1e6bc918b0c8e0701f5e15afb91b84a9004231b
2015-04-21 15:16:48 +00:00
drh
c50c8f4043
Remove an ALWAYS() that turns out to be false when there is a semantic
...
error on a compound SELECT.
FossilOrigin-Name: ad67a67c03078a2bc65d28f2b880b29bf02067c1
2015-04-17 16:12:03 +00:00
drh
b8289a8b00
Fix a faulty assert() in sqlite3SelectNew().
...
FossilOrigin-Name: 620d19c3b462f5c4763ebd26513321431f21dd72
2015-04-17 15:16:58 +00:00
drh
a276e3fd4d
Fix a faulty assert() in the compound-SELECT code generator.
...
FossilOrigin-Name: 10715b05f2201a63dca317f99ce39d3ce182e182
2015-04-16 16:22:27 +00:00
drh
6736618a8f
Fix a faulty assert() in the compound select code generator.
...
FossilOrigin-Name: 9d336be1b16aa9bd5c9e4132bb645874993c7d96
2015-04-16 14:33:35 +00:00
drh
772460fd4c
Improvements to the way VALUES clauses are parsed.
...
FossilOrigin-Name: ec5a493ad27593ca78899b3001630c1898b940ff
2015-04-16 14:13:12 +00:00
dan
5b1c07e7fb
Ensure the sqlite3Select() routine always returns non-zero if an error has occurred.
...
FossilOrigin-Name: b51028ed2f57f4245a7ebd9bdb99d1bcfaf1a01b
2015-04-16 07:19:23 +00:00
drh
3dc4cc66b3
Change the multiSelectOrderBy() routine to return non-zero if there has
...
been any prior error.
FossilOrigin-Name: 14784c317bff05dd0a74e2596432dfd12c139391
2015-04-15 07:10:25 +00:00