Commit Graph

37 Commits

Author SHA1 Message Date
drh
93a960a0a8 Remove unused code. Test coverage enhancements. Modify the algorithm used
to select column names for VIEWs of joins so that the constructed column
names omits the underlying table names. (CVS 5386)

FossilOrigin-Name: 636cd723296a8b1709011fdd99b236ffddf3f1b0
2008-07-10 00:32:42 +00:00
danielk1977
daf79acb68 Call the query flattener while processing the parent query. Previously, it was called while processing the sub-queries. (CVS 5330)
FossilOrigin-Name: 6fcb3bffe26ae1c21c72ce9019f1db1c118094a4
2008-06-30 18:12:28 +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
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
fdd48a76a6 Add support for IF EXISTS on CREATE/DROP TRIGGER/VIEW. Ticket #1899. (CVS 3406)
FossilOrigin-Name: e4fe736cfbbdc081581911a01690576034877b72
2006-09-11 23:45:48 +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
923782530b SQLite now always chooses the column names for compound selects using
the left-most select.  This makes SQLite work like other SQL database,
but it also is a change from historical behavior and may break some
scripts.  Ticket #1721. (CVS 3153)

FossilOrigin-Name: 80cda9f7ce83f2de6cd2fdaf6150bbc35b670fee
2006-03-26 01:21:22 +00:00
drh
643054c18b Correct names returned from a query against a view. Ticket #1709, #1688, #1711. (CVS 3128)
FossilOrigin-Name: 36830fafa405c9eae4795045efc6843394c67555
2006-03-09 17:28:12 +00:00
drh
fb8de2dc07 Detect circularly defined views and issue an error message. Ticket #1658. (CVS 3055)
FossilOrigin-Name: f5341529d0cdbd63ce4c33606858158b6093969a
2006-02-05 18:55:20 +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
drh
85c23c61e2 Increased test coverage. Some malloc tests now fail though this is believed
to be an instrumentation problem not a real error. (CVS 2604)

FossilOrigin-Name: f786f37a5e31f42aaf81b3ad4a734f12855da69e
2005-08-20 03:03:04 +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
7c3d64f151 Do not allow parameters in VIEW definitions. Ticket #1270. (CVS 2492)
FossilOrigin-Name: 0d46289f02aad526f462a3ceceb1bca1b9f6a543
2005-06-06 15:32:08 +00:00
danielk1977
142bdf4051 Respect collation sequences in views. Ticket #1088. (CVS 2291)
FossilOrigin-Name: 9843c0dd795ceda3c260986f95b101a0cbc7cf64
2005-01-30 11:11:44 +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
danielk1977
e61b9f4f3c Modify test scripts to work when SQLITE_OMIT_SUBQUERY (but no other OMIT macros) is defined. (CVS 2252)
FossilOrigin-Name: d4e19efcef68d834c55c7d496cdb3696d63a31a2
2005-01-21 04:25:47 +00:00
danielk1977
27c774388a Ensure tests pass when SQLITE_OMIT_COMPOUND_SELECT is defined. (CVS 2138)
FossilOrigin-Name: 007be591b7829f9ff38e4b14ba5a5043796c2ff3
2004-11-22 13:35:41 +00:00
danielk1977
0fa8ddbdec Modify test suite to work when SQLITE_OMIT_VIEW is defined. (CVS 2132)
FossilOrigin-Name: 711e8d7695dfc74b3f1ee00591dcdda2cd7fc7d5
2004-11-22 08:43:32 +00:00
drh
6bf895708c Update tests to work even if some features of the library are disabled. (CVS 2050)
FossilOrigin-Name: b11fc9b3f3a2711f98e7e45724aa1d30081197f3
2004-11-03 16:27:01 +00:00
drh
2c61c070d2 Correct handling of views on tables with quoted column names. Ticket #756. (CVS 1826)
FossilOrigin-Name: 8ac5a8ad5eec381585adb6812fc39a1a30aee4c1
2004-07-20 00:20:23 +00:00
drh
ef4ac8f9df Change the name of the TCL command from "sqlite" to "sqlite3" so that both
SQLite version 2 and SQLite version 3 can be used by Tcl at the same time. (CVS 1626)

FossilOrigin-Name: d705d051bed2b92b6c3bbcc75fe5b056633b9c31
2004-06-19 00:16:31 +00:00
drh
f26e09c87f Tighter binding of views, triggers, and indices to their respective
databases.  Ticket #323.  Much more testing needs to be done to the
sqliteFix...() routines in attach.c. (CVS 990)

FossilOrigin-Name: 7202d4f1a8853368954a967b7ccca9d8a6645a2e
2003-05-31 16:21:12 +00:00
drh
c31c2eb82c Enhance the query flattener to handle subqueries that are joins.
All regressions pass but new tests need to be added before release.
Ticket #272. (CVS 948)

FossilOrigin-Name: ad57693e9f1b83a8cc4d028264b35018a9a4a701
2003-05-02 16:04:17 +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
174b619591 Honor ORDER BY clauses in VIEWs. Ticket #193. (CVS 792)
FossilOrigin-Name: dbf7893234a6c5d6bb2d931e52080bb05784c0c9
2002-12-03 02:22:52 +00:00
drh
8c74a8ca5b Fix for ticket #136: Added the OP_RenameCursor VDBE instruction and used it
to make cursor numbers right on nested subqueries.  Also added OP_Gosub and
OP_Return but have not actually used them for anything yet. (CVS 727)

FossilOrigin-Name: c602603e7cd8dc5c8bb9db2748eacab650de5bf0
2002-08-25 19:20:40 +00:00
drh
d94a669894 Fix the memory leak introduced by check-in (725). (CVS 726)
FossilOrigin-Name: b957dafc26383af514795df18bc7b8f367c9bd21
2002-08-25 18:29:11 +00:00
drh
4b59ab5e64 Change the way token memory is allocated in an effort to fix ticket #136.
There is now a memory leak when using views of views. (CVS 725)

FossilOrigin-Name: 22d8726e61eec0e53893f492cb2163824b87a23e
2002-08-24 18:24:51 +00:00
drh
0c36cbe0c2 Fix for ticket #100: Correctly handle ON and USING clauses of JOINs within
a VIEW. (CVS 679)

FossilOrigin-Name: 93710f7ed7e1baa6acbf4bc32982e046f61ffa44
2002-07-16 02:05:43 +00:00
drh
2f2c01e51d Fix for ticket #92: Correct the sqliteExprCompare() function so that is takes
into account the iTable and iColumn fields of the Expr structure.  Otherwise,
"min(a)" and "min(b)" will compare equal to each other in views. (CVS 658)

FossilOrigin-Name: 85793a4f03250166c21007cab3525709592d0866
2002-07-02 13:05:04 +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
0f18b450ad Fix for ticket #34: VIEWs ignore their ORDER BY clause. (CVS 556)
FossilOrigin-Name: 5f22d21571acedbd6348b61445a7c408cde8d229
2002-05-08 21:30:15 +00:00
drh
0bb28106be Fix for tickets #32 and #33: Generate the names of the result set early, before
doing the flattening optimization or evaluating subqueries.  Otherwise, the
result set column names are generated incorrectly or after they are needed. (CVS 553)

FossilOrigin-Name: 08f27cb36805d38648274b6fe91dec43a5910057
2002-05-08 11:54:14 +00:00
drh
4ff6dfa7de More bugs fixed for views. (CVS 416)
FossilOrigin-Name: 813077623087ffc6cd506f57cf6d1e3d9239f806
2002-03-03 23:06:00 +00:00
drh
417be79cd1 VIEWs are bound to tables when they are used, not when they are first
entered.  This works around the problem of what to do if a table is deleted
that a view refers to. (CVS 415)

FossilOrigin-Name: 6121e5ab9328c90c64d40ade3de73ad11d4aaf4e
2002-03-03 18:59:40 +00:00
drh
ff78bd2f07 Bug fixes in the VIEW implementation. (CVS 396)
FossilOrigin-Name: 668ef6380eba256ef82477b63aef850249a619a0
2002-02-27 01:47:11 +00:00