From 80daf8d8ede9458a74cb535e42c482916ebcb312 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Fri, 4 Sep 2015 10:53:02 +0000 Subject: [PATCH] Rollback frontend transaction after getting login and role names --- src/isql/isql.epp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/isql/isql.epp b/src/isql/isql.epp index ee164ef2de..8bb29eaea5 100644 --- a/src/isql/isql.epp +++ b/src/isql/isql.epp @@ -5916,6 +5916,21 @@ static bool printUser(const char* dbName) if (!frontendTransaction()) return false; + class FbTransCommit + { + public: + ~FbTransCommit() + { + if (DB && fbTrans) + { + fbTrans->rollback(fbStatus); + if (succeeded()) + fbTrans = NULL; + } + } + }; + FbTransCommit fbTransCommit; + const char* sql = "SELECT CURRENT_USER, CURRENT_ROLE FROM RDB$DATABASE"; Firebird::RefPtr st(Firebird::REF_NO_INCR,