mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
P_S 5.7.28
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user