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

:use movies; throws database not found error #1961

Open
ikwattro opened this issue Feb 16, 2024 · 6 comments
Open

:use movies; throws database not found error #1961

ikwattro opened this issue Feb 16, 2024 · 6 comments
Assignees

Comments

@ikwattro
Copy link

ikwattro commented Feb 16, 2024

Neo4j Version: 5.15.0
Operating System: Any
API: Any

The following statement throws database not found error although the database name is escaped.

:use `movies`;
A database with the "movies`;" name or alias could not be found.

Adding a space before the semicolon works.

Steps to reproduce

As above

Expected behavior

Since the database is escaped, Cypher should understand that the semicolon is not part of the database name.

Actual behavior

database not found error

@ikwattro ikwattro added the bug label Feb 16, 2024
@arnefischereit
Copy link

I assume you are running the above in Browser?

@ikwattro
Copy link
Author

@arnefischereit yes

@ikwattro
Copy link
Author

@arnefischereit and I just checked, in cypher-shell it does work correctly

neo4j@neo4j> :use `senzing`;
neo4j@senzing>

@OskarDamkjaer
Copy link
Contributor

@ikwattro I did some testing and seems the problem is with the semicolon, a hint is in the error message that the database ""movies`;" wasn't found.

:use `movies` // <-- works fine
:use `movies`; // <-- breaks 

Should be straightforward to fix, I'll move the issue to Browser. Thanks for reporting it 👍

@OskarDamkjaer OskarDamkjaer transferred this issue from neo4j/neo4j Feb 20, 2024
@OskarDamkjaer OskarDamkjaer self-assigned this Feb 20, 2024
@ikwattro
Copy link
Author

@OskarDamkjaer Yes I got the issue was the semicolon, however it works from cypher-shell so I believe it should work from the browser surface as well. Secondly we generate multi-statements scripts to paste in the browser and it seems the :use clause is the only one causing issues with the semicolon.

@OskarDamkjaer
Copy link
Contributor

@ikwattro I agree it's a bug we should fix. For your generated scripts I think I adding an extra space can would be a workaround you could use in the meantime:

:use `movies` ;
create ()

The above worked when I tried it just now.

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

3 participants