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

BUG for dropping database,Unexpect operation for dropping non-current database #8690

Closed
FriedEggsWithLeek opened this issue Dec 6, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@FriedEggsWithLeek
Copy link

OrientDB Version: 3.0.11

Java Version: 1.8

OS: Centos6.9

Expected behavior

connected remote to a2
then
drop database a1

Actual behavior

drop database a2

Steps to reproduce

efe08d7c0d950e253e6f0c5578ee77ae

@FriedEggsWithLeek FriedEggsWithLeek changed the title BUG for drop database,Unexpect operation for dropping non-current database BUG for dropping database,Unexpect operation for dropping non-current database Dec 6, 2018
@luigidellaquila
Copy link
Member

luigidellaquila commented Dec 6, 2018

Hi @FriedEggsWithLeek

Sorry, it's just a misunderstanding on the usage of drop database and a missing check in the code.

drop database can be used in two ways:

drop database [<storageType>]

that drops current database, and where is a legacy parameter (it could be local or plocal, but it doesn't make any sense now), that is just ignored, or

drop database <dbUrl> <username> <password>

You are using the first option, but since the storage type is ignored, you are not having any feedback and your current DB is being dropped.

I just added a check, so that you enter an invalid storage type you won't have this unexpected drop anymore.

The fix is already on 3.0.x branch and will be released with v 3.0.12

Thanks

Luigi

@luigidellaquila luigidellaquila self-assigned this Dec 6, 2018
@luigidellaquila luigidellaquila added this to the 3.0.12 milestone Dec 6, 2018
luigidellaquila added a commit that referenced this issue Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants