Commit 032a61fc authored by Sergei Golubchik's avatar Sergei Golubchik

restore the condition in filename_to_tablename()

(broken in the revid:sergii@pisem.net-20130615170931-bn2h8j30vu5bfp0t)
parent 79d2e6c8
......@@ -365,11 +365,8 @@ uint explain_filename(THD* thd,
Table name length.
*/
uint filename_to_tablename(const char *from, char *to, uint to_length
#ifndef DBUG_OFF
, bool stay_quiet
#endif /* DBUG_OFF */
)
uint filename_to_tablename(const char *from, char *to, uint to_length,
bool stay_quiet)
{
uint errors;
size_t res;
......@@ -382,7 +379,7 @@ uint filename_to_tablename(const char *from, char *to, uint to_length
{
res= (strxnmov(to, to_length, MYSQL50_TABLE_NAME_PREFIX, from, NullS) -
to);
if (IF_DBUG(!stay_quiet,0))
if (!stay_quiet)
sql_print_error("Invalid (old?) table or database name '%s'", from);
}
......
......@@ -123,11 +123,8 @@ enum enum_explain_filename_mode
/** Don't check foreign key constraints while renaming table */
#define NO_FK_CHECKS (1 << 4)
uint filename_to_tablename(const char *from, char *to, uint to_length
#ifndef DBUG_OFF
, bool stay_quiet = false
#endif /* DBUG_OFF */
);
uint filename_to_tablename(const char *from, char *to, uint to_length,
bool stay_quiet = false);
uint tablename_to_filename(const char *from, char *to, uint to_length);
uint check_n_cut_mysql50_prefix(const char *from, char *to, uint to_length);
bool check_mysql50_prefix(const char *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