diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-08-22 11:40:39 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-08-22 11:40:39 +0200 |
commit | cefc30b1663114930439e03dec245604bc904604 (patch) | |
tree | 83a4479fe38adb24e478dde743856f04d65fa801 /sql/field.cc | |
parent | 34f2f8ea41726d98e50752ff3453ebde70912c35 (diff) | |
parent | 171355077501da7ddd32778ab3ebe77c5f7ce7da (diff) | |
download | mariadb-git-cefc30b1663114930439e03dec245604bc904604.tar.gz |
merge with MySQL 5.1.65
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc index a8bb59ca417..278ba83cc81 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -10236,6 +10236,17 @@ Create_field::Create_field(Field *old_field,Field *orig_field) geom_type= ((Field_geom*)old_field)->geom_type; break; #endif + case MYSQL_TYPE_YEAR: + if (length != 4) + { + char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1]; + my_snprintf(buff, sizeof(buff), "YEAR(%lu)", length); + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_NOTE, + ER_WARN_DEPRECATED_SYNTAX, + ER(ER_WARN_DEPRECATED_SYNTAX), + buff, "YEAR(4)"); + } + break; default: break; } |