MySQL 8.4.0
Source Code Documentation
mysql_current_thread_reader.h
Go to the documentation of this file.
1/* Copyright (c) 2019, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MYSQL_CURRENT_THREAD_READER_H
25#define MYSQL_CURRENT_THREAD_READER_H
26
28
29#ifdef __cplusplus
30class THD;
31#define MYSQL_THD THD *
32#else
33#define MYSQL_THD void *
34#endif
35
36/**
37 @ingroup group_components_services_inventory
38
39 A service to fetch the current thread id
40
41 Use in conjunction with all the related services that operate on thread ids
42 @sa mysql_component_mysql_current_thread_reader_imp
43*/
45/**
46 get the current THD.
47
48 @param[out] thread id
49 @return Status of performed operation
50 @retval false success (valid password)
51 @retval true failure (invalid password)
52*/
54
56
57#endif /* MYSQL_CURRENT_THREAD_READER_H */
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
#define MYSQL_THD
Definition: mysql_current_thread_reader.h:31
void get(PSI_field *, PSI_longlong *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:32
const mysql_service_mysql_current_thread_reader_t * mysql_current_thread_reader
Definition: rewriter_plugin.cc:63
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:112