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

447 Commits

Author SHA1 Message Date
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
asfernandes
3f8de25fcc Feature CORE-4403 - Allow referencing cursors as record variables in PSQL.
Improvement CORE-4434 - Extend the use of colon prefix for read/assignment OLD/NEW fields and assignment to variables.
2014-05-19 19:06:47 +00:00
robocop
492f4437c4 Misplaced parentheses are unexpected invitees. 2014-05-10 14:17:53 +00:00
robocop
632075d98f It seems it's possible to restrict gbak more on deletions. Thanks Vlad for hint on TDBB_dont_post_dfw. 2014-05-09 20:26:01 +00:00
asfernandes
40b38014e4 Misc. 2014-05-08 23:26:40 +00:00
alexpeshkoff
bf82df1ebb Postfix for CORE-3242: somewhy when checking metadata access (like MODIFY or DROP) always checked that access from object itself. Strange at the first glance behavior, but let us do not change legacy (at least since FB1.0) when possible. 2014-05-07 11:21:31 +00:00
robocop
4895ac6067 Fix the problem with gbak restoring a db and lack of rights on sys tables that Philippe detected. 2014-05-07 08:58:36 +00:00
robocop
e6d3b34c55 Fix CORE-4418, using the property of special triggers that are marked "system" or "ignore_perm". 2014-05-06 01:28:53 +00:00
robocop
a6fc5ea73b 1.- Don't let gbak delete more than the only table it might clean. 2.- Special case for rdb$types: user can insert records, provided that's locksmith and the records contain non-system types. 2014-05-02 03:01:38 +00:00
robocop
8c83e71e88 More sys tables protected. 2014-05-01 05:55:15 +00:00
dimitr
a6225eca2d Attempted to fix CORE-4388: SELECT WITH LOCK may enter an infinite loop for a single record. To be field tested. 2014-04-13 08:27:04 +00:00
robocop
6fcd20e73f Experimental way of stopping gbak impersonation in sys tables. Gbak only needs to write to sys tables when it's restoring and only in the first attachment. Second and third attachment are for bringing the DB online and setting the R/O flag. Please test. 2014-04-10 01:39:32 +00:00
robocop
de7ed79414 Fixing several issues with my previous commit:
Use increment [by], no step.
Enable again code in ini.epp because it's needed when restoring (but not when creating gens directly in a new db).
Gbak has code to fix system generators and we should allow it.
Nbackup cannot update the history generator when doing a backup.
Field name renamed to rdb$generator_increment.
2014-04-09 07:17:34 +00:00
robocop
29e36dc4f3 The 0th generator becomes unnamed. Only internal requests can access it (zero length names are not allowed from outside). RDB$GENERATORS is no longer a reserved name.System generators cannot be changed by user requests, but can be queried with gen_id(g, 0) if the permissions (ACL) allow that. We don't track dependencies on sys generators, it's not necessary. 2014-04-04 06:39:09 +00:00
robocop
315a1b79fc Misc. 2014-03-22 20:56:13 +00:00
asfernandes
f197d5912a Fixed restore of sh_test.gbk in TCS. 2014-03-14 16:45:09 +00:00
robocop
e964c4f2a2 More restrictions on sys tables. Please report if you have problems with DDL or the utilities. 2014-03-11 07:40:42 +00:00
robocop
aac88ea33d Make BTR_lookup return bool. 2014-02-25 06:30:18 +00:00
hvlad
2a67db1b06 Better (i hope) fix for the bugcheck appeared in test bugs.core_195.
The original fix broke cursor stability when there are sub-queries, see also CORE-3362.
Misc fixes for better debugging.
2014-01-09 10:29:37 +00:00
dimitr
5e9a5ef312 Attempted to fix a number of issues with badly working privileges after restore into ODS12. 2013-11-18 16:28:24 +00:00
alexpeshkoff
82f1524800 Fixed some more warnings 2013-11-18 14:56:14 +00:00
alexpeshkoff
120b10a78a Implemented CORE-4263: Database linger 2013-11-14 16:16:24 +00:00
asfernandes
dc99961e8b Misc. 2013-10-13 23:44:57 +00:00
hvlad
1267bfb3f6 Fix to please GCC 2013-09-13 08:15:17 +00:00
hvlad
db70a7742d Fixed bug CORE-3921 : "record disappeared (186), file: vio.cpp line: 408" 2013-09-12 19:08:59 +00:00
hvlad
cf4e7ecc0d Fixed bug CORE-4212 : Dropping FK on GTT crashes server 2013-09-10 14:30:42 +00:00
dimitr
8586171695 Core support for records longer than 64KB. Not exposed to the external world yet. 2013-08-21 07:40:31 +00:00
dimitr
69961e9bae Fixed CORE-4164: Owner name is missing for generators/exceptions restored from a backup.
Also propagated the sysflag/owner/secclass assignment and validation to all object types and wiped out the duplicating system triggers.
Warning: testing is required!
2013-08-04 15:19:31 +00:00
dimitr
31b4f14055 A quick fix for the bugcheck appeared in test bugs.core_195. 2013-07-15 13:44:47 +00:00
dimitr
8e32f8f5f8 Misc. 2013-07-02 11:27:02 +00:00
dimitr
15e4367810 Small refactoring. 2013-03-17 17:35:53 +00:00
hvlad
50c4099b92 Make tracing VIO works and more easy to use:
- log into file instead of console
- rebuild only small set of affected modules when VIO_DEBUG is changed
2013-03-10 14:48:17 +00:00
dimitr
86f4b02ef3 1) Cleanup and renaming in the SCL code.
2) Reimplemented the USAGE privilege as a separate one.
3) Added USAGE permission checks for generators/sequences and exceptions.
4) Supported USAGE in GRANT/REVOKE for all object types.
5) Refactored SET GENERATOR and ALTER SEQUENCE as true DDL. blr_set_generator is supported only for backward compatibility, it's not generated by DSQL anymore.
6) Added START WITH clause for [RE]CREATE SEQUENCE and CREATE OR ALTER SEQUENCE.
7) Fixed a number of related errors.
2013-03-07 13:59:03 +00:00
alexpeshkoff
7a9e867ab4 comment 2013-01-08 10:51:02 +00:00
alexpeshkoff
c7454a49a5 Work in progress (committed due to SF upgrade). Checked only on SS.
1. Frontported fix for CORE-3935 and CORE-3993.
2. Added debugging support for mutexes and rwlocks in Vulcan style.
Unfortunately after last 'svn up' build asserts in JrdStatement:71.
2012-12-14 17:59:02 +00:00
asfernandes
9727c2685b Misc. 2012-12-02 01:45:18 +00:00
hvlad
6afc531f86 Make sure relation's flags are loaded from disk before analyze them 2012-11-20 12:23:53 +00:00
asfernandes
6a0a6f2d13 Misc. 2012-11-05 01:14:04 +00:00
alexpeshkoff
4ca6e669fe 1. Fixed CORE-3786: Firebird 2.5.1 Hangs on MacOSX 10.7 (Lion) on DB create after reboot.
2. Cleanup: avoid functional style in stuff exception.
2012-11-01 11:40:18 +00:00
dimitr
657511babe Wiped out the legacy attachment level counters in favor of the already existing runtime statistics. Introduced a record lock counter (more to follow). 2012-11-01 00:16:55 +00:00
dimitr
5847f3860f Avoid a sweep pass for temporary tables, as the sweeper always sees those tables as empty, but even setting them up as empty has a non-zero cost. 2012-10-31 14:20:24 +00:00
asfernandes
b7d87a6cfa Misc. 2012-10-16 00:51:42 +00:00
hvlad
513ce5e1ce Additional patch for improvement CORE-3362 : Cursors should ignore changes made by the same statement.
- SubQueryNode (sub-select's) and RseBoolNode (exists(), in\any\all) now knows if it is a part of some outer select (ForNode) or it is a standalone statement. 
- VIO\get_undo_data was reworked to better fit undo-log implementation, corresponding changes in VIO_chase_record_version also done
- AV in VIO\get_undo_data was fixed
2012-09-24 14:26:33 +00:00
dimitr
594bae44d2 Fixed CORE-3924: Bugcheck 291 (cannot find record back version) if GTT is modified concurrently using at least one read-committed read-only transaction. 2012-09-12 05:26:38 +00:00
hvlad
b636315561 Improvement CORE-3656 : Support for sweep information in Trace API.
Fixed case when sweep cleaned up relation with all records deleted but corresponding event was missed in trace log.
2012-09-04 11:35:16 +00:00
hvlad
9124f5e188 Front ported improvements
CORE-3656 : Support for sweep information in Trace API, and
CORE-2668 : Write note into log when automatic sweep is started
Also per-table stats is enabled at transaction level (see thread_db::bumpRelStats)
2012-08-02 08:55:21 +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
asfernandes
07557dc297 Misc. 2012-05-26 18:05:56 +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
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
24d152138d Refactoring of runtime statistics and related classes:
- moved relation's counters into RuntimeStatistics.h 
- renamed RuntimeStatistics::bumpValue to RuntimeStatistics::bumpRelValue and thread_db::bumpStats to thread_db::bumpRelStats to make things more clear  
- removed not obvious cast in VIO_bump_count
- removed dependency of RuntimeStatistics.h from ntrace.h
2012-04-11 09:38:19 +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
f0112290c6 Disallowed deletions from RDB$DATABASE. This fixes the only problematic part of CORE-3735: Unprivileged user can delete from RDB$DATABASE, RDB$COLLATIONS, RDB$CHARACTER_SETS. The implemented solution could be used to protect other system tables from direct modifications. 2012-01-20 10:23:31 +00:00
asfernandes
c44c548f8c Corrections and cleanup. 2012-01-09 00:08:33 +00:00
dimitr
e956e2e6c0 1) Restricted ALTER/DROP permissions to the object owners only. Now this applies to domains, charsets, collations, generators and exceptions. This fixes CORE-304: Metadata security hole - any user can alter/drop generators and exceptions.
2) Opened the gates to implement the standard USAGE privilege (CORE-2884). SQL support and validation logic are still to be developed.
3) Added the grant option to the owner permissions for packages, procedures and functions.
4) Misc cleanup and refactoring.
2012-01-08 14:05:29 +00:00
dimitr
aa4e36e0d6 Correction. 2011-12-01 09:37:25 +00:00
dimitr
e3fb73cdca Attempted to fix CORE-3490: Concurrency problem when using named cursors. The solution may look sub-optimal but it doesn't seem to affect the performance. 2011-12-01 09:24:59 +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
asfernandes
906ea4729e Misc. 2011-10-27 01:04:14 +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
asfernandes
eb5689ef0e Misc. 2011-10-07 02:33:02 +00:00
hvlad
ca1a67992c Return explicit sign of active transaction from VIO_get_current() - it makes logic more clear in check_duplicates() and allows to clear transient lock error from status vector and not propagate up to the callers.
Cleanup : removed my old disabled code (checking for old and new values) and restored original code in check_duplicates().
2011-10-03 11:27:46 +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
hvlad
fb36296224 Port forward fix for bug CORE-3610 : Can insert DUPLICATE keys in UNIQUE index 2011-09-29 12:34:07 +00:00
dimitr
b100b395eb Being a little bit more paranoid doesn't hurt. 2011-09-22 18:15:21 +00:00
dimitr
031339406c Methinks it's more correct from the scoping POV. 2011-09-21 17:49:49 +00:00
dimitr
809fba5ec9 Reworked the garbage collector thread:
- a single try-catch block looks better
- cross-helping between GC and CW/CR threads is agreed to be a bad idea
- replaced ATT_disable_gc_notify with a check inside notify_garbage_collector()
- made the logic more straightforward
Careful review would be appreciated.
2011-09-21 07:59:15 +00:00
hvlad
652200448a Port forward fix for bug CORE-3557 : AV in engine when preparing query against dropping table 2011-07-16 10:41:27 +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
hvlad
7c68e15a0f Delete deferred work when savepoint is cleaned up after failure even if no records was modified. Else DFW task will be repeated at commit making system tables logically inconsistent. 2011-06-24 12:03:32 +00:00
robocop
5ad96271e6 Misc. 2011-06-24 06:34:16 +00:00
hvlad
81cec16f83 Fixed leak of SysAttachment instance. Noted by Claudio. 2011-06-13 11:09:19 +00:00
asfernandes
add3d8ddef Misc. 2011-06-08 01:55:13 +00:00
hvlad
945a1bdbf4 Fixed bug CORE-3515 : Index corruption. Validation put "missing entries" message into firebird.log 2011-06-05 08:15:33 +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
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
3ce54d2eda Misc. 2011-05-11 01:18:28 +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
e4658d76c3 Misc 2011-03-20 16:24:46 +00:00
hvlad
58a55cc813 Improvement CORE-3399 : Allow write operations to temporary tables in read only transactions 2011-03-19 13:10:51 +00:00
dimitr
d68affa114 More complex fix for CORE-3374: Server may crash or corrupt data if SELECT WITH LOCK is issued against records not in the latest format. It involves upgrading the record to the current format, like UPDATE does. 2011-03-05 17:33:01 +00:00
asfernandes
72b7e83082 Misc 2011-02-26 19:05:09 +00:00
asfernandes
87ec1ad31c The (bad) definition of fb_assert cause this code to not work in clang. It's a surprive if it works in MSVC. 2011-02-25 15:28:10 +00:00
hvlad
07e245ab1b Implement improvement CORE-3362 : Cursors should ignore changes made by the same statement 2011-02-25 12:26:57 +00:00
dimitr
7a405a4eea Fixed CORE-3058: New generators are created with wrong value when more than 32K generators was previously created. 2011-02-17 06:05:16 +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
dimitr
af23581244 Front ported my recent changes. I'm unable to verify the compilation now, sorry. 2010-10-14 05:27:08 +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
dimitr
34dd100554 Fixed CORE-3137: Partial rollback is possible for a selectable procedure modifying data. 2010-09-18 06:52:46 +00:00