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

manual merge of bug#37402

This commit is contained in:
Mattias Jonsson
2008-08-12 12:26:23 +02:00
51 changed files with 11503 additions and 15 deletions

View File

@@ -1814,8 +1814,8 @@ bool ha_flush_logs(handlerton *db_type)
return FALSE;
}
static const char *check_lowercase_names(handler *file, const char *path,
char *tmp_path)
const char *get_canonical_filename(handler *file, const char *path,
char *tmp_path)
{
if (lower_case_table_names != 2 || (file->ha_table_flags() & HA_FILE_BASED))
return path;
@@ -1886,7 +1886,7 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
! (file=get_new_handler((TABLE_SHARE*)0, thd->mem_root, table_type)))
DBUG_RETURN(ENOENT);
path= check_lowercase_names(file, path, tmp_path);
path= get_canonical_filename(file, path, tmp_path);
if ((error= file->ha_delete_table(path)) && generate_warning)
{
/*
@@ -3422,7 +3422,7 @@ int ha_create_table(THD *thd, const char *path,
if (update_create_info)
update_create_info_from_table(create_info, &table);
name= check_lowercase_names(table.file, share.path.str, name_buff);
name= get_canonical_filename(table.file, share.path.str, name_buff);
error= table.file->ha_create(name, &table, create_info);
VOID(closefrm(&table, 0));
@@ -3494,7 +3494,7 @@ int ha_create_table_from_engine(THD* thd, const char *db, const char *name)
update_create_info_from_table(&create_info, &table);
create_info.table_options|= HA_OPTION_CREATE_FROM_ENGINE;
check_lowercase_names(table.file, path, path);
get_canonical_filename(table.file, path, path);
error=table.file->ha_create(path, &table, &create_info);
VOID(closefrm(&table, 1));