asfernandes
c737d6a807
Create ExprNode class hierarchy.
...
Convert CONCATENATE and aggregate functions to it.
Fix some bugs:
- select sum(n) over (order by n2), sum(n) over (), n, n2 from x1;
- select (select 1 from x1 b where list(1, a.n) = 1) from x1 a;
2010-02-13 20:29:29 +00:00
robocop
446097fe8e
Be explicit, change "qualifier" to "package" in QualifiedName (needed anyway if/when schemas are added).
2010-01-27 04:32:27 +00:00
asfernandes
b68658534f
Feature CORE-2823 - Support the ORDER BY subclause for current aggregate functions (except LIST)
2010-01-23 03:02:53 +00:00
asfernandes
cf4e283f7d
Separate aggregate/union maps from window maps
2010-01-21 18:33:18 +00:00
dimitr
ebf7907918
Misc.
2010-01-20 07:34:31 +00:00
dimitr
d58907258a
Bugfix. There may be aggregations without maps.
2010-01-19 17:18:13 +00:00
dimitr
d35f6e316b
1) Simplify the explicit plan handling between the parser and the engine. It makes no sense to pass the join type as it's ignored internally.
...
2) Support hash joins in the plan output and in the parser. For the latter, it's just the syntax sugar, same as loop vs merge join (see above).
2010-01-19 09:25:29 +00:00
asfernandes
7fbee2c76b
Feature OVER (PARTITION BY ...) clause for window functions
2010-01-18 21:37:47 +00:00
asfernandes
be859980ea
Feature CORE-832 - Parameterized exceptions
2010-01-07 00:16:50 +00:00
asfernandes
63f481da40
1) Refactor the EXCEPTION statement
...
2) Cleanup DSQL nod_abort
2010-01-05 17:32:42 +00:00
dimitr
778ea0d9bf
Small refactoring (code simplification).
2010-01-03 10:33:22 +00:00
asfernandes
4750f6415e
Fix another problem in cursor handling changes
2009-12-27 16:49:23 +00:00
asfernandes
95e5fd5873
Fix problem of mixing dbkey and record version on the same internal parameter
2009-12-26 02:21:56 +00:00
asfernandes
534b8c020e
Misc
2009-12-25 19:29:58 +00:00
dimitr
2702907c88
We don't need an EOS slot for PSQL functions.
2009-12-25 11:16:20 +00:00
robocop
cd4c00ab21
Misc.
2009-12-24 10:42:32 +00:00
asfernandes
d3ac9ac6cc
More refactoring: name changes, accessors, consts, removed not good references (statement referencing scratch and metadata indirectly)
2009-12-23 00:57:08 +00:00
asfernandes
8968888820
Getters and setters for DsqlCompiledStatement and consts
2009-12-22 15:36:10 +00:00
asfernandes
50542e3f00
Make dsql_req::statement constant
2009-12-21 14:56:12 +00:00
asfernandes
6eabb1620e
Misc
2009-12-21 14:20:26 +00:00
asfernandes
985bc2db87
Separate the scratch, statement and request flags. Don't ask me why I didn't change them to bools.
2009-12-20 22:42:43 +00:00
asfernandes
488eb40fe0
Refactor DSQL, continuing the work I started in 2.5:
...
- Renamed CompiledStatement to DsqlCompilerScratch and removed inheritance to dsql_req.
- Introduced DsqlCompilerStatement, moving things from dsql_req - not completelly shareable yet.
- Make dsql_req reference a DsqlCompilerStatement. DsqlCompilerScratch may be discarded in the future.
- Replaced AlterCharSetNode usage by PreparedStatement for the default collation in database creation.
- Changed METD API.
2009-12-20 21:01:10 +00:00
asfernandes
c7a3f6f6e1
Separating run state from compiled statements
2009-12-19 21:20:36 +00:00
asfernandes
20ed875d57
Replaced linked list of dsql parameters by array
2009-12-19 18:50:38 +00:00
dimitr
b9f0242ffd
Let's transfer procedure aliases to the engine similarly to how it is done for relations. This allows more precise plan reporting.
...
I hate to waste the BLR space in such a vandal way, so I'm open to any better suggestions.
2009-12-14 11:19:26 +00:00
dimitr
7b14c3c3e2
Simplified the code, thanks to Adriano.
2009-12-10 05:11:43 +00:00
asfernandes
9ec1c36a55
Cleanup
2009-11-28 19:39:23 +00:00
robocop
f955568fc9
The architect created ODS12 and saw it was good, then he said "thy shall be the only one among your race", dropped the older ones and sent the developers to the four corners of the cyberspace to convert the masses to ODS12.
2009-11-27 02:33:40 +00:00
asfernandes
7c11f5b6b0
Misc
2009-11-22 00:09:30 +00:00
asfernandes
200a63b1b4
Reduce usage of legacy (and unsafe) nodes related to PSQL parameters and variables.
...
Use btyacc feature "inherited attributes" (kind of parameters for non-terminals).
2009-11-21 20:42:27 +00:00
robocop
9c71413426
Style.
2009-11-16 09:18:24 +00:00
asfernandes
6d3576a447
Do not generate not needed blr_derived_expr for view's fields.
2009-11-14 23:58:17 +00:00
asfernandes
7e0f76e708
Misc
2009-11-02 14:42:27 +00:00
robocop
16361cada8
Misc.
2009-11-01 10:58:16 +00:00
dimitr
5c80805bed
Cleanup.
2009-10-31 11:45:44 +00:00
dimitr
7bdb39e616
Wipe out the SCROLLABLE_CURSORS code + minor cleanup.
...
Also, surfaced scrollability for PSQL cursors (without internal support yet).
2009-10-31 06:17:49 +00:00
asfernandes
b31aaf0129
Some statements nodes refactor - creation of IfNode, ExitNode, SuspendNode, PostEventNode and SavePointNode.
2009-10-24 17:45:33 +00:00
asfernandes
ed0e0daeb3
- External Engines implementation.
...
- Plugins API.
- Feature CORE-2700 - UDR (User Defined Routines) Engine - C++ API supporting functions, triggers and stored procedures.
- Feature CORE-2470 - Support for alternate format of strings literals.
- Feature CORE-2310 - DDL triggers.
- Feature CORE-2312 - PSQL Packages.
- Feature CORE-1209 - CONTINUE statement.
- Feature CORE-1180 - DDL syntax to change (not) nullable state of columns.
- Feature CORE-2090 - Support OVER () clause with current aggregate functions.
- Fixed CORE-2699 - Common table expression context could be used with parameters.
- Introduce ODS 12.0.
- Work in progress in type-safe parser.
- Refactor some DDL commands (procedures and triggers) from DYN to DdlNodes.
- Refactor virtual tables to use a class hierarchy instead of namespaces. This is basic thing, not based on the changes done in Vulcan. Window functions is based on this work.
- Refactor COMMENT ON and DROP FUNCTION from DYN to DdlNodes. COMMENT ON do not use GDML anymore, it uses DSQL with PreparedStatement class.
- Refactor EXECUTE BLOCK to StmtNodes.
- Refactor the IUDF to SysFunctions. That eliminates RDB$GET_CONTEXT and RDB$SET_CONTEXT from RDB$FUNCTIONS.
2009-10-21 00:42:38 +00:00
asfernandes
f590889311
Fixed CORE-2607 - Introducer (_charset) problems with monitoring and persistent modules
2009-08-30 02:26:50 +00:00
asfernandes
88495f2e92
Fixed CORE-2584 - Wrong results for CASE used together with GROUP BY
2009-08-06 02:32:56 +00:00
hvlad
9a749a272f
Implement improvement CORE-2452 : Add Role Name in input parameters for EXECUTE STATEMENT
2009-05-14 10:21:47 +00:00
asfernandes
c986de33a2
Misc
2009-04-22 01:58:40 +00:00
robocop
74537636b9
Comments.
2009-04-18 14:13:26 +00:00
robocop
b627ad2a39
Style.
2009-01-07 09:30:57 +00:00
robocop
8dca837420
Style.
2009-01-06 05:53:34 +00:00
asfernandes
41b4b3ab8d
Fixed CORE-2227 - Problem with column names with Accents and triggers.
...
Thanks to Alex for makefile fixes!
2008-12-08 23:45:23 +00:00
asfernandes
db82e7cd6b
Misc
2008-11-06 00:23:21 +00:00
alexpeshkoff
d8ea120ded
AIX port - use FB_ prefix for alignment constants
2008-11-05 11:26:23 +00:00
asfernandes
774635c3a9
Fixed another case for CORE-1246 - Incorrect column values with outer joins and derived tables:
...
select t2.n
from rdb$database t1
left join (
select 11 n
from (
select 0 a
from rdb$database
) x1
) t2
on 1 = 0
;
was returning 11.
2008-10-04 02:48:35 +00:00
robocop
0c85fac2d4
CORE-1799: improve the almost useless "expression evaluation not supported" error message.
...
Did the DSQL part for now.
2008-09-27 09:51:53 +00:00
asfernandes
b550749a47
Fixed CORE-1246 - Incorrect column values with outer joins and derived tables
2008-09-07 19:44:48 +00:00
robocop
a6d4e3de82
Misc.
2008-09-03 12:18:59 +00:00
asfernandes
139e4f8ca9
Misc
2008-09-03 02:26:45 +00:00
asfernandes
9150e6f4f2
This should fix regressions related to fixes of:
...
CORE-501 - Optimization problem with COALESCE
CORE-1343 - Bug with a simple case and a subquery
CORE-2041 - update or insert with gen_id() with wrong generator value
And should fix this one (snapshot build bug):
CORE-2051 - don't work subquery in COALESCE
2008-09-01 13:18:02 +00:00
robocop
92f2d1dc1b
Misc.
2008-08-26 10:28:58 +00:00
asfernandes
e54682efa0
Fixed CORE-1343 - Bug with a simple case and a subquery
2008-08-21 01:58:53 +00:00
asfernandes
b910161f82
Fixed CORE-501 - Optimization problem with COALESCE
2008-08-20 01:54:45 +00:00
asfernandes
736659c1a1
Misc
2008-08-16 15:42:38 +00:00
asfernandes
5d4084d30c
Fixed CORE-2041 - update or insert with gen_id() with wrong generator value
2008-08-15 16:32:42 +00:00
alexpeshkoff
1785fb6ee3
fixing CORE-1964: Use of 0 instead of isc_arg_end to terminate list of ERR_post's (and cousines) arguments is invalid
...
finished cleanup of vararg in error diagnostics in DSQL
2008-08-15 11:21:47 +00:00
asfernandes
45786da3bc
Misc
2008-07-06 16:42:52 +00:00
robocop
1d7bc9916b
Misc.
2008-07-03 07:12:36 +00:00
robocop
1ffc7a2291
Misc.
2008-07-02 09:46:44 +00:00
asfernandes
ce4bf91533
Misc
2008-07-01 01:12:02 +00:00
alexpeshkoff
a2e416210b
Fixed CORE-1964: Use of 0 instead of isc_arg_end to terminate list of ERR_post's (and cousines) arguments is invalid.
...
Also cleaned up use of gds__log() in a few places.
2008-06-26 09:47:59 +00:00
asfernandes
d30d6410ea
Misc
2008-06-13 01:42:58 +00:00
robocop
30b5480c66
Move the new EXEC STMT functionality to a separate function.
2008-06-12 09:02:54 +00:00
hvlad
66fd7d5488
Make blr_exec_stmt extensible in the future.
...
Sorry, recompile of stored objects using new EXECUTE STATEMENT is necessary. Hope the last time ;)
2008-06-10 22:43:30 +00:00
dimitr
c639285420
Fixed the Linux build.
2008-06-10 03:31:19 +00:00
hvlad
5d9c430674
Implemented improvement CORE-1928 : Allow EXECUTE STATEMENT to inherit access privileges of caller stored procedure or trigger.
...
Allow to specify EXECUTE STATEMENToptional clauses in any (not fixed) order.
Use INTERNAL_PROVIDER for access to the current database by another user too.
2008-06-08 20:42:27 +00:00
asfernandes
552f58dd48
Misc
2008-06-06 02:25:35 +00:00
robocop
07c087094d
Mostly remove useless parentheses.
2008-06-03 06:14:59 +00:00
asfernandes
0d979e5b92
Misc
2008-05-28 02:11:00 +00:00
robocop
88859fdc51
Make operations a bit faster by enabling the vector to add an array of values in a single pass (the same idea as insert's overloaded version).
2008-05-25 12:16:20 +00:00
asfernandes
d4bf9ab246
Split dsql_req into dsql_req and CompiledStatement. This should be my last refactoring to 2.5:
...
- dsql_req becomes a running request;
- CompiledStatement is derived from dsql_req. The compilation state previously in dsql_req comes to here;
- Rename many "request" parameters to "statement" where type is changed from dsql_req to CompiledStatement.
This changes makes easy the path to support compiled statement cache.
2008-05-24 03:19:52 +00:00
asfernandes
d52dc96278
1) Move the new Node classes to appropriate files
...
2) Creation of StmtNode
3) Conversion of IN AUTONOMOUS TRANSACTION to InAutonomousTransactionNode (inherited from StmtNode) - it makes this feature almost self-contained
Please do a boot build or at least run blr_table.
2008-05-19 13:47:48 +00:00
hvlad
48f8d0ff80
Correct my mistake
2008-04-17 10:47:31 +00:00
hvlad
23dad7416f
Generate old blr codes (blr_exec_sql or blr_exec_into) if given EXEC STMT statement is compatible with old syntax. Per Adriano request.
2008-04-16 13:08:51 +00:00
robocop
4580126101
Do not use flags for values that are exclusive (can't be combined).
2008-04-16 10:38:08 +00:00
asfernandes
6e59d736df
1) Fix Linux build
...
2) Misc
2008-04-11 01:38:50 +00:00
asfernandes
0e8febd6e3
Misc
2008-04-10 02:35:30 +00:00
hvlad
fe3f8c184b
New EXECUTE STATEMENT with support of external data source implementation
2008-04-09 20:18:47 +00:00
dimitr
580544fbd7
More changes targeted to a better error diagnostics.
2008-04-04 10:01:06 +00:00
dimitr
e0feb6e228
Misc.
2008-04-01 12:56:30 +00:00
dimitr
30f7cce178
Fixed CORE-1811. A solution is to move the validation code from GEN to PASS1 in order to catch bad things earlier. This differs from the SAS solution, but hopefully it's more generic.
2008-04-01 06:11:29 +00:00
asfernandes
2e8bd421dc
Cleanup: do not replicate attachment charset info in DSQL
2008-03-01 19:32:16 +00:00
asfernandes
f49017d2ff
Misc
2008-03-01 15:08:11 +00:00
dimitr
99caa91b85
DSQL integration into the engine.
2008-02-28 13:48:16 +00:00
dimitr
c7db4d6a64
Get rid of DsqlMemoryPool.
2008-02-20 15:24:21 +00:00
alexpeshkoff
39896cb955
Fixed CORE-1671: atexit() calls in client libraries cause segfaults
...
and CORE-1079: Every attach of fbclient/fbembed library leaks 64KB of memory
To do it:
- created new template GlobalPtr, controlling access to destructors of global objects.
- applied it to global objects.
Also some related cleanup.
2008-01-23 15:52:40 +00:00
dimitr
eac5ac337b
The merge continued.
2008-01-16 06:52:43 +00:00
hvlad
2b47bbe55b
Revert files back after wrong commit
2007-11-19 00:21:18 +00:00
hvlad
86f1141328
Execute statement with support of external data source
2007-11-18 22:59:20 +00:00
alexpeshkoff
407cf7e1d8
Changes suggested by Claudio and Adriano. Further cleanup
2007-10-19 11:51:58 +00:00
alexpeshkoff
e4271ba6fa
Fixed CORE-1501: Wrong access to SLONG data in dsql_nod
2007-10-17 14:35:31 +00:00
asfernandes
8c202cdd61
Fixed CORE-1378 - Domain names and charset issues
2007-07-24 16:28:08 +00:00
hvlad
671e59e993
Fixed bug CORE-1373 : Incorrect result of recursive CTE query when recursive member's SELECT list contains expression using self-referenced fields
2007-07-21 21:28:56 +00:00
robocop
5c152e5cfe
Misc.
2007-07-08 08:43:30 +00:00
asfernandes
379ebc9ab6
Misc
2007-07-01 02:40:15 +00:00
hvlad
77a5e7498c
Improve implementation of nod_src_info to avoid generation of additional blr_begin\blr_end pair
2007-06-29 10:22:50 +00:00