Issue Details (XML | Word | Printable)

Key: CORE-4224
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: michalk1
Votes: 0
Watchers: 2
Operations

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

Database replace through services API fails

Created: 18/Sep/13 09:41 AM   Updated: 26/Dec/15 05:54 AM
Component/s: Engine
Affects Version/s: 2.5.3
Fix Version/s: 2.5.3

Environment: Windows XP

QA Status: Done successfully


 Description  « Hide
Gbak in service mode now fails to overwrite a database. The problem is specific to current FB2.5.3 snapshot builds, previous release version (2.5.2) is ok:

gbak -REP -USER sysdba -PASSWORD masterkey -SERVICE localhost:service_mgr C:\test.gbk C:\test.fdb

gbak: ERROR:could not drop database C:\test.fdb (database might be in use)
gbak: ERROR: Exiting before completion due to errors

  Nevertheless, the replaced database file is removed by previous gbak call, so the next call of the same gbak command is successfull (since the file to overwrite is now missing). Once the database file exists, however, gbak fails again.
  To be sure that the file is really not in use, I even tried to stop the server before the gbak call, but it didn't help.

The same problem can be demonstrated by fbsvcmgr:

fbsvcmgr localhost:service_mgr -user sysdba -password masterkey action_restore verbose res_replace -dbname C:\test.fdb -bkp_file C:\test.gbk

gbak:opened file C:\test.gbk
could not drop database C:\test.fdb (database might be in use)
-Exiting before completion due to errors

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 18/Sep/13 11:31 AM
Reproduced, reason is clear

Alexander Peshkov added a comment - 18/Sep/13 12:08 PM
Return value of isc_drop_database() was broken (status vector was OK)