This seems like a small thing, and I'm not sure why this hasn't picked up yet.

Could someone look at this, or otherwise let me know where I should look so I can try to fix it myself?

Mark

On 27-12-2018 12:11, Mark Rotteveel (JIRA) wrote:
gbak multi-database file restore uses wrong minimum number of pages for first 
database file
-------------------------------------------------------------------------------------------

                  Key: CORE-5976
                  URL: http://tracker.firebirdsql.org/browse/CORE-5976
              Project: Firebird Core
           Issue Type: Bug
           Components: GBAK
     Affects Versions: 4.0 Alpha 1
          Environment: Firebird-4.0.0.1352-0_x64
             Reporter: Mark Rotteveel


I have a Jaybird test that creates a multi-file database using a gbak restore 
(through the services API). This test creates an artificially small first file. 
Jaybird instructs Firebird to make the first file 10 pages big, and Firebird 
then overrides that to 200 pages.

This doesn't work correctly, because those 200 pages are not sufficient. As a 
result the second database file is not created.

Firebird 4, the restore logs the following:

"""
[..]
gbak:backup version is 11
gbak:created database 
C:\Users\Mark\AppData\Local\Temp\junit8203596626416973464\junit4583341152862574241\testrestore1.fdb,
 page_size 8192 bytes
gbak:started transaction
gbak:length given for initial file (10) is less than minimum (200)
gbak:adding file 
C:\Users\Mark\AppData\Local\Temp\junit8203596626416973464\junit4583341152862574241\testrestore2.fdb,
 starting at page 201
gbak:committing secondary files
gbak:cannot commit files
gbak: ERROR:Starting page number for file 
C:\USERS\MARK\APPDATA\LOCAL\TEMP\JUNIT8203596626416973464\JUNIT4583341152862574241\TESTRESTORE2.FDB
 must be 213 or greater
gbak:creating indexes
[..]
"""

If the minimum is actually 213 or greater, instead of "gbak:length given for initial file (10) 
is less than minimum (200)", shouldn't it do "gbak:length given for initial file (10) is 
less than minimum (**212**)" and create the first database file as 212 pages instead of the 
200 it does now?

For reference, Firebird 3 does create both database files and logs:

"""
[..]
gbak:backup version is 10
gbak:created database 
C:\Users\Mark\AppData\Local\Temp\junit10807610804273459707\junit7128503662445743782\testrestore1.fdb,
 page_size 8192 bytes
gbak:started transaction
gbak:length given for initial file (10) is less than minimum (200)
gbak:adding file 
C:\Users\Mark\AppData\Local\Temp\junit10807610804273459707\junit7128503662445743782\testrestore2.fdb,
 starting at page 201
gbak:committing secondary files
gbak:creating indexes
[..]
"""



--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to