You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If multifile database have some (non-last) file with size less than maximum allowed for this file, engine could attempt to read after the end of such file.
Corresponding code is called by validation only. Database is not corrupted.
Test case
a) make backup
gbak -b EMPLOYEE.FDB EMPLOYEE.FBK
b) restore it into multifile database, make first file big enougth to fit whole database
gbak -r -v EMPLOYEE.FBK EMPLOYEE-1.FDB 100000 EMPLOYEE-2.FDB
gbak:opened file EMPLOYEE.FBK
gbak:transportable backup -- data in XDR format
gbak: backup file is compressed
gbak:backup version is 10
gbak:created database EMPLOYEE-1.FDB, page_size 8192 bytes
gbak:started transaction
gbak:adding file EMPLOYEE-2.FDB, starting at page 100001
gbak:committing secondary files
...
gbak:finishing, closing, and going home
gbak:adjusting the ONLINE and FORCED WRITES flags
c) validate restored database
gfix -v EMPLOYEE-1.FDB
I/O error during "ReadFile" operation for file "EMPLOYEE-1.FDB"
-Error while trying to read from file
-Reached the end of file
While v2.5 is not directly affected by this bug (as corresponding validatin code was introduced in v3)
there is one more side effect - file preallocation could be less effective for multifile database.
Therefore i commit fix into v2.5 too.
Single file databases are not affected by this fix.
Submitted by: @hvlad
If multifile database have some (non-last) file with size less than maximum allowed for this file, engine could attempt to read after the end of such file.
Corresponding code is called by validation only. Database is not corrupted.
Test case
a) make backup
gbak -b EMPLOYEE.FDB EMPLOYEE.FBK
b) restore it into multifile database, make first file big enougth to fit whole database
gbak -r -v EMPLOYEE.FBK EMPLOYEE-1.FDB 100000 EMPLOYEE-2.FDB
gbak:opened file EMPLOYEE.FBK
gbak:transportable backup -- data in XDR format
gbak: backup file is compressed
gbak:backup version is 10
gbak:created database EMPLOYEE-1.FDB, page_size 8192 bytes
gbak:started transaction
gbak:adding file EMPLOYEE-2.FDB, starting at page 100001
gbak:committing secondary files
...
gbak:finishing, closing, and going home
gbak:adjusting the ONLINE and FORCED WRITES flags
c) validate restored database
gfix -v EMPLOYEE-1.FDB
I/O error during "ReadFile" operation for file "EMPLOYEE-1.FDB"
-Error while trying to read from file
-Reached the end of file
Commits: d62260d 2b58717 92d0ca8
The text was updated successfully, but these errors were encountered: