summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-15 18:47:47 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-15 18:47:47 +0200
commit821db3801d443f5b7640921da9a6d15496649803 (patch)
tree025c1d642dceb92c4ed7a235065641ba01d97d5b /sql/handler.h
parenta9035be5b7a7b3865ddb4ef34a5d0cfc65dfc254 (diff)
downloadmariadb-git-821db3801d443f5b7640921da9a6d15496649803.tar.gz
remove numerous #ifdef HAVE_PSI_TABLE_INTERFACE
simplify ha_table_share_psi()
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 44d86e5ec97..1b2ae21c05a 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -36,6 +36,7 @@
#include <my_compare.h>
#include <ft_global.h>
#include <keycache.h>
+#include <mysql/psi/mysql_table.h>
#if MAX_KEY > 128
#error MAX_KEY is too large. Values up to 128 are supported.
@@ -2907,34 +2908,29 @@ protected:
/**
Acquire the instrumented table information from a table share.
- @param share a table share
@return an instrumented table share, or NULL.
*/
- PSI_table_share *ha_table_share_psi(const TABLE_SHARE *share) const;
+ PSI_table_share *ha_table_share_psi() const;
inline void psi_open()
{
DBUG_ASSERT(m_psi == NULL);
DBUG_ASSERT(table_share != NULL);
-#ifdef HAVE_PSI_INTERFACE
if (PSI_server)
{
- PSI_table_share *share_psi= ha_table_share_psi(table_share);
+ PSI_table_share *share_psi= ha_table_share_psi();
if (share_psi)
- m_psi= PSI_server->open_table(share_psi, this);
+ m_psi= PSI_CALL_open_table(share_psi, this);
}
-#endif
}
inline void psi_close()
{
-#ifdef HAVE_PSI_INTERFACE
if (PSI_server && m_psi)
{
- PSI_server->close_table(m_psi);
+ PSI_CALL_close_table(m_psi);
m_psi= NULL; /* instrumentation handle, invalid after close_table() */
}
-#endif
DBUG_ASSERT(m_psi == NULL);
}