Commit d6975b63 authored by serg@serg.mylan's avatar serg@serg.mylan

don't modify constant strings

parent 3cd665ba
...@@ -802,7 +802,7 @@ static int mysql_test_select_fields(Prepared_statement *stmt, ...@@ -802,7 +802,7 @@ static int mysql_test_select_fields(Prepared_statement *stmt,
if (check_table_access(thd, privilege, tables,0)) if (check_table_access(thd, privilege, tables,0))
DBUG_RETURN(1); DBUG_RETURN(1);
} }
else if (check_access(thd, privilege, "*any*",0,0,0)) else if (check_access(thd, privilege, any_db,0,0,0))
DBUG_RETURN(1); DBUG_RETURN(1);
#endif #endif
if ((&lex->select_lex != lex->all_selects_list && if ((&lex->select_lex != lex->all_selects_list &&
......
...@@ -1288,7 +1288,7 @@ bool check_db_name(char *name) ...@@ -1288,7 +1288,7 @@ bool check_db_name(char *name)
/* Used to catch empty names and names with end space */ /* Used to catch empty names and names with end space */
bool last_char_is_space= TRUE; bool last_char_is_space= TRUE;
if (lower_case_table_names) if (lower_case_table_names && name != any_db)
my_casedn_str(files_charset_info, name); my_casedn_str(files_charset_info, name);
while (*name) while (*name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment