diff options
author | monty@mysql.com/narttu.mysql.fi <> | 2007-03-23 22:08:31 +0200 |
---|---|---|
committer | monty@mysql.com/narttu.mysql.fi <> | 2007-03-23 22:08:31 +0200 |
commit | 193360364703b5aeba78925aa5cdbf1f28a392c8 (patch) | |
tree | e49fe06028525f2e9ade2717aa57f2ed8c319576 /sql/unireg.cc | |
parent | 5e0596f4e1e8a30139b3bab62095a2d301d7970c (diff) | |
download | mariadb-git-193360364703b5aeba78925aa5cdbf1f28a392c8.tar.gz |
Removed not used define YY_MAGIC_BELOW
Made year 2000 handling more uniform
Removed year 2000 handling out from calc_days()
The above removes some bugs in date/datetimes with year between 0 and 200
Now we get a note when we insert a datetime value into a date column
For default values to CREATE, don't give errors for warning level NOTE
Fixed some compiler failures
Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
Removed duplicate typedef TIME and replaced it with MYSQL_TIME
Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index d90420313a6..a69a9be6a43 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -936,7 +936,9 @@ static bool make_empty_rec(THD *thd, File file,enum legacy_db_type table_type, (regfield->real_type() != MYSQL_TYPE_YEAR || field->def->val_int() != 0)) { - if (field->def->save_in_field(regfield, 1)) + int res= field->def->save_in_field(regfield, 1); + /* If not ok or warning of level 'note' */ + if (res != 0 && res != 3) { my_error(ER_INVALID_DEFAULT, MYF(0), regfield->field_name); error= 1; |