diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-01 15:23:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-01 15:23:18 +0200 |
commit | ec40980ddd921a3a765c23cc430c9c219e48ea85 (patch) | |
tree | 6553832d3d3fb4b2cb39aea6a1d69e54275f6eb2 /sql/service_wsrep.cc | |
parent | 6801f80aface011811d2978f86c03a25ca7b9165 (diff) | |
parent | 9c72963d2aef783cae652b5b8ac01f7aa2bcb43a (diff) | |
download | mariadb-git-ec40980ddd921a3a765c23cc430c9c219e48ea85.tar.gz |
Merge 10.3 into 10.4
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 43944366665..35bc1b83029 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) |