MySQL 9.1.0
Source Code Documentation
sql_lexer_error.h File Reference

Go to the source code of this file.

Functions

void warn_on_deprecated_charset (THD *, const CHARSET_INFO *, const char *, const char *=nullptr)
 
void warn_on_deprecated_collation (THD *, const CHARSET_INFO *, const char *=nullptr)
 
void push_deprecated_warn (THD *, const char *, const char *)
 Generates a warning that a feature is deprecated. More...
 
void push_deprecated_warn_no_replacement (THD *, const char *)
 Generates a warning that a feature is deprecated. More...
 

Function Documentation

◆ push_deprecated_warn()

void push_deprecated_warn ( THD thd,
const char *  old_syntax,
const char *  new_syntax 
)
inline

Generates a warning that a feature is deprecated.

Using it as push_deprecated_warn(thd, "BAD", "'GOOD'"); Will result in a warning: "The syntax 'BAD' is deprecated and will be removed in a future release. Please use 'GOOD' instead"

If a function is deprecated, it should implement Item_func::is_deprecated() to return true to prevent the usage of the function in the generated column expression.

Parameters
thdThread context. If NULL, warning is written to the error log, otherwise the warning is sent to the client.
old_syntaxDeprecated syntax.
new_syntaxReplacement syntax.

◆ push_deprecated_warn_no_replacement()

void push_deprecated_warn_no_replacement ( THD thd,
const char *  old_syntax 
)
inline

Generates a warning that a feature is deprecated.

Using it as push_deprecated_warn_no_replacement(thd, "old"); Will result in a warning: "The syntax 'old' is deprecated and will be removed in a future release.

If a function is deprecated, it should implement Item_func::is_deprecated() to return true to prevent the usage of the function in the generated column expression.

Parameters
thdThread context. If NULL, warning is written to the error log, otherwise the warning is sent to the client.
old_syntaxDeprecated syntax.

◆ warn_on_deprecated_charset()

void warn_on_deprecated_charset ( THD thd,
const CHARSET_INFO cs,
const char *  alias,
const char *  option = nullptr 
)
inline

◆ warn_on_deprecated_collation()

void warn_on_deprecated_collation ( THD thd,
const CHARSET_INFO collation,
const char *  option = nullptr 
)
inline