diff options
author | unknown <lenz@mysql.com> | 2002-10-30 21:55:56 +0100 |
---|---|---|
committer | unknown <lenz@mysql.com> | 2002-10-30 21:55:56 +0100 |
commit | 360b64379daf7d485d43089d4e42dc891b09e1b1 (patch) | |
tree | 5d2c778bb6794c73a8a8774a9ae2bb36443cb523 /sql | |
parent | 1ede1572a716d2ee7a4e84834aafb7f12fb351ad (diff) | |
download | mariadb-git-360b64379daf7d485d43089d4e42dc891b09e1b1.tar.gz |
- Applied fix made in 4.0 tree to fix a bug when comparing a datetime
column with timestamp values with BETWEEN clause
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.h | 1 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h index e822f6a71d6..92e098c75c4 100644 --- a/sql/field.h +++ b/sql/field.h @@ -533,6 +533,7 @@ public: enum Item_result result_type () const { return field_length == 8 || field_length == 14 ? INT_RESULT : STRING_RESULT; } enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } + enum Item_result cmp_type () const { return INT_RESULT; } void store(const char *to,uint length); void store(double nr); void store(longlong nr); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 36ecde337a7..4650b770299 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -354,6 +354,7 @@ void Item_func_between::fix_length_and_dec() if (args[0]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[0])->field; + cmp_type=field->cmp_type(); if (field->store_for_compare()) { if (convert_constant_item(field,&args[1])) |