diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-04-20 18:27:23 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-04-20 18:27:23 +0200 |
commit | 24ac546d0f16d5f56b11c068e4f187a9c4c56bd0 (patch) | |
tree | 0ce4470aa683f8109963f71760f23a6711ec05ab /sql/handler.cc | |
parent | 9e826bfa36a57f10540ca6ea649cb450add48cf4 (diff) | |
download | mariadb-git-24ac546d0f16d5f56b11c068e4f187a9c4c56bd0.tar.gz |
use consistent error messaging for IGNORE
1. the same message text for INSERT and INSERT IGNORE
2. no new warnings in UPDATE IGNORE yet (big change for 5.5)
and replace a commonly used expression with a
named constant
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 1a318334ef3..d528c0aea7a 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -5463,28 +5463,3 @@ fl_create_iterator(enum handler_iterator_type type, } } #endif /*TRANS_LOG_MGM_EXAMPLE_CODE*/ - - -/** - Report a warning for FK constraint violation. - - @param thd Thread handle. - @param table table on which the operation is performed. - @param error handler error number. -*/ -void warn_fk_constraint_violation(THD *thd,TABLE *table, int error) -{ - String str; - switch(error) { - case HA_ERR_ROW_IS_REFERENCED: - table->file->get_error_message(error, &str); - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ROW_IS_REFERENCED_2, str.c_ptr_safe()); - break; - case HA_ERR_NO_REFERENCED_ROW: - table->file->get_error_message(error, &str); - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_NO_REFERENCED_ROW_2, str.c_ptr_safe()); - break; - } -} |