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

525 Commits

Author SHA1 Message Date
hvlad
5e6a939197 Set transaction handle to NULL after successful commit or rollback 2008-03-28 09:18:39 +00:00
alexpeshkoff
cbe0217664 fixed gcc warning 2008-03-27 09:14:24 +00:00
dimitr
b87b5032ef Changes in the TimeStamp class by Dmitry Kovalenko. 2008-03-26 10:21:04 +00:00
robocop
8270e50066 make them explicit. 2008-03-22 09:02:27 +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
alexpeshkoff
ed25245303 Applied shutdown changes, discussed in fb-devel a week ago. 2008-03-17 16:49:47 +00:00
asfernandes
493a6eab3c Misc 2008-03-17 02:00:16 +00:00
asfernandes
8bb723bec3 Validate (and store in tdbb) non-NULL transaction handles 2008-03-16 19:30:00 +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
robocop
dadefcb479 Binary things are UCHAR. Let's try to fix them from the innermost layer to the outermost layer until we can fix the public interfaces. 2008-03-10 09:31:40 +00:00
asfernandes
74d8711856 Misc 2008-03-08 21:20:26 +00:00
robocop
b1b7634b3d Since SCL_release changed meaning, it's necessary to adjust the name (SCL_release_all) and the comments. 2008-03-08 11:37:15 +00:00
asfernandes
0b6ecafe1b 1) Remove REPLAY_OSRI_API_CALLS_SUBSYSTEM code
2) Remove internal y-valve function INTERNAL_COMPILE_REQUEST
3) Go direct to engine internals from DSQL, without need to exit/enter the attachment lock and check exceptions in status vector
2008-03-07 15:23:21 +00:00
hvlad
7d54298dea Fixed CORE-1775 : Improve performance of security checking 2008-03-06 13:13:31 +00:00
hvlad
23679a8b04 Fix few race conditions during metadata load and make index lock block accounting more MT safe. 2008-03-05 14:23:19 +00:00
dimitr
d597154a4b 1) Added timeout value to the shutdown API call.
2) Fixed the slow fbembed detach noticed by Claudio and Vlad.
3) Cleanup.
2008-03-04 13:27:02 +00:00
robocop
8888ecb544 Let's better use UCHAR for binary streams. 2008-03-04 06:03:34 +00:00
asfernandes
e88fd596d9 Let DSQL cache lock logic in SS too - per Dmitry request 2008-03-03 15:40:56 +00:00
asfernandes
88b6f39f82 1) Restore logic of not handled exceptions
2) Initialize some status vectors
2008-03-03 00:47:04 +00:00
asfernandes
7a2dedaa39 Go direct to engine internals from DSQL, without need to exit/enter the attachment lock - more to follow 2008-03-02 21:16:16 +00:00
asfernandes
35688cd5d9 Cleanup: remove y-valve functions DSQL_CACHE and INTL_FUNCTION 2008-03-01 19:14:46 +00:00
dimitr
0096b53d9b Fixed the issue reported by Dmitry Kovalenko in fb-devel. We don't need to validate the transaction handle in JRD, as DSQL does some tricks about it. 2008-03-01 08:42:31 +00:00
alexpeshkoff
48e9858b57 fixed CORE-1756: AV in isc_start_transaction (isc_start_multiple) 2008-02-29 16:44:17 +00:00
dimitr
5ca270c096 1) Cleanup SERVER_SHUTDOWN.
2) Make the engine shutdown asynchronous.
2008-02-29 12:47:20 +00:00
alexpeshkoff
00c63c1f8d 1. Make signals handling in yValve MT safe.
2. Introduce new private API calls, fb__shutdown() and fb__shutdown_callback().
3. Introduce fb_smp_server - binary to run superclassic on posix.
4. Various cleanups.
2008-02-28 18:42:30 +00:00
dimitr
99caa91b85 DSQL integration into the engine. 2008-02-28 13:48:16 +00:00
dimitr
6343ea1d84 1) Fixed a deadlock related to SecurityDatabase.
2) Cleaned up the code duplicated in CMP_shutdown_database(). This was a mistake in one of my prior commits.
2008-02-27 12:25:04 +00:00
dimitr
c7bbcda729 Fixed the mutex recursion in jrd8_prepare_transaction. Thanks to Dmitry Kovalenko. 2008-02-24 09:55:10 +00:00
robocop
95e59f72b5 Undo the check for 255 bytes in JRD_num_attachments (let the callers handle long paths).
Fix some memory leaks (at least one of them signaled by myself years ago) when calling JRD_num_attachments.
Introduce an enumeration for the "flag" parameter in the same function.
2008-02-21 04:24:42 +00:00
dimitr
0542cccc67 Cleanup the code that was never enabled. 2008-02-20 16:33:59 +00:00
dimitr
3b843d8aea Make the memory stats SuperClassic friendly. It doesn't make the Classic logic much worse. 2008-02-20 15:29:07 +00:00
robocop
5bff502eac Better report truncated paths than to crash due to malformed parameter block. 2008-02-20 10:20:40 +00:00
dimitr
81df8a829f Added missing synchronization. 2008-02-19 16:50:04 +00:00
dimitr
7ae3eb5977 1) Make enumeration and shutdown routines SuperClassic friendly.
2) Cleanup and minor refactoring of the Classic shutdown routines.
2008-02-19 16:23:53 +00:00
asfernandes
c979d91901 Misc 2008-02-19 02:34:55 +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
360cc4c31b Style. 2008-02-14 07:31:25 +00:00
dimitr
ff9e777bc0 Cleanup, style and synchronization. Solved a few deadlocks and races during attach. 2008-02-14 07:12:13 +00:00
alexpeshkoff
dbf65528b8 Fixed CORE-1726: isc_service_start failed, use InitHolder for SecurityDatabase in services too. 2008-02-13 13:10:23 +00:00
asfernandes
627202bd84 Fix operator precedence 2008-02-11 23:32:15 +00:00
dimitr
78b4b30764 Move the dbb<->att check under the mutex protection. 2008-02-11 17:39:04 +00:00
asfernandes
4ffcaa7c5b Misc 2008-02-10 17:26: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
robocop
4c3381ef6b Style, constness and macro cleanup. 2008-02-03 10:41:44 +00:00
asfernandes
b39ac40c9d Misc 2008-02-03 02:32:39 +00:00
alexpeshkoff
8901a0e003 Services cleanup - make class Service traditional C++ class 2008-02-02 18:33:37 +00:00
robocop
e9e1ead67a Mostly style, constness, native memcpy and explicit constructors. 2008-02-02 17:04:06 +00:00
dimitr
9c9413d02e Fixed issue spotted by Claudio privately. 2008-02-02 14:36:06 +00:00
dimitr
16814b51a6 Let's be consistent with operation order during dbb destruction. 2008-01-29 17:32:42 +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
asfernandes
de8771570f Misc 2008-01-29 01:36:41 +00:00
dimitr
c0f1809bde Let's explicitly release all locks we own. 2008-01-28 17:27:03 +00:00
dimitr
ed3817f6b6 Sigh, we have to release the dbb when doing authentication. 2008-01-26 17:33:57 +00:00
dimitr
d54edd1a13 Major synchronization changes. Description of the commit will be posted to fb-devel. 2008-01-26 13:51:33 +00:00
asfernandes
aea2bcb354 Misc 2008-01-23 19:03:16 +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
c577fde263 The merge is being fixed. 2008-01-16 12:29:45 +00:00
dimitr
d1e8f67a5d The merge continued. 2008-01-16 09:29:37 +00:00
dimitr
516f75c010 Protect the mutex from being released twice. 2007-12-19 14:12:31 +00:00
dimitr
cf12557e36 Code simplification. We don't need to track the cancellation for the non-request activities. 2007-12-11 09:19:06 +00:00
dimitr
d276641cc8 Fixed CORE-1610 and its subtask CORE-1615. 2007-12-10 07:18:54 +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
alexpeshkoff
3e0d8ebc5b Fixed CORE-1603: Possible buffer overflow with long user name 2007-11-19 16:18:59 +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
alexpeshkoff
a80dd39b11 Fixed CORE-1593: Full domain user name can be longer than 31 char(for trusted authentication) 2007-11-15 12:48:24 +00:00
alexpeshkoff
c4f6801e34 avoid cast 2007-11-01 17:19:54 +00:00
alexpeshkoff
8c542c5b26 Fixed CORE-1551: AV when all statements are cancelled 2007-10-30 14:50:05 +00:00
alexpeshkoff
edc03201ca Fixed CORE-1537: NBackup creates difference file in bad place 2007-10-26 13:21:16 +00:00
dimitr
025cf5c752 Fixed CORE-1540. 2007-10-26 10:53:47 +00:00
robocop
5e135ba43f Moved the bool before the strings. 2007-10-24 07:03:37 +00:00
robocop
3c9917e8e2 For now, we are only interested in knowing that
dpb_gbak_attach was specified, not in the content of the string.
2007-10-24 06:26:31 +00:00
dimitr
81a791c6bb Allow ASTs to be delivered while the engine performs some long activity. 2007-10-15 17:45:30 +00:00
hvlad
6bc73b2260 Correction for fix for bug CORE-1443 2007-09-18 14:58:31 +00:00
hvlad
ebb55209c0 Fixed bug CORE-1468 : Database corruption possible when database file extension and read\write activity is performed simultaneously 2007-09-18 14:50:51 +00:00
hvlad
193910ff7c Fixed bug CORE-1443 : Embedded engine may hang application on exit if no database access was performed 2007-09-06 07:52:39 +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
robocop
3a7d93f658 Misc tweaks with Firebird::string. 2007-08-26 09:53:08 +00:00
asfernandes
6beb5e28bd Misc 2007-07-26 01:23:18 +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
alexpeshkoff
0545a76ef6 Fixed role uppercasing - thanks to Adriano 2007-06-13 13:21:40 +00:00
alexpeshkoff
4a4a01ee98 Restored old (SYSDBA) value of CURRENT_USER during BOOT_BUILD 2007-06-09 09:25:40 +00:00
alexpeshkoff
abb9f55932 fixed option name 2007-06-09 08:38:27 +00:00
asfernandes
fbf04d54fc Misc 2007-06-09 04:06:26 +00:00
alexpeshkoff
e5f1e63836 Fixed CORE-1312: A remote attacker can check, if a file is present in the system, running firebird server 2007-06-08 10:24:57 +00:00
alexpeshkoff
ea8ba3370d Cleaned up mutexes - removed MUTX_T and related macros 2007-06-06 12:37:24 +00:00
asfernandes
e705b335f8 Fix non-ASCII object names in:
1) aliases in PLANs
2) EXECUTE PROCEDURE
3) SELECTs inside procedures/triggers
2007-05-26 22:08:13 +00:00
alexpeshkoff
f72f84ed58 Much better pool may be used here 2007-05-24 12:18:41 +00:00
alexpeshkoff
364849e5fe Fixed ContextPoolHolder usage - in non-AST cases pool should not be 0 2007-05-24 12:13:10 +00:00
asfernandes
c67afcb4ee Improvement CORE-1277 - Automatic transliteration of text blobs 2007-05-22 02:14:20 +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
hvlad
395fa7f43d Assing memory pool in tdbb at database detach. 2007-05-07 13:09:26 +00:00
alexpeshkoff
6f8fb87780 Front-ported fix for CORE-1240 - any task, using libfbclient, hangs on exit on Darwin/PPC 2007-05-03 13:52:16 +00:00
skidder
742706cc4d Fix server crash if database file cannot be created that was introduced by our previous patch 2007-04-26 17:25:49 +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
dimitr
4c66511fbd Correction for my old commit. Enforced rescheduling does very bad job for classic, causing a major slowdown. 2007-04-17 12:39:56 +00:00
alexpeshkoff
f0d465bf34 Fixed gcc warnings, general (un)signed usage cleanup 2007-04-11 09:28:50 +00:00
alexpeshkoff
6e735f7c53 Misc + gcc warning hunting 2007-04-09 16:15:29 +00:00
dimitr
72c5963844 Misc. 2007-04-05 04:27:29 +00:00
hvlad
79613ef6aa Don't waste even a nanosecond copying string if we can avoid it 2007-04-04 21:38:06 +00:00
asfernandes
032a4b170c Don't leak memory after conversion to blob for store the value in a variable or parameter 2007-03-24 03:00:22 +00:00
hvlad
b3dcfede36 Close external table's file when relation is not used by the engine.
This is simplest fix for bug CORE-132 (Restore fails on external table) and CORE-961(Free external tables)
2007-03-19 21:34:52 +00:00
dimitr
05473ab246 Front-ported fix for CORE-943. 2007-03-09 08:55:07 +00:00
dimitr
57c02cc754 Front-ported fix for CORE-1140. 2007-03-09 08:16:37 +00:00
dimitr
d3ae3fef1c Front-ported fix for CORE-1139. 2007-03-09 07:59:05 +00:00
asfernandes
e544f6fd1e Misc 2007-03-01 00:44:14 +00:00
alexpeshkoff
c877054ae5 Fix for CORE-900: Deadlock when attaching simultaneously with services and standard APIs 2007-02-28 08:40:27 +00:00
alexpeshkoff
9b2d957057 Fixed CORE-1091 - isc_service_query() showed full db file name 2007-02-26 16:17:00 +00:00
asfernandes
ba4be4f293 Misc 2007-02-26 02:13:42 +00:00
asfernandes
f73cf3e501 Initialize random seed when necessary 2007-02-26 01:01:17 +00:00
asfernandes
d87a30bf0c Misc 2007-02-23 01:42:10 +00:00
alexpeshkoff
dfef55e991 Fix for CORE-968 - Assertion failure in posix/isc_ipc.cpp 2007-02-22 16:47:39 +00:00
robocop
409ff041dd Misc and replaced "IB" by "FB" where it made sense to me. 2007-02-11 09:04:54 +00:00
dimitr
1c2de5688c Fixed (partially) CORE-1105. A half of the whole db alias idea has been broken three years ago and left unnoticed until now. Sigh. 2007-02-08 14:14:54 +00:00
alexpeshkoff
7d3949ad67 Fixed some problems, noticed by Claudio. 2007-01-28 12:17:17 +00:00
hvlad
3843604cd0 GTT related bugfix 2007-01-27 15:40:12 +00:00
asfernandes
c3d64106e0 Misc 2007-01-26 01:24:48 +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
asfernandes
f30ee6b63e Use debug informations in EXECUTE BLOCK 2007-01-20 14:18:18 +00:00
asfernandes
aca179f398 Full domain support and NOT NULL in PSQL 2007-01-17 01:19:01 +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
asfernandes
9493f2fb66 Fix problems with COMMIT triggers:
1) Fix a problem when the transaction could not be commited due to errors in DFW.
2) Run triggers inside a savepoint when "preparing" the transaction.
3) More doc.
2007-01-06 23:54:23 +00:00
hvlad
b9d0a9bcd6 Fixed CORE-1080 : Bugcheck 167 (invalid SEND request) in SS when many parallel attachments begin to execute trigger not loaded into metadata cache 2007-01-06 13:43:41 +00:00
dimitr
83c7f38229 Fixed CS build. 2007-01-06 06:52:43 +00:00
asfernandes
5db5421a66 Misc 2006-12-30 16:55:06 +00:00
asfernandes
de7dbae857 Rollback changes of all ON TRANSACTION COMMIT triggers when one trigger fail 2006-12-30 01:26:50 +00:00
dimitr
40f6fa11d0 Let's not cancel the verb cleanup process as it causes a fatal bugcheck. 2006-12-22 15:49:31 +00:00
asfernandes
bfcc8df647 Restore the original status vector 2006-12-13 14:28:57 +00:00
asfernandes
7329ad3f3b Run ON DISCONNECT triggers on server shutdown - thanks to Alex 2006-12-12 14:21:17 +00:00
alexpeshkoff
1a4652f01a Trusted authentication for windows 2006-12-08 18:38:15 +00:00
dimitr
b43b43eca9 1) Changed MON$STATEMENTS a bit.
2) Implemented statement cancellation.
2006-12-04 21:36:29 +00:00
asfernandes
d168869475 Added RDB$NULL_FLAG and RDB$PARAMETER_MECHANISM to RDB$PROCEDURE_PARAMETERS 2006-11-24 00:25:13 +00:00
asfernandes
3e7a2b4542 Do not swallow bugcheck exceptions - thanks to Claudio 2006-11-12 21:19:50 +00:00
robocop
4734698382 Fix a crash in Adriano's db triggers when using -shut and -tran in gfix, because TRA_start can throw and thus our result in jrd.cpp was uninitialized. 2006-11-10 08:38:55 +00:00
robocop
7a46dc7247 Misc. 2006-11-10 08:12:07 +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
hvlad
f48f2af25b Few corrections pointed by Claudio 2006-11-03 09:42:42 +00:00
asfernandes
4197a8be70 Fixed a bug when the connection charset is multibyte, appeared after recent changes to CsConvert class. 2006-11-02 22:37:19 +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
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