1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix Bug#57739 Scary messages in error log

Silence a warning about old table name when InnoDB tests whether the
format has changed using a nonexistent table name.

Reviewed by:	bar@mysql.com, marko.makela@oracle.com
This commit is contained in:
Vasil Dimov
2010-11-22 16:08:51 +02:00
parent 250d851129
commit d5787a3c59
4 changed files with 20 additions and 7 deletions

View File

@@ -371,7 +371,11 @@ uint explain_filename(THD* thd,
Table name length.
*/
uint filename_to_tablename(const char *from, char *to, uint to_length)
uint filename_to_tablename(const char *from, char *to, uint to_length
#ifndef DBUG_OFF
, bool stay_quiet
#endif /* DBUG_OFF */
)
{
uint errors;
size_t res;
@@ -391,7 +395,13 @@ uint filename_to_tablename(const char *from, char *to, uint to_length)
{
res= (strxnmov(to, to_length, MYSQL50_TABLE_NAME_PREFIX, from, NullS) -
to);
sql_print_error("Invalid (old?) table or database name '%s'", from);
#ifndef DBUG_OFF
if (!stay_quiet) {
#endif /* DBUG_OFF */
sql_print_error("Invalid (old?) table or database name '%s'", from);
#ifndef DBUG_OFF
}
#endif /* DBUG_OFF */
/*
TODO: add a stored procedure for fix table and database names,
and mention its name in error log.