diff options
author | gkodinov/kgeorge@macbook.gmz <> | 2007-02-06 11:08:57 +0200 |
---|---|---|
committer | gkodinov/kgeorge@macbook.gmz <> | 2007-02-06 11:08:57 +0200 |
commit | 5092f7ab269c75273c791201eb0cc803a2f456ee (patch) | |
tree | 2c29aa1d71aa6438281906e4da3ddab01ebbe7ba /sql/field.h | |
parent | 5313db2d82f6f7bc0831ef616343d516643dbda5 (diff) | |
download | mariadb-git-5092f7ab269c75273c791201eb0cc803a2f456ee.tar.gz |
Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
Ignoring error codes from type conversion allows default (wrong) values to
go unnoticed in the formation of index search conditions.
Fixed by correctly checking for conversion errors.
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index 565342637ba..562991f681e 100644 --- a/sql/field.h +++ b/sql/field.h @@ -29,7 +29,7 @@ class Send_field; class Protocol; struct st_cache_field; -void field_conv(Field *to,Field *from); +int field_conv(Field *to,Field *from); inline uint get_enum_pack_length(int elements) { @@ -1242,7 +1242,7 @@ public: uint max_packed_col_length(uint max_length); void free() { value.free(); } inline void clear_temporary() { bzero((char*) &value,sizeof(value)); } - friend void field_conv(Field *to,Field *from); + friend int field_conv(Field *to,Field *from); uint size_of() const { return sizeof(*this); } bool has_charset(void) const { return charset() == &my_charset_bin ? FALSE : TRUE; } |