From 440b840792e3550e535cd420a6bd536f35fa1185 Mon Sep 17 00:00:00 2001 From: olivia Date: Mon, 2 Dec 2019 12:33:22 +0100 Subject: [PATCH] Change query to execute against system to ping for version --- .../src/main/java/org/neo4j/shell/state/BoltStateHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypher-shell/src/main/java/org/neo4j/shell/state/BoltStateHandler.java b/cypher-shell/src/main/java/org/neo4j/shell/state/BoltStateHandler.java index 67d43f8b..1d41684c 100644 --- a/cypher-shell/src/main/java/org/neo4j/shell/state/BoltStateHandler.java +++ b/cypher-shell/src/main/java/org/neo4j/shell/state/BoltStateHandler.java @@ -193,7 +193,7 @@ private void reconnect(boolean keepBookmark) { session = driver.session(builder.build()); - String query = activeDatabaseNameAsSetByUser.compareToIgnoreCase(SYSTEM_DB_NAME) == 0 ? "SHOW DEFAULT DATABASE" : "RETURN 1"; + String query = activeDatabaseNameAsSetByUser.compareToIgnoreCase(SYSTEM_DB_NAME) == 0 ? "CALL dbms.showCurrentUser()" : "RETURN 1"; resetActualDbName(); // Set this to null first in case run throws an exception Result run = session.run(query);