diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-12-10 15:35:00 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-03-10 19:24:22 +0100 |
commit | 0ea717f51a152afdb3791195c4a25ee0baa2faac (patch) | |
tree | 0eb10fc1413d1583ffdec2c18a66491d7befeec2 /include/mysql/psi/mysql_statement.h | |
parent | dfe6e914e58472159f34a8a4c9288ff61eac479f (diff) | |
download | mariadb-git-0ea717f51a152afdb3791195c4a25ee0baa2faac.tar.gz |
P_S 5.7.28
Diffstat (limited to 'include/mysql/psi/mysql_statement.h')
-rw-r--r-- | include/mysql/psi/mysql_statement.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h index 6d38131ea99..fab23d2c5c2 100644 --- a/include/mysql/psi/mysql_statement.h +++ b/include/mysql/psi/mysql_statement.h @@ -1,5 +1,5 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. - Copyright (c) 2017, MariaDB Corporation. + Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -31,6 +31,17 @@ #include "mysql/psi/psi.h" +class Diagnostics_area; +typedef const struct charset_info_st CHARSET_INFO; + +#ifndef PSI_STATEMENT_CALL +#define PSI_STATEMENT_CALL(M) PSI_DYNAMIC_CALL(M) +#endif + +#ifndef PSI_DIGEST_CALL +#define PSI_DIGEST_CALL(M) PSI_DYNAMIC_CALL(M) +#endif + /** @defgroup Statement_instrumentation Statement Instrumentation @ingroup Instrumentation_interface @@ -66,10 +77,10 @@ #endif #ifdef HAVE_PSI_STATEMENT_INTERFACE - #define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS) \ - inline_mysql_start_statement(STATE, K, DB, DB_LEN, CS, __FILE__, __LINE__) + #define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS, SPS) \ + inline_mysql_start_statement(STATE, K, DB, DB_LEN, CS, SPS, __FILE__, __LINE__) #else - #define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS) \ + #define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS, SPS) \ NULL #endif @@ -153,11 +164,13 @@ static inline struct PSI_statement_locker * inline_mysql_start_statement(PSI_statement_locker_state *state, PSI_statement_key key, const char *db, size_t db_len, - const CHARSET_INFO *charset, + CHARSET_INFO *charset, + PSI_sp_share *sp_share, const char *src_file, uint src_line) { PSI_statement_locker *locker; - locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset); + locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset, + sp_share); if (psi_likely(locker != NULL)) PSI_STATEMENT_CALL(start_statement)(locker, db, (uint)db_len, src_file, src_line); return locker; |