![]() |
MySQL 9.3.0
Source Code Documentation
|
Go to the source code of this file.
Classes | |
class | Rewrite_params |
An interface to wrap the parameters required by specific Rewriter. More... | |
class | User_params |
Wrapper object for user related parameters required by: SET PASSWORD|CREATE USER|ALTER USER statements. More... | |
class | Show_user_params |
Wrapper object for parameters required by SHOW CREATE USER statement. More... | |
class | Grant_params |
Wrapper object for parameters required for GRANT statement. More... | |
class | I_rewriter |
An abstract base class to enable the implementation of various query rewriters. More... | |
class | Rewriter_user |
Abstract base class to define the skeleton of rewriting the users, yet deferring some steps to the concrete classes. More... | |
class | Rewriter_create_user |
Rewrites the CREATE USER statement. More... | |
class | Rewriter_alter_user |
Rewrites the ALTER USER statement. More... | |
class | Rewriter_show_create_user |
Rewrites the SHOW CREATE USER statement. More... | |
class | Rewriter_set |
Rewrites the SET statement. More... | |
class | Rewriter_set_password |
class | Rewriter_grant |
Rewrites the GRANT statement. More... | |
class | Rewriter_change_replication_source |
Rewrites the CHANGE REPLICATION SOURCE statement. More... | |
class | Rewriter_replica_start |
Rewrites the START REPLICA statement. More... | |
class | Rewriter_server_option |
Base class for SERVER OPTIONS related statement. More... | |
class | Rewriter_create_server |
Rewrites the CREATE SERVER statement. More... | |
class | Rewriter_alter_server |
Rewrites the ALTER SERVER statement. More... | |
class | Rewriter_prepare |
Rewrites the PREPARE statement. More... | |
class | Rewriter_clone |
Rewrites CLONE statement. More... | |
class | Rewriter_start_group_replication |
Rewrites the START GROUP_REPLICATION command. More... | |
class | Rewriter_select_query |
Rewrites the SELECT statement. More... | |
class | Rewriter_create_procedure |
Rewrites the CREATE PROCEDURE or CREATE FUNCTION statement. More... | |
class | Rewriter_create_table |
Rewrites the CREATE TABLE statement for external tables. More... | |
class | Rewriter_alter_table |
Rewrites the ALTER TABLE statement for external tales. More... | |
Enumerations | |
enum class | Consumer_type { TEXTLOG , BINLOG , STDOUT } |
Target types where the rewritten query will be added. More... | |
Functions | |
void | mysql_rewrite_query (THD *thd, Consumer_type type=Consumer_type::TEXTLOG, const Rewrite_params *params=nullptr) |
Provides the default interface to rewrite the SQL statements to to obfuscate passwords. More... | |
void | mysql_rewrite_acl_query (THD *thd, String &rlb, Consumer_type type, const Rewrite_params *params=nullptr, bool do_ps_instrument=true) |
Provides the default interface to rewrite the ACL query. More... | |
void | redact_par_url (String original_query_str, String &rlb) |
Rewrites the par URL used in external tables. More... | |
|
strong |
void mysql_rewrite_acl_query | ( | THD * | thd, |
String & | rlb, | ||
Consumer_type | type, | ||
const Rewrite_params * | params, | ||
bool | do_ps_instrument | ||
) |
Provides the default interface to rewrite the ACL query.
If do_ps_instrument, it sets the thd->rewritten_query with a rewritten query.
thd | The THD to rewrite for. |
rlb | Buffer to return rewritten query in (if any) if do_ps_instrument is false. |
type | Purpose of rewriting the query Consumer_type::TEXTLOG To rewrite the query either for general, slow query and audit log. Consumer_type::BINLOG To rewrite the query for binlogs. Consumer_type::STDOUT To rewrite the query for standard output. |
params | Wrapper object of parameters in case needed by a SQL rewriter. |
do_ps_instrument | flag to indicate if the query has to be instrumented in the PSI. Default value is true. If instrumented, the previous |
void mysql_rewrite_query | ( | THD * | thd, |
Consumer_type | type, | ||
const Rewrite_params * | params | ||
) |
Provides the default interface to rewrite the SQL statements to to obfuscate passwords.
It either sets the thd->rewritten_query with a rewritten query, or clears it if no rewriting took place.
The query aimed to be rewritten in the usual log files (i.e. General, slow query and audit log) uses default value of type which is Consumer_type::TEXTLOG
Side-effects:
thd | The THD to rewrite for. |
type | Purpose of rewriting the query Consumer_type::TEXTLOG To rewrite the query either for general, slow query and audit log. Consumer_type::BINLOG To rewrite the query for binlogs. Consumer_type::STDOUT To rewrite the query for standard output. |
params | Wrapper object of parameters in case needed by a SQL rewriter. |