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

379 Commits

Author SHA1 Message Date
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
e5a732d782 Cleanup the dead code remaining from the legacy scrollable cursors feature. 2010-03-16 06:21:28 +00:00
dimitr
42fbd2615b Front ported CORE-2833: Changing data that affects an expression index that contains references to null date fields fails.
Also, removed the duplicated (and, at the first glance, unnecessary) code that forced us to deal with the already_attached flag. To be tested in the field.
2010-02-26 09:02:22 +00:00
asfernandes
5cb37fda71 Misc 2010-02-11 01:08:20 +00:00
hvlad
3b4a374a16 Fixed bug CORE-2586 : Non-NULL key in unique index could be not found when key is removed 2010-02-10 14:48:02 +00:00
asfernandes
534b8c020e Misc 2009-12-25 19:29:58 +00:00
robocop
0564019d2f Misc and cleanup. 2009-12-24 11:48:17 +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
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
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
robocop
579a456329 Style. 2009-11-25 08:38:52 +00:00
robocop
d6ceb87638 Cleanup. 2009-11-25 04:52:54 +00:00
robocop
5a1e3fb0aa Restrict us to ODS11 and ODS12 until the dust settles down. 2009-11-24 12:22:31 +00:00
robocop
804ad6048a Restrict us to ODS11 and ODS12 until the dust settles down. 2009-11-24 11:42:56 +00:00
robocop
1386adcf90 Style. 2009-11-16 08:06:31 +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
asfernandes
19fac12314 Misc 2009-10-21 01:01:04 +00:00
hvlad
19e817cb70 Fixed bug CORE-2684 : Error page NNN is of wrong type (expected 7, found N) 2009-10-15 09:16:31 +00:00
hvlad
6fde607f41 Fixed bug CORE-2616 : page 1530262 is of wrong type (expected 7, found 5) 2009-09-24 21:05:45 +00:00
asfernandes
d4e407cb3f Misc 2009-09-24 02:11:10 +00:00
hvlad
08812363ad A little paranoid addition to the fix for CORE-2635 2009-09-23 10:32:58 +00:00
hvlad
aca4df4e9a Fixed bug CORE-2635 : Unique index with a lot of NULL keys can be corrupted at level 1 2009-09-22 21:01:16 +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
robocop
abae34b092 We never handled ODS_VERSION7 (see FB1 for example). Thanks Dmitry.
Rework code for readability.
2009-08-24 10:21:14 +00:00
robocop
17cefa486e Comments. 2009-08-21 08:54:56 +00:00
robocop
f7b2032c31 Typo repeated. 2009-06-27 11:12:49 +00:00
robocop
f10e1b72eb Style. 2009-06-27 06:23:36 +00:00
robocop
d82f063395 Style. 2009-06-26 04:12:20 +00:00
robocop
48377f4e35 Convert goto into a for() loop. 2009-06-25 10:59:10 +00:00
asfernandes
097b0ca2c2 Misc 2009-06-25 02:29:13 +00:00
robocop
bb83e70cfe Isolate even more the scrollable cursors-related code. 2009-06-22 08:45:38 +00:00
robocop
c9feb04a8a Simplification. 2009-06-21 08:32:55 +00:00
robocop
f3fdc5b5c7 Give idx_id and associated values a consistent data type and treatment. 2009-06-21 06:04:18 +00:00
robocop
a958da87f5 Style. 2009-06-21 05:46:51 +00:00
asfernandes
bbb06eca72 Fix assertion at INTL due to much longer buffer 2009-05-06 16:34:18 +00:00
dimitr
93be80a4aa Fixed CORE-2449: Unexpected "lock conflict" error can be thrown instead of other (expected) exception. 2009-05-05 09:32:45 +00:00
alexpeshkoff
ae92789faf Fixed bugs noticed by Claudio 2009-05-05 07:27:20 +00:00
asfernandes
38a2912669 Misc 2009-05-03 21:57:13 +00:00
robocop
60ba0586dd Undo two of Alex' suspicious or wrong changes until he can return and rethink them. 2009-05-02 13:05:29 +00:00
robocop
66b1227b22 Unused params, some formatting, cleanup. 2009-05-01 17:21:36 +00:00
alexpeshkoff
8c983fec26 Fixed alignment issues with on-stack vary strings 2009-04-29 14:00:32 +00:00
asfernandes
f6f364da49 Trim trailling spaces 2009-04-04 16:39:31 +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
7ba3e7d0e5 Misc 2009-02-11 01:32:09 +00:00
hvlad
1f8e353154 Comment my recent (not obvious) change 2009-02-09 15:12:55 +00:00
asfernandes
1105286dee Misc 2009-02-07 15:20:34 +00:00
hvlad
f4544ce4a0 Performance : use stack allocation when possible 2009-02-06 19:38:48 +00:00
robocop
3689f15321 Style. 2009-01-20 08:33:59 +00:00
asfernandes
296f170224 Misc 2009-01-04 20:32:35 +00:00
asfernandes
79e89d573d Misc 2009-01-03 19:02:04 +00:00
hvlad
8646bad2f9 Fixed bug CORE-2241 : Wrong number of records fetched when using index 2009-01-02 09:49:50 +00:00
robocop
6406e45337 Shut up compiler warnings (unreferenced vars, uninitialized vars, compile-time conditional code, etc.) 2009-01-02 06:36:12 +00:00
asfernandes
5c97a235e3 Misc 2008-12-24 00:32:49 +00:00
robocop
2fadc0e456 Style. 2008-12-22 09:00:05 +00:00
asfernandes
5311dd5a5e Misc 2008-12-20 19:57:43 +00:00
robocop
9c9e4e9b0b There's no need to check whether a pointer is null before applying delete or delete[]. 2008-12-20 08:16:55 +00:00
robocop
ff99dc3d46 Style. 2008-12-18 10:47:25 +00:00
robocop
511c7eb7d8 Promote thread_data* as function argument. 2008-12-14 10:19:27 +00:00
asfernandes
8fbf0e8e8c Remove trailing spaces (.cpp files) 2008-12-05 01:20:14 +00:00
dimitr
3b03866f7e This change is intended to make the engine responsible to async requests (shutdown, cancellation, etc) while performing long index scans. 2008-09-16 10:27:30 +00:00
alexpeshkoff
13a15d4bfe 1. Final fix for CORE-1964 - finished vararg cleanup in jrd.
2. Generic cleanup of error reporting functions all around engine.
2008-08-27 12:20:47 +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
robocop
b629df88ff Correction for logic error (it worked by pure coincidence). 2008-06-05 10:56:14 +00:00
robocop
8a28565ea7 Misc. 2008-05-08 08:19:50 +00:00
dimitr
e0c6d0e13d Fixed CORE-1812. 2008-05-06 09:40:22 +00:00
hvlad
7970d15d65 A little correction and more explanations in comment 2008-04-03 11:13:20 +00:00
asfernandes
f0299cfb29 Misc 2008-04-03 01:11:26 +00:00
hvlad
259fafa647 Implement CORE-1819 : More efficient solution for CORE-1300 2008-04-02 23:46:59 +00:00
hvlad
f672d51a14 Avoid manipulations with TDBB_use_db_page_space flag in jrd_rel::getPagesInternal 2008-04-02 13:55:10 +00:00
dimitr
de8514ea4c Cleanup/refactoring. 2008-03-19 11:39:25 +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
db7d3ecd4c The merge continued. 2008-01-16 08:31:31 +00:00
hvlad
e833be6785 Correction for fix for CORE-1199. Thanks to Claudio 2007-12-17 07:36:46 +00:00
hvlad
37e3128777 Fixed bug CORE-1199 : Firebird SS: internal gds software consistency check (CCH_precedence: block marked (212), file: cch.cpp line: 3640) 2007-12-16 20:14:53 +00:00
alexpeshkoff
eea9070f48 Optimized RuntimeStaticstics (and related part of ThreadDb) for performance - some tests run 25faster 2007-12-03 15:46:39 +00:00
paulbeach
7602a29b94 HPUX Port 2007-11-12 14:26:44 +00:00
asfernandes
f3ba6d4fa5 Misc 2007-08-29 02:33:35 +00:00
hvlad
8de5dd7342 Fixed bug CORE-1361 : Index operations for global temporary tables are not visible for the active connection 2007-08-28 20:17:36 +00:00
asfernandes
4cc5949028 Misc 2007-08-05 19:56:27 +00:00
hvlad
e196a9e42f Fixed bug CORE-1401 : Global temporary table instance may pick up not all indices 2007-08-02 20:20:16 +00:00
hvlad
04f367d0d2 Fixed CORE-1300 : Lower level index pages in missed from parent page 2007-06-02 12:15:18 +00:00
hvlad
512a33e0c0 Fixed CORE-1299 : Wrong index entries order at non-leaf b-tree pages 2007-06-02 12:10:40 +00:00
hvlad
f3163f9295 Fixed CORE-1298 : BTR\garbage_collect code can make a deadlock in a page cache 2007-06-02 12:07:52 +00:00
hvlad
13cfb0e2f6 Correct error handling in index creation code when no space left on disk 2007-04-25 20:54:36 +00:00
asfernandes
f676883248 Misc 2007-04-21 03:27:36 +00:00
robocop
0a0213ff84 Totally misc. 2007-04-19 07:51:22 +00:00
hvlad
7b020a53ba Fixed bug CORE-1215 : Wrong SELECT query results using index to evaluate >= condition 2007-04-18 10:47:10 +00:00
hvlad
8bfa87d892 Let store plain 64-bit record number in index_sort_record (and in sort scratch file) and became independent of additional fields of RecordNumber class.
Also pack index_sort_record structure to avoid compiler added padding which unnecessary grow sort scratch file
2007-03-20 18:02:10 +00:00
dimitr
a72f56ea4b Misc. 2007-02-08 14:03:41 +00:00
hvlad
2e343c74ef Implement improvement CORE-1069 : Optimize index scan when more than one index scanned and ANDed 2006-12-27 21:01:02 +00:00
robocop
9a61c5185f Totally misc. 2006-12-19 08:36:48 +00:00
alexpeshkoff
8896a21641 frontported fixes from 2.0 2006-12-15 17:30:41 +00:00
alexpeshkoff
f86fef0c48 Fixed CORE-1053 2006-12-14 16:20:35 +00:00
hvlad
f206c67d12 Fixed CORE-1040: Wrong single-segment ascending index on character field with NULL and empty string values 2006-12-06 09:37:25 +00:00
dimitr
543fc5e0d1 Enabled rescheduling points for classic. It allows to shutdown database or cancel operation timely for a heavy loaded attachment. 2006-10-31 15:59:23 +00:00
hvlad
c747acbbaa Fixed CORE-952: AV when blob is used in expression index 2006-10-17 11:03:20 +00:00
robocop
870b1a0363 Misc. 2006-10-08 06:43:59 +00:00
dimitr
988782a96a 1) A new class to handle aggregated multi-level performance counters.
2) Cleanup and minor fixing.
3) A few monitoring changes.
2006-10-07 10:53:01 +00:00
robocop
581d251c82 Misc: idx_id is already USHORT. 2006-09-15 07:24:31 +00:00
hvlad
04051ab102 Fix for CORE-895: possible unique index violation 2006-08-12 17:21:55 +00:00
hvlad
8d7cd54229 Correction to the fix :) 2006-06-01 16:28:38 +00:00
hvlad
029706631f Fixed unregistered FB2 bug:
endless loop when exception during index's expression evaluation occured
2006-06-01 16:25:30 +00:00
robocop
7040d668fd Misc. 2006-05-25 08:40:23 +00:00
dimitr
211645e3dc Getting rid of the old allocator routines. 2006-05-23 10:17:00 +00:00
asfernandes
24d936cd70 Misc 2006-05-22 01:29:06 +00:00
hvlad
701f2cbda4 Global temporary tables implementation 2006-05-21 22:07:35 +00:00
asfernandes
292ad66e96 Misc 2006-05-20 01:53:51 +00:00
alexpeshkoff
b056a118b5 1. Avoid use of STL
2. Reworked exceptions to make status_exception always hold correct status vector
3. Avoid use of RTTI
2006-05-19 15:17:02 +00:00
dimitr
8c66a4883a 1) Fixed wrong ALL results in the ODS11 optimizer.
2) Fixed SF #527681 -- Strange/Inconsistent query results
2006-05-17 19:15:41 +00:00
asfernandes
eb77ff3709 Misc 2006-05-01 02:26:10 +00:00
dimitr
b8342226e6 Const'ness. 2006-04-30 15:11:50 +00:00
alexpeshkoff
469589f573 Use Firebird::Array instead of STL's vector 2006-04-25 17:49:24 +00:00
robocop
d74438baed Fix the discordant data types between flags and the vars used to work with them (really dangerous if the flag is USHORT and you hold it in a UCHAR). Also, get rid of some debris of the uppercased typedefs. 2006-04-19 07:10:53 +00:00
hvlad
6cf18cc072 Bug fix: don't use page buffer after page was released - it can be replaced
by another page and may lead to serious corruptions
2006-04-18 12:45:22 +00:00
robocop
c5f2284b15 Style. 2006-04-06 08:18:53 +00:00
dimitr
5010e6b0cb Fixed the bug that caused unexpected bugcheck(205) in big databases. 2006-03-29 15:26:24 +00:00
robocop
10cb928ddc More cleanup. 2006-02-23 06:52:25 +00:00
robocop
1f84bac700 Mark unused data members, discover more code associated to conditional compilation, clean some places, replace custom loops by memcpy and memset when possible, etc. 2006-02-23 05:08:26 +00:00
hvlad
47ac2b981a bugfix 2006-02-08 10:11:46 +00:00
robocop
1ca7a582f9 EXPRESSION_INDICES code is considered stable and therefore there's no need to keep it protected by macros. Please do a full rebuild. 2006-01-14 07:00:44 +00:00
dimitr
2e258f4cf9 Fixed BUGCHECK(205) related to ODS11 index changes. 2006-01-08 08:21:46 +00:00
robocop
c76a021f70 Misc. 2005-11-29 06:18:06 +00:00
hvlad
80827a5284 1. Move IDX\eval_expr_idx into BTR_eval_expression
2. Replace similar code in BTR_key by new BTR_eval_expression
3. Use EXE_find_request in index expression evaluation to avoid AV in case of using index simultaneously in some connections
2005-11-28 21:43:06 +00:00
robocop
85c48cb387 Misc. 2005-10-28 04:15:09 +00:00
hvlad
15ac3a9f47 Fixed SF #223060
Slow processing of GREATER-THEN operator
2005-10-27 21:52:17 +00:00
hvlad
0216a3d2f5 Don't allow to create primary key constraint on non-null fields with null values.
For example:

create table buggg (f1 int not null, f2 int not null);
commit;

insert into buggg values (1, 1)
commit;

alter table buggg add pk int not null primary key;
or
alter table buggg add constraint pk_buggg primary key (pk)
or
alter table buggg add constraint pk_buggg primary key (f1, f2, pk)
2005-10-26 15:11:51 +00:00
dimitr
48a377cd7a Fixed server crashes caused by buffer overruns if too big index key was used. 2005-09-30 08:48:17 +00:00
robocop
6c89683142 Totally misc. 2005-07-31 00:45:38 +00:00
arnobrinkman
0725746548 Fix scope problem reported by Konstantin 2005-07-29 10:42:38 +00:00
arnobrinkman
14f667f4b6 Fix bug SF #1242982
Equality search on first segment (integer) in compound indexes resulted
in more scans on specific values (2^n, f.e. 131072) then needed.
2005-07-24 18:32:29 +00:00
dimitr
894fa1e011 Removed unused thread scheduling option. 2005-06-12 06:27:12 +00:00
asfernandes
59213efe7e Merge INTL branch into HEAD 2005-05-27 22:45:31 +00:00
hvlad
7fd4f64863 Correct previous fix for multisegment descending indexes 2005-05-08 09:43:36 +00:00
hvlad
f1d576feb4 Fixed unregistered bug - "index key too big" when creating descending index 2005-05-07 19:45:57 +00:00
hvlad
493bdd92cd Correct index validation code. Big thanks to Arno 2005-05-03 15:45:23 +00:00
hvlad
565b5e173b Undo my previous commit. Duplicate chains in not null keys in unique indexes not sorted by design. Changes must be done in index validation code 2005-05-01 19:23:04 +00:00
hvlad
735f369d76 Duplicate chains not sorted by record number in unique indices 2005-04-30 10:10:48 +00:00
dimitr
92dbd6ae59 More complete fix for DESC indices. 2005-02-22 06:32:35 +00:00
arnobrinkman
11a7710b92 Fix segment-selectivity values for descending indexes, reported by Dmitry Yemanov 2005-02-21 20:07:24 +00:00
hvlad
5247ca5bab Fix AV when expression index is created 2005-02-10 13:37:05 +00:00
hvlad
9826986fb8 Fix bug SF #1076858 2005-02-08 21:23:59 +00:00
arnobrinkman
a3b6944a75 Fix duplicate checking for unique indexes 2005-01-27 14:33:58 +00:00
robocop
8d4b89723f Welcome to paranoid programming. 2005-01-25 06:33:07 +00:00
dimitr
567fafa30c Fixed expression indices bugs. 2005-01-24 09:35:47 +00:00
robocop
229d08b927 Misc. 2005-01-22 04:16:55 +00:00
alexpeshkoff
f9898ffb5a fixed my bug with descending indices in referential constraints 2005-01-21 13:49:35 +00:00
arnobrinkman
eddac3c767 Fix index bug when a single NULL with recordnumber 0 was 2 times removed.
Due this the LevelNode was removed, which of course may never happen.
2005-01-03 19:24:48 +00:00