diff options
author | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2005-12-02 15:01:44 +0400 |
---|---|---|
committer | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2005-12-02 15:01:44 +0400 |
commit | ca34f415e9d6493706131f769d0f56d8017e3f41 (patch) | |
tree | 65e24243474e43801b96670b9012967868c3a50a /sql/time.cc | |
parent | 44523ebc50d913c4b0a33e1e9214e60357081ae3 (diff) | |
download | mariadb-git-ca34f415e9d6493706131f769d0f56d8017e3f41.tar.gz |
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
-issue more correct message for incorrect date|datetime|time values
-ER_WARN_DATA_OUT_OF_RANGE message is changed
-added new error message
mysql-test/r/auto_increment.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/bigint.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/ctype_ucs.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/date_formats.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/func_sapdb.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/func_str.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/func_time.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/insert.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/loaddata.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/mysqldump.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/ps_2myisam.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/ps_3innodb.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/ps_4heap.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/ps_5merge.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/ps_6bdb.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/ps_7ndb.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/rpl_rewrite_db.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/sp.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/strict.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/timezone2.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/timezone_grant.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_bit.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_bit_innodb.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_date.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_datetime.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_decimal.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_float.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_newdecimal.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_ranges.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_time.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/type_uint.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/view.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
mysql-test/r/warnings.result:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
result change
sql/share/errmsg.txt:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
-ER_WARN_DATA_OUT_OF_RANGE message is changed
-added new error message
sql/time.cc:
Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
issue more correct message for incorrect date|datetime|time values
Diffstat (limited to 'sql/time.cc')
-rw-r--r-- | sql/time.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/time.cc b/sql/time.cc index 5069031081d..480cafaab34 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -711,9 +711,15 @@ void make_truncated_value_warning(THD *thd, const char *str_val, type_str, str.c_ptr(), field_name, (ulong) thd->row_count); else - cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff), - ER(ER_TRUNCATED_WRONG_VALUE), - type_str, str.c_ptr()); + { + if (time_type > MYSQL_TIMESTAMP_ERROR) + cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff), + ER(ER_TRUNCATED_WRONG_VALUE), + type_str, str.c_ptr()); + else + cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff), + ER(ER_WRONG_VALUE), type_str, str.c_ptr()); + } push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_TRUNCATED_WRONG_VALUE, warn_buff); } |