diff options
author | unknown <bell@sanja.is.com.ua> | 2004-11-12 14:34:00 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-11-12 14:34:00 +0200 |
commit | 9e921615a1c3147961dc4a8314ebb0e455ea105b (patch) | |
tree | 7591e416fa1685ed1e41707824091a5ca7f9c2c1 /sql/sql_delete.cc | |
parent | 17cf3c633eb1db29457cbd62c5fc022d07d5dd6d (diff) | |
download | mariadb-git-9e921615a1c3147961dc4a8314ebb0e455ea105b.tar.gz |
post-review fixes
mysql-test/r/rpl_rotate_logs.result:
removed host dependence in error messages
mysql-test/t/rpl_rotate_logs.test:
removed host dependence in error messages
mysys/my_error.c:
comment about using my_error family functions
sql/filesort.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/ha_innodb.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/handler.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_cmpfunc.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_func.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_strfunc.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_subselect.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_sum.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/lock.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/log.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/mysql_priv.h:
error check moved to fill_record
sql/mysqld.cc:
fixed error messages
sql/parse_file.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/protocol.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/protocol_cursor.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/repl_failsafe.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/set_var.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/slave.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sp.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sp_head.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sp_rcontext.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_acl.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_analyse.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_base.cc:
changing my_error on my_message and my_printf_error where if they are prefered
error check moved to fill_record
sql/sql_class.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_class.h:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_db.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_delete.cc:
changing my_error on my_message and my_printf_error where if they are prefered
error check moved to fill_record
sql/sql_handler.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_help.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_insert.cc:
changing my_error on my_message and my_printf_error where if they are prefered
error check moved to fill_record
sql/sql_lex.cc:
layout fixed
sql/sql_load.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_map.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_parse.cc:
error check moved to fill_record
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_prepare.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_rename.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_repl.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_select.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_show.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_table.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_trigger.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_udf.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_union.cc:
error check moved to fill_record
sql/sql_update.cc:
error check moved to fill_record
sql/sql_view.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_yacc.yy:
changing my_error on my_message and my_printf_error where if they are prefered
sql/table.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/unireg.cc:
changing my_error on my_message and my_printf_error where if they are prefered
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 54c6cd1ebc5..26b37efb773 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -55,7 +55,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, safe_update=test(thd->options & OPTION_SAFE_UPDATES); if (safe_update && const_cond) { - my_error(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, MYF(0)); + my_message(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, + ER(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE), MYF(0)); DBUG_RETURN(TRUE); } @@ -103,7 +104,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, { delete select; free_underlaid_joins(thd, &thd->lex->select_lex); - my_error(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, MYF(0)); + my_message(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, + ER(ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE), MYF(0)); DBUG_RETURN(TRUE); } } @@ -259,7 +261,7 @@ cleanup: send_ok(thd,deleted); DBUG_PRINT("info",("%d records deleted",deleted)); } - DBUG_RETURN(FALSE); + DBUG_RETURN(error >= 0 || thd->net.report_error); } @@ -287,12 +289,14 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds) DBUG_RETURN(TRUE); if (!table_list->updatable || check_key_in_view(thd, table_list)) { - my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "DELETE"); + my_printf_error(ER_NON_UPDATABLE_TABLE, ER(ER_NON_UPDATABLE_TABLE), MYF(0), + table_list->alias, "DELETE"); DBUG_RETURN(TRUE); } if (unique_table(table_list, table_list->next_independent())) { - my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->real_name); + my_printf_error(ER_UPDATE_TABLE_USED, ER(ER_UPDATE_TABLE_USED), MYF(0), + table_list->real_name); DBUG_RETURN(TRUE); } select_lex->fix_prepare_information(thd, conds); @@ -349,8 +353,8 @@ bool mysql_multi_delete_prepare(THD *thd) if (!target_tbl->correspondent_table->updatable || check_key_in_view(thd, target_tbl->correspondent_table)) { - my_error(ER_NON_UPDATABLE_TABLE, MYF(0), target_tbl->real_name, - "DELETE"); + my_printf_error(ER_NON_UPDATABLE_TABLE, ER(ER_NON_UPDATABLE_TABLE), + MYF(0), target_tbl->real_name, "DELETE"); DBUG_RETURN(TRUE); } /* @@ -367,8 +371,8 @@ bool mysql_multi_delete_prepare(THD *thd) un->check_updateable(target_tbl->correspondent_table->db, target_tbl->correspondent_table->real_name)) { - my_error(ER_UPDATE_TABLE_USED, MYF(0), - target_tbl->correspondent_table->real_name); + my_printf_error(ER_UPDATE_TABLE_USED, ER(ER_UPDATE_TABLE_USED), + MYF(0), target_tbl->correspondent_table->real_name); DBUG_RETURN(TRUE); } } @@ -729,8 +733,8 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) db_type table_type; if ((table_type=get_table_type(path)) == DB_TYPE_UNKNOWN) { - my_error(ER_NO_SUCH_TABLE, MYF(0), table_list->db, - table_list->real_name); + my_printf_error(ER_NO_SUCH_TABLE, ER(ER_NO_SUCH_TABLE), MYF(0), + table_list->db, table_list->real_name); DBUG_RETURN(TRUE); } if (!ha_supports_generate(table_type)) |