summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-03-02 17:37:44 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2007-03-02 17:37:44 +0200
commit2ebd43960b4dc8612c0c39b324bab40dc3ae5eec (patch)
tree135ee23a424fa3eb14422ad4761711173f8398ee /sql/item_cmpfunc.h
parent2464f1082649fbca1e9e9f7fddfbf6a032eca2ca (diff)
parentf77eb48712325f88d3fd6533e91e579e8eaf9c93 (diff)
downloadmariadb-git-2ebd43960b4dc8612c0c39b324bab40dc3ae5eec.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.h17
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