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

354 Commits

Author SHA1 Message Date
robocop
70d5ebdfdf - Got rid of the fixed array that kept the stream count in the first element and 255 streams after it.
- Changed streams from UCHAR to ULONG as Dmitry wanted
- Got rid of some redundant flags to indicate BLR level
- Misc changes (for example, converted to test for DBB_read_only in Database to a function)
- BLR v6 is left commented (waiting for a better solution to appear, if any exists)
- This change is not going to raise the engine limits until a solution is found to express more than 255 streams in BLR.
2012-04-12 09:02:13 +00:00
alexpeshkoff
4e795f4047 Include platform definitions file common.h in firebird.h. Use OS-specific ThreadId instead artificial FB_THREAD_ID, avoiding unneeded casts in the code. This should fix BSD and MAC ports. 2012-03-01 08:55:43 +00:00
robocop
eed418a89e Make blb resemble more a class: private data members, convert some functions into methods, add methods with code that was in other files, etc. 2012-02-15 03:34:21 +00:00
robocop
186c817caa Playing with fire: converting some static functions into member functions. I tried to check every change I did. 2012-02-07 03:17:52 +00:00
robocop
21cd78a0fd Cleanup: unused functions, parameters & variables. 2012-01-24 03:37:43 +00:00
dimitr
20a8600bd0 Cleanup. 2011-12-23 17:55:00 +00:00
alexpeshkoff
7fb8ebd3a9 Fixed CORE-1898: Increase the password length from 8 characters, CORE-3372: Simplify process of non-default security database creation 2011-12-23 12:43:58 +00:00
dimitr
9bac54c2ca A little bit of safety doesn't hurt. 2011-11-09 13:31:27 +00:00
dimitr
444d5302e1 Refactored the tdbb initialization, especially in AST and BG threads.
Replaced dbb_use_count with a list of active requests (to be utilized later).
Misc cleanup.
2011-10-18 18:02:57 +00:00
dimitr
4263301039 Refactored the database shutdown. Work in progress. 2011-10-10 13:51:10 +00:00
dimitr
2604f07d68 Let's avoid having tdbb_transaction pointing to the deallocated memory. 2011-09-19 15:19:24 +00:00
asfernandes
47489fa71b Misc. 2011-06-26 18:48:00 +00:00
robocop
1c250c02eb Misc. 2011-06-25 03:40:18 +00:00
hvlad
f12c243e1c Improvement CORE-3537 : There is no need to undo changes made in GTT created with ON COMMIT DELETE ROWS option when transaction is rolled back. 2011-06-24 12:54:46 +00:00
hvlad
f2aaa12ce5 Improvement CORE-3536 : Garbage collection in GTT is unnecessary delayed by active transactions in another attachments 2011-06-24 12:49:08 +00:00
asfernandes
77af7c9d55 Misc. 2011-06-17 01:06:27 +00:00
hvlad
eb41aaa8d5 Fixed bug CORE-3525 : Autonomous transactions should not inherit run-time flags of "parent" transaction 2011-06-16 08:58:13 +00:00
hvlad
b202c0573a Try to correctly handle IO errors in cache and avoid some internal deadlocks. 2011-06-15 12:44:44 +00:00
alexpeshkoff
4c02901734 Fixed segfault in execute statement, reported by Dmitry privately 2011-06-03 15:29:01 +00:00
dimitr
df893a708d Better (I hope) solution for CORE-3058: New generators are created with wrong value when more than 32K generators was previously created. It also resolves the [temporary] inability to restore generator values. 2011-06-01 16:58:55 +00:00
hvlad
99c9c8e2db Enabled background threads (garbage collector and cache writer).
Introduced special kind of system attachments used in this threads and show its activity in monitoring.
2011-05-27 07:57:16 +00:00
asfernandes
3ce54d2eda Misc. 2011-05-11 01:18:28 +00:00
hvlad
fef1f49c94 Shared page cache implementation 2011-05-09 10:15:19 +00:00
alexpeshkoff
256cb1e853 1. Use reference counted stable in global pool objects instead PublicHandle's validation.
2. Avoid massive segfaults when closing heavily loaded server.                                                                                 
3. Restored logic in YValve required for correct shutdown.                                                                                    
4. Do not change externally visible request body when preparing it.
2011-04-25 17:47:56 +00:00
dimitr
0cc0d65eb1 Fixed the assertion caused by refcnt != 0. 2011-04-05 05:47:45 +00:00
alexpeshkoff
9ef53b65e0 Remove reference counting where not appropriate 2011-03-31 13:44:22 +00:00
dimitr
86ea2ddb00 Front ported:
Refactored the shared counter to support multiple number spaces.
Changed att_id and tra_id to be generated sequentially (without caching), as agreed with Vlad privately.
Fixed CORE-2305: Make mon$statement_id value constant among monitoring snapshots.
2011-02-15 07:16:57 +00:00
hvlad
12ada43e38 Front ported improvement CORE-3323 : Ability to cancel waiting in lock manager
LM part will be changed to not rely on engine internals.
2011-02-02 11:20:52 +00:00
alexpeshkoff
f89ac854ef Getting ready to use 32 (not 31) page and transaction numbers 2011-01-21 17:55:04 +00:00
alexpeshkoff
d6fcde387b New plugin manager. Use it for all types of plugins. 2011-01-14 17:31:40 +00:00
dimitr
a170738b10 Front ported fix for CORE-3207. 2010-11-11 07:41:33 +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
2dc25a44bb OSRI and new posix build 2010-10-12 08:02:57 +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
robocop
b75afaaf9a Some day we will be able to manipulate objects' data through member functions instead of allowing everyone to change their internals directly. 2010-04-04 09:36:22 +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
alexpeshkoff
55e717f810 Moved authentication code from engine to remote listener.
Get ready for authentication plugins.
2010-01-22 14:55:11 +00:00
asfernandes
e8cc188227 Store the view context type when it doesn't came from backup and simplify the code. Still problems altering procedures used in views. 2009-12-28 15:31:09 +00:00
dimitr
debe65bcfb Support for PSQL functions (other JRD changes). Still work in progress. 2009-12-21 17:43:01 +00:00
asfernandes
1b1f90d06c Work in progress on RDB$VIEW_RELATIONS 2009-12-17 15:07:02 +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
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
alexpeshkoff
b19dacee16 Ported fix for CORE-2634: Performance regression when restoring database with big metadata 2009-09-29 10:35:16 +00:00
robocop
11b4c9b388 Style. 2009-08-23 09:49:58 +00:00
robocop
53e0eb32e0 Comment. 2009-08-21 09:45:08 +00:00
asfernandes
097b0ca2c2 Misc 2009-06-25 02:29:13 +00:00
hvlad
1a0c3da584 Fixed bug CORE-2268 : GFIX causes BUGCHECK errors with non valid transaction numbers 2009-06-24 11:45:16 +00:00
robocop
2e3ce0d23d Misc. 2009-06-07 09:49:58 +00:00
hvlad
7c9a94b391 Implement sub-task CORE-1647 : Close external table's file even if it used by some cached (inactive) requests.
It also fixed bug CORE-2475 : External table data not visible to other sessions in Classic.
2009-06-03 09:59:45 +00:00
robocop
888000e21e Unused function params. 2009-04-26 10:24:44 +00:00
dimitr
10683e50ee Simplification. 2009-04-10 11:43:20 +00:00
alexpeshkoff
d7313f63db Fixed check for length of isc_tpb_lock_timeout parameter - it can be up to 4 bytes, but should not be numerically greater than MAX_SSHORT 2009-04-10 10:28:51 +00:00
asfernandes
f6f364da49 Trim trailling spaces 2009-04-04 16:39:31 +00:00
dimitr
712c68d5a0 Misc. 2009-03-31 04:14:31 +00:00
hvlad
31596ff3e4 Move MAX_TRA_NUMBER to the header file.
Fix AV in TRA_sweep when new transaction can't be started
2009-03-01 10:25:54 +00:00
hvlad
311facc76f Destroy temporary transaction block if exception occurs at transaction start. 2009-02-28 20:11:49 +00:00
alexpeshkoff
36ffc511e3 misc 2009-02-20 08:14:18 +00:00
asfernandes
e0848b3ba8 Do not delete a pointer from a forward declaration 2009-02-19 22:33:15 +00:00
alexpeshkoff
40e2f7f892 Fixed transactions support in user management commands 2009-02-19 12:59:32 +00:00
asfernandes
612c108e3e Misc 2009-02-02 03:35:52 +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
robocop
efbc559a8f The last param to LCK_convert is not BOOL or bool but LCK_WAIT (1) or LCK_NO_WAIT (0) according to lock.h, -1 (infinite) or a custom value (provided as negative value by jrd_tra::getLockWait() since the user must input a positive value when starting the txn). 2009-01-03 09:34:42 +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
5a85277726 Misc 2008-12-25 14:25:01 +00:00
robocop
762d7e1392 Style. 2008-12-25 06:09:37 +00:00
robocop
29f1b0d641 Style. 2008-12-18 12:09:35 +00:00
asfernandes
744e83f240 Misc 2008-12-03 01:05:53 +00:00
hvlad
36e1866a1d Few fixes to correctly close brocken external connection.
Ability to stop execution of external query when :
- engine is shutted down
- database is shutted down
- local statement is cancelled
- local connection is cancelled
2008-11-27 23:06:48 +00:00
asfernandes
ad716e38d9 Misc 2008-10-20 23:46:46 +00:00
robocop
60d4b42518 Straighten some multi-line statements that can fit in less than 100 columns. 2008-10-16 11:30:10 +00:00
dimitr
c4530625d9 Undo log shouldn't depend on the outer transaction. 2008-10-16 05:36:36 +00:00
dimitr
e0db5f3ecd Splitted the undo log into two parts: in-memory one for initial undo items (but they're much more dense now) and on-disk (cached up to TempSpaceLimit) one for full record versions (used in update-in-place).
This dramatically reduces the memory usage for bulk updates, thus solving CORE-1575 (serious memory bug on multiple update a table in a single transaction) and CORE-1477 (Avoiding excessive memory consumption by undo-log after series of updates) and predicting out-of-memory conditions that could often lead to record-level corruptions.
2008-10-14 10:32:54 +00:00
hvlad
a3d266ba83 Fixed bug CORE-2018 : Only one client can access a readonly database 2008-10-14 09:10:36 +00:00
alexpeshkoff
e79f55708d 1. Cleanup - use Firebird::Semaphore instead of local events, removed code
related with local events from isc_sync.cpp.

2. Cleanup - removed unused parameter 'number of events' from ISC_event_wait()
and two unused parameters from ISC_event_init().

3. Added SYSV-semaphore based implementation of IPC to isc_sync.cpp.
This should fix CORE-2102: Firebird 2.5 does not build on MacOS (Darwin).

4. Fixed use of posic CS without (x)inetd (i.e. fb_inet_server -s).

5. Fixed (to be reviewed by Dmitry) recovery after some process death in lock manager.
2008-10-10 15:58:05 +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
alexpeshkoff
e0109ab067 1. Use DFW to store data for user management.
2. Minor cleanup in DFW, fixed memory leaks.
2008-05-21 08:13:20 +00:00
asfernandes
c9202a3767 Misc 2008-05-18 02:02:50 +00:00
alexpeshkoff
0552035ce5 Added transaction support in user management commands 2008-05-15 15:15:02 +00:00
hvlad
85aed9d302 Make ViewContext::vcx_context_name able to store more than 31 chars as was discussed in fb-devel. Thanks to Claudio for the tips. 2008-05-11 21:27:21 +00:00
dimitr
0a9e8c8382 Implemented CORE-1751. The changes include:
1) Make memory counters aggregated.
2) Add attachment pool and allocate appropriate resources out of this pool.
3) Always release attachments explicitly (via destructor).
4) Always delete user requests prior to attachment deletion.
5) Introduce memory usage counters per every monitoring object.
6) Misc refactoring.
Some pieces are still incomplete (although everything basically works), but I'd like to get feedback and testing sooner rather than later.
2008-05-06 08:46:39 +00:00
hvlad
9280a572a0 Avoid long blocking of att_mutex and make sure it is always released when attachment deleted.
Move active requests cancellation at engine shutdown from Y-valve into engine and let them stop execution before deletion of attachments.
Make sweep run in separate thread despite of engine architecture.
2008-05-04 12:49:29 +00:00
dimitr
c66a8cb62a Misc. 2008-04-30 19:16:12 +00:00
dimitr
7fc85de737 Misc. 2008-04-17 07:54:10 +00:00
robocop
bf0db00991 Misc. 2008-04-13 06:40:26 +00:00
hvlad
fe3f8c184b New EXECUTE STATEMENT with support of external data source implementation 2008-04-09 20:18:47 +00:00
robocop
922206ecc7 Fix comment. 2008-04-09 13:46:22 +00:00
hvlad
4224fce3ff Clear lock error in TRA_sweep else it is wrongly reported as failure of currently starting transaction. 2008-04-05 23:06:31 +00:00
asfernandes
21da64cca7 Link blobs of autonomous transaction with the outer transaction - to fix invalid BLOB ID errors. 2008-04-05 19:28:52 +00:00
dimitr
2f41d8e8ba Corrections for the currently disabled code. 2008-04-02 12:42:09 +00:00
dimitr
f5659c0b70 1) Major cleanup of the old-style blk and allocator-based blk_type.
2) Added synchronization for the JRD locks.
2008-03-19 16:19:56 +00:00
robocop
f5db14b277 Pass some tdbb's as arguments. 2008-03-18 13:04:05 +00:00
asfernandes
12c50384b5 Misc 2008-03-13 02:43:32 +00:00
dimitr
afb970dba1 1) Cleanup.
2) Catch exceptions in AST routines.
2008-03-12 16:53:57 +00:00
robocop
04106ddde6 More fixes for CORE-1600.
CORE-1777.
2008-03-12 07:33:12 +00:00
asfernandes
74d8711856 Misc 2008-03-08 21:20:26 +00:00
robocop
c8082004d2 CORE-1600. Needs testing with any sort of valid and invalid TPBs. 2008-03-07 07:28:57 +00:00
robocop
2d8ac2acb9 CORE-1600, work in progress, before I have to return to my private work. 2008-03-06 09:43:43 +00:00
dimitr
99caa91b85 DSQL integration into the engine. 2008-02-28 13:48:16 +00:00
robocop
f8007f4071 Misc. 2008-02-24 03:23:40 +00:00
alexpeshkoff
19b903f0c5 fixed posix build 2008-02-14 11:52:59 +00:00
dimitr
9c69da779a Misc. 2008-02-13 16:46:11 +00:00
robocop
4c3381ef6b Style, constness and macro cleanup. 2008-02-03 10:41:44 +00:00
dimitr
a38b327886 Cleanup. Get rid of the JrdMemoryPool. 2008-01-29 10:11:52 +00:00
dimitr
43594ed53a Major synchronization changes. Description of the commit will be posted to fb-devel. 2008-01-26 13:17:19 +00:00
alexpeshkoff
955819dfd4 better way to fix a problem - suggested by Dmitry 2008-01-23 14:20:40 +00:00
alexpeshkoff
28a6d557ed One more deletePool - also added destructor 2008-01-23 14:12:15 +00:00
alexpeshkoff
578e81508b Call transaction destructor before removing transaction pool 2008-01-23 13:44:03 +00:00
dimitr
48e81dd58a The merge is being fixed. 2008-01-16 12:22:11 +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
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
robocop
4de70004e6 Relax the txn option checks as required by Dmitry. 2007-09-11 07:47:41 +00:00
asfernandes
0359e65d4f It's difficult for human beings distinguish between l (letter) and 1 (number one) 2007-09-10 00:26:45 +00:00
robocop
d59376ef7c Fix CORE-1440. 2007-09-04 08:22:48 +00:00
asfernandes
f3ba6d4fa5 Misc 2007-08-29 02:33:35 +00:00
robocop
66d30dac5c Let's detect wait/no_wait conflict as requested by Dmitry. 2007-08-28 05:28:24 +00:00
robocop
786039bb28 Implement a variation of the suggested fix in CORE-1416:
- Use isc_bad_tpb_content instead of isc_bad_tpb_form seems better, considering the rest of the cases.
- Detect another trivial case: wait once no_wait has been seen previously.
2007-08-25 08:06:09 +00:00
dimitr
1d4a090bcf Misc. 2007-03-09 08:56:31 +00:00
alexpeshkoff
cef61d5d3c Fixed unregistered bug, reported privately by Adriano 2007-02-12 15:52:57 +00:00
dimitr
bdee46366b Misc. 2007-02-12 10:18:43 +00:00
dimitr
99c2df56b6 Changed cancellation implementation to work at the transaction level as being more efficient. 2007-01-07 15:15:06 +00:00
dimitr
1ce4eb2a2b Fixed CORE-980. 2006-10-30 19:04:27 +00:00
asfernandes
1d422a8330 1) Refactor intl_classes.h and intl.cpp
2) Make conversions from CharSet1->UTF16->CharSet2 job of CsConvert class
2006-10-10 19:40:33 +00:00
robocop
8e7e781e5f Partial commit with some cleanup and more constants. 2006-10-10 06:41:36 +00:00
asfernandes
6174398915 Misc 2006-10-08 16:03:37 +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
asfernandes
6c707c12a1 Misc 2006-08-08 02:42:10 +00:00
asfernandes
e538061c38 Implementation of CREATE/DROP COLLATION and ISQL show/extraction of collations 2006-08-07 16:39:21 +00:00
robocop
70eeae5c45 Delete strange cast. 2006-07-27 09:29:04 +00:00
asfernandes
ea0435247a Misc 2006-07-18 02:45:35 +00:00
dimitr
c68587fe66 1. Virtual tables
2. ODS 11.1, procedure type and relation type
2006-07-17 17:44:18 +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
hvlad
701f2cbda4 Global temporary tables implementation 2006-05-21 22:07:35 +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
robocop
c5f2284b15 Style. 2006-04-06 08:18:53 +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
robocop
044c5841ad Misc. 2006-02-10 03:28:43 +00:00
hvlad
e631258ed3 1. Let SUPERSERVER_V2 also check for transactions numbers overflow
2. Correction
2006-02-05 11:06:28 +00:00
hvlad
daadf2dce0 Prevent transaction numbers from overflow MAX_SLONG boundary 2006-02-03 17:44:19 +00:00
hvlad
43fc51e2c1 Prevent unnecessary blocking of garbage collection by read-committed transactions 2006-02-03 13:49:39 +00:00
robocop
2b99e764e3 The files rng.cpp, rng.h, rng_proto.h, bookmark.cpp and bookmark.h belong exclusively to PC_ENGINE, that's obsolete functionality.
Sixth step: remove the places protected by the macro PC_ENGINE. More to come. (I guess all of you who have pending functional changes to post will love this commit. <g>)
2006-02-02 07:32:07 +00:00
robocop
51e1d59ac5 Misc. 2006-01-28 04:12:42 +00:00
dimitr
d1721c7142 Fixed a number of inconsistencies in the rollback code. 2006-01-25 12:20:57 +00:00
hvlad
44908a267c Attachment with isc_dpb_no_garbage_collect option will not force a sweep 2006-01-21 15:29:21 +00:00
robocop
f00fc0ff56 1.- Make "vec" type safe and get rid of several code contortions. Fix some small bugs meanwhile.
2.- Put inside PC_ENGINE several data members that belong to that feature.
3.- Put inside PC_ENGINE the code that does cleanup on those unused data members.
2005-12-02 07:35:34 +00:00
alexpeshkoff
62a24d46e4 1. Moved data structures, written to database file, into ods.h.
2. Added new types of clumplets to ClumpletReader and ClupmletWriter.
3. Applied modified ClumpletReader and ClupmletWriter to /remote and partially /jrd.
4. Added active protection from remote brute-force attack to services API.
2005-11-27 20:53:09 +00:00
robocop
1e562ddc16 Totally misc. 2005-11-11 05:42:42 +00:00