Red Database 3.0 - v3.0.5.1
Jan. 22, 2020, 11:58 a.m.
Changelog
Fixes:
- If "RDB$ADMIN" role is granted to user pass it to a user manager and allow to alter LDAP users
- Handle exceptions when updating failed attempts count. It should fix wrong success of authentication process.
- Clean password in case of error when searching LDAP user in order to stop authentication
- Fixed assigning roles granted to LDAP roles
- Fixed parsing of multi-line string values in CSV adapter
- Updated description of -ig option in gbak help
- fts.sql and fts_permissions.sql moved to misc
- Don't try to use known authentication plugins to check correctness of the previous plugins. One more place to log record about failed authentication.
- Fixed CORE-5758: Fixed issue: Database is corrupted when conflicting "starting at page" values is specified for secondary files. Raise error when conflicting "starting at page" values is specified for secondary database files
- Avoid inifinity loop inside vsnpintf on buggy glibc
- Fix external engine memory leaks
- Fixed generate ephem key with alg GOST-2012
- Fixed building SQL queries to change a calculated fields
- Fix multifactor authentication when logging as Trusted
- Fixed "request synchronization error" when LDAP user works with roles
- Fixed reading configuration and starting new system sessions
- Set default SQL security for database has no effect
- Fixed TempPageSpaceId generation: make it below FILE_PAGE_SPACE value
- Set world-accessible permissions on systemd service file to avoid spam messages in system log
- Fix isc_dpb_hw_address value as been in 2.x version
- Fixed printing OS error when operation with a file BLOB fails
- Don't skip next plugin if previous one has not sent data
- Fix ODS for new fields of RedDatabase in system tables
- Fixed log message about changing database "PageBuffers" value
- Use the hash method from the configuration instead of hardcoded value
- Fixed CORE-5955: Unable to init binreloc with ld >= 2.31
- Fixed re-generation GUID in backup utility
- Fixed wiping of the files to be deleted
- Fixed CORE-5823: No permission for SELECT access to blob field in stored procedure
- Fixed CORE-5841: No permission for SELECT access to TABLE PLG$SRP in newer snapshot
- Add output error if metadata signature failed
- Use 64bit value to count records during backup/restore
- Display error when opening Firebird database
- SQL SECURITY DEFINER context is not properly evaluated for monitoring tables
- Fixed infinity while building external access list
- Increased maximum size of the certificate owner name and fixed bug with calculating its length
- Additional fix for CORE-6045: TraceManager::update_sessions can fail on shutdown so try to protect it with mutex
- Now we user EffectiveUserId instead of current
- Can't change user attributes without changing password.
- Fix deleted memory use in optimizer
- Fix wipe memory after merging 077a2a3b from firebird.
- If BugcheckAbort is enabled try to create memory dump in case of critical lock manager error
- In case of direct IO use 4K page alignment because of some device requirements.
- CORE-6198: Wrong error checking for pread / pwrite calls
- Eliminated possibility of infinite loop in cases when changes in BLR are ignored by the server for some reason (see)
- Parsing 12-digit memory addresses. If gcc uses the -pie flag, need to consider that a memory address of executable file will be 12-digit, and executable file will be labeled as DYN.
- Check for existence of process file in hashgen
- Fixed registration of Srp plugins in Windows.
- Checking for opening executable memory in hashgen. If specified invalid process id on linux system, then program cannot open process memory and ends with segmentation fault
- Backport of the fix from the master branch: Now CREATE FUNCTION/PROCEDURE inside CREATE PACKAGE does not require CREATE FUNCTION/PROCEDURE privilege. It's not really necessary since there are no packages in 3.0 but the patch fixes TDBB_trusted_ddl flag reset. So let it be.
- Search for upgrade script in location found in registry when upgrading.
- Add fbtrace_* and jvm.args to upgrade script
- Fixed role disappearing from context variable, after changing role to unexisting
- SIMILAR TO expression can hang server
- Size of mapping shared memory increased to 4MB to avoid error "Global mapping memory overflow".
- Update prefix in installer scripts during installation
- Authentication using certificate doesn't work if there are the signature keys in a container
- GSS plugin on the server side can be executed before client one
- Use password in UTF16 encoding for sambaNTPassword calculating
- Change "sambaPwdLastSet" LDAP attribute when samba password has been changed
- Uninstaller now uninstall systemd unit
Improvements:
- Ability to authenticate using certificate in "EXECUTE STATEMENT ... ON EXTERNAL DATA SOURCE". "CERTIFICATE" and "PIN" tokens added to the clause.
- Stop database restore with -o option when no space left on disk
- Added GBAK option "-KEEP_DATA"
- Option "-q" of the lock print described in its help
- Improved function REGEXP_SUBSTR and class SimilarToMatcher.
- When password is changing try to use a manager that matches the authentication plugin
- Added context variable AUTH_PLUGIN in AUTHDATA namespace
- Added rdbAuth LDAP schema and LDIF file
- Add SQL scripts for recovery legacy and multifactor passwords
- Implemented two versions of crypto plugin crypto_api_sec - without CryptDeriveKey, CryptEncrypt and CryptDecrypt functions
- Request only required attributes when searching LDAP
- Add "CREATE OR ALTER" clause for policy syntax
- Altering computed fields. If a field changes and it has calculated dependencies, it's necessary to recalculate them. Now, recalculation is performed only for string fields and provided that a types of the calculated field and the query are the same, since cannot convert integer type to string type, etc
- All "SrpXYZ" auth methods are considered as "Srp" plugin
- Use --as-needed for linking to avoid unneded dependencies
- Implemented parsing of double-quoted strings in CSV adapter.
- Ported parameter "LoginFailureDelay" from 2.6.
- Allow to disable fields evaluating for external trigger. External trigger object now can give a hint to engine which fields will not be used and do not need to be evaluated. Properly implemented function getDoNotEvaluateField should return true, if field should not be evaluated. Index of field should start from 0. Index -1 reserved for all computed fields, so external trigger can ask engine do not evaluate computed fields.
- Output error messages to stderr in hashgen
- Switch -ig allows to continue restore when errors occur during parsing BLR of procedure, function or trigger
- Implemented CSV adapter for external tables
- Frontported left->inner conversion for joins
- Trusted user can attach to a database with a different login
- Transfer provider id to client
- Increased default cache size of the security DB
- Uninstaller now do not delete system user
- Drop obsolete qli and gsplit from build
- Drop LSB support in favor pure CentOS 6 build
- Tommath now linked statically
- Additions and fixes in documentation
Fixes and improvements in built-in replication:
- Fix multiple records in MON$REPLICATIONS table on the replica
- Fix query for search unique indexes of tables if fbrepldiff utility
- Fix use option -C in fbrepldiff utility
- Frontported fix for the master-slave inconsistency/corruption after errors during commit
- Fix archive timeout use in seconds
- Increase catch-up timeout
- Correct output when happened error in fbrepldiff utility
- Create control file if doesn't exists in fbreplmgr utility
- Changing use force flag in the fblogmgr utility. Set FULL state the segment from ARCH state only if archive number of sequence is specified
fbjava updated to 1.1.8. Changes in fbjava since 1.1.2:
- Do not cache permissions when accessed not from RDB context
- Fix loading roles list when role granted on role
- Cache user roles list and java permissions for current attachment.
- Ignore result type for trigger functions. We want some compatibility with JavaESPUDF at least for backup-restore
- Initial support for JRE 9+. Add new search path for libjvm. Do not restrict code from jrt://
- Support ExternalTrigger::getDoNotEvaluateField function. Fields which should not be evaluated can be passed through
annotations: org.firebirdsql.fbjava.annotations.DoNotEvaluateComputedFields and org.firebirdsql.fbjava.annotations.DoNotEvaluateField
- Add EvaluateField annotation in addition to DoNotEvaluateField. If these annotations exists only fields from annotations will be evaluated. EvaluateField and DoNotEvaluateField (DoNotEvaluateComputedFields) are mutually exclusive. If both annotation present, RuntimeException will be raised.
- Getting all user roles to configure security
Initially, only one role is taken - current_role. but it's not right.
User can have many roles active, as access rights are configured using a
combination of roles
- Support some substitutions inside first argument of java-security
permission
- Remove debug code which lead to memory leaks
fbjava_lucene updated to 2.0.8: Changes in fbjava_lucene since 2.0.3:
- Add script with some basic permissions for java security
- Initialize Tika parser once when on creating DocumentIndex instance. This fix improve performance of index/reindex by an orders
- Check if blob empty and do not try to parse it. Tika parser do not like empty streams
- Copy description blob instead direct inserting
- Better handle identifiers symbols case in FTS$* functions and procedures
Now, by default all identifiers uppercased, so
FTS$CREATE_INDEX('UpPeRcAsEd', ...
will create index 'UPPSERCASED',
and FTS$ADD_FIELD_TO_INDEX('uppercased', 'test', 'str')
will add field
'STR' from table 'TEST' to index 'UPPERCASED'.
To force symbols treat as is, identifiers should be wrapped with '"'.
FTS$ADD_FIELD_TO_INDEX('"lowercased"', '"Test"', '"str"')
will add field
'str' from table 'Test' to index 'lowercased'.
- Updated dependencies with known security vulnerabilities
- Return short from indexFieldChange to fix backup restoring from 2.x. See This function will NOT work on FBJava, because it requires TriggerContext, but at least backup with such trigger can be restored.
Ported from Firebird:
- Avoid unnecessary operations in the destructor. This also prevents possible hangs in Classic builds.
- Backported CORE-6217: Wrong work with pointer: delete ptr; ptr=new ;
- Backported CORE-6221: Incorrect (throw-based) allocFunc for zlib
- Fixed races during shmem reattaching
- Attempted to fix the optimizer regression related to sorting vs compound indices
- Cast the parameters to match the API declaration. This removes warnings in the generated code.
- Fixed inconsistency between attachment/transaction states and their request states
- Fixed bug CORE-6204 : FB crash because TraceSvcJrd::checkPrivileges can pass NULL in 'alias'
- Backported CORE-6141: fbsvcmgr action_repair rpr_list_limbo_trans does not show list of transactions in LIMBO state
- This should fix regression for test core_0053.fbt
- Minor correction for Vlad's solution to CORE-4680
- Backported CORE-6031: Little valgrind memory leak in isc_attach_database
- Postfix for CORE-6028, thanks to Adriano
- Backported CORE-6028: Trigger on system table restored in FB3 database and can't be deleted
- Fixed CORE-6026 - Alignment issue with FB_MESSAGE C++ macro (as well UDR macros) and BIGINT/DECFLOAT types in Linux 32-bits.
- Backported CORE-6015: Segfault when using expression index with complex expression
- Backported CORE-6009: I/O error during "open" operation for file "/tmp/firebird/fb_trace_*" in firebird.log
- Backported CORE-6007: Firebird does not build on Mac with fresh toolchain
- Backported CORE-6004: Don't assign new socket handle becore socket is connected
- Backported CORE-6004: Use correct definition for missing socket value
- Backported CORE-6004: Add a switch to disable the "TCP Loopback Fast Path" option
- Fixed CORE-5972 - External engine trigger crashing server if table have computed field.
- Fixed bug CORE-5995 : Creator user name is empty in user trace sessions
- Fixed bug CORE-5993 : When creation of audit log file fails, there is no error message in firebird.log
- Fixed bug CORE-5991 : Trace could not work correctly with quoted file names in trace configurations
- Backported CORE-5985: Regression: ROLE does not passed in ES/EDS (specifying it in the statement is ignored)
- Fixed missing monitoring for the crypt thread
- Backported fix for CORE-5989
- Backported fix for CORE-5982
- Fixed CORE-5986 - Incorrect evaluation of NULL IS [NOT] {FALSE | TRUE}.
- Attempted to fix CORE-2440, CORE-5118 and CORE-5900 together (expression indices contain NULL keys after restore).
- Fixed the database left attached (and the engine not unloaded) after error thrown from the beginning of the attach process (e.g. due to the engine shutdown in progress)
- More reliable check for view vs table
- Reworked Alex's solution for modern compilers (GCC 5/6)
- Ported fix for bug CORE-5980 : Firebird 2.5.6 & 25.8 server crash
- Backported CORE-5724: Add ability to use "install.sh -path /opt/my_path" without need to install FB first in the default folder ("/opt/firebird")
- This should fix CORE-5395: Invalid data type for negation (minus operator)
- Attempt to fix CORE-5070, CORE-5795, CORE-5845, CORE-5965 with a single shot
- Fixed CORE-5966: Slow performance when executing SQL scripts as non-SYSDBA user
- Backport fix for bug CORE-5959 : Firebird returns wrong time after changes of time zone
- Enable "Enhance Optimized Debugging" to produce more useful debug info (.pdb files)
- Added context variable to indicate database as replica
- Fixed possible corruption of the monitoring shared data
- Fixed CORE-5943: Server crashes preparing a query with both DISTINCT/ORDER BY and non-field expression in the select list
- Backported CORE-5741: Word "fixing" in gbak output is too scary
- Backported CORE-5950: Deadlock when attaching to bugchecked database
- Fixed bug CORE-5949 : Bugcheck could happen when read-only database with non-zero linger is set to read-write mode
- Backported CORE-5948: Make WIN_SSPI plugin produce keys for wirecrypt plugin
- Backported CORE-5639: Mapping rule using WIN_SSPI plugin: windows user group conversion to firebird role does not work
- Implement sub-task CORE-5913 : Add context variables with compression and encryption status of current connection
- Additional fix for bug CORE-5436 : [FB3 SC] Server hangs (under load test). The case when main thread convert still not acquired lock when AST thread assert locks. It leads to the error: Fatal lock manager error: invalid lock id (0)
- Fixed bug CORE-5911 : Connection could hung after no activity for 60 seconds
- Fix CORE-5905 - Inconsistencies with PSQL FUNCTION vs UDF.
- Backported CORE-5908: Enhance dynamic libraries loading related error messages
- Applied modified patch from Damyan fixing piped decompression
- Avoid races in YObject::destroy()
- Unify memory allocation in verb_post.
- This should fix memory leak when not fully initialized attachment killed by DBA
- This should fix crash when not fully initialized attachment killed by DBA. For example - sweep (it happens few times when running core_4337.fbt).
- Backported CORE-5793: Error returned from DbCryptPlugin::setKey() is not shown
- Backported CORE-5860: Support auth_plugin_list dpb/spb item from application to client
- Backported CORE-5904: An attempt to create global mapping with long (> SQL identifier length) FROM field fails
- Fixed bug CORE-5898 : ROLE not passed in EXECUTE STATEMENT ... ON EXTERNAL
- This should fix a bug CORE-5902 : Add Firebird Event fails with error "While isc_que_events - Failed to establish a secondary connection for event processing."
- Backported CORE-5886: Nbackup does not work after 32K of backups iterations
- Backported CORE-5900: Banned during engine shutdown threads cause unwanted delays when shutting server
- Backported changes in memory leaks debugging code
- Backported CORE-5899: Memory leak in GBAK code when used as service
- Backported CORE-5893:gbak may crash database when mixing alias with full database name
- Avoid crash due to executing already unloaded code (in attachmentShutdownThread). Probably, same trick should be used in all threads, started not by Dispatcher, which could run after its module is unloaded concurrently. So far, it looks like Windows specific.
- Avoid race condition in cancel_operation() when client connection breaks immediately after op_detach.
- Avoid race condition (with AV) when YEvents object references is released concurrently
- Fix incorrect reference counting for EventManager object. It leads to the crash due to attempt to execute code (watcher_thread) after engine DLL is unloaded.
- Avoid double delete of ThreadSync object
- Clear events of dead process, not our own
- Backported fix of segfault in special build.
- Backported CORE-5884: Initial global mapping from srp plugin does not work
- Backported CORE-5876: Provide name of udf function for "arithmetic exception, numeric overflow, or string truncation"
- Backported CORE-5881: Network server ignores any error that took place in KeyHolderPlugin when establishing initial callback with client
- Reintroduce optimisation for 64bit build after commit of alignment fix (CORE-5865) 32bit build O2 optimisation too
- Backported fix for CORE-5865: Alignment error on x86_64
- This should fix bug CORE-5844 : Firebird freeze for new connections
- Ability to specify "FROM" user name in mapping using regular expression
- Correct condition when mapped file of monitoring data should be removed.
- Fixed memory corruption found when run test bugs.5674 in Classic mode using debug build.
- Improvement CORE-5853 - Forward-compatible expressions LOCALTIME and LOCALTIMESTAMP.
- Code cleanup - this should fix MacOS build
- Update MacOS postfix for CORE-304
- Port forward fix for bug CORE-5936 : Firebird server segfaults in the end of database backup. While i can't reproduce bug on v3, it will make no harm.
- Backported CORE-5927: With some non-standard authentication plugins providing correct crypt key wire anyway remains not encrypted
- Backported CORE-5926: Attempt to create mapping with non-ascii user name which is encoded in SINGLE-BYTE codepage (win 1251) leads to '-Malformed string' message
- Backported CORE-5918: Memory pool statistics is not accurate
- Backported CORE-5907: Regression: can not launch trace if its 'database' section contains regexp pattern with curvy brackets to enclose quantifier
- Fixed bug CORE-5935 : Bugcheck 165 (cannot find tip page)
- Backported CORE-5888: Firebird server on Android has problem with numerics
- Backported fix for android port - some kernels accept only PIE binaries
- Postfix for CORE-5474, more generic way to check for actual library name
- Bug fix for CORE-5074 [B3_0]
- Common implemetation for MAKE_desc_from_field and MAKE_desc_from_element.
- Make it possible to build with VS 2017/2019 (with VS 2015 compiler installed).
- Fixed CORE-6065 - Windows kits does have incomplete include headers directory.
- Fast bug fix for CORE-6063 [backport]. Server does not return result of own work (name of next auth-plugin).
- Re-enable building udrcpp_example on Windows
- Addition for CORE-6043 : GTTs do not release used space
- Avoid races at PAG_release\PAG_allocate
- Backported fix for bug CORE-3925 : Creating self-referential FK crashes database (bug-check) whether constraint violation had place
- This should fix CORE-6050, wait for confirmation from user
- Backported CORE-6038: Srp user manager sporadically creates users which can not attach
- Fixed CORE-6040 - Metadata script extracted using ISQL is invalid/incorrect when table has COMPUTED BY field.
- Fixed bug CORE-6043 : GTTs do not release used space
- Backported CORE-6045: Segmentation fault in fbtracemgr when closing it using Ctrl-C
- Cleanup - that long ago deprecated file was removed from OS
- Backported CORE-6027: Server hang on new attachment right after trace session stop
- SHA2 Refactoring
- Fixed bug CORE-6067 : Memory leak in fbclient
- Improve diagnostics of internal trace errors (see CORE-3413 and CORE-6075)
- Prevent child process hung if it writes too much data to the pipe and overflow the pipe buffer. Preserve child eol's when print child stderr data. Try to distinguish case when child's stdout closed abnormally.
- Sub-task CORE-4463: Windows implementation for CORE-4462 (Make it possible to restore compressed .nbk files without explicitly decompressing them)
- Fixed CORE-6197: Memory leak in INET_connect().
- MSVC declare uintXXX_t types at stdint.h
- Fixed CORE-5902: Add Firebird Event fails with error. "While isc_que_events - Failed to establish a secondary connection for event processing".
- Fixed CORE-6182: ExtConnPoolLifeTime acts as countdown for activity in MOST RECENT database (of several) rather then separate for each of used databases
- Let logAndDie() call abort() on all platforms. It prevent hung when process exits (instead of aborts) and tries to release resources.
- Backport addition for CORE-4463: Avoid handle leak after killing hung child process. Print child's stderr after child is gone to not loose very last childs output.
- Backported CORE-6203: "Error reading data from the connection" is raised sometimes when using non-default authentication plugin
- Better name for print_child_error() method
- CORE-6000: gbak issues "Your user name and password are not defined" when command switch "-fe(tch_password) ..." is specified when run as service.
- CORE-6163: Generator pages are not encrypted.
- Fixed races during attach/detach to the monitoring shared file (similarly to how it was done for other shmem files).
- CORE-6171: No current record for fetch operation with queries with aggregated subselect
- This should fix double close of srcBlob if extBlob->close() failed
- This should fix broken LRU pending chain
- Fixed bug CORE-6150 : Bugcheck when PK\UK\FK constraint check read record already marked as damaged
- Fixed CORE-6144: Inconsistent behaviour of the NEW context variable in AFTER UPDATE OR DELETE triggers
- Fixed bug CORE-6138 : Inconsistent behavior regarding visibility of master record on detail inserts
- Backported CORE-6143: Error 'Multiple maps found for ...' is raised in not appropriate case
- Port forward fix for bug CORE-6142 : Error "connection lost to database" could happen when application creates few local attachments (using XNET) simultaneously
- Fixed bug CORE-6137 : Server crashes when it run SQL
- An attempt to fix CORE-6134: Win_Sspi in the list of auth plugins leads message about failed login to be changed (from 'Your user name and password are not defined...' to 'Missing security context ...')
- Effective login constant fixed in Firebird.pas
- Fixed CORE-6108 - Regression: FB3 throws "Datatypes are not comparable in expression" in procedure parameters.
- Fixed CORE-6087 - Problem with casting within UNION.
- Fix CORE-6068 - Server hangs when compiling big package with error.
- Backport fixed diagnostics
- Fixed CORE-6104: incorrect erroris thrown when an embedded user does not have SELECT permissions
- This should fix CORE-6097: Connection does not see itself in the MON
- Improvement CORE-6095 : Extend trace record for COMMIT/ROLLBACK RETAINING to allow chaining of transaction ids
- Backported CORE-5784: Lock folder inizialization is not multi-process safe
- Authentication block, received by client plugin from engine, might contain trash
- Postfix for CORE-6091, thanks to Vlad
- Fixed CORE-6091: Errors when processing correct SQL statements in engine12 provider loaded by FB4 server
- Rework bugfix for CORE-5600 to avoid regression CORE-6089
- This should fix CORE-6090: BLOB fields may be suddenly set to NULLs during UPDATE after a table format change
- Fix for CORE-6072 - make firebird always work with security database from databases.conf
- Partial fix for CORE-6072 - reworked potentially buggy approach when adding different kind of strings to the clumplet
- Partial fix for CORE-6072 - use configured providers internally (except loopback)
- Fixed CORE-6086, thanks to Vlad
- Backported CORE-6078: Permissions for create or alter statements are not checked