Commit 341504b3 authored by unknown's avatar unknown

handler.cc If CREATE TABLE fails for an InnoDB table, do not put the OS error...

handler.cc	If CREATE TABLE fails for an InnoDB table, do not put the OS error number to the error message, because it is not the cause


sql/handler.cc:
  If CREATE TABLE fails for an InnoDB table, do not put the OS error number to the error message, because it is not the cause
parent 1c404ff9
...@@ -837,8 +837,15 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info, ...@@ -837,8 +837,15 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info,
} }
error=table.file->create(name,&table,create_info); error=table.file->create(name,&table,create_info);
VOID(closefrm(&table)); VOID(closefrm(&table));
if (error) if (error) {
my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,my_errno); if (table.db_type == DB_TYPE_INNOBASE) {
/* Creation of InnoDB table cannot fail because of an OS error:
put error as the number */
my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,error);
} else {
my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,my_errno);
}
}
DBUG_RETURN(error != 0); DBUG_RETURN(error != 0);
} }
......
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