summaryrefslogtreecommitdiff
path: root/include/mysql/psi/mysql_statement.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mysql/psi/mysql_statement.h')
-rw-r--r--include/mysql/psi/mysql_statement.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h
index d7a76ee25e4..3d5943fa55a 100644
--- a/include/mysql/psi/mysql_statement.h
+++ b/include/mysql/psi/mysql_statement.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +41,6 @@
do {} while (0)
#endif
-#ifdef HAVE_PSI_STATEMENT_INTERFACE
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
#define MYSQL_DIGEST_START(LOCKER) \
inline_mysql_digest_start(LOCKER)
@@ -49,17 +48,13 @@
#define MYSQL_DIGEST_START(LOCKER) \
NULL
#endif
-#else
- #define MYSQL_DIGEST_START(LOCKER) \
- NULL
-#endif
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
- #define MYSQL_ADD_TOKEN(LOCKER, T, Y) \
- inline_mysql_add_token(LOCKER, T, Y)
+ #define MYSQL_DIGEST_END(LOCKER, DIGEST) \
+ inline_mysql_digest_end(LOCKER, DIGEST)
#else
- #define MYSQL_ADD_TOKEN(LOCKER, T, Y) \
- NULL
+ #define MYSQL_DIGEST_END(LOCKER, DIGEST) \
+ do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
@@ -132,20 +127,17 @@ inline_mysql_digest_start(PSI_statement_locker *locker)
PSI_digest_locker* digest_locker= NULL;
if (likely(locker != NULL))
- digest_locker= PSI_STATEMENT_CALL(digest_start)(locker);
+ digest_locker= PSI_DIGEST_CALL(digest_start)(locker);
return digest_locker;
}
#endif
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
-static inline struct PSI_digest_locker *
-inline_mysql_add_token(PSI_digest_locker *locker, uint token,
- void *yylval)
+static inline void
+inline_mysql_digest_end(PSI_digest_locker *locker, const sql_digest_storage *digest)
{
if (likely(locker != NULL))
- locker= PSI_STATEMENT_CALL(digest_add_token)(locker, token,
- (OPAQUE_LEX_YYSTYPE*)yylval);
- return locker;
+ PSI_DIGEST_CALL(digest_end)(locker, digest);
}
#endif