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

355 Commits

Author SHA1 Message Date
asfernandes
ff5f8745fb Remove trailing spaces (.h files) 2008-12-05 00:56:15 +00:00
alexpeshkoff
2200a681f8 fixed some gcc warning 2008-11-28 18:49:07 +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
alexpeshkoff
e9162ee2f2 Fixed CORE-2179: Deadlock when trying to shutdown server with opened ExecuteStatement 2008-11-12 14:32:18 +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
asfernandes
96194d08ba Misc 2008-08-31 01:10:41 +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
asfernandes
8f9b451ce9 Rework of ib_util changes. Dynamically load it in the engine and inform callback functions to alloc and free memory. Allocate memory from the default pool. 2008-07-12 21:23:42 +00:00
asfernandes
c8cacf9ad1 Misc 2008-06-27 13:31:04 +00:00
dimitr
ec1d5a91b4 1) Encapsulated the lock manager and integrated it into the engine.
2) Replaced "early" (before LM) checkouts with "late" (inside LM) ones.
3) Removed the mutex protection that's no longer necessary.
Note: the new LM contains some future code (currently commented out) which will be enabled and tested after the Alpha release.
2008-06-07 09:08:16 +00:00
robocop
3e10324c58 Totally misc. 2008-06-05 11:46:20 +00:00
hvlad
6bff6c6649 Replace fixed size array of shared latches (bdb_shared) by queue. It allows to have more than 20 simultaneous readers for hot pages and eliminate needs for scanning full array when searching for current thread's latch 2008-06-05 08:35:18 +00:00
dimitr
9a6c0accf6 Reduce number of warnings for 64-bit targets. 2008-05-10 16:49:39 +00:00
robocop
dc7176c697 Misc. 2008-05-08 09:43:24 +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
a8d9303dc7 Restore att_mutex blocking logic as prior commit broked EXECUTE STATEMENT. Add extra mt protection in cancel_attachments. 2008-05-04 21:24:33 +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
asfernandes
53a2090f65 Misc 2008-04-27 02:39:51 +00:00
robocop
83d3ddd6cb Replace custom code by helper class ThreadStatusGuard. 2008-04-26 10:29:52 +00:00
asfernandes
e18ac3cb53 Misc 2008-04-24 01:53:40 +00:00
asfernandes
c416ea1621 Lock the attachment handle during API calls 2008-04-20 22:54:36 +00:00
dimitr
ebf3ad7261 Cleanup. 2008-04-10 09:32:13 +00:00
dimitr
6203ec728f 1) Enabled proper error reporting for unexpected crashes in Classic.
2) Attempted to make the async error handling independent from the engine.
Alex, please verify the UNIX part of my changes.
2008-04-10 09:25:48 +00:00
hvlad
37a03b26b8 Split TDBB_deferred flag by two separate flags as its used for two different purposes now 2008-04-02 13:46:29 +00:00
robocop
8177de47ec const. 2008-03-28 13:32:36 +00:00
dimitr
1f22e3e1c1 1) Added proper handle validation for dbb.
2) Changed dbb_sync lifestyle handling.
3) Sync'ed access to the att_long_locks.
4) Put in a temporary workaround for nbackup deadlocks.
2008-03-20 16:42:29 +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
asfernandes
dddbd9d5a1 Misc 2008-03-18 14:50:37 +00:00
asfernandes
c7ec88bee4 1) Created classes PreparedStatement and ResultSet
2) Changed EXECUTE STATEMENT to use these classes
3) Fixed CORE-1784 - Error with EXECUTE PROCEDURE inside EXECUTE STATEMENT
2008-03-13 16:37:20 +00:00
dimitr
ebad313cfd 1) Fixed CORE-1788.
2) Protected from other similar deadlocks.
3) Refactoring.
2008-03-13 14:20:32 +00:00
dimitr
afb970dba1 1) Cleanup.
2) Catch exceptions in AST routines.
2008-03-12 16:53:57 +00:00
robocop
c407e8cd0e Make member function inline. 2008-03-12 07:16:26 +00:00
hvlad
7d54298dea Fixed CORE-1775 : Improve performance of security checking 2008-03-06 13:13:31 +00:00
asfernandes
e88fd596d9 Let DSQL cache lock logic in SS too - per Dmitry request 2008-03-03 15:40:56 +00:00
alexpeshkoff
48e9858b57 fixed CORE-1756: AV in isc_start_transaction (isc_start_multiple) 2008-02-29 16:44:17 +00:00
dimitr
99caa91b85 DSQL integration into the engine. 2008-02-28 13:48:16 +00:00
robocop
7a0a29e234 Move some clutter out of jrd.h to Database.h and Database.cpp. 2008-02-14 12:24:27 +00:00
robocop
a002cd3837 Comment unused code. 2008-02-14 12:21:35 +00:00
alexpeshkoff
c3e1830e12 1. Cleanup:
- moved Attachment constructor (big enough) into .cpp file
 - avoid use of dbb in Database::get() and getUserInfo()
2. Complete fix for CORE-1726 - SecurityDatabase::init() is now not Database, but Attachment counted.
2008-02-10 16:38:30 +00:00
alexpeshkoff
18f72a7ed2 Fixed filehandles and temp diskspace leak - delete dbb_sys_trans makes it close TempSpace 2008-02-08 16:54:10 +00:00
asfernandes
691fb487d8 Misc 2008-02-06 00:43:54 +00:00
alexpeshkoff
ee6c433597 Mutexes cleanup:
1. Make all firebird mutexes recursive.
2. Enable exceptions to be thrown by mutexes and process them in code where needed.
3. Catch and ignore exceptions in various MutexGuard dtors.
2008-02-05 08:21:18 +00:00
alexpeshkoff
63b726f8f0 fixed gcc warning 2008-02-02 18:08:28 +00:00
robocop
e9e1ead67a Mostly style, constness, native memcpy and explicit constructors. 2008-02-02 17:04:06 +00:00
asfernandes
ce0ae486c5 Misc 2008-01-29 18:07:37 +00:00
alexpeshkoff
49d9fd4b3c fixed gcc warning 2008-01-29 15:02:21 +00:00
alexpeshkoff
3589cebc95 Fixed some posix problems 2008-01-29 10:36:49 +00:00
dimitr
a38b327886 Cleanup. Get rid of the JrdMemoryPool. 2008-01-29 10:11:52 +00:00
dimitr
3921854d21 Major synchronization changes. Description of the commit will be posted to fb-devel. 2008-01-26 13:30:47 +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
74e8bba437 The merge is being fixed. 2008-01-16 11:51:42 +00:00
dimitr
d1e8f67a5d The merge continued. 2008-01-16 09:29:37 +00:00
dimitr
d276641cc8 Fixed CORE-1610 and its subtask CORE-1615. 2007-12-10 07:18:54 +00:00
asfernandes
41faeba3cc Misc 2007-12-05 00:03:15 +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
dimitr
65bde054e9 A few trivial optimizations. 2007-11-29 10:26:23 +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
asfernandes
9dd863d6d7 Create class to buffer random bytes generation as process of generate many small random bytes is slow - thanks to Nickolay 2007-10-28 14:54:16 +00:00
alexpeshkoff
edc03201ca Fixed CORE-1537: NBackup creates difference file in bad place 2007-10-26 13:21:16 +00:00
dimitr
91fa6a519b 1) Replaced the hackery LM-based ID generation with the local counter. Uniqueness will be ensured by the DatabaseSnapshot internals.
2) Fixed CORE-1441.
2007-09-05 07:18:37 +00:00
hvlad
61427ef242 Forgotten files for CORE-1381. Thanks to Adriano 2007-07-26 07:37:09 +00:00
alexpeshkoff
4a0e6d59f3 Fixed unreleased (or released in wrong order) locks in:
1. Dsql cache.
2. Transaction (table lock) - only when database dropped.
3. Collation - were released after database's lock.
2007-07-25 13:21:59 +00:00
alexpeshkoff
f250c52b4f Fixed CORE-1323: NBAK not working 2007-06-15 09:28:56 +00:00
asfernandes
ae3c20aa55 Misc 2007-06-07 03:35:04 +00:00
alexpeshkoff
ea8ba3370d Cleaned up mutexes - removed MUTX_T and related macros 2007-06-06 12:37:24 +00:00
dimitr
bc7c4d0054 Added remote process name to the monitoring data. Applications are allowed to override this value via DPB. 2007-05-16 07:54:33 +00:00
robocop
52f1b15e0c Misc. 2007-05-02 06:57:18 +00:00
skidder
04b9ec818b NBAK synchronization rework. This should fix CORE-1151 and other Nbackup stability issues 2007-04-24 14:05:46 +00:00
alexpeshkoff
6e735f7c53 Misc + gcc warning hunting 2007-04-09 16:15:29 +00:00
hvlad
119a702ec5 Fixed CORE-1127 : Circular index references in corrupt database causes fbserver to loop infinitely.
Thanks to Diane Downie
2007-02-14 08:57:34 +00:00
alexpeshkoff
2ed72ce2d1 Fixed results of copyNpaste technique - thanks to Adriano. 2007-01-26 10:31:22 +00:00
alexpeshkoff
d66281291f 1. Make classic server close shutdown normally when killed by signals 2 & 15.
2. Don't leave running instances of fb_inet_server after database shutdown.
3. To make all this possible - reworked Y-Valve in general.
2007-01-20 14:45:45 +00:00
dimitr
9d2b718bba Restored the old alter-in-use logic upon customer requests. 2006-12-14 16:11:21 +00:00
dimitr
b43b43eca9 1) Changed MON$STATEMENTS a bit.
2) Implemented statement cancellation.
2006-12-04 21:36:29 +00:00
asfernandes
570b6cd4b4 1) CORE-645 and CORE-745: Database triggers
2) CORE-711: Make syntax for "CREATE TRIGGER" compliant with SQL2003
2006-11-05 18:30:36 +00:00
alexpeshkoff
c7f3b027d6 Jrd's deletePool() now return pointer to next database's pool as suggested by dlh 2006-10-31 12:27:49 +00:00
hvlad
58d381edd7 1. Remove blr_src_info code as it is prevents database downgrade from ODS 11.1
2. Put debug information (mapping between blr offset and source line\column and names of local variables) into new blob field RDB$DEBUG_INFO
This is first step to implement native SQL debugger i believe
2006-10-30 20:58:06 +00:00
dimitr
e4fffd425f 1) Updated monitoring implementation.
2) Cleanup.
2006-10-30 12:39:08 +00:00
asfernandes
9a9f7ae899 Correction 2006-10-08 01:59:24 +00:00
asfernandes
6f9092fe35 Misc 2006-10-08 01:57:21 +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
dimitr
7c405166aa 1) Support for client PID in the monitoring data.
2) Changed XNET to return local hostname instead of PID as its remote address.
2006-09-14 13:47:31 +00:00
alexpeshkoff
205a7303c3 1. Centralized validation of attachment to be a super-user attachment.
2. Fixed a couple of old problems, when sysdba could perform operations, but
   database owner - could not.
3. Fixed CORE-84 - nbackup operations were allowed for everybody who can login
   to the given database.
4. Disabled creating shadows and adding additional DB-files for non super-user.
2006-08-16 15:15:58 +00:00
asfernandes
37284696a7 Misc 2006-07-22 03:54:43 +00:00
dimitr
0fe0535082 Forward declaration of enums is not allowed in the C++ language, even although being supported by MSVC.
This commit should fix GCC compilation problems.
2006-07-21 07:47:00 +00:00
robocop
64f6eb42a1 Misc. 2006-07-21 01:35:17 +00:00
dimitr
6992f3b904 Reject attempts to select from executable procedures. 2006-07-19 14:50:33 +00:00
dimitr
c68587fe66 1. Virtual tables
2. ODS 11.1, procedure type and relation type
2006-07-17 17:44:18 +00:00
asfernandes
3d20c0180a Misc 2006-07-12 15:13:22 +00:00
asfernandes
a86cf35ad4 Synchronization of DSQL metadata cache objects in classic-server 2006-07-10 03:12:10 +00:00
hvlad
8e14bc4f1e Move relation stuff from jrd.h\vio.cpp into new Relation.h\Relation.cpp
by request of Claudio and Dmitry
2006-05-30 13:29:24 +00:00
hvlad
4e20ada751 Move jrd_rel::getPages into jrd.h to make it inline not only in vio.cpp. Noted by Adriano 2006-05-29 07:41:11 +00:00
hvlad
64f6714f2d Optimize jrd_rel::getPages a bit 2006-05-28 11:54:54 +00:00
robocop
3fa49e994b Style and typo correction. 2006-05-26 05:19:48 +00:00
asfernandes
1dcdd0d3ca Misc 2006-05-25 03:15:53 +00:00
robocop
c4c5b05894 Misc. 2006-05-24 09:28:22 +00:00
asfernandes
92cd427bbd Misc 2006-05-23 03:37:00 +00:00
alexpeshkoff
2eca860afb fixed gcc warnings 2006-05-22 10:41:32 +00:00
hvlad
701f2cbda4 Global temporary tables implementation 2006-05-21 22:07:35 +00:00
dimitr
04e1c432d2 Misc. 2006-05-01 04:42:10 +00:00
dimitr
afa0f666b8 Threading cleanup. More to follow. 2006-05-01 04:12:30 +00:00
dimitr
bece02f7e8 Threading cleanup. More to follow. 2006-04-30 18:15:30 +00:00
dimitr
61bd8dbc05 Threading cleanup. More to follow. 2006-04-30 17:49:32 +00:00
dimitr
8f9d2584db Threading cleanup. More to follow. 2006-04-30 17:40:24 +00:00
dimitr
4d903bc32c Removed unused code. When MT-safe logic is done, we should use native classes instead of wrappers anyway. 2006-04-30 17:30:11 +00:00
alexpeshkoff
469589f573 Use Firebird::Array instead of STL's vector 2006-04-25 17:49:24 +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
robocop
2011950972 The files rng.cpp, rng.h, rng_proto.h, bookmark.cpp and bookmark.h belong exclusively to PC_ENGINE, that's obsolete functionality.
Ninth step: while doing cleanup, I discovered some data members that aren't used anymore or that should be inside conditional code. This is the result.
2006-02-03 02:28:58 +00:00
robocop
25c08aea67 The files rng.cpp, rng.h, rng_proto.h, bookmark.cpp and bookmark.h belong exclusively to PC_ENGINE, that's obsolete functionality.
Eighth step: dbb_refresh_ranges belongs to the obsolete functionality and since it's never set but tested in cch.cpp with two AND, the whole condition will be always false, hence remove the code.
2006-02-02 07:57:36 +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
8975ef292a The files rng.cpp, rng.h, rng_proto.h, bookmark.cpp and bookmark.h belong exclusively to PC_ENGINE, that's obsolete functionality.
Fourth step: remove forward declarations of classes Bookmark and RefreshRange. More to come.
2006-02-01 22:45:35 +00:00
alexpeshkoff
e85ee26ade fixed gcc warning(s) 2006-01-18 10:43:13 +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
hvlad
b144b0267d Enlarged dsql and jrd hash tables sizes 2005-11-21 23:52:11 +00:00
hvlad
9d6b361f69 Eliminate unnecessary JRD_get_thread_data call in nbak.
Checked against B2_0_BV_Stable3 branch
2005-11-21 23:33:20 +00:00
dimitr
0af3a3f462 Fixed one of the server shutdown bugs. More to come. 2005-07-24 18:48:45 +00:00
hvlad
0bc1c4bf49 1. Allow to create FK constraints without exclusive database locking
2. Fix 'partner index not found' error when one process dropped FK and another trying to delete master record
3. misc changes in vio.cpp
2005-06-26 21:48:47 +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
aafemt
0091cb5124 Fix warnings 2005-05-14 04:39:17 +00:00
alexpeshkoff
5729790ed6 1. Applied class MetaName
2. Small generic cleanup
2005-05-12 18:28:04 +00:00
dimitr
4ec439dd14 1) Deliver trigger type to the compiler level
2) Disallow NEW context assignments for POST-triggers
2005-03-28 21:52:55 +00:00
robocop
7084912c3d We are only asking for information, so use const. 2005-01-25 06:40:00 +00:00
robocop
24742873ad fb_string.h is moved to common/classes. 2004-12-17 05:41:47 +00:00
alexpeshkoff
752be8fbcb removed fault comment 2004-12-01 07:38:02 +00:00
alexpeshkoff
49aab40955 1. rewritten flu.cpp using modern firebird classes library
2. fixed diagnostic about missing/unusable UDF module
2004-11-29 11:15:09 +00:00
skidder
55c4e0ac85 CLIENT_ADDRESS and NETWORK_PROTOCOL variables support 2004-11-26 01:01:27 +00:00
alexpeshkoff
f762abf547 applied fixes, suggested by Claudio
made get_options method of class DatabaseOptions
2004-11-25 16:09:12 +00:00
skidder
35ddab28fb Implement Claudio suggestion regarding clean generic map class 2004-11-24 20:48:59 +00:00
robocop
d6535351a2 Misc: style. 2004-11-24 09:22:07 +00:00
skidder
9507cf9714 Context variables support 2004-11-22 20:22:03 +00:00
skidder
1e26d6c80d CURRENT_DATABASE implementation. Established identity may also be used for isc_info_db_id datum 2004-11-11 05:37:52 +00:00
hvlad
ffb640e22a Removed unneeded method as Nickolay suggested 2004-11-10 13:32:17 +00:00
hvlad
aba34753cb Add config file parameter for the garbage collection policy 2004-11-09 12:59:37 +00:00
robocop
77571e4c69 1.- Extra unneeded semicolons are being garbage collected.
2.- Style: sepate params by space, type for<space>(, etc.
2004-11-06 07:20:44 +00:00
hvlad
4d95ce3d42 New garbage collector thread implementation 2004-11-05 08:01:21 +00:00
dimitr
feb6b7e006 Replaced non-centralized datetime management with a new class. 2004-10-30 19:41:54 +00:00
robocop
31ba754981 After talking to Ann, decided to disable several items:
- obsolete items like WAL and JOURNAL (cleaned in the past)
- crud from attempts never finished like the shared cache manager for Classic
- DSQL nodes that aren't used. This allowed freeing some keywords.
The functionality was disabled by commenting the code. No code has been deleted.
2004-10-03 04:49:04 +00:00
skidder
02a0915156 Teach engine to work with larger record numbers - 64-bit internally, 40-bit externally 2004-09-28 06:28:38 +00:00
robocop
432f4b4376 Bye WAL macro 2004-09-27 11:50:28 +00:00
arnobrinkman
3a5cec7e97 1) Add filename and linenumber to loginformation for ERR_BUGCHECK
2) Fix some index bugs and little refactoring
2004-09-24 00:11:32 +00:00
alexpeshkoff
c3db4aaa97 added (and used in sources) template to change and restore default pool 2004-08-30 18:11:08 +00:00
skidder
478a252e70 Fix memory corruption issue in SuperServer builds noted by Valgrind 2004-08-17 02:02:21 +00:00
alexpeshkoff
31039a254e next step preparing to allocate auto objects memory from appropriate pool 2004-08-16 12:28:43 +00:00
hvlad
d82cde309e Ability to show PSQL stack trace when exception occurs. 2004-08-06 15:26:55 +00:00
skidder
f4e7ebdd3b Implement rudimentary framework to track lifetimes of active BLOBs.
This solves the following issues:
1) Outrageous memory consumption when blobs are converted from strings during request processing
2) Materialization doesn't cause invalidation of BLOB IDs too early.
Original behaviour caused errors with updatable views or procedures receiving BLOB arguments.
2004-06-22 20:13:10 +00:00
alexpeshkoff
1591a54e5e Thread cleanup:
1. Added macros to declare thread entrypoints
2. THD_mutex_* functions use Firebird::Mutex
3. Thread local storage use fb_tls.h
2004-06-08 13:41:08 +00:00
alexpeshkoff
2f99a5ebf1 small strings cleanup 2004-05-26 16:12:05 +00:00