diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-11-05 16:15:20 +0100 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-07 08:52:30 +0100 |
commit | 3ad37ed0eb343cd173b103974aded5783958a88e (patch) | |
tree | f4ff854553d26a9e7d57791e7d671d4349a58d2d /sql/service_wsrep.cc | |
parent | 46f2f24ec43e9c1fa2d994afd615f58736c00d65 (diff) | |
parent | 0339cbe2f628f8a122ba7ea3a75fc99fa1dc4c96 (diff) | |
download | mariadb-git-3ad37ed0eb343cd173b103974aded5783958a88e.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/service_wsrep.cc')
-rw-r--r-- | sql/service_wsrep.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc index b365b393e0b..204d671d53b 100644 --- a/sql/service_wsrep.cc +++ b/sql/service_wsrep.cc @@ -55,7 +55,26 @@ extern "C" const char* wsrep_thd_transaction_state_str(const THD *thd) extern "C" const char *wsrep_thd_query(const THD *thd) { - return thd ? thd->query() : NULL; + if (thd) + { + switch(thd->lex->sql_command) + { + case SQLCOM_CREATE_USER: + return "CREATE USER"; + case SQLCOM_GRANT: + return "GRANT"; + case SQLCOM_REVOKE: + return "REVOKE"; + case SQLCOM_SET_OPTION: + if (thd->lex->definer) + return "SET PASSWORD"; + /* fallthrough */ + default: + if (thd->query()) + return thd->query(); + } + } + return "NULL"; } extern "C" query_id_t wsrep_thd_transaction_id(const THD *thd) |