diff --git a/sql/item.cc b/sql/item.cc index 73c8e80228b..541fbf7b178 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -3591,6 +3591,7 @@ bool Item::send(Protocol *protocol, String *buffer) break; } case MYSQL_TYPE_SHORT: + case MYSQL_TYPE_YEAR: { longlong nr; nr= val_int(); diff --git a/sql/protocol.cc b/sql/protocol.cc index edeb78cc00b..22f1249ca28 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -774,7 +774,6 @@ bool Protocol_simple::store(const char *from, uint length, #ifndef DEBUG_OFF DBUG_ASSERT(field_types == 0 || field_types[field_pos] == MYSQL_TYPE_DECIMAL || - field_types[field_pos] == MYSQL_TYPE_YEAR || field_types[field_pos] == MYSQL_TYPE_BIT || field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL || (field_types[field_pos] >= MYSQL_TYPE_ENUM && @@ -801,6 +800,7 @@ bool Protocol_simple::store_short(longlong from) { #ifndef DEBUG_OFF DBUG_ASSERT(field_types == 0 || + field_types[field_pos] == MYSQL_TYPE_YEAR || field_types[field_pos] == MYSQL_TYPE_SHORT); field_pos++; #endif