mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
restore the condition in filename_to_tablename()
(broken in the revid:sergii@pisem.net-20130615170931-bn2h8j30vu5bfp0t)
This commit is contained in:
@ -365,11 +365,8 @@ uint explain_filename(THD* thd,
|
|||||||
Table name length.
|
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)
|
||||||
, bool stay_quiet
|
|
||||||
#endif /* DBUG_OFF */
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
uint errors;
|
uint errors;
|
||||||
size_t res;
|
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) -
|
res= (strxnmov(to, to_length, MYSQL50_TABLE_NAME_PREFIX, from, NullS) -
|
||||||
to);
|
to);
|
||||||
if (IF_DBUG(!stay_quiet,0))
|
if (!stay_quiet)
|
||||||
sql_print_error("Invalid (old?) table or database name '%s'", from);
|
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 */
|
/** Don't check foreign key constraints while renaming table */
|
||||||
#define NO_FK_CHECKS (1 << 4)
|
#define NO_FK_CHECKS (1 << 4)
|
||||||
|
|
||||||
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 = false);
|
||||||
, bool stay_quiet = false
|
|
||||||
#endif /* DBUG_OFF */
|
|
||||||
);
|
|
||||||
uint tablename_to_filename(const char *from, char *to, uint to_length);
|
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);
|
uint check_n_cut_mysql50_prefix(const char *from, char *to, uint to_length);
|
||||||
bool check_mysql50_prefix(const char *name);
|
bool check_mysql50_prefix(const char *name);
|
||||||
|
Reference in New Issue
Block a user