asfernandes
96f2829728
Refactor nod_map and nod_sort to type-safe MapNode and SortNode
2010-08-29 18:20:44 +00:00
dimitr
f1b959694c
Fixed the engine crash caused by the recent refactoring.
2010-08-28 08:52:37 +00:00
dimitr
e7c44824e6
Fixed a few suspicious places related to the variable cloning.
2010-08-25 08:02:21 +00:00
asfernandes
e736c7d15c
Misc
2010-08-25 00:42:17 +00:00
asfernandes
0ce8cb6f2f
Correction
2010-08-24 16:26:20 +00:00
asfernandes
48d83b8fef
Refactor nod_rse, nod_relation, nod_procedure, nod_union, nod_aggregate and nod_window.
2010-08-24 03:25:01 +00:00
asfernandes
18a6a6b4f9
More consts
2010-08-13 15:22:00 +00:00
asfernandes
dadc0f560c
Const correction for EVL, EXE and they subsystems. Adjustments to CMP and OPT.
2010-08-09 15:48:51 +00:00
asfernandes
7adb129d37
Frontport fix for CORE-3094 - Parameters doesn't work with NOT IN from a selectable procedure
2010-08-04 15:50:26 +00:00
alexpeshkoff
f28f040e0f
Fixed CORE-3024: Error "no current record for fetch operation" after ALTER VIEW (and a lot of other possible inconsistencies)
2010-06-15 12:27:33 +00:00
asfernandes
4763533669
Refactor jrd_req into JrdStatement (shared part) and jrd_req (execution of a statement).
...
Fixed some bugs found in the way.
2010-04-18 22:19:11 +00:00
asfernandes
39498cb65b
Use AutoCacheRequest in all cacheable system requests. Fixes some request leakages.
2010-04-18 15:04:52 +00:00
dimitr
3c0def2549
I believe this limit should also be unconditional.
2010-04-15 18:09:50 +00:00
dimitr
4c86c50c11
Misc.
2010-04-15 16:12:39 +00:00
dimitr
1e2edd445d
Reworked the rsb/cursor logic a bit. Now I don't think sub-queries should be cursors.
2010-04-15 16:10:51 +00:00
alexpeshkoff
88b8a40a04
1. Cleaned up most of SUPERSERVER usage.
...
SUPERSERVER has 4 different meanings in our code:
- this is milticlient server (replaced with Config::getMultiClientServer())
- use shared data cache (replaced with Config::getSharedCache())
- use shared metadata cache (replaced with macro SHARED_METADATA_CACHE)
- database are NOT shared between processes (replaced with getSharedDatabase())
2. Use fb_smp_server as both superclassic and classic binary on posix
(xinetd autodecection is done).
3. Small posix build cleanup.
2010-04-15 14:40:27 +00:00
dimitr
4eedf7d29e
Cleanup.
2010-04-14 08:30:29 +00:00
asfernandes
3387c9c288
Move impure area and rpbs to their own arrays
2010-04-09 15:43:48 +00:00
asfernandes
0762519962
Misc
2010-04-09 00:53:31 +00:00
asfernandes
ae34c52bae
Misc
2010-04-08 15:49:46 +00:00
dimitr
c030d0f939
Let's consistently handle offsets as unsigned integers.
2010-04-08 12:17:54 +00:00
asfernandes
08b84aee0f
Misc
2010-04-05 18:56:02 +00:00
asfernandes
fe9bf02848
Refactor user and system functions nodes
2010-04-05 18:43:11 +00:00
robocop
ac551e2b71
Cleanup.
2010-04-04 08:52:10 +00:00
asfernandes
e1ba33a2ae
Fix problem of the system transaction storing pointer to random or already deallocated attachment. Full build (or kind of) required.
2010-04-02 21:48:15 +00:00
dimitr
12c5597118
This line is redundant, because the RSE contents (its fixed part) is copied by value right above.
2010-03-24 09:10:44 +00:00
asfernandes
2ed85aef29
Misc
2010-03-21 23:01:30 +00:00
dimitr
90b128d6b6
Fixed CORE-2890: SQLSTATE should also be available as a PSQL context variable like GDSCODE/SQLCODE.
...
To be later backported into v2.5.1, I suppose.
2010-03-21 07:29:58 +00:00
dimitr
437ea7a1f6
Cleanup.
2010-03-19 20:10:19 +00:00
dimitr
63bedffa71
Refactored the sorter into a proper class.
...
Removed some dead code and unused files.
2010-03-16 11:19:29 +00:00
robocop
be3660d221
Misc.
2010-03-07 04:30:35 +00:00
asfernandes
e079a8fb43
Fixed CORE-2893 - Expression in a subquery in WHERE is treated as invariant and produce incorrect results
2010-02-28 00:40:03 +00:00
asfernandes
c27e61571f
Frontport fix for CORE-2886 - Query with "NOT IN <subselect from view>" fails
2010-02-27 18:24:26 +00:00
asfernandes
ee2cc13aba
Misc
2010-02-24 00:37:04 +00:00
robocop
47d09db742
Reduce copy/paste.
2010-02-23 04:32:09 +00:00
asfernandes
82fe06ed9a
Refactor FOR statement and SELECT...INTO. Indirectly (blr_for), JRD side of standard SELECT is affected as well.
2010-02-22 16:00:49 +00:00
asfernandes
4f9b9161b4
Feature CORE-2006 - SUBSTRING with regular expression (SIMILAR TO) capability
2010-02-21 01:47:54 +00:00
robocop
54507b1048
Misc (formatting).
2010-02-15 05:40:20 +00:00
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
3b5a0fdae5
The way AccessItem instances were ordered was a hack that sooner or later would fail when adding more object types (that now have ACLs but we still don't enfornce them). Further, comparing numbers is faster than comparing strings.
2010-02-13 08:31:16 +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
robocop
1d87d749f0
Misc.
2010-01-26 08:20:27 +00:00
asfernandes
ad10992404
Fix external datasources
2010-01-24 17:35:10 +00:00
asfernandes
a1e1df8194
Refactor the cmp/copy function due to its different usage scenarios
2010-01-20 16:27:29 +00:00
asfernandes
88d0e557ca
Err...
2010-01-20 01:32:30 +00:00
asfernandes
dc26e34e12
Fix bug with non-trivial partition expressions
2010-01-20 01:13:14 +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
9c1bab1793
Feature CORE-1385 Identity columns - in its basic form
2010-01-13 19:14:15 +00:00
asfernandes
63f481da40
1) Refactor the EXCEPTION statement
...
2) Cleanup DSQL nod_abort
2010-01-05 17:32:42 +00:00
asfernandes
82ccb81d3b
Unify even more procedure and function handling. While at it, fix a wrong access to req_procedure when validating function.
2009-12-30 01:40:39 +00:00
asfernandes
d8c99a9be2
1) Make procedures and functions member of the same hierarchy (Routine class)
...
2) Some completion for external functions
2009-12-27 22:05:22 +00:00
robocop
0564019d2f
Misc and cleanup.
2009-12-24 11:48:17 +00:00
asfernandes
dd6331f002
Some fixes; Misc.
2009-12-22 00:08:49 +00:00
dimitr
debe65bcfb
Support for PSQL functions (other JRD changes). Still work in progress.
2009-12-21 17:43:01 +00:00
dimitr
cc8794d02f
Cleanup.
2009-12-15 12:25:44 +00:00
dimitr
6162602e53
Set up the ANY/ALL boolean at the compile time instead of runtime.
2009-12-13 08:17:32 +00:00
dimitr
d09fba5ebd
Fixed (hopefully) CORE-2798: Incomplete plan output (lack of view names) when selecting from views containing procedures inside.
2009-12-10 14:47:52 +00:00
dimitr
7b14c3c3e2
Simplified the code, thanks to Adriano.
2009-12-10 05:11:43 +00:00
asfernandes
925bcc9cf6
Misc / warnings
2009-12-10 00:02:01 +00:00
dimitr
11495a55fb
Refactored the whole RSB stuff into classes. They're inside the /recsrc sub-directory now.
...
Fixed the layering for WITH LOCK and (partially) ANY/ALL predicates.
Cleaned up the outdated code that never worked (mapping DISTINCT to an index, some VMS remainings).
Wiped out a lot of the pre-ODS11 optimizer logic. Some minor adjustments there.
Re-implemented the full outer join from scratch. This resolves CORE-2678 (full outer join cannot use available indices).
Resolved CORE-2796: DB_KEY is always zero for external tables.
Implemented the core part of the scrollable PSQL cursors. Implementation is still incomplete, but ready for testing.
Some other changes I don't recall at the moment ;-)
WARNING! The engine may be unstable. Please email me about any issues found.
2009-12-09 18:45:44 +00:00
asfernandes
9ec1c36a55
Cleanup
2009-11-28 19:39:23 +00:00
robocop
c1d4a1cc8e
Comments.
2009-11-20 09:19:50 +00:00
robocop
c3298fd6be
Style.
2009-11-20 07:03:20 +00:00
robocop
1386adcf90
Style.
2009-11-16 08:06:31 +00:00
asfernandes
f2cd6b7ec2
Misc
2009-11-12 01:38:48 +00:00
asfernandes
87e274b76a
Misc
2009-11-06 01:21:14 +00:00
alexpeshkoff
513a44ba40
Fixed CORE-2578: select rdb$db_key from a view with a more than 1 table joined, results in conversion error
2009-11-05 16:23:07 +00:00
dimitr
5ae7b7f340
Cleanup.
2009-10-31 11:08:11 +00:00
dimitr
e6909de7f7
Wipe out the SCROLLABLE_CURSORS code + minor cleanup.
...
Also, surfaced scrollability for PSQL cursors (without internal support yet).
2009-10-31 06:25:01 +00:00
robocop
07dc116ed2
Misc.
2009-10-30 10:50:59 +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
870e35d120
Argh. Fix for the second time problem with line endings
2009-10-15 16:13:40 +00:00
asfernandes
da2f4c2b6d
Added some debug code to cmp
2009-10-15 16:06:22 +00:00
dimitr
c175687923
Misc.
2009-10-02 19:16:36 +00:00
dimitr
8e36474f76
More explicit (and shorter) life-time for sort blocks. Now they belong to either requests (user sorts) or transactions (index sorts).
...
This also resolves CORE-2477: mon$memory_usage: Sorting memory should be reported as owned by the statement.
2009-09-04 06:11:55 +00:00
asfernandes
82b6f6a794
Fixed CORE-2612 - Connection lost immediatelly after compiling procedure with RPAD system function
2009-08-31 15:28:07 +00:00
robocop
e90fc8d63f
Change the interface again. Please full rebuild (although the many recent changes to common.h almost qualify as full rebuild).
2009-08-05 12:30:32 +00:00
asfernandes
4759973045
Fixed CORE-2576 - Server may crash parsing wrong or truncated BLR
...
Full rebuild required - CMP_compile2 prototype changed
2009-08-02 04:10:07 +00:00
asfernandes
5063bafc36
Misc
2009-07-15 03:13:16 +00:00
dimitr
468b31fddd
1) Let the collation existence locks respect the database shutdown. In particular, let's distinguish between "releasing" and "destroying" the lock.
...
2) Explicitly invalidate and release the cached system requests.
2009-07-13 19:45:08 +00:00
alexpeshkoff
fe4aec8a12
Fixed CORE-2550: Bus error when working with DB_KEY on bigendian machines. Introduced dtype_dbkey inside engine.
2009-07-09 14:04:42 +00:00
asfernandes
8a94ecf6bc
Misc
2009-06-29 02:06:00 +00:00
robocop
f10e1b72eb
Style.
2009-06-27 06:23:36 +00:00
asfernandes
158a05c78d
Misc
2009-05-10 15:23:31 +00:00
robocop
66b1227b22
Unused params, some formatting, cleanup.
2009-05-01 17:21:36 +00:00
robocop
2d7cb94844
Unused params
...
Some BLR checks
2009-04-28 13:08:04 +00:00
robocop
a730fbf074
Get rid of more typedefs.
2009-04-03 10:07:55 +00:00
robocop
fab6a3a6cf
Get rid of superflous parentheses.
2009-02-28 11:57:40 +00:00
asfernandes
517f426392
Misc
2009-02-15 18:05:38 +00:00
asfernandes
b4c98c27a5
Fixed the ALL Regression reported by Bill (CORE-1137)
2009-02-14 18:18:41 +00:00
asfernandes
afed84f36c
Fixed CORE-2317 - select * from (select cast(.... returns null
2009-02-12 14:56:59 +00:00
dimitr
22bd1345c5
Let's count user DSQL statements only.
2009-02-05 20:41:47 +00:00
hvlad
115602ff06
Trace services support
2009-02-01 22:10:12 +00:00
robocop
3689f15321
Style.
2009-01-20 08:33:59 +00:00
asfernandes
2e3ced29fc
Fixed CORE-2258 - Internal error when select upper(<blob>) from union
2008-12-25 15:05:06 +00:00
dimitr
05299f653e
Fixed CORE-1607: Correlated subquery is optimized badly if it depends on the union stream.
2008-12-21 06:29:47 +00:00
asfernandes
5311dd5a5e
Misc
2008-12-20 19:57:43 +00:00
dimitr
2b87e94242
Use explicit iterators instead of the implicit (built-in) ones due to the thread-safety requirements.
...
This change affects GenericMap only, as it's used globally in a few places and we have a proven crash there.
I have a more complete solution (total cleanup of default accessors from BePlusTree and SparseBitmap) in my local tree (thanks to Dmitry Kovalenko), but it's incomplete (requires more changes inside the engine) and IMHO risky (~20 core modules are affected), so I'd like to defer finalization of this cleanup till v3.0.
All objects of these types seem being protected by dbb_sync, so they shouldn't cause us any problems currently.
2008-12-19 14:57:01 +00:00