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

Online validation fails on WINDOWS if dbname argument contains forward slash ('/') and concurrent attachment which also uses '/' exists. [CORE4860] #5156

Closed
firebird-automations opened this issue Jul 5, 2015 · 11 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

On Windows one may specify FORWARD slash ('/', ascii_char = 47) as subfolders separator in the path to database file, and it works OK:

C:\FBTESTING\qa\fbt-repo>isql localhost/3333:C:/FBTESTING/qa/fbt-repo/tmp/E30.fdb
Database: localhost/3333:C:/FBTESTING/qa/fbt-repo/tmp/E30.fdb

But if we do following:
1) make ISQL connection using this separator (forward slash),
2) try to perform online validation using also this separator ('/') in the path to validated database
-- then we get:

fbsvcmgr.exe localhost/3333:service_mgr user SYSDBA password masterkey action_validate dbname C:/FBTESTING/qa/fbt-repo/tmp/E30.fdb val_lock_timeout 1
I/O error during "CreateFile (open)" operation for file "C:/FBTESTING/qa/fbt-repo/tmp/E30.fdb"
-Error while trying to open file
-The process can not access the file because the file is in use by another process.

If we change separator in ISQL window to default for Windows ("\") than validation works fine.
If we change separator in fbsvcmgr command line to '\' (but leave '/' in ISQL) than validation also works fine.

So, the trouble exists only when forward slash is specified both in ISQL connection string and in validation DB path argument.

BTW: error in FBSVCMGR will not appear for other actions, with forward slash as path separator, e.g.:

fbsvcmgr.exe localhost/3333:service_mgr user SYSDBA password masterkey action_db_stats dbname C:/FBTESTING/qa/fbt-repo/tmp/E30.fdb sts_hdr_pages

-- works OK and produces standard output of DB header info.

This bug prevent from creating test which tries to validate database online: fbtest engine has $(DATABASE_LOCATION) macro which contains PATH of currently used database. But this macro uses exactly FORWARD slash bot on Linux and Windows as path separator, so one may NOT to do this:

runProgram('fbsvcmgr',['localhost:service_mgr','user','SYSDBA','password','masterkey','action_validate','dbname','$(DATABASE_LOCATION)bugs.core_4707.fdb','val_lock_timeout','1'])

-- it will fail with error that is shown above ("process can not access the file because the file is in use by another process").

Commits: 6e7b2fd 22d149c FirebirdSQL/fbt-repository@25312d3 FirebirdSQL/fbt-repository@f2b4ece

====== Test Details ======

Test not needed: core_4707.fbt will not run if something will be broken here.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

priority: Major [ 3 ] => Minor [ 4 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 RC 1 [ 10584 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Test Details: Test not needed: core_4707.fbt will not run if something will be broken here.

Test Specifics: [Platform (Windows/Linux) specific]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Re-open to backport fix into v2.5

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Closed [ 6 ] => Reopened [ 4 ]

Fix Version: 2.5.5 [ 10670 ]

resolution: Fixed [ 1 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Version: 3.0 Beta 2 [ 10586 ]

Version: 2.5.4 [ 10585 ]

Version: 3.0 RC 1 [ 10584 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Covered by another test(s)

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