diff options
author | monty@mysql.com/narttu.mysql.fi <> | 2006-12-15 06:21:15 +0200 |
---|---|---|
committer | monty@mysql.com/narttu.mysql.fi <> | 2006-12-15 06:21:15 +0200 |
commit | 9d3fda77c8e20ff299f9750b64c42dfbb58a7806 (patch) | |
tree | eadc127bca394c93278bb5da69b78bb61c008951 /sql/sql_table.cc | |
parent | a6481aa4c7016c996a9787db4824307c705ec8a1 (diff) | |
download | mariadb-git-9d3fda77c8e20ff299f9750b64c42dfbb58a7806.tar.gz |
After merge fixes:
- Remove compiler warnings
- Fix merge errors
- Indentation fixes
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index bcca3906266..0af7ea7e40a 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -223,9 +223,10 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, String wrong_tables; int error; bool some_tables_deleted=0, tmp_table_deleted=0, foreign_key_error=0; - DBUG_ENTER("mysql_rm_table_part2"); + LINT_INIT(alias); + if (!drop_temporary && lock_table_names(thd, tables)) DBUG_RETURN(1); @@ -2998,7 +2999,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, ALTER_INFO *alter_info, bool do_send_ok) { TABLE *table,*new_table=0; - int error; + int error= 0; char tmp_name[80],old_name[32],new_name_buff[FN_REFLEN]; char new_alias_buff[FN_REFLEN], *table_name, *db, *new_alias, *alias; char index_file[FN_REFLEN], data_file[FN_REFLEN]; @@ -3051,9 +3052,11 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, DBUG_RETURN(1); VOID(pthread_mutex_lock(&LOCK_open)); if (lock_table_names(thd, table_list)) + { + error= 1; goto view_err; + } - error=0; if (!do_rename(thd, table_list, new_db, new_name, new_name, 1)) { if (mysql_bin_log.is_open()) @@ -3154,7 +3157,6 @@ view_err: switch (alter_info->keys_onoff) { case LEAVE_AS_IS: - error= 0; break; case ENABLE: wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN); @@ -3169,10 +3171,10 @@ view_err: } if (error == HA_ERR_WRONG_COMMAND) { + error= 0; push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), table->alias); - error= 0; } if (!error && (new_name != table_name || new_db != db)) @@ -3202,10 +3204,10 @@ view_err: if (error == HA_ERR_WRONG_COMMAND) { + error= 0; push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), table->alias); - error= 0; } if (!error) |