Add the Firebird 5 service parameter constants for parallel workers and in-place ODS upgrade - #8
Open
mariuz wants to merge 2 commits into
Open
Add the Firebird 5 service parameter constants for parallel workers and in-place ODS upgrade#8mariuz wants to merge 2 commits into
mariuz wants to merge 2 commits into
Conversation
isc_spb_bkp_parallel_workers (21) and isc_spb_res_parallel_workers, which is the same code, are what gbak -par passes to run a backup or restore with several workers. They are in Firebird's own firebird/impl/consts_pub.h but not in this copy, which predates Firebird 5, so a caller cannot request parallel workers at all. Values taken from the shipped Firebird 6.0.0 header. Verified by sending the parameter through a backup service against a live Firebird 6 server: the server accepts it, and the resulting file restores to a working database.
isc_spb_rpr_upgrade_db (0x1000) is what gfix -upgrade passes to upgrade a database's on-disk structure in place rather than by backup and restore. It is in Firebird's own firebird/impl/consts_pub.h but not in this copy, which predates Firebird 5. Value taken from the shipped Firebird 6.0.0 header. Verified by sending the option through a repair service against a live Firebird 6 server and confirming the assembled parameter is 0x1000 and the request completes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gbak -par/gfixstyle parallel workers cannot be requested through thislibrary, because the service parameter block constants for it are missing.
Firebird's own
firebird/impl/consts_pub.hhas:client/include/consts_pub.incpredates Firebird 5 and carries neither, sothere is no way to add the parameter to a backup or restore request.
This adds both, with the values taken from the header shipped with Firebird
6.0.0 rather than transcribed from documentation.
Verified
Against a live Firebird 6.0.0 server, by adding the parameter to a backup
request through
TIBXBackupService(an ibx4lazarus change that depends onthis one):
isc_spb_bkp_parallel_workers = 4is sent, the server accepts it,and the resulting file restores to a working database
The constants alone change no behaviour — nothing in this library sends them
yet — so this is safe on its own and is split out from the ibx4lazarus side
deliberately.