8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-30 22:43:03 +01:00
Commit Graph

242 Commits

Author SHA1 Message Date
dimitr
a672c012ad Fixed the NULL handling for MIN/MAX mapped to an index.
Adriano, please review and rework, if necessary.
2011-03-05 17:28:37 +00:00
dimitr
4be14cbad9 Fixed incorrect WITH LOCK handling (refactoring error). 2011-03-05 17:25:12 +00:00
dimitr
690cc4aa43 Corrections to make new assertions working properly. 2011-03-04 07:52:08 +00:00
dimitr
446ea88ba7 Misc. 2011-03-03 14:12:41 +00:00
dimitr
790b888561 Better protection from wrong casts. 2011-02-26 07:25:10 +00:00
dimitr
516b6f0887 Fixed CORE-3173: Empty result when select from SP that contains two CTE (second of them with GROUP BY clause) and INNER join. 2011-02-21 08:04:08 +00:00
dimitr
cc71f0835f Removed duplicated type declaration. 2011-02-20 15:34:08 +00:00
dimitr
aef577652f Totally misc. 2011-02-20 13:19:11 +00:00
dimitr
b1a74121d1 Front ported CORE-3138: Internal error or crash occurs when accessing any MON$ table after altering its structure. 2011-02-15 08:47:51 +00:00
dimitr
a59dc809a0 Misc. 2011-02-12 08:59:55 +00:00
dimitr
0232bc77f3 Misc. 2011-02-10 20:22:22 +00:00
dimitr
a7b85a2db8 Misc. 2011-02-10 14:52:21 +00:00
asfernandes
67f9c9b31d Do not reuse arbitrary nodes' impure space in aggregate. Relates to CORE-3255. 2011-02-09 00:29:46 +00:00
dimitr
bb1f7ad9a6 Implement CORE-3076: Better performance for (table.field = :param or :param = -1) in where clause. 2011-02-07 17:54:24 +00:00
dimitr
f8f2b4d942 Correction in the plan output. 2011-02-06 19:52:18 +00:00
dimitr
c7224b44ef Correction in the plan output. 2011-02-06 19:50:42 +00:00
dimitr
24804a4a4f Warnings. 2011-02-06 19:36:49 +00:00
dimitr
392bfbc0ef Warnings. 2011-02-06 19:34:43 +00:00
dimitr
0fbff04472 Warnings. 2011-02-06 18:55:22 +00:00
asfernandes
7800060e22 Misc 2011-02-04 23:58:10 +00:00
dimitr
c398168403 Slightly clearer output. 2011-02-04 12:13:46 +00:00
dimitr
e967ba7ba4 Correction. 2011-02-04 10:02:20 +00:00
dimitr
6449c942e7 Implemented CORE-3332: Provide more detailed information about the query execution plan. Some details are still to be worked on. 2011-02-02 11:31:04 +00:00
dimitr
e0f5a68da0 More work on enlarging the message buffers. To be continued. 2011-01-28 18:50:27 +00:00
alexpeshkoff
f89ac854ef Getting ready to use 32 (not 31) page and transaction numbers 2011-01-21 17:55:04 +00:00
asfernandes
9c42d4e5af Finish the statements refactor in the engine. Get rid of jrd_nod. 2010-12-04 22:15:03 +00:00
asfernandes
a3064848d6 Make ExprNodes and RecordSourceNodes reference others directly instead of via jrd_nod.
Store ValueExprNodes instead of jrd_nod in the metadata cache.
Make RecordSourceNode child of ExprNode as they share most operations.
Get rid of the JRD visitors in favor of direct calls.
Convert assignments statement lists created inside expressions to separate source and targets ValuesExprNodes.
2010-11-21 03:47:29 +00:00
asfernandes
4dea3a42a1 Remove dependency of jrd_nod in ExprNode 2010-11-14 22:31:42 +00:00
asfernandes
3eb252ec5f Refactored DSQL nodes: nod_derived_field, nod_map, nod_dbkey and nod_rec_version.
Refactored JRD nodes: blr_field (JRD side only), blr_dbkey, blr_record_version and blr_stmt_expr.
2010-11-14 17:25:48 +00:00
asfernandes
045c090a38 Misc 2010-11-06 18:56:46 +00:00
dimitr
b060fb4c67 Fixed CORE-3208: Significant memory leaks with recursive queries. 2010-11-01 19:32:17 +00:00
asfernandes
3317eeeebc Refactor literal values. 2010-10-24 00:26:00 +00:00
alexpeshkoff
e05c1a825f Moved some more .h-files to common from jrd as Vlad suggested 2010-10-13 10:39:52 +00:00
alexpeshkoff
83d6a2f88c Restored a lot of changes, rolled back by me unintentionally 2010-10-12 11:36:51 +00:00
alexpeshkoff
2dc25a44bb OSRI and new posix build 2010-10-12 08:02:57 +00:00
robocop
98a2c6822d Warnings. 2010-09-24 09:53:51 +00:00
asfernandes
9b8171d5c1 1) Refactor nod_value_if.
2) Created ExprNode::expressionEqual method to replace a new big and ugly switch.
3) Make boolean referencers use BoolExprNode instead of jrd_nod, except nod_validate for now. This includes BinaryBoolNode and NotBoolNode working without jrd_nod references.
4) Rework in the impure allocation code (replace "csb_impure += ..." by CMP_impure calls).
2010-09-20 16:07:50 +00:00
asfernandes
c1b5abfdf2 1) Refactor all types of boolean nodes.
2) Remove the scratch from the nodes.
2010-09-17 03:15:32 +00:00
dimitr
7083a2fff5 Corrections to the multi-key hashing. Thanks to Adriano. 2010-09-08 18:05:28 +00:00
asfernandes
ada671c034 Refactor nod_index and nod_bit_* to InversionNode 2010-08-31 00:20:33 +00:00
asfernandes
96f2829728 Refactor nod_map and nod_sort to type-safe MapNode and SortNode 2010-08-29 18:20:44 +00:00
asfernandes
588c545d17 Rework WindowSourceNode to use type-safe partitions 2010-08-25 15:52:46 +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
dimitr
1249095a38 Reworked the SEC$USERS implementation so that no new physical table type and data access method would be required. More changes are likely to follow soon. 2010-07-13 12:33:55 +00:00
dimitr
da183a98ed Reworked the SEC$USERS implementation so that no new physical table type and data access method would be required. More changes are likely to follow soon. 2010-07-13 12:31:35 +00:00
alexpeshkoff
88db8b2fbc ODS change: made RDB$USERS system table, added virtual table SEC$USERS 2010-07-09 12:51:05 +00:00
asfernandes
2da3eee4e5 More const correctness 2010-07-06 11:09:32 +00:00
asfernandes
33fc2bae16 Constify RecordSource methods - these classes are shared pieces of a (shared) statement 2010-07-05 18:37:35 +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
e3b4876245 Fix bug: impure space was not being allocated. 2010-04-09 15:35:52 +00:00
asfernandes
0762519962 Misc 2010-04-09 00:53:31 +00:00
dimitr
c030d0f939 Let's consistently handle offsets as unsigned integers. 2010-04-08 12:17:54 +00:00
dimitr
871ffb24d3 Extending the message size limit from 64K to 4G. First stage. 2010-04-08 11:14:57 +00:00
asfernandes
5ac2130415 Cleanup - switch from pointer arithmetics to sane way to get impure places 2010-04-05 21:20:08 +00:00
dimitr
c6b8f7aaab Corrections based on the scrutineers comments. 2010-03-19 03:53:45 +00:00
robocop
2ffe6d1ffe Totally misc. 2010-03-18 09:12:40 +00:00
asfernandes
cd0c292823 Misc 2010-03-17 02:12:39 +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
dimitr
1e41092ae3 Cleanup the dead code remaining from the legacy scrollable cursors feature. 2010-03-16 06:26:41 +00:00
dimitr
b31f4b4a7d Misc. 2010-03-11 11:40:41 +00:00
asfernandes
725f7878ad Fix the bug reported by Ivan Prenosil (FB3 - problem with inactive triggers). It was the SortMap::flags not initialized. 2010-03-06 02:13:22 +00:00
alexpeshkoff
d6fcd8eb63 It was bad idea to make two TempSpace related parameters per-database - rolled back some changes 2010-03-03 15:02:01 +00:00
asfernandes
77a2706b73 Misc 2010-03-01 02:14:36 +00:00
alexpeshkoff
e5017f1a12 Extend format of firebird configuration file with a set of additional parameters for any parameter.
Use traditional firebird configuration files format in all places (intl, trace, etc.).
Add per-database configuration facility to aliases.conf (currently 15 parameters from firebird.conf).
2010-02-28 18:00:51 +00:00
asfernandes
af249fe61a Misc 2010-02-19 01:40:05 +00:00
asfernandes
a6bd7851e8 Misc and fix per Claudio comments 2010-02-16 21:16:21 +00:00
robocop
835750a54c Misc. 2010-02-16 08:53:31 +00:00
asfernandes
0ce6fb958c Feature CORE-2869 - Window functions: LAG and LEAD. 2010-02-16 00:26:53 +00:00
asfernandes
01f6e290fd Misc 2010-02-15 00:43:04 +00:00
asfernandes
d3c0e1971a 1) Feature CORE-2830 - Window functions: DENSE_RANK, RANK and ROW_NUMBER
2) Fix BLR filter for some procedure verbs
2010-02-14 19:08:22 +00:00
asfernandes
0affd15dc5 Merge OrderedWindowStream into AggregatedStream 2010-02-13 23:55:48 +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
asfernandes
e52fc518f1 Fix NULL pointer dereference in debug build 2010-01-27 19:26:23 +00:00
robocop
1d87d749f0 Misc. 2010-01-26 08:20:27 +00:00
robocop
79cd3bc57a Totally misc. 2010-01-25 06:48:09 +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
dimitr
5254696532 Better pay attention to the buffer scope. 2010-01-22 15:41:47 +00:00
dimitr
38fb57b1f5 Finally, fixed comparison of INTL strings. 2010-01-22 15:40:25 +00:00
dimitr
2f09eb79ca Fixed comparison of strings with different number of trailing spaces. 2010-01-22 10:25:47 +00:00
dimitr
2e1b41114a Fixed the broken recursive queries. 2010-01-22 08:23:36 +00:00
dimitr
2c3d97fcbe 1) Extended hash joins to handle more than two streams at once.
2) Allowed the hash table size to be configurable at runtime.
2010-01-22 07:11:02 +00:00
asfernandes
6ec26b4285 Use nod_sort to _copy_ correctly 2010-01-20 13:24:26 +00:00
hvlad
12cf2ed4f6 Fixed bug CORE-2817 : If stored procedure or trigger contains query with PLAN ORDER it could fail after disconnect of attachment where procedure\trigger executed first time
and bug CORE-2820 : Small memory leak in query with PLAN ORDER
2010-01-20 10:25:18 +00:00
asfernandes
e9f377f81e Replace the hash join by specialized join with the already sorted streams 2010-01-20 00:02:58 +00:00
dimitr
53f5c611d4 Misc. 2010-01-19 16:32:02 +00:00
dimitr
b850e51b4f Misc. I hope to get the idea correctly. 2010-01-19 10:31:48 +00:00
asfernandes
7fbee2c76b Feature OVER (PARTITION BY ...) clause for window functions 2010-01-18 21:37:47 +00:00
robocop
50f1ad96e2 Misc. 2010-01-15 04:57:57 +00:00
asfernandes
7c59c445e7 Misc 2010-01-14 16:47:47 +00:00
dimitr
5aca542e6d Fixed the access path output for left joins. 2010-01-14 12:32:35 +00:00
dimitr
4da89d351a Fixed the hash calculation for VARCHARs. 2010-01-14 12:18:03 +00:00
dimitr
7d7aef4228 Cleanup and refactoring in the optimizer (mostly related to rivers and sort/merge). 2010-01-13 11:46:16 +00:00
asfernandes
5277b99bcf Misc 2010-01-12 14:21:30 +00:00
dimitr
6c4dd3ba82 Proper cleanup while closing the stream. 2010-01-12 11:33:13 +00:00
dimitr
2874edbf5c Basic implementation of hash joins (only inner so far).
Optimizer support is to follow a bit later.
2010-01-12 11:26:09 +00:00
dimitr
6eff77d30e Slightly better support for merge joins and IS NOT DISTINCT equalities. 2010-01-12 11:08:45 +00:00
dimitr
00dc3068fe Implement the lazy caching mode. Rows are stored in the buffer while fetching forward.
The switch to the fully cached mode is performed upon the first positioned access.
2010-01-06 15:40:39 +00:00
dimitr
cca8441572 Added the missing license. 2010-01-04 07:57:29 +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
asfernandes
534b8c020e Misc 2009-12-25 19:29:58 +00:00
robocop
06a4224d0b Put class Attachment in its own files by brute force. 2009-12-25 09:55:05 +00:00
dimitr
79a2e9bdcb Cleanup. 2009-12-23 14:19:38 +00:00
alexpeshkoff
b3ff195a64 Cleanup - two flags are always set to true starting with ODS > 10 2009-12-22 10:30:49 +00:00
asfernandes
b525f3b54f Misc 2009-12-16 21:52:01 +00:00
alexpeshkoff
bf75fffe70 fixed gcc warnings 2009-12-15 13:55:35 +00:00
asfernandes
b137cdfd80 Misc 2009-12-14 23:55:56 +00:00
dimitr
255f1b8e27 Optimization: avoid reading the underlying streams in the case of "FIRST 0". 2009-12-14 14:29:20 +00:00
dimitr
cccfb555db Scrollable cursors: work continued. 2009-12-14 12:56:27 +00:00
dimitr
0fa76552c2 Misc. 2009-12-14 11:40:26 +00:00
dimitr
424199b648 Misc. 2009-12-14 09:23:27 +00:00
dimitr
eb067509a6 Rollback to the prior revision, as the latest commit crashes the engine. 2009-12-14 09:17:05 +00:00
dimitr
08aded6029 Misc. 2009-12-14 07:27:05 +00:00
hvlad
f312a3afce Let use correct rsb type in PLAN output 2009-12-13 21:16:29 +00:00
dimitr
9863e0f953 Misc. 2009-12-13 12:08:02 +00:00
robocop
5be128322d Misc. 2009-12-13 11:06:24 +00:00
robocop
79008881ac It's easy to streamline the code when another person did the hard job before.
:-)
2009-12-13 10:55:32 +00:00
robocop
52de590516 Correction (paying attention to warnings can help really). 2009-12-13 10:42:55 +00:00
robocop
dae574f7f1 Misc, style and unused vars. 2009-12-13 10:41:53 +00:00
dimitr
a2ae164ff4 Fixed the binary plan output, thanks to Claudio. 2009-12-13 07:38:26 +00:00
asfernandes
b1de816d6a Misc 2009-12-12 20:56:12 +00:00
asfernandes
7b8ea84561 Sort maps refactor 2009-12-12 20:36:56 +00:00
asfernandes
008e1bdb59 Remove usage of plain array with count in [0] in the new classes 2009-12-12 19:00:43 +00:00
dimitr
743a5862a1 Misc. 2009-12-12 17:57:48 +00:00
dimitr
d0d78a2677 Misc. 2009-12-12 14:54:33 +00:00
dimitr
9a73ddbda1 Fixed a not-initialized pointer. 2009-12-12 14:44:28 +00:00
dimitr
64b4d4040c Please Claudio and make the flags unique across all RecordSource implementors. 2009-12-12 10:23:14 +00:00
dimitr
7f60db7fc9 Make the auto-incremented positioning slightly more explicit. 2009-12-12 10:16:35 +00:00
asfernandes
8d8f89efd6 Misc 2009-12-11 14:48:15 +00:00
dimitr
b716a4d083 Misc. 2009-12-10 20:09:23 +00:00
dimitr
3c815dbaac Restored the code from rse.cpp that was forgotten during refactoring. 2009-12-10 16:26:11 +00:00
dimitr
3d5e55807f Boundary check. 2009-12-10 15:50:16 +00:00
dimitr
308c5e1e89 Forgotten changes from a few prior commits. 2009-12-10 15:27:17 +00:00
dimitr
8cbaa89e7e Fixed the merge join algorithm. Thanks to Adriano. 2009-12-10 15:26:46 +00:00
asfernandes
e71e4d1e3e Rename file to match class name 2009-12-10 13:46:22 +00:00
dimitr
386edb9f43 Misc. 2009-12-10 12:45:16 +00:00
asfernandes
733a0790d4 Misc 2009-12-10 12:17:00 +00:00
asfernandes
01a8a22be5 Misc / Constant for aggregate state 2009-12-10 01:32:47 +00:00
asfernandes
7971899bd5 Fix window functions 2009-12-10 00:29:41 +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