1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00
This commit is contained in:
Sergei Golubchik
2016-07-28 15:52:12 +02:00
parent 51ed64a520
commit 15f60c1a73
976 changed files with 148320 additions and 35656 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright (c) 2010, 2015, 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
@@ -23,6 +23,17 @@
#include "mysql/psi/psi.h"
class Diagnostics_area;
typedef 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
@@ -58,10 +69,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
@@ -146,10 +157,12 @@ inline_mysql_start_statement(PSI_statement_locker_state *state,
PSI_statement_key key,
const char *db, uint db_len,
const CHARSET_INFO *charset,
PSI_sp_share *sp_share,
const char *src_file, int 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 (likely(locker != NULL))
PSI_STATEMENT_CALL(start_statement)(locker, db, db_len, src_file, src_line);
return locker;