~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

« back to all changes in this revision

Viewing changes to include/mysql/psi/mysql_statement.h

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-04-16 20:07:10 UTC
  • mto: (1.3.9 vivid-proposed)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20150416200710-pcrsa022082zj46k
Tags: upstream-5.6.24
ImportĀ upstreamĀ versionĀ 5.6.24

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.   
 
1
/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.   
2
2
 
3
3
  This program is free software; you can redistribute it and/or modify
4
4
  it under the terms of the GNU General Public License as published by
41
41
  do {} while (0)
42
42
#endif
43
43
 
44
 
#ifdef HAVE_PSI_STATEMENT_INTERFACE
45
44
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
46
45
  #define MYSQL_DIGEST_START(LOCKER) \
47
46
    inline_mysql_digest_start(LOCKER)
49
48
  #define MYSQL_DIGEST_START(LOCKER) \
50
49
    NULL
51
50
#endif
52
 
#else
53
 
  #define MYSQL_DIGEST_START(LOCKER) \
54
 
    NULL
55
 
#endif
56
51
 
57
52
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
58
 
  #define MYSQL_ADD_TOKEN(LOCKER, T, Y) \
59
 
    inline_mysql_add_token(LOCKER, T, Y)
 
53
  #define MYSQL_DIGEST_END(LOCKER, DIGEST) \
 
54
    inline_mysql_digest_end(LOCKER, DIGEST)
60
55
#else
61
 
  #define MYSQL_ADD_TOKEN(LOCKER, T, Y) \
62
 
    NULL
 
56
  #define MYSQL_DIGEST_END(LOCKER, DIGEST) \
 
57
    do {} while (0)
63
58
#endif
64
59
 
65
60
#ifdef HAVE_PSI_STATEMENT_INTERFACE
132
127
  PSI_digest_locker* digest_locker= NULL;
133
128
 
134
129
  if (likely(locker != NULL))
135
 
    digest_locker= PSI_STATEMENT_CALL(digest_start)(locker);
 
130
    digest_locker= PSI_DIGEST_CALL(digest_start)(locker);
136
131
  return digest_locker;
137
132
}
138
133
#endif
139
134
 
140
135
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
141
 
static inline struct PSI_digest_locker *
142
 
inline_mysql_add_token(PSI_digest_locker *locker, uint token,
143
 
                       void *yylval)
 
136
static inline void
 
137
inline_mysql_digest_end(PSI_digest_locker *locker, const sql_digest_storage *digest)
144
138
{
145
139
  if (likely(locker != NULL))
146
 
    locker= PSI_STATEMENT_CALL(digest_add_token)(locker, token,
147
 
                                      (OPAQUE_LEX_YYSTYPE*)yylval);
148
 
  return locker;
 
140
    PSI_DIGEST_CALL(digest_end)(locker, digest);
149
141
}
150
142
#endif
151
143