Issue Details (XML | Word | Printable)

Key: CORE-6023
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Alexander Peshkov
Reporter: michalk1
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Firebird Core

FB4 unable to overwrite older ods database

Created: 13/Mar/19 08:23 AM   Updated: 10/Apr/20 05:05 PM
Component/s: Engine
Affects Version/s: 4.0 Beta 1
Fix Version/s: None

Environment: Windows 10, FB 4.0 Beta 1

QA Status: No test


 Description  « Hide
FB4 is unable to overwrite database files created by older firebird versions. It concerns gbak restore (with -rep switch) and database creation functions, even when run under sysdba account. This is probably not an error per se, but it differs from FB3 and can complicate automated database migration process.

gbak -rep -v -user sydba -password masterkey C:\TEST\TEST.GBK localhost:C:\TEST\TEST.FDB
...
gbak: ERROR:unsupported on-disk structure for file C:\TEST\TEST.FDB; found 11.2, support 13.0
gbak: ERROR: IProvider::attachDatabase failed when loading mapping cache
gbak: ERROR:failed to create database localhost:c:\TEST\TEST.FDB

Local (embedded) connections are not affected, only TCP ones. Strangely, when embedded overwriting is tested first, the server seems to remember that it has successfully accessed this database file, so that subsequent TCP rewrites of the same file (that I each time replace by the original old database) now succeed as well. This lasts until server is restarted.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 13/May/19 03:53 PM
Rule is that one should attach then drop. For non-database files (and older ODS) that is not possible.

I think the behavior should not be changed.

Alexander Peshkov added a comment - 10/Apr/20 05:05 PM
At least we should not have different behavior for remote vs. embedded connections. Currently:

# ./gbak -user sysdba -pas masterkey -rep e4.fbk localhost:`pwd`/employee3.fdb
gbak: ERROR:unsupported on-disk structure for file /usr/home/firebird/HEAD/gen/Debug/firebird/bin/employee3.fdb; found 12.0, support 13.0
gbak: ERROR: IProvider::attachDatabase failed when loading mapping cache
gbak: ERROR:failed to create database localhost:/usr/home/firebird/HEAD/gen/Debug/firebird/bin/employee3.fdb
gbak:Exiting before completion due to errors
# ./gbak -rep e4.fbk employee3.fdb
#