mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Bug#20616: drop_temp_table test fails on Windows platform
This commit is contained in:
parent
1a79cb56f5
commit
f68b01e347
2 changed files with 16 additions and 9 deletions
|
@ -1656,8 +1656,23 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||||
my_casedn_str(files_charset_info, path);
|
my_casedn_str(files_charset_info, path);
|
||||||
create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE;
|
create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE;
|
||||||
}
|
}
|
||||||
else
|
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);
|
build_table_path(path, sizeof(path), db, alias, reg_ext);
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if table already exists */
|
/* Check if table already exists */
|
||||||
if ((create_info->options & HA_LEX_CREATE_TMP_TABLE)
|
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 ||
|
if (*name == '/' || *name == '\\' || *name == FN_LIBCHAR ||
|
||||||
*name == FN_EXTCHAR)
|
*name == FN_EXTCHAR)
|
||||||
return 1;
|
return 1;
|
||||||
#ifdef FN_DEVCHAR
|
|
||||||
if (*name == FN_DEVCHAR)
|
|
||||||
return 1;
|
|
||||||
#endif
|
|
||||||
name++;
|
name++;
|
||||||
}
|
}
|
||||||
return last_char_is_space || (uint) (name - start) > NAME_LEN;
|
return last_char_is_space || (uint) (name - start) > NAME_LEN;
|
||||||
|
@ -1660,10 +1656,6 @@ bool check_table_name(const char *name, uint length)
|
||||||
#endif
|
#endif
|
||||||
if (*name == '/' || *name == '\\' || *name == FN_EXTCHAR)
|
if (*name == '/' || *name == '\\' || *name == FN_EXTCHAR)
|
||||||
return 1;
|
return 1;
|
||||||
#ifdef FN_DEVCHAR
|
|
||||||
if (*name == FN_DEVCHAR)
|
|
||||||
return 1;
|
|
||||||
#endif
|
|
||||||
name++;
|
name++;
|
||||||
}
|
}
|
||||||
#if defined(USE_MB) && defined(USE_MB_IDENT)
|
#if defined(USE_MB) && defined(USE_MB_IDENT)
|
||||||
|
|
Loading…
Reference in a new issue