diff options
author | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-04-12 14:13:15 +0400 |
---|---|---|
committer | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-04-12 14:13:15 +0400 |
commit | f88699196c68cd9870953c85d6b7ec42f430f10e (patch) | |
tree | ef8dbbf74c04cf68e31aaa9fe923b6003c08084d /sql/field.cc | |
parent | db63b0b771cae0fc2750eff03dea1c4beb350381 (diff) | |
parent | 60cc2f91d6848ced6be1463a22d21b5b9d2c2dab (diff) | |
download | mariadb-git-f88699196c68cd9870953c85d6b7ec42f430f10e.tar.gz |
5.1 -> 5.5 merge
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc index 01c4459c06c..7ffc399718c 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5382,6 +5382,7 @@ double Field_year::val_real(void) longlong Field_year::val_int(void) { ASSERT_COLUMN_MARKED_FOR_READ; + DBUG_ASSERT(field_length == 2 || field_length == 4); int tmp= (int) ptr[0]; if (field_length != 4) tmp%=100; // Return last 2 char @@ -5394,6 +5395,7 @@ longlong Field_year::val_int(void) String *Field_year::val_str(String *val_buffer, String *val_ptr __attribute__((unused))) { + DBUG_ASSERT(field_length < 5); val_buffer->alloc(5); val_buffer->length(field_length); char *to=(char*) val_buffer->ptr(); |