Commit 55bd222b authored by iggy@mysql.com's avatar iggy@mysql.com

Merge mysql.com:/mnt/storeage/mysql-5.0-maint

into  mysql.com:/mnt/storeage/mysql-5.0-maint_bug20616
parents d11c890b f68b01e3
......@@ -1657,7 +1657,22 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE;
}
else
{
#ifdef FN_DEVCHAR
/* check if the table name contains FN_DEVCHAR when defined */
const char *start= alias;
while (*start != '\0')
{
if (*start == FN_DEVCHAR)
{
my_error(ER_WRONG_TABLE_NAME, MYF(0), alias);
DBUG_RETURN(TRUE);
}
start++;
}
#endif
build_table_path(path, sizeof(path), db, alias, reg_ext);
}
/* Check if table already exists */
if ((create_info->options & HA_LEX_CREATE_TMP_TABLE)
......
......@@ -1614,10 +1614,6 @@ bool check_db_name(char *name)
if (*name == '/' || *name == '\\' || *name == FN_LIBCHAR ||
*name == FN_EXTCHAR)
return 1;
#ifdef FN_DEVCHAR
if (*name == FN_DEVCHAR)
return 1;
#endif
name++;
}
return last_char_is_space || (uint) (name - start) > NAME_LEN;
......@@ -1660,10 +1656,6 @@ bool check_table_name(const char *name, uint length)
#endif
if (*name == '/' || *name == '\\' || *name == FN_EXTCHAR)
return 1;
#ifdef FN_DEVCHAR
if (*name == FN_DEVCHAR)
return 1;
#endif
name++;
}
#if defined(USE_MB) && defined(USE_MB_IDENT)
......
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