From 6be6dda7db396dc50aed9963d747a9f8d433613d Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Sat, 11 Apr 2020 21:47:43 +0200 Subject: [PATCH] auth smysql: mimic error message format from mysql tooling --- modules/gmysqlbackend/smysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index 74087425e2..7e78283dae 100644 --- a/modules/gmysqlbackend/smysql.cc +++ b/modules/gmysqlbackend/smysql.cc @@ -515,7 +515,7 @@ SMySQL::~SMySQL() SSqlException SMySQL::sPerrorException(const string &reason) { - return SSqlException(reason+string(": ")+mysql_error(&d_db)); + return SSqlException(reason+string(": ERROR ")+std::to_string(mysql_errno(&d_db))+" ("+string(mysql_sqlstate(&d_db))+"): "+mysql_error(&d_db)); } std::unique_ptr SMySQL::prepare(const string& query, int nparams) -- 2.47.2