Restore (without replace) when database already exists crashes gbak or Firebird 
(when run through service manager)
------------------------------------------------------------------------------------------------------------------

                 Key: CORE-5771
                 URL: http://tracker.firebirdsql.org/browse/CORE-5771
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine, GBAK, SVCMGR
    Affects Versions: 4.0 Beta 1
         Environment: Firebird-4.0.0.920-0_x64 on Windows 10
            Reporter: Mark Rotteveel


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 CORE-5691)

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().

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to