MySQL 8.0.39
Source Code Documentation
|
Rewrites the CREATE USER statement. More...
#include <sql_rewrite.h>
Public Member Functions | |
Rewriter_create_user (THD *thd, Consumer_type type) | |
bool | rewrite (String &rlb) const override |
Rewrite the query for the CREATE USER statement. More... | |
void | rewrite_user_application_user_metadata (const LEX *lex, String *str) const override |
Default implementation of the the rewriter for user applicatiton user metadata. More... | |
Public Member Functions inherited from I_rewriter | |
I_rewriter (THD *thd, Consumer_type type) | |
virtual | ~I_rewriter () |
I_rewriter (const I_rewriter &)=delete | |
const I_rewriter & | operator= (const I_rewriter &)=delete |
I_rewriter (const I_rewriter &&)=delete | |
const I_rewriter & | operator= (const I_rewriter &&)=delete |
void | set_consumer_type (Consumer_type type) |
Reset the previous consumer type. More... | |
Consumer_type | consumer_type () |
Return the current consumer type set in the object. More... | |
Private Types | |
using | parent = Rewriter_user |
Private Member Functions | |
void | append_user_auth_info (LEX_USER *user, bool comma, String *str) const override |
Append the authID, plugin and auth str of the user to output string : More... | |
void | rewrite_password_history (const LEX *lex, String *str) const override |
Append the PASSWORD HISTORY clause for users iff it is specified. More... | |
void | rewrite_password_reuse (const LEX *lex, String *str) const override |
Append the PASSWORD REUSE clause for users iff it is specified. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Rewriter_user | |
Rewriter_user (THD *thd, Consumer_type target_type) | |
void | rewrite_users (LEX *lex, String *str) const |
Fetch the users from user_list in LEX struct and append them to the String. More... | |
void | append_literal_secret (String *str) const |
Append the literal <secret> in place of password to the output string. More... | |
virtual void | append_auth_str (LEX_USER *lex, String *str) const |
Append the password hash to the output string. More... | |
void | append_plugin_name (const LEX_USER *user, String *str) const |
Append the authentication plugin name for the user. More... | |
void | append_mfa_plugin_name (const LEX_MFA *user, String *str) const |
Append the authentication plugin name from LEX_MFA for the user. More... | |
void | append_mfa_auth_str (const LEX_MFA *user, String *str) const |
Append the authentication string from LEX_MFA for the user. More... | |
void | rewrite_in_memory_user_application_user_metadata (const LEX *user, String *str) const |
Use the LEX for reconstructing the ATTRIBUTE or COMMENT clause. More... | |
Protected Attributes inherited from I_rewriter | |
THD *const | m_thd |
Consumer_type | m_consumer_type |
Rewrites the CREATE USER statement.
|
private |
Rewriter_create_user::Rewriter_create_user | ( | THD * | thd, |
Consumer_type | type | ||
) |
|
overrideprivatevirtual |
Append the authID, plugin and auth str of the user to output string :
[in] | user | Lex user to fetch the info |
[in] | comma | separator to be prefixed while appending user info |
[in,out] | str | String to which user auth info is suffixed. |
Implements Rewriter_user.
|
overridevirtual |
Rewrite the query for the CREATE USER statement.
[in,out] | rlb | Buffer to return the rewritten query in. |
true | The query was rewritten. |
Reimplemented from Rewriter_user.
|
overrideprivatevirtual |
Append the PASSWORD HISTORY clause for users iff it is specified.
[in] | lex | LEX struct to check if clause is specified |
[in,out] | str | The string in which clause is suffixed |
Implements Rewriter_user.
|
overrideprivatevirtual |
Append the PASSWORD REUSE clause for users iff it is specified.
[in] | lex | LEX struct to check if clause is specified |
[in,out] | str | The string in which clause is suffixed |
Implements Rewriter_user.
|
overridevirtual |
Default implementation of the the rewriter for user applicatiton user metadata.
[in] | lex | LEX struct to know if the clause was specified |
[in,out] | str | The string in which the clause is suffixed |
Implements Rewriter_user.