Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore (without replace) when database already exists crashes gbak or Firebird (when run through service manager) [CORE5771] #6034

Closed
firebird-automations opened this issue Mar 11, 2018 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @mrotteveel

Restoring (not replacing) a database which already exists crashes gbak, or - when running through the service manager - the Firebird server process.

Steps to reproduce:

From ISQL:

create database 'd:\temp\restoretest.fdb' user sysdba password 'masterkey';

From command prompt:
gbak -b D:\temp\RESTORETEST.FDB D:\temp\restoretest.fbk -user sysdba -password masterkey

Replace works fine:
gbak -replace D:\Temp\RESTORETEST.fbk D:\Temp\RESTORETEST.FDB -user sysdba -password masterkey
gbak -replace -service localhost:service_mgr D:\Temp\RESTORETEST.fbk D:\Temp\RESTORETEST.FDB -user sysdba -password masterkey

But using simply create crashes either gbak or Firebird:

Crashing gbak (**after displaying the error message**):
gbak -create D:\Temp\RESTORETEST.fbk D:\Temp\RESTORETEST.FDB -user sysdba -password masterkey

This gives the error output:
"""
gbak: ERROR:database D:\Temp\RESTORETEST.FDB already exists. To replace it, use the -REP switch
gbak:Exiting before completion due to errors
"""

And then Windows displays the "Firebird SQL Server has stopped working" message (meaning gbak crashed, see also CORE5691)

Crashing Firebird server process:
gbak -create -service localhost:service_mgr D:\Temp\RESTORETEST.fbk D:\Temp\RESTORETEST.FDB -user sysdba -password masterkey

This gives the error output:
"""
gbak: ERROR:Error reading data from the connection.
gbak:Exiting before completion due to errors
"""

The crash of Firebird server is also reproducible with the Jaybird test org.firebirdsql.management.TestBackupManager.testBackupReplace().

Commits: a48f18f

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

I can confirm it is fixed (tested with Firebird-4.0.0.926-0_x64)

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants