Commit 8486ae21 authored by Konstantin Osipov's avatar Konstantin Osipov

Backport of:

---------------------------------------------------------
2630.7.2 Konstantin Osipov       2008-06-02
         Fix alignment in sql_table.cc (no other changes).
parent 4689cddb
...@@ -6855,8 +6855,8 @@ view_err: ...@@ -6855,8 +6855,8 @@ view_err:
{ {
error= 0; error= 0;
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
table->alias); table->alias);
} }
if (!error && (new_name != table_name || new_db != db)) if (!error && (new_name != table_name || new_db != db))
...@@ -6882,20 +6882,20 @@ view_err: ...@@ -6882,20 +6882,20 @@ view_err:
*/ */
if (!access(new_name_buff,F_OK)) if (!access(new_name_buff,F_OK))
{ {
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name); my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name);
error= -1; error= -1;
} }
else else
{ {
*fn_ext(new_name)=0; *fn_ext(new_name)=0;
pthread_mutex_lock(&LOCK_open); pthread_mutex_lock(&LOCK_open);
if (mysql_rename_table(old_db_type,db,table_name,new_db,new_alias, 0)) if (mysql_rename_table(old_db_type,db,table_name,new_db,new_alias, 0))
error= -1; error= -1;
else if (Table_triggers_list::change_table_name(thd, db, table_name, else if (Table_triggers_list::change_table_name(thd, db, table_name,
new_db, new_alias)) new_db, new_alias))
{ {
(void) mysql_rename_table(old_db_type, new_db, new_alias, db, (void) mysql_rename_table(old_db_type, new_db, new_alias, db,
table_name, 0); table_name, 0);
error= -1; error= -1;
} }
pthread_mutex_unlock(&LOCK_open); pthread_mutex_unlock(&LOCK_open);
...@@ -6906,8 +6906,8 @@ view_err: ...@@ -6906,8 +6906,8 @@ view_err:
{ {
error= 0; error= 0;
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
table->alias); table->alias);
} }
if (!error) if (!error)
...@@ -6931,7 +6931,7 @@ view_err: ...@@ -6931,7 +6931,7 @@ view_err:
them. them.
TODO: Investigate what should be done with upgraded table-level TODO: Investigate what should be done with upgraded table-level
lock here... lock here...
*/ */
if (new_name != table_name || new_db != db) if (new_name != table_name || new_db != db)
{ {
...@@ -6966,7 +6966,7 @@ view_err: ...@@ -6966,7 +6966,7 @@ view_err:
if (mysql_prepare_alter_table(thd, table, create_info, alter_info)) if (mysql_prepare_alter_table(thd, table, create_info, alter_info))
goto err; goto err;
need_copy_table= alter_info->change_level; need_copy_table= alter_info->change_level;
set_table_default_charset(thd, create_info, db); set_table_default_charset(thd, create_info, db);
...@@ -6990,7 +6990,7 @@ view_err: ...@@ -6990,7 +6990,7 @@ view_err:
&index_add_buffer, &index_add_count, &index_add_buffer, &index_add_count,
&candidate_key_count)) &candidate_key_count))
goto err; goto err;
if (need_copy_table == ALTER_TABLE_METADATA_ONLY) if (need_copy_table == ALTER_TABLE_METADATA_ONLY)
need_copy_table= need_copy_table_res; need_copy_table= need_copy_table_res;
} }
......
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