diff options
author | gkodinov/kgeorge@macbook.gmz <> | 2007-03-02 16:25:56 +0200 |
---|---|---|
committer | gkodinov/kgeorge@macbook.gmz <> | 2007-03-02 16:25:56 +0200 |
commit | be75593165afccdc4dc829b8de5add5f0477b1f3 (patch) | |
tree | 063e0ea949c0c8921128bb894268763c63ea4220 /sql/item.h | |
parent | a119169bf0844585ad1707a147ff4081ff894489 (diff) | |
download | mariadb-git-be75593165afccdc4dc829b8de5add5f0477b1f3.tar.gz |
Bug #19342:
Several problems here :
1. The conversion to double of an hex string const item
was not taking into account the unsigned flag.
2. IN was not behaving in the same was way as comparisons
when performed over an INT/DATE/DATETIME/TIMESTAMP column
and a constant. The ordinary comparisons in that case
convert the constant to an INTEGER value and do int
comparisons. Fixed the IN to do the same.
3. IN is not taking into account the unsigned flag when
calculating <expr> IN (<int_const1>, <int_const2>, ...).
Extended the implementation of IN to store and process
the unsigned flag for its arguments.
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index 6c41aa09f80..f02d4f0c65d 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1766,7 +1766,10 @@ public: Item_hex_string(const char *str,uint str_length); enum Type type() const { return VARBIN_ITEM; } double val_real() - { DBUG_ASSERT(fixed == 1); return (double) Item_hex_string::val_int(); } + { + DBUG_ASSERT(fixed == 1); + return (double) (ulonglong) Item_hex_string::val_int(); + } longlong val_int(); bool basic_const_item() const { return 1; } String *val_str(String*) { DBUG_ASSERT(fixed == 1); return &str_value; } |