Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 665fd66

Browse files
committed
Use db.indexes instead of showCurrentUser as ping
We still have no built-in mechanism for pinging the database, we were using `dbms.showCurrentUser` (for system db) however this procedure is not registered when auth is disabled so in those cases you get a ``` neo4j@neo4j> :use system There is no procedure with the name dbms.showCurrentUser registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed. ``` This PR changes to use `db.indexes` which is also what the browser use.
1 parent e19ee1c commit 665fd66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cypher-shell/src/main/java/org/neo4j/shell/state/BoltStateHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private void reconnect(boolean keepBookmark) {
190190

191191
session = driver.session(builder.build());
192192

193-
String query = activeDatabaseNameAsSetByUser.compareToIgnoreCase(SYSTEM_DB_NAME) == 0 ? "CALL dbms.showCurrentUser()" : "RETURN 1";
193+
String query = activeDatabaseNameAsSetByUser.compareToIgnoreCase(SYSTEM_DB_NAME) == 0 ? "CALL db.indexes()" : "RETURN 1";
194194

195195
resetActualDbName(); // Set this to null first in case run throws an exception
196196
Result run = session.run(query);

0 commit comments

Comments
 (0)