summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorholyfoot/hf@mysql.com/hfmain.(none) <>2007-03-08 21:42:41 +0400
committerholyfoot/hf@mysql.com/hfmain.(none) <>2007-03-08 21:42:41 +0400
commit11dd0fa326bd5e9fbc60b200b84c0b7e857fb5c9 (patch)
tree3ea2e264e3a5c14147046497d569f7c67b701520 /sql/item_cmpfunc.h
parent433d3e6cf79a741228b0fbef68ca2ac840d138b0 (diff)
parent999c1cdcc1a6c82b69ea75d6661f75ed55f405f1 (diff)
downloadmariadb-git-11dd0fa326bd5e9fbc60b200b84c0b7e857fb5c9.tar.gz
Merge bk@192.168.21.1:mysql-5.0
into mysql.com:/home/hf/work/mrg/mysql-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 319c6c2a36f..f6c6f612c5b 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -820,7 +820,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);
@@ -836,8 +845,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= (my_bool)
+ ((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