Adding the "const" qualified to the LEX_CSTRING parameter of a few check_xxx() functions
Functions: check_routine_name() check_string_byte_length() check_string_char_length() check_ident_length()
This commit is contained in:
parent
68bc777830
commit
9b74b00c8e
@ -480,7 +480,7 @@ sp_name::sp_name(const MDL_key *key, char *qname_buff)
|
||||
*/
|
||||
|
||||
bool
|
||||
check_routine_name(LEX_CSTRING *ident)
|
||||
check_routine_name(const LEX_CSTRING *ident)
|
||||
{
|
||||
DBUG_ASSERT(ident);
|
||||
DBUG_ASSERT(ident->str);
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
|
||||
|
||||
bool
|
||||
check_routine_name(LEX_CSTRING *ident);
|
||||
check_routine_name(const LEX_CSTRING *ident);
|
||||
|
||||
class sp_head :private Query_arena,
|
||||
public Database_qualified_name
|
||||
|
@ -9677,7 +9677,7 @@ LEX_USER *create_definer(THD *thd, LEX_CSTRING *user_name,
|
||||
The function is not used in existing code but can be useful later?
|
||||
*/
|
||||
|
||||
bool check_string_byte_length(LEX_CSTRING *str, uint err_msg,
|
||||
bool check_string_byte_length(const LEX_CSTRING *str, uint err_msg,
|
||||
uint max_byte_length)
|
||||
{
|
||||
if (str->length <= max_byte_length)
|
||||
@ -9707,7 +9707,7 @@ bool check_string_byte_length(LEX_CSTRING *str, uint err_msg,
|
||||
*/
|
||||
|
||||
|
||||
bool check_string_char_length(LEX_CSTRING *str, uint err_msg,
|
||||
bool check_string_char_length(const LEX_CSTRING *str, uint err_msg,
|
||||
uint max_char_length, CHARSET_INFO *cs,
|
||||
bool no_error)
|
||||
{
|
||||
@ -9726,7 +9726,7 @@ bool check_string_char_length(LEX_CSTRING *str, uint err_msg,
|
||||
}
|
||||
|
||||
|
||||
bool check_ident_length(LEX_CSTRING *ident)
|
||||
bool check_ident_length(const LEX_CSTRING *ident)
|
||||
{
|
||||
if (check_string_char_length(ident, 0, NAME_CHAR_LEN, system_charset_info, 1))
|
||||
{
|
||||
|
@ -73,12 +73,12 @@ LEX_USER *create_default_definer(THD *thd, bool role);
|
||||
LEX_USER *create_definer(THD *thd, LEX_CSTRING *user_name, LEX_CSTRING *host_name);
|
||||
LEX_USER *get_current_user(THD *thd, LEX_USER *user, bool lock=true);
|
||||
bool sp_process_definer(THD *thd);
|
||||
bool check_string_byte_length(LEX_CSTRING *str, uint err_msg,
|
||||
bool check_string_byte_length(const LEX_CSTRING *str, uint err_msg,
|
||||
uint max_byte_length);
|
||||
bool check_string_char_length(LEX_CSTRING *str, uint err_msg,
|
||||
bool check_string_char_length(const LEX_CSTRING *str, uint err_msg,
|
||||
uint max_char_length, CHARSET_INFO *cs,
|
||||
bool no_error);
|
||||
bool check_ident_length(LEX_CSTRING *ident);
|
||||
bool check_ident_length(const LEX_CSTRING *ident);
|
||||
CHARSET_INFO* merge_charset_and_collation(CHARSET_INFO *cs, CHARSET_INFO *cl);
|
||||
CHARSET_INFO *find_bin_collation(CHARSET_INFO *cs);
|
||||
bool check_host_name(LEX_CSTRING *str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user