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

155 Commits

Author SHA1 Message Date
hvlad
d6fae697a3 Remove not necessary sync points - dbb_lck_sync 2016-07-06 16:08:11 +03:00
Dmitry Yemanov
f2d0b64ba2 Misc adjustments after CORE-5232 and more encapsulation for the Lock
class.
2016-05-10 10:44:30 +03:00
James Clarke
0dc0a4b595 Fix locking on big-endian architectures
4e4d8002e5 extended locks to have 64-bit
keys in most cases, but some were left as 32-bit. However, code using
these 32-bit locks assumed that the significant bytes of the key's long
value started from lck_string[0], which is false on big-endian
architectures.  This commit adds Lock::getKeyString(), which gets a
pointer to the first used byte of lck_string, and should be used in
place of accessing lck_string directly.
2016-05-07 22:09:09 +01:00
dimitr
0b97f5fc41 Misc refactoring:
1) Renamed Hash class to HashTable
2) Reversed data/length arguments
3) Moved hash() routine to its own class/namespace
4) Fixed the license text
2016-03-05 17:40:49 +00:00
aafemt
a1d55c3e6e Optimized hash function for lock manager and hash join 2016-03-05 12:28:04 +00:00
hvlad
714e6c2eaf Remove LCK_idx_reserve introduced with 64-bit transaction ID.
Restore original logic in BTR_next_index (wait for tx lock when index build is in progress). 
Use irt_repeat::irt_root to store high 32 bit of tra_num. 
It also fixed deadlock related with LCK_idx_reserve lock (reported privately).
2016-01-27 11:11:38 +00:00
dimitr
dc7aad88ed 1) Slightly refactored recheduling and checkout logic.
2) Re-enabled checkouts in PIO routines, this resolves CORE-4179. Windows build may be broken, please validate.
3) Implemented faster reaction on asynchronous cancellation/shutdown requests.
4) Avoided locking dbb_sync in AST. This change also solves races during massive attachment shutdown.
2015-11-29 15:12:31 +00:00
hvlad
58248822af Removed unneeded assert, correct code a bit as Dmitry suggested 2015-11-04 07:23:58 +00:00
dimitr
4e4d8002e5 CORE-4965: Extend the transaction ID space beyond 2^32 transactions. Initially developed in the v2.5 custom branch, then reworked and now merged into v3.0. 2015-10-19 13:32:02 +00:00
dimitr
fce30a63fa Fixed the hash function (broken since the very beginning). 2015-08-20 11:23:48 +00:00
asfernandes
ae30b29011 Misc. 2015-06-29 01:02:52 +00:00
hvlad
2e78b5a7e0 Feature CORE-4707 : Implement ability to validate tables and indices online 2015-06-19 12:07:41 +00:00
alexpeshkoff
e7663b6bc0 Use status interface instead plain status vector when working with exceptions.
Avoid use of circullar allocation for strings in status vector (except when unavoidable for ISC API backward compatibility).
Use TLS for circullar allocation buffer instead manually working with threads' list.
2015-03-27 14:36:30 +00:00
dimitr
b742803ebf Refactored the shared cache checks. Optimized the shared counter for SS. 2014-09-01 13:19:53 +00:00
dimitr
6199136792 Refactored database monitoring, made its handling attachment bound. This should make deadlocks impossible, as well as avoid blocking worker connections while the monitoring request is processed. 2014-07-31 08:56:53 +00:00
alexpeshkoff
6a2016235a Fixed CORE-4435: After calling release() for attachment to database (instead detach) in embedded mode attachment remains active forever (and some cleanup re. reference counters) 2014-06-10 07:13:34 +00:00
mapopa
204f33a5c9 VMS lock cleanup 2014-04-30 09:20:30 +00:00
hvlad
db70a7742d Fixed bug CORE-3921 : "record disappeared (186), file: vio.cpp line: 408" 2013-09-12 19:08:59 +00:00
alexpeshkoff
d2b757507c Rollback bad fix for CORE-4185 2013-09-02 13:21:37 +00:00
alexpeshkoff
ee0be488a4 Fixed CORE-4185: message "Invalid lock ID" happened due to incorrect lock kind 2013-08-26 06:28:07 +00:00
dimitr
a12e7b6eaa Cleanup. 2013-08-19 17:29:44 +00:00
alexpeshkoff
70a5c5db43 Always lock dbb_sync before accessing something in setLockAttachment() 2013-08-16 12:41:49 +00:00
dimitr
8a9cebb21e Fixed the sweep lock owner. This is a complementary bugfix for CORE-4134 (Race condition when auto-sweep is started). 2013-07-15 13:51:18 +00:00
alexpeshkoff
afa0770781 1. Fixed broken by me a few time ago server shutdown.
2. Implemented prototype of TLS-based debugging helper holding information about 'What does firebird do now?"
   Currently it's more or less ready for use with JAttachment::release().
2013-03-15 16:37:32 +00:00
alexpeshkoff
c74565ce0e Avoid races with lck_attachment in AST 2012-12-29 13:48:49 +00:00
alexpeshkoff
b3f9759960 Take locks in AST before building tdbb
Fixed assertion in CCH_exclusive_attachment 
Rolled back my changes required to let cancelOperation() enter engine after shutdown
Better locks' history in SyncObject
2012-12-18 13:54:18 +00:00
dimitr
42a4c93b97 1) Removed the no longer actual "parent lock" concept from both the lock and event managers.
2) Reworked the lock manager synchronization: added the RAII mutex holders and avoided dirty reads for the shared memory.
3) Encapsulated lck_length into the Lock class + small related  refactoring.
4) Front ported recent fixes from the v2.x branches.
5) Misc cleanup.
2012-06-21 15:37:38 +00:00
alexpeshkoff
2a01e4bcf9 Implemented CORE-3861: Make it possible to encrypt database
Also some cleanups, the most important are:                                                                                                                   
- meaningful ctor on Jrd::Lock, helping to avoid code dup                                                                                                     
- avoid unneeded h-file dependencies, making boot build engine dependent
2012-05-31 16:53:42 +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
21cd78a0fd Cleanup: unused functions, parameters & variables. 2012-01-24 03:37:43 +00:00
dimitr
d6c99d641a Fixed the lock owners accordingly to the per-attachment metadata caches. 2011-12-23 17:08:54 +00:00
robocop
5ad96271e6 Misc. 2011-06-24 06:34:16 +00:00
asfernandes
d0c2265105 Misc. 2011-05-10 01:12:14 +00:00
hvlad
fef1f49c94 Shared page cache implementation 2011-05-09 10:15:19 +00:00
dimitr
4b3033c013 Better locality of allocations. This also fixes a tiny memory leak in SuperServer. 2011-04-05 05:36:05 +00:00
robocop
82403a5621 Misc, style, etc. 2011-04-02 04:45:26 +00:00
asfernandes
0193d90f6c Fix definition and usages of fb_assert. 2011-02-26 16:03:36 +00:00
asfernandes
7800060e22 Misc 2011-02-04 23:58:10 +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
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
alexpeshkoff
f28f040e0f Fixed CORE-3024: Error "no current record for fetch operation" after ALTER VIEW (and a lot of other possible inconsistencies) 2010-06-15 12:27:33 +00:00
alexpeshkoff
88b8a40a04 1. Cleaned up most of SUPERSERVER usage.
SUPERSERVER has 4 different meanings in our code:
- this is milticlient server (replaced with Config::getMultiClientServer())
- use shared data cache (replaced with Config::getSharedCache())
- use shared metadata cache (replaced with macro SHARED_METADATA_CACHE)
- database are NOT shared between processes (replaced with getSharedDatabase())

2. Use fb_smp_server as both superclassic and classic binary on posix
(xinetd autodecection is done).

3. Small posix build cleanup.
2010-04-15 14:40:27 +00:00
dimitr
05ac7fb118 Fixed error reporting for no-wait transactions. 2010-02-16 16:23:49 +00:00
robocop
06a4224d0b Put class Attachment in its own files by brute force. 2009-12-25 09:55:05 +00:00
dimitr
87c632874d Support for PSQL functions (misc JRD changes). Still work in progress. 2009-12-21 17:31:34 +00:00
hvlad
71e02a96d4 Caller should know reason why LM denied its request 2009-12-17 19:29:29 +00:00
asfernandes
e99a07bffd Remove usage of tdbb (and tdbb->tdbb_status_vector) in the lock manager 2009-12-06 01:34:57 +00:00
robocop
f95155fd14 Misc. 2009-11-27 08:10:13 +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