MySQL 8.0.31
Source Code Documentation
mysql_current_thread_reader.h
Go to the documentation of this file.
1/* Copyright (c) 2019, 2022, 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 also distributed 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 included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef MYSQL_CURRENT_THREAD_READER_H
24#define MYSQL_CURRENT_THREAD_READER_H
25
27
28#ifdef __cplusplus
29class THD;
30#define MYSQL_THD THD *
31#else
32#define MYSQL_THD void *
33#endif
34
35/**
36 @ingroup group_components_services_inventory
37
38 A service to fetch the current thread id
39
40 Use in conjunction with all the related services that operate on thread ids
41 @sa mysql_component_mysql_current_thread_reader_imp
42*/
44/**
45 get the current THD.
46
47 @param[out] thread id
48 @return Status of performed operation
49 @retval false success (valid password)
50 @retval true failure (invalid password)
51*/
53
55
56#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_class.h:922
#define MYSQL_THD
Definition: mysql_current_thread_reader.h:30
static mysql_service_status_t get(reference_caching_cache cache, unsigned service_name_index, const my_h_service **refs) noexcept
Definition: component.cc:113
const mysql_service_mysql_current_thread_reader_t * mysql_current_thread_reader
Definition: rewriter_plugin.cc:62
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:111