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

415 Commits

Author SHA1 Message Date
asfernandes
07557dc297 Misc. 2012-05-26 18:05:56 +00:00
robocop
844b15bd13 Misc and style. 2012-05-20 10:00:52 +00:00
robocop
642d506cd9 Change txn numbers to unsigned and commit after Vlad's review. If the compile-time checks (to ensure enough room for the new txn type) are too ugly, they may be deleted. 2012-05-19 12:04:37 +00:00
hvlad
ec6c21f244 Fixed bug CORE-3814 : SuperClassic server crashes when performing a database shutdown (FW=OFF) 2012-05-03 14:05:47 +00:00
asfernandes
580172419b Misc. 2012-04-23 00:48:28 +00:00
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
hvlad
bd96e2c2e5 New patch for CORE-3468 2012-03-22 00:21:57 +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
asfernandes
ed3d7ed720 Misc. 2012-01-20 01:42:03 +00:00
robocop
e2914070b9 Misc. 2012-01-19 04:54:39 +00:00
dimitr
64f68935d0 Methinks this solution should be a bit better, as it doesn't overwrite the pending error code (happened in PIO). 2011-12-23 18:13:55 +00:00
dimitr
8dda62eaab Fixed the assertions caused by the isc_lock_conflict error left in the status vector after successful execution of the API call. 2011-12-23 17:11:37 +00:00
dimitr
d542f5ac88 Fixed the races leading to a crash during dbb finalization. Thanks to Adriano for assistance. 2011-11-01 04:02:59 +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
hvlad
dc4abc05e4 Protect system attachments list with dedicated sync object. It prevents deadlocks with common sync object on process shutdown. 2011-10-02 10:19:06 +00:00
asfernandes
b048dfb072 Misc. 2011-09-30 01:15:13 +00:00
dimitr
c864f7ed66 Misc. 2011-09-23 05:44:59 +00:00
dimitr
b100b395eb Being a little bit more paranoid doesn't hurt. 2011-09-22 18:15:21 +00:00
asfernandes
26392cae53 Misc. 2011-09-22 01:40:38 +00:00
dimitr
031339406c Methinks it's more correct from the scoping POV. 2011-09-21 17:49:49 +00:00
dimitr
17f39f77f9 Slightly reworked the cache writer thread:
- it doesn't make sense to return -1, as the result is void* with PTHREADS
- a single try-catch block looks better
- cross-helping between GC and CW/CR threads is agreed to be a bad idea
2011-09-21 07:45:09 +00:00
hvlad
82fc475600 Missed lock 2011-06-24 08:44:33 +00:00
robocop
5ad96271e6 Misc. 2011-06-24 06:34:16 +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
hvlad
757ac2923c Additional fix for correct Nbackup state lock accounting. See also CORE-3465 2011-06-15 11:59:28 +00:00
hvlad
9f94f41e4e Fixed bug CORE-3521 : Delta file contents is not flushed to disk 2011-06-15 11:43:42 +00:00
hvlad
81cec16f83 Fixed leak of SysAttachment instance. Noted by Claudio. 2011-06-13 11:09:19 +00:00
hvlad
00af466e84 Fixed mistake noted by Claudio 2011-06-03 08:25:04 +00:00
asfernandes
2c9dd7e1ff Misc. 2011-05-28 02:05:45 +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
7b72429210 Misc. 2011-05-13 01:15:18 +00:00
asfernandes
3800177568 Misc. 2011-05-12 00:42:40 +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
asfernandes
7915153e51 Misc. 2011-05-07 19:33:46 +00:00
hvlad
d57814996f Fixed bug CORE-3466 : Some changes could be lost during the merge of delta file into main database file.
Removed BDB_merge flag and related code.
2011-05-05 18:11:22 +00:00
hvlad
5bbff34ac1 FiFixed bug CORE-3465 : Nbackup state lock could be not released after cache error. It results in "Can't lock state for write" bugcheck when backup state is going to be changed. 2011-05-05 17:40:54 +00:00
hvlad
dc30e39fd7 Fixed bug CORE-3464.
Correct error reporting - bugcheck's 215 and 216 was confused with each other.
2011-05-05 14:33:50 +00:00
asfernandes
0193d90f6c Fix definition and usages of fb_assert. 2011-02-26 16:03:36 +00:00
hvlad
aa77d27743 Fixed problem with GTT's reported by Adriano in fb-devel 2011-02-14 08:47:09 +00:00
dimitr
d5b24b77fb Removed the supposedly wrong checkout (it was added in v2.0), as theoretically it can lead to race conditions in the page cache. 2011-02-03 08:01:22 +00:00
dimitr
e3831d1061 Fixed the cache logic (manifested itself as infinite loops) after Alex's SLONG->ULONG changes for page numbers. There's still room for further changes. While being there, performed some related cleanup. 2011-02-02 17:47:11 +00:00
asfernandes
ffb28dfc3d Misc 2011-01-22 17:15:52 +00:00
alexpeshkoff
f89ac854ef Getting ready to use 32 (not 31) page and transaction numbers 2011-01-21 17:55:04 +00:00
asfernandes
5c7e5ce634 Misc 2010-10-22 01:24:31 +00:00
hvlad
f223086fdd Corrections for new build system. Work in progress... 2010-10-18 17:23:36 +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
83d6a2f88c Restored a lot of changes, rolled back by me unintentionally 2010-10-12 11:36:51 +00:00
alexpeshkoff
2dc25a44bb OSRI and new posix build 2010-10-12 08:02:57 +00:00
robocop
98a2c6822d Warnings. 2010-09-24 09:53:51 +00:00
asfernandes
3940feef1f Port from CVS Vlad's fixes for CORE-3015, CORE-3016 and CORE-3017 2010-06-05 00:48:06 +00:00
asfernandes
0762519962 Misc 2010-04-09 00:53:31 +00:00
dimitr
e0179c672d Cleanup. Let's finally use a single (and standard) behavior of the allocator. 2010-04-08 09:35:39 +00:00
asfernandes
f9154aca75 Misc 2010-04-07 02:04: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
dimitr
e5a732d782 Cleanup the dead code remaining from the legacy scrollable cursors feature. 2010-03-16 06:21:28 +00:00
alexpeshkoff
e5017f1a12 Extend format of firebird configuration file with a set of additional parameters for any parameter.
Use traditional firebird configuration files format in all places (intl, trace, etc.).
Add per-database configuration facility to aliases.conf (currently 15 parameters from firebird.conf).
2010-02-28 18:00:51 +00:00
alexpeshkoff
255f088785 Frontported fix for CORE-2842: Timeout with latchs in CCH does not work 2010-02-04 15:28:33 +00:00
hvlad
bf7464bc69 Cleanup : remove tree of dirty pages in favor of list based implementation. 2010-01-06 17:38:54 +00:00
hvlad
a2af0c8e9e ODS change : implemented SCN inventory pages to make diffrential backup faster not reading pages which was not changed since previous backup.
Corresponding nbackup and validation code changes also done.
PAG code refactored a bit.
2009-12-20 23:13:01 +00:00
hvlad
19f5a8b76e Misc 2009-12-14 11:41:47 +00:00
dimitr
c9fd9c5732 Cleanup. 2009-12-14 11:33:13 +00:00
hvlad
559494bfd3 A couple of ODS changes :
- abandon page checksums and use page number for validation
- PIP have now pip_used field to track number of allocated pages
- two more flag bits per data page is now reserved on pointer page. One is for the swept flag and second is still not used but makes calculations easy
- misc changes
Don't forget to rebuild your DBs !
2009-12-14 09:46:16 +00:00
robocop
00c5d74904 Cleanup. 2009-12-13 13:49:43 +00:00
robocop
d5fc87e0d2 Make checksum deterministic in all platforms (it was already in Windows and UNIX). 2009-11-29 07:09:41 +00:00
robocop
409ab220b0 - Eliminate the LOG page.
- Eliminate the useless bumped transaction
- Close the gaps in flags related to indices (btr_* in ods.h)
- Close the gaps in header page clumplets types (HDR_* in ods.h)
- Close the gaps in header page flags (hdr_* in ods.h)
Please do a full rebuild.
2009-11-28 08:04:04 +00:00
robocop
6b58626584 Cleanup. 2009-11-27 06:57:17 +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
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
asfernandes
9c1918d39b Misc 2009-10-15 02:15:31 +00:00
hvlad
789b069820 Improvement CORE-2672 : Reduce precedence writes 2009-10-11 22:15:51 +00:00
hvlad
1c1dbeae5b Improvement CORE-1687 : Allow bigger cache sizes than 2 GB (16K * 128 K) for x64 builds 2009-09-06 09:39:40 +00:00
robocop
99ddf76ef8 Comments. 2009-08-23 11:43:25 +00:00
alexpeshkoff
4fe226c84d Much better fix for CORE-2590, thanks to Dmitry Yemanov 2009-08-19 07:49:37 +00:00
asfernandes
ae6c7e7352 Misc 2009-08-14 01:58:22 +00:00
alexpeshkoff
289f84d777 Fixed CORE-2590: SegFault in page AST routine under high load 2009-08-13 12:46:20 +00:00
robocop
d82f063395 Style. 2009-06-26 04:12:20 +00:00
robocop
eca8ad1a4d bool, style. 2009-06-07 10:16:41 +00:00
robocop
e920037b8a Misc. 2009-06-06 09:05:20 +00:00
robocop
e5b226f7a7 More unused params; style. 2009-05-02 13:00:09 +00:00
robocop
66b1227b22 Unused params, some formatting, cleanup. 2009-05-01 17:21:36 +00:00
asfernandes
1c20adb8fc Misc 2009-04-29 01:52:49 +00:00
robocop
2d7cb94844 Unused params
Some BLR checks
2009-04-28 13:08:04 +00:00
robocop
4480c7c405 Misc. 2009-04-01 10:49:54 +00:00
asfernandes
a6d88154ee Misc 2009-03-18 02:43:15 +00:00
roman-simakov
1a4949891b Refactored NBackup subsystem.
1) Fixed CORE-1696 - "Deadlock in LM by using nbackup utility" with priority rating of lock requesting for LCK_backup_database and LCK_bdb.
2) A lot of stability fixes were made.
3) The key thing is using new GlobalRWLock for removing LCK_set_owner_handle function and speed up performance.
4) The code is still ready for using both in shared cache architecture and in claster architecture.
2009-03-17 07:39:55 +00:00
robocop
fab6a3a6cf Get rid of superflous parentheses. 2009-02-28 11:57:40 +00:00
dimitr
0cb4e923cd 1) Cleanup the legacy page op counters (they're redundant now).
2) Return 64-bit values in the information buffer, if required.
2009-02-05 20:12:30 +00:00
dimitr
2760b48e81 Fixed more cases causing a successful completion with a non-empty status vector. 2009-01-23 11:16:31 +00:00
robocop
3689f15321 Style. 2009-01-20 08:33:59 +00:00
robocop
582cdf185b Style. 2009-01-14 09:19:00 +00:00
robocop
21bb7f3d20 Style. 2009-01-03 09:14:29 +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
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
robocop
e4650d5027 Promote thread_data* as function argument. Only exception where both tdbb and dbb were left together as arguments is nbak.cpp's call to CCH_rollover_to_shadow to avoid any side effect in the changed code, but anyway, that function calls SDW_rollover_to_shadow that takes the dbb from the tdbb and not explicitly. 2008-12-14 09:28:25 +00:00
asfernandes
8fbf0e8e8c Remove trailing spaces (.cpp files) 2008-12-05 01:20:14 +00:00
dimitr
5ac621c954 Let's not hide the line number of a particular bugcheck call behind a dummy function. 2008-10-14 13:09:48 +00:00
asfernandes
843df670d7 Misc 2008-10-11 02:42:01 +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
hvlad
97bf925499 Use fb_utils::init_status instead of status[0] = 0 2008-09-10 11:41:36 +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
roman-simakov
59ae35d837 Style 2008-08-13 09:02:35 +00:00
hvlad
53f21b34c8 Fixed bug CORE-1970 : Lock conversion denied (215) error may occurs 2008-07-17 12:49:19 +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
asfernandes
4822c30c70 Misc 2008-06-06 22:40:15 +00:00
robocop
94224d3300 Totally misc. 2008-06-06 08:51:03 +00:00
robocop
b8ea332022 Misc. 2008-06-05 11:02:42 +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
ad8ce57050 Enabled page latching code for [Super]Classic. This solves most of the synchronization issues between worker thread and ASTs. 2008-06-04 13:22:59 +00:00
dimitr
f84ad12e33 Misc. 2008-05-14 09:21:01 +00:00
robocop
89a57960db Cleanup. 2008-05-11 12:27:51 +00:00
hvlad
422338e5e3 Lock att_mutex in Attachment's constructor 2008-05-08 07:45:19 +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
adc1ed0f03 Let cache_writer also lock its own attachment during execution 2008-05-04 21:25:56 +00:00
skidder
3d8af77572 Fix regression CORE-1876. Incremental backups with NBACKUP broken in 2.1 2008-05-01 01:40:22 +00:00
robocop
53bf05282d Misc. 2008-04-26 14:35:12 +00:00
roman-simakov
dda2676ba5 1. Fixed unlocking header page while CCH_release. Thanks to Vlad.
2. Fixed writing page while nbackup merge state is stalled.
3. Fixed using dead dbb in AST handler while somebody is changing cached lock of the GlobalRWLock.
2008-04-16 09:16:45 +00:00
roman-simakov
a202daf6bb Replaced nbackup dirty pages locking with RAII classes 2008-04-16 08:46:13 +00:00
dimitr
2f41d8e8ba Corrections for the currently disabled code. 2008-04-02 12:42:09 +00:00
robocop
882955f5c3 const. 2008-03-29 13:01:49 +00:00
asfernandes
a930424d27 Fix the build 2008-03-19 15:55:11 +00:00
dimitr
26e92220d3 Cleanup/refactoring. 2008-03-19 11:46:47 +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
2912e6a5be Cleanup and misc. 2008-03-10 08:44:07 +00:00
robocop
10d74a7642 Style. 2008-02-13 12:57:04 +00:00
asfernandes
11b869588d Misc 2008-02-08 01:25:41 +00:00
hvlad
078f55d9b0 Fixed bug CORE-1731 : Sometimes engine may "hang" using 100% CPU load and no IO activity for the few minutes 2008-02-06 17:06:43 +00:00
robocop
4c3381ef6b Style, constness and macro cleanup. 2008-02-03 10:41:44 +00:00
asfernandes
de8771570f Misc 2008-01-29 01:36:41 +00:00
dimitr
132176a475 Major synchronization changes. Description of the commit will be posted to fb-devel. 2008-01-26 12:52:51 +00:00
dimitr
db7d3ecd4c The merge continued. 2008-01-16 08:31:31 +00:00
roman-simakov
406a8cc3bf small fix debug code under NBAK_DEBUG 2008-01-14 16:22:43 +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
1a64b5214c Fixed CORE-1601. 2007-11-19 10:29:59 +00:00
dimitr
0e6c8c9abe Moved the engine checkout/checkin logic from CCH to PIO. This allows to avoid hacks like usage of SCH_check_thread_enter(). 2007-09-25 11:47:39 +00:00
hvlad
a576160b7a Restore correct error message formating 2007-09-19 20:35:33 +00:00
dimitr
97a45d4704 Removed the asserts. 2007-09-05 06:44:12 +00:00
alexpeshkoff
6d66c28b13 Fixed solx86 build - not always offset_t and UINT64 are the same 2007-08-10 07:55:46 +00:00
alexpeshkoff
ea8ba3370d Cleaned up mutexes - removed MUTX_T and related macros 2007-06-06 12:37:24 +00:00
mkubecek
9aa6368cc2 C++ specification does not allow unbraced linkage specification with storage class (and neither does GCC 4.1.2) 2007-05-20 12:34:36 +00:00
asfernandes
97843da8a3 Misc 2007-05-20 03:25:52 +00:00
robocop
5f3d9bbd54 Misc. 2007-05-18 06:15:26 +00:00