![]() |
MySQL 8.0.43
Source Code Documentation
|
Functions | |
| void | comma_maybe (String *str, bool *comma) |
| Append a comma to given string if item wasn't the first to be added. More... | |
| bool | append_int (String *str, bool comma, const char *txt, size_t len, long val, int cond) |
| Append a key/value pair to a string, with an optional preceding comma. More... | |
| bool | append_str (String *str, bool comma, const char *key, const char *val) |
| Append a key/value pair to a string if the value is non-NULL, with an optional preceding comma. More... | |
| void | append_auth_id (const THD *thd, const LEX_USER *user, bool comma, String *str) |
| Append the authorization id for the user. More... | |
| void | append_auth_id_identifier (const THD *thd, const LEX_USER *user, bool comma, String *str) |
| Append the authorization id for the user. More... | |
| int | lex_user_comp (LEX_USER *l1, LEX_USER *l2) |
| Used with List<>::sort for alphabetic sorting of LEX_USER records using user,host as keys. More... | |
| bool | rewrite_query (THD *thd, Consumer_type type, const Rewrite_params *params, String &rlb) |
| Util method which does the real rewrite of the SQL statement. More... | |
| void anonymous_namespace{sql_rewrite.cc}::append_auth_id | ( | const THD * | thd, |
| const LEX_USER * | user, | ||
| bool | comma, | ||
| String * | str | ||
| ) |
Append the authorization id for the user.
| [in] | thd | The THD to find the SQL mode |
| [in] | user | LEX User to retrieve the plugin string |
| [in] | comma | Separator to be prefixed before adding user info |
| [in,out] | str | The string in which authID is suffixed |
| void anonymous_namespace{sql_rewrite.cc}::append_auth_id_identifier | ( | const THD * | thd, |
| const LEX_USER * | user, | ||
| bool | comma, | ||
| String * | str | ||
| ) |
Append the authorization id for the user.
This quotes auth_id with ` or " based on the sql_mode set.
| [in] | thd | The THD to find the SQL mode |
| [in] | user | LEX User to retrieve the plugin string |
| [in] | comma | Separator to be prefixed before adding user info |
| [in,out] | str | The string in which authID is suffixed |
| bool anonymous_namespace{sql_rewrite.cc}::append_int | ( | String * | str, |
| bool | comma, | ||
| const char * | txt, | ||
| size_t | len, | ||
| long | val, | ||
| int | cond | ||
| ) |
Append a key/value pair to a string, with an optional preceding comma.
For numeric values.
| [in,out] | str | The string to append to |
| comma | Prepend a comma? | |
| txt | C-string, must end in a space | |
| len | strlen(txt) | |
| val | numeric value | |
| cond | only append if this evaluates to true |
| false | if any subsequent key/value pair would be the first |
| bool anonymous_namespace{sql_rewrite.cc}::append_str | ( | String * | str, |
| bool | comma, | ||
| const char * | key, | ||
| const char * | val | ||
| ) |
Append a key/value pair to a string if the value is non-NULL, with an optional preceding comma.
| [in,out] | str | The string to append to |
| comma | Prepend a comma? | |
| key | C-string: the key, must be non-NULL | |
| val | C-string: the value |
| false | if any subsequent key/value pair would be the first |
| void anonymous_namespace{sql_rewrite.cc}::comma_maybe | ( | String * | str, |
| bool * | comma | ||
| ) |
Append a comma to given string if item wasn't the first to be added.
| [in,out] | str | The string to (maybe) append to. |
| [in,out] | comma | If true, there are already items in the list. Always true afterwards. |
Used with List<>::sort for alphabetic sorting of LEX_USER records using user,host as keys.
| l1 | A LEX_USER element |
| l2 | A LEX_USER element |
| 1 | if n1 > n2 |
| 0 | if n1 <= n2 |
| bool anonymous_namespace{sql_rewrite.cc}::rewrite_query | ( | THD * | thd, |
| Consumer_type | type, | ||
| const Rewrite_params * | params, | ||
| String & | rlb | ||
| ) |
Util method which does the real rewrite of the SQL statement.
If a Rewriter is available for the specified SQL command then the rewritten query will be stored in the String rlb; otherwise, the string will just be cleared.
| thd | The THD to rewrite for. | |
| type | Purpose of rewriting the query | |
| params | Wrapper object of parameters in case needed by a SQL rewriter. | |
| [in,out] | rlb | Buffer to return the rewritten query in. Will be empty if no rewriting happened. |
| true | If the Query is re-written. |
| false | Otherwise |