summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/sql_table.cc9
-rw-r--r--sql/sql_table.h7
2 files changed, 5 insertions, 11 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 2b1dbbd394f..602e4faa979 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -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);
}
diff --git a/sql/sql_table.h b/sql/sql_table.h
index 58280b45861..02e72fc564c 100644
--- a/sql/sql_table.h
+++ b/sql/sql_table.h
@@ -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);