diff options
author | gkodinov/kgeorge@magare.gmz <> | 2007-03-02 16:28:41 +0200 |
---|---|---|
committer | gkodinov/kgeorge@magare.gmz <> | 2007-03-02 16:28:41 +0200 |
commit | 225575ce47599ff85258c194e34ff97d3530eee6 (patch) | |
tree | 7f46136f407f3b840711f27bdd23337004bb1138 /sql/item_cmpfunc.h | |
parent | 629aa8071dca494ea0c4c98d40340d2712934237 (diff) | |
parent | be75593165afccdc4dc829b8de5add5f0477b1f3 (diff) | |
download | mariadb-git-225575ce47599ff85258c194e34ff97d3530eee6.tar.gz |
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B19342-5.0-opt
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 47f67d0392f..b0d85ba92a1 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -734,7 +734,16 @@ public: class in_longlong :public in_vector { - longlong tmp; + /* + Here we declare a temporary variable (tmp) of the same type as the + elements of this vector. tmp is used in finding if a given value is in + the list. + */ + struct packed_longlong + { + longlong val; + longlong unsigned_flag; // Use longlong, not bool, to preserve alignment + } tmp; public: in_longlong(uint elements); void set(uint pos,Item *item); @@ -750,8 +759,12 @@ public: } void value_to_item(uint pos, Item *item) { - ((Item_int*)item)->value= ((longlong*)base)[pos]; + ((Item_int*) item)->value= ((packed_longlong*) base)[pos].val; + ((Item_int*) item)->unsigned_flag= + ((packed_longlong*) base)[pos].unsigned_flag; } + + friend int cmp_longlong(void *cmp_arg, packed_longlong *a,packed_longlong *b); }; class in_double :public in_vector |