summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-04-06 12:31:25 +0200
committerunknown <serg@serg.mylan>2004-04-06 12:31:25 +0200
commite78208e59ba90a08630bef32b8423df3687bb96f (patch)
treef49fb77dc2d1c84ab5967e498b304946685330dc
parent6b433f99a4dd717e3274c26f5727c6aa14663f75 (diff)
downloadmariadb-git-e78208e59ba90a08630bef32b8423df3687bb96f.tar.gz
don't modify constant strings
sql/sql_prepare.cc: use static variable
-rw-r--r--sql/sql_prepare.cc2
-rw-r--r--sql/table.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 94fef4cafdc..8a5759459af 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -802,7 +802,7 @@ static int mysql_test_select_fields(Prepared_statement *stmt,
if (check_table_access(thd, privilege, tables,0))
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);
#endif
if ((&lex->select_lex != lex->all_selects_list &&
diff --git a/sql/table.cc b/sql/table.cc
index dcd0d39d855..b25517bce10 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1288,7 +1288,7 @@ bool check_db_name(char *name)
/* Used to catch empty names and names with end space */
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);
while (*name)