mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
This commit is contained in:
@ -1562,6 +1562,9 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
|
||||
{
|
||||
create_info->table_existed= 1; // Mark that table existed
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||
ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
|
||||
alias);
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias);
|
||||
@ -1575,12 +1578,8 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
if (!access(path,F_OK))
|
||||
{
|
||||
if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
|
||||
{
|
||||
create_info->table_existed= 1; // Mark that table existed
|
||||
error= FALSE;
|
||||
}
|
||||
else
|
||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
|
||||
goto warn;
|
||||
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
@ -1603,12 +1602,8 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
DBUG_PRINT("info", ("Table with same name already existed in handler"));
|
||||
|
||||
if (create_if_not_exists)
|
||||
{
|
||||
create_info->table_existed= 1; // Mark that table existed
|
||||
error= FALSE;
|
||||
}
|
||||
else
|
||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
|
||||
goto warn;
|
||||
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
@ -1641,6 +1636,14 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
error= FALSE;
|
||||
goto end;
|
||||
|
||||
warn:
|
||||
error= 0;
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||
ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
|
||||
alias);
|
||||
create_info->table_existed= 1; // Mark that table existed
|
||||
|
||||
end:
|
||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||
|
Reference in New Issue
Block a user