skidder
d7e24011b7
Clean up optimizer
2003-10-17 20:29:52 +00:00
arnobrinkman
fa934885e8
bugfix: Missing initialization of position vector. Thanks for Nickolay who notice this.
2003-10-16 21:02:51 +00:00
robocop
8182b6cba2
const correctness and other tasks
2003-10-16 08:51:06 +00:00
skidder
4e8605294e
Forward port Sparc fixes
2003-10-10 23:56:57 +00:00
dimitr
7cc43e264a
Fixed bug introduced one year ago.
2003-10-01 19:46:01 +00:00
skidder
235db035ce
Ok, i'm joining Firebird destruction team with my cleanup:
...
1. Bring trace DSQL, DYN and BLR trace logging up-to-date
2. Remove redundant CSB pointer dereferences in BLR parser and request compiler
3. Convert RIGHT JOIN to LEFT JOIN early during BLR parsing
4. Check BLR syntax for unititalized contexts usage
5. Some type-safety and const-correctness fixes
2003-09-28 21:36:05 +00:00
arnobrinkman
7e024c858e
Remove IGNORE_NULL_IDX_KEY define.
...
Still to go : nav.cpp, nav_proto.h, ods.h, dba.epp
2003-09-16 23:19:46 +00:00
dimitr
f7aa490111
The final part of my little PLAN enhancement.
2003-09-14 15:37:05 +00:00
dimitr
5ec79f66ef
PLAN enhancements. The DSQL part of this change will follow.
2003-09-10 13:24:49 +00:00
arnobrinkman
6770751035
Don't forget the OR operations Arno
2003-09-08 08:56:13 +00:00
brodsom
382cd1c45e
Code cleaning
2003-09-08 01:45:09 +00:00
arnobrinkman
75486586c9
Added some comments and boolean replacement
2003-09-04 21:37:55 +00:00
brodsom
f76f59a61e
Replace BOOLEAN, TRUE and FALSE
2003-09-04 21:20:01 +00:00
arnobrinkman
bfd32caffa
Fix wrong last commit :-(
2003-09-02 16:39:58 +00:00
arnobrinkman
e5574959ad
Change BOOLEAN to bool type
2003-09-01 23:22:22 +00:00
arnobrinkman
df3c6abf15
1) fix: Unique index must be complete used else we keep on looking for another one.
...
2) MERGE can also handle expressions, stupid example :
SELECT
*
FROM
RDB$RELATIONS r,
RDB$RELATION_FIELDS rf
WHERE
rf.RDB$RELATION_NAME || 'A' = r.RDB$RELATION_NAME || 'A'
3) Do some code style issues
2003-08-31 22:41:19 +00:00
arnobrinkman
5ce032f2d9
Optimizer fix. Compound-indices were choosen above single-indices where we need only the single-field-index.
2003-08-30 19:51:44 +00:00
brodsom
6a2ef35fda
-Remove NULL_PTR
...
-Remove unneeded NULL casts
-Remove (void) function return cast
2003-08-28 13:16:03 +00:00
skidder
27ebbfe696
Get rid of alloca usage
2003-08-19 12:49:33 +00:00
skidder
b05dc24810
Forward port removal of artificial index number limitation from 1.0.3.
...
Fix bug in dbb_max_idx calculation. Do not port GC and metadata versioning
changes as they seem very dangerous to me.
2003-08-18 21:13:56 +00:00
brodsom
daf2d5ff2c
-Fix cast warnings
...
-Fix signed/unsigned comparison warnings
-Fix format warnings
-Add MinGW 3.0 rc header
2003-08-09 21:15:32 +00:00
arnobrinkman
e091f9e9c3
bugfix: All flags csb_flags were cleared except csb_active. Thanks to Claudio V.
2003-08-08 21:35:27 +00:00
dimitr
38a973d2b1
Let's fix the cause instead of the effect. No more buffer overflows.
2003-07-15 13:35:23 +00:00
alexpeshkoff
5933e22503
added static function declaration
2003-07-08 12:26:44 +00:00
alexpeshkoff
8ecb3a933b
fixed AV on some combinations of CAST, BETWEEN and sub-select
2003-07-08 12:12:34 +00:00
dimitr
7374918a78
Bugfix for SF #736318 .
2003-06-27 17:04:07 +00:00
arnobrinkman
ec7ff125ce
bugfix: When 1 merge was done no other merge could be generated. for example with 4 stored procedures.
2003-06-26 22:14:55 +00:00
arnobrinkman
d26fd757cb
bugfix: More bugfixes for 'no current record for fetch operation' errors.
...
These were mostly related to queries where a MERGE was done and/or SP/VIEW/Aggregates/Unions were used together.
2003-06-09 23:04:29 +00:00
dimitr
cb844e541a
Fixed random crashes with big queries prepared.
2003-06-05 16:09:37 +00:00
arnobrinkman
98b28378a9
bugfix FB1.5: Optimizer crashed when all indices of a table had the selectivity of 1
2003-05-16 22:15:39 +00:00
brodsom
a4903c9278
- Comment unneeded checks or conditions
2003-04-02 11:13:11 +00:00
dimitr
46fd65228a
Cleanup.
2003-03-25 09:51:52 +00:00
dimitr
20ce2e24d8
Fixed optimizer bug introduced by me appr. one month ago.
2003-03-25 09:40:15 +00:00
tamlin
de27710a5e
Fixed a comment mistake (*/ leftover at EOL of //) spotted by Claudio.
2003-03-09 09:06:47 +00:00
brodsom
a808195f28
Avoid undefined function warning
2003-03-07 00:36:44 +00:00
tamlin
3ef654d69f
Just a bit of cleanup, nothing interesting.
2003-03-02 16:17:08 +00:00
arnobrinkman
28c3eb69a3
Comments added
2003-02-27 23:07:15 +00:00
tamlin
b99ae4c70c
Basic code cleanup and fixed a problem spotted by Dmitry Yemanov.
2003-02-27 18:46:49 +00:00
tamlin
66527bca20
Fix optimizer crasher with too many streams (UCHAR overflow/wrap-around).
2003-02-27 16:28:53 +00:00
arnobrinkman
57eb03f09f
bugfix: Fix FB1.5 optimizer bug which causes the server to crash.
2003-02-25 18:34:52 +00:00
dimitr
09c3847515
A bit reworked fixed-size vector allocations. Thanks to Mike for the hint.
2003-02-23 10:23:19 +00:00
dimitr
18549a8e14
Cleanup and some economy of the stack space (in favor of the heap). Performance penalty isn't noticable.
2003-02-22 17:09:02 +00:00
dimitr
02963521f8
Some cleanup of the optimizer.
2003-02-22 15:10:29 +00:00
dimitr
09dec233aa
Made the optimizer a bit better in the case of old index statistics.
2003-02-22 12:20:53 +00:00
tamlin
f5676d103e
A little bit of code cleanup and addition of a few asserts, to get early warning before it crashes.
2003-02-22 10:10:37 +00:00
arnobrinkman
59c31c48bc
Let the optimizer build MERGE/SORT where possible.
...
This is : Multiple STORED PROCEDURES and/or VIEWS with internally aggregate or union
2003-02-22 00:48:38 +00:00
dimitr
17f69fc9e5
Fixed stack oveflow caused by deep recursion and big stack arrays in the optimizer.
2003-02-20 10:58:46 +00:00
arnobrinkman
afc3d38954
More optimizer enhancements.
...
When an equal-node and other nodes (geq, leq, between...) are available for an index retrieval, then use the equal node always instead of the others.
2003-02-15 01:35:19 +00:00
brodsom
3cb91fce80
Remove PIPE and STACK defines (PIPE_SERVER, PIPE_CLIENT, PIPE_LIBRARY, PIPE_SERVER_YVALUE, PIPE_BRIDGE_TO_V3, V3, V3_PATH, ALTPIPE)(STACK_EFFICIENT, STACK_REDUCTION)
2003-02-14 02:24:44 +00:00
dimitr
67749f906b
Fixed exception handling.
2003-02-13 13:33:57 +00:00
dimitr
b096a2593d
CONST -> const
2003-02-13 10:11:35 +00:00
eku
a7f18b2e31
Removed "register" variables from the source code. It's up to the compiler
...
to hold variables in CPU registers.
2003-02-10 13:28:35 +00:00
arnobrinkman
52a7ba0d51
bugfix: a simple LEFT JOIN on a VIEW with only a ON clause didn't use an index even if it was possible.
...
SF BUG # [ 508594 ]
2003-02-01 00:08:18 +00:00
arnobrinkman
fcb77779fa
More and better optimizations with "complex" JOIN queries (LEFT JOIN, views, sp etc...).
...
bugfix: An SORT can't be generated when there are already RSBs on the stack, because this will lead to strange values. See also SF BUG # [ 221921 ].
2003-01-22 00:17:27 +00:00
arnobrinkman
d4624c794e
bugfix: SF BUG # [ 221921 ] ORDER BY has no effect
2003-01-12 22:33:43 +00:00
arnobrinkman
a09fc594fb
Reworked the last bugfix by dmitry
2003-01-12 13:55:35 +00:00
dimitr
ab4b67b24c
1. More proper implementation of my last bugfix.
...
2. Fixed known problems with explicit plans.
2003-01-11 19:04:36 +00:00
dimitr
2b0913546f
Fix for the optimizer issue with compound indices. Leave it up to Arno to decide whether this fix is correct or not.
2003-01-11 18:02:17 +00:00
arnobrinkman
c83b1db4a7
more cosmetic changes to opt.cpp
...
bugfix: When UNIONS where used in a VIEW and that VIEW was used in the where clause inside an sub-select then the engine crashed !!
2002-12-31 00:12:18 +00:00
arnobrinkman
7e2b62528a
bugfix: OUTER JOINs and no current record for fetch operation, caused by previous optimizer change
2002-12-28 00:20:45 +00:00
arnobrinkman
aa638632a3
another bugfix Alpha5 "no current record for fetch operation"
...
Added code so that more index-retrieval can be used.
Cases where an LEFT OUTER JOIN messed-up the optimizer should be much lower.
Example :
SELECT * FROM
SomeTable t1
LEFT JOIN AnotherTable t2 ON (t1.PK_Key = t2.FK_Key)
JOIN AnotherTable t3 ON (t1.PK_Key = t3.FK_Key)
This change fixed also BUG SF #219525 .
2002-12-16 00:45:35 +00:00
arnobrinkman
7f67f42a5f
bugfix: no index was used for STARTING WITH and IS NULL comparison inside OR structures.
2002-12-04 20:05:04 +00:00
arnobrinkman
fb42c5b975
Cosmetic changes with thanks to Claudio V.
...
A better/logical change so that the optimizer can use indices in sub-selects and aggregate-statements.
2002-12-04 18:39:14 +00:00
eku
34e9391a97
Use the new macro FB_NELEM to calculate the number of elements in an array.
2002-12-02 09:45:52 +00:00
arnobrinkman
b5f4f72800
1) bugfix another LEFT JOIN and 'no current record for fetch operation'.
...
2) Let sub-selects also use indices when there parent is a stored procedure.
2002-11-23 23:36:22 +00:00
dimitr
3d55c724ae
no message
2002-11-23 17:59:11 +00:00
arnobrinkman
5b4b3ef482
bugfix Optimizer LEFT OUTER JOIN and error : no current record for fetch operation
2002-11-21 23:02:54 +00:00
hippoman
7387e6fb70
changed nod,tra,req,trg,rel,ctx,prc struct names to local module names
2002-11-20 23:18:16 +00:00
arnobrinkman
e1f9fefb15
More optimizer improvement of handle AND nodes inside an OR node.
2002-11-18 21:31:01 +00:00
skidder
53f625e077
New explicit pessimistic locks implementation. It is logically consistent in all TPB modes and should be very fast.
2002-11-18 20:27:24 +00:00
hippoman
4a76e9e4fe
change TRA,REQ,TRG,REL,CTX or PRC, to module local names.
2002-11-17 00:13:59 +00:00
skidder
5a712a4fee
Fixed restore problem for databases having views that use procedures AND are used by procedures. General procedure metadata related cleanup.
2002-11-16 18:48:01 +00:00
hippoman
25c1dbd367
* Changed NOD struct name to JRD_NOD.
2002-11-11 19:42:47 +00:00
arnobrinkman
2600ac844b
Update for explicit PLAN support and little cosmetic changes.
2002-11-09 01:42:10 +00:00
dimitr
8d62d05d5c
Yep, I've joined with Arno in his struggle with the optimizer ;-)
2002-11-08 16:23:20 +00:00
arnobrinkman
65251221cd
no message
2002-11-06 19:23:48 +00:00
arnobrinkman
b652434669
New changes to the optimizer. Better backward compatibility with forced PLAN's
2002-11-06 03:07:50 +00:00
arnobrinkman
d3ed97fa75
Give ASC a higher priority against same selectivity indices.
2002-11-04 21:57:39 +00:00
arnobrinkman
1d84ffbfd3
Added better support for using indices with "OR".
...
Pick the best available compound index from all "AND" nodes.
2002-11-02 03:20:52 +00:00
seanleyne
0b82f4aa07
Removed obsolete "Netware" port
2002-10-30 06:40:58 +00:00
tamlin
fb3cfa85da
const correctness etc
2002-10-29 16:27:47 +00:00
arnobrinkman
3b053bc9c3
AB: Added support for detecting use of index with sub-selects in aggregate selects
2002-10-26 21:16:39 +00:00
skidder
6d499910f9
Move nulls first/last code out of SCROLLABLE_CURSORS ifdef
2002-10-12 20:27:26 +00:00
skidder
b9b600d7fd
Fixed problem which caused complex outer joins to produce wrong results
2002-10-12 19:46:29 +00:00
skidder
b4cb6b07ff
Fixed problem which caused complex outer joins to produce wrong results
2002-10-12 19:39:19 +00:00
skidder
6d64014e57
Changed engine to store source file name/line number information for EVERY allocation when DEBUG_GDS_ALLOC is defined. All allocation should be done using FB_NEW or FB_NEW_RPT macros instead of keyword new since now
2002-09-25 17:12:16 +00:00
eku
4eaf8c0914
Autoconf cleanup:
...
o since the define 'VAX' was only used to tell that the byte order is
LITTLE_ENDIAN (it have nothing else to do with the VAX computer family)
it can safely replaced with '!WORDS_BIGENDIAN'.
o check if pointers are 64 bit
o replaced HAS_64BIT_POINTERS with 'SIZEOF_VOID_P == 8'
2002-09-17 05:58:40 +00:00
skidder
f1b4c04d42
Added nulls first/last support
2002-09-10 18:34:00 +00:00
skywalker
d89b1a0842
Changes to make fb2 compile super version for linux
2002-07-29 15:37:59 +00:00
skywalker
82d8017317
Merged change from fb1.
2002-07-01 16:59:09 +00:00
dimitr
67fd70aa1d
Fixed bug with uninitialized local variables. Thanks to Oleg LOA.
2002-06-20 10:10:28 +00:00
dimitr
c5f50577cb
1. New system variables - CONNECTION_ID and TRANSACTION_ID
...
2. Universal triggers
2002-06-14 12:09:37 +00:00
bellardo
895801a449
Changes to bring intl support to FB2.
2002-06-04 19:56:16 +00:00
bellardo
773836f1b1
Finished removal of setjmp/longjmp code, and fixed a handful of FB1->FB2
...
porting bugs.
2002-04-04 07:10:40 +00:00
skywalker
a887af3646
Changes to make it compile on linux.
...
and work through a few issues.
2002-01-04 11:34:22 +00:00
tamlin
80f7fb6dd4
New C++ memory pool
2001-12-24 02:51:06 +00:00
skywalker
365a7fe19c
Changes to compile fb2 under autoconf includes some structural changes
2001-07-29 17:42:23 +00:00
tamlin
9a776a604e
First steps towards a C++ conversion.
2001-05-23 13:26:42 +00:00