MySQL 9.0.0
Source Code Documentation
sql_query_rewrite.h
Go to the documentation of this file.
1#ifndef SQL_QUERY_REWRITE_INCLUDED
2#define SQL_QUERY_REWRITE_INCLUDED
3
4/* Copyright (c) 2015, 2024, Oracle and/or its affiliates.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License, version 2.0,
8 as published by the Free Software Foundation.
9
10 This program is designed to work with certain software (including
11 but not limited to OpenSSL) that is licensed under separate terms,
12 as designated in a particular file or component or in included license
13 documentation. The authors of MySQL hereby grant you an additional
14 permission to link the program and your derivative works with the
15 separately licensed software that they have either included with
16 the program or referenced in the documentation.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License, version 2.0, for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
26
27class Parser_state;
28class THD;
29
30/**
31 Calls the query rewrite plugins' respective rewrite functions before parsing
32 the query.
33
34 @param[in] thd The session sending the query to be rewritten.
35*/
37
38/**
39 Enables digests in the parser state if any plugin needs it.
40
41 @param thd The session.
42
43 @param ps This parser state will have digests enabled if any plugin
44 needs it.
45
46 @note For the time being, only post-parse query rewrite plugins are able to
47 request digests. If other plugin types need the same, this function needs to
48 be modified.
49*/
51
52/**
53 Calls query rewrite plugins after parsing the query.
54
55 @param[in] thd The session with the query to be rewritten.
56 @param is_prepared True if the query was a prepared statement.
57*/
58bool invoke_post_parse_rewrite_plugins(THD *thd, bool is_prepared);
59
60#endif /* SQL_QUERY_REWRITE_INCLUDED */
Internal state of the parser.
Definition: sql_lexer_parser_state.h:44
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
void invoke_pre_parse_rewrite_plugins(THD *thd)
Calls the query rewrite plugins' respective rewrite functions before parsing the query.
Definition: sql_query_rewrite.cc:52
void enable_digest_if_any_plugin_needs_it(THD *thd, Parser_state *ps)
Enables digests in the parser state if any plugin needs it.
bool invoke_post_parse_rewrite_plugins(THD *thd, bool is_prepared)
Calls query rewrite plugins after parsing the query.
Definition: sql_query_rewrite.cc:90