1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

cosmetic fixes

This commit is contained in:
Sergei Golubchik
2013-07-21 16:43:42 +02:00
parent b7b5f6f1ab
commit d1fdb17bfb
11 changed files with 36 additions and 38 deletions

View File

@ -7834,9 +7834,11 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
handle_if_exists_options(thd, table, alter_info);
/* Look if we have to do anything at all. */
/* Normally ALTER can become NOOP only after handling */
/* the IF (NOT) EXISTS options. */
/*
Look if we have to do anything at all.
Normally ALTER can become NOOP only after handling
the IF (NOT) EXISTS options.
*/
if (alter_info->flags == 0)
{
my_snprintf(alter_ctx.tmp_name, sizeof(alter_ctx.tmp_name),
@ -8238,26 +8240,23 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
if (lock_tables(thd, table_list, alter_ctx.tables_opened, 0))
goto err_new_table_cleanup;
if (ha_create_table(thd, alter_ctx.get_tmp_path(),
alter_ctx.new_db, alter_ctx.tmp_name,
create_info, &frm))
goto err_new_table_cleanup;
/* Mark that we have created table in storage engine. */
no_ha_table= false;
if (create_info->tmp_table())
{
if (ha_create_table(thd, alter_ctx.get_tmp_path(),
alter_ctx.new_db, alter_ctx.tmp_name,
create_info, &frm))
if (!open_table_uncached(thd, new_db_type,
alter_ctx.get_tmp_path(),
alter_ctx.new_db, alter_ctx.tmp_name,
true, true))
goto err_new_table_cleanup;
/* Mark that we have created table in storage engine. */
no_ha_table= false;
if (create_info->tmp_table())
{
if (!open_table_uncached(thd, new_db_type,
alter_ctx.get_tmp_path(),
alter_ctx.new_db, alter_ctx.tmp_name,
true, true))
goto err_new_table_cleanup;
}
}
/* Open the table since we need to copy the data. */
if (table->s->tmp_table != NO_TMP_TABLE)
{