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

495 Commits

Author SHA1 Message Date
alexpeshkoff
164e2cbcba Check for source nullifying a bit more accurate 2015-04-27 13:15:44 +00:00
alexpeshkoff
852c4366b2 Make it possible for DBA only to NULLify sources 2015-04-24 17:47:29 +00:00
alexpeshkoff
512f0d944e Write-protect one more system relation 2015-04-20 11:42:17 +00:00
alexpeshkoff
0afc4289de Postfix for CORE-4731 2015-04-16 11:58:19 +00:00
alexpeshkoff
18c902de46 Fixed CORE-4715: Restore of shadowed database fails using -k ("restore without shadow") switch 2015-04-15 14:01:24 +00:00
alexpeshkoff
d42402d0b9 Fixed CORE-4731: Prohibit an ability to issue DML or DDL statements on RDB$ tables 2015-04-15 13:19:18 +00:00
asfernandes
2828aee4ab Fixed CORE-4733 - Command "Alter table <T> alter TYPE <C> <DOMAIN_WITH_NOT_NULL" does not verifies data in column <C> and makes incorrect assignments in <C> to ZERO / JULIAN_DATE / ASCII(0) for types INT, TIMESTAMP and VARCHAR. 2015-04-05 02:24:40 +00:00
asfernandes
b50abdb04c Optimize check of column NULLs when changing field or domain to NOT NULL. 2015-04-05 02:24:26 +00:00
alexpeshkoff
f96129ceef Fixes assertion in DFW, caused by uninitialized descriptor 2015-04-01 15:10:06 +00:00
asfernandes
336456d140 Misc. 2015-03-28 00:36:04 +00:00
alexpeshkoff
16768b177d Be more consistent putting IStatus into fast inline wrapper. Also some syntax sugar as suggested by Dmitry 2015-03-27 17:51:19 +00:00
robocop
7873b1f983 Misc. 2015-03-24 01:30:20 +00:00
alexpeshkoff
6c5f9b77fe Cleanup - avoid automatic type conversion in FbLocalStatus as suggested by Claudio 2015-03-23 11:06:51 +00:00
alexpeshkoff
c4c9daf132 Avoid limits on size of status vector in engine. Ensure that status is always clean on entry to interface methods. 2015-03-20 18:02:30 +00:00
hvlad
1332ff27ac Fixed bug CORE-4713 : "BLOB not found" error at rollback after insert into table with expression index 2015-03-18 17:26:56 +00:00
asfernandes
bd1094a671 Misc. 2015-03-17 21:44:55 +00:00
robocop
746d47f4f2 Misc. 2015-03-13 15:30:23 +00:00
alexpeshkoff
7fed9ff78c cleanup 2015-03-05 16:18:46 +00:00
hvlad
39a137e913 Use attachment's or relation's pool instead of dbb_permanent where it is more suitable.
It fixed memory leak from dbb_permanent (CORE-4683)
2015-02-22 11:02:49 +00:00
dimitr
c6f6557d5e Misc. 2015-02-19 15:53:42 +00:00
dimitr
6ae3e2cbaf 1) Fixed CORE-4383: Index and BLOBs garbage collection doesn't work for update_in_place().
2) Applied the same approach to temporary GC records.
3) Refactored the Record class to avoid reallocations, to improve encapsulation and to simplify the code.
4) Slightly refactored UndoItem to isolate its logic from the Record class.
5) Reduced the in-memory size of the undo log.
6) Slightly better alternative to the legacy NULL reporting for outer joins.
7) Minor fixes and adjustments in BufferedStream.
2015-02-19 14:15:00 +00:00
hvlad
79b760b4ac Memory leak (CORE-4683) 2015-02-16 13:57:28 +00:00
dimitr
c8d6349c77 Replace a verb-cleanup bugcheck with regular error + transaction invalidation. 2015-02-03 16:31:05 +00:00
asfernandes
a04966874e Correction. 2015-01-12 00:21:07 +00:00
asfernandes
c4228eb623 Misc. 2015-01-12 00:04:14 +00:00
starodubov
b260c1ead1 Fixed CORE-4656: Server could hang during chasing dead record version 2014-12-30 08:17:19 +00:00
dimitr
0e11867e84 Refactored the RPB flags. The new logic also provides a second-level protection against CORE-4618. 2014-12-01 21:53:29 +00:00
dimitr
9b0a24fc5a Simplest possible fix for CORE-4618: Rollback doesn`t undo changes when MERGE statement updates the same target rows multiple times and PLAN MERGE is used. An alternative solution is being considered. 2014-11-30 16:00:19 +00:00
dimitr
d98625b933 Relaxed system tables protection for cases UPDATE ... SET RDB$*_SOURCE = NULL. So far nullification is allowed for views/packages/procedures/functions/triggers only. I'm not sure somebody really needs hiding sources for defaults and check constraints, but this can be supported later, if required. This is a temporary solution, intended to be replaced with something more clever (e.g. special permissions or new DDL command) in v4. 2014-11-09 16:40:52 +00:00
hvlad
18806682fd Fixed bug CORE-4575 : AV in garbage collector thread at disconnect of last attachment 2014-10-10 10:11:14 +00:00
dimitr
9defd49c6d Count record reads performed by the IDX code. 2014-09-01 08:29:04 +00:00
dimitr
6d77447723 Minor refactoring. 2014-08-28 15:53:43 +00:00
dimitr
82bf6c2c0e Minor adjustments to the performance counters. Work in progress. 2014-08-28 15:16:39 +00:00
dimitr
4dae12ccce Added counter for record refetches (aka repeated reads). 2014-08-27 14:51:51 +00:00
dimitr
a79ff180da Added specific error code for read conflicts in RC NO_REC_VER mode. Added missing conflict counting. 2014-08-27 12:56:36 +00:00
dimitr
36af3d8cb2 Cleanup and small refactoring to avoid redundancy. 2014-08-15 14:19:02 +00:00
dimitr
abb5897fce Fixed possible deadlocks between a worker thread and an attachment-level AST. 2014-08-08 15:27:59 +00:00
hvlad
79637fc733 Missing notification of gc thread. 2014-08-06 08:55:47 +00:00
dimitr
a8b1dba646 Refactored RuntimeStatistics internals. Added more record-level performance counters. 2014-08-05 08:46:09 +00:00
asfernandes
718eb6a33e Fixed the restore of packaged routines. 2014-08-01 16:22:37 +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
hvlad
8741e3d68c Cleanup and optimize locking a bit (as suggested by Dmitry) 2014-07-29 08:15:29 +00:00
skidder
e2e901939c Fix GCC warnings 2014-07-17 21:17:15 +00:00
skidder
7c743fc291 Fix build warnings 2014-07-17 18:48:46 +00:00
roman-simakov
d74aeda1a0 Corrections pointed by Adriano. 2014-07-13 18:50:57 +00:00
roman-simakov
573e93e5a6 Fixed CORE-735: User rights for metadata changes.
We check DDL in DDL nodes and skip at vio level. vio level still exists for direct metadata editing.
2014-07-08 07:35:27 +00:00
alexpeshkoff
26319333e3 Renamed mapping-related tables as was discussed in devel 2014-06-26 09:37:55 +00:00
dimitr
153b06b2fd Minor structure changes. 2014-06-13 16:28:22 +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
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