summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorholyfoot/hf@hfmain.(none) <>2007-03-08 22:04:17 +0400
committerholyfoot/hf@hfmain.(none) <>2007-03-08 22:04:17 +0400
commitcdcf3ec097d62fe3daf0ed7df90daa3c77172e4e (patch)
treea0686066351b8e7441c1b2937a6d675b4a2963fd /sql/item_cmpfunc.h
parentbb273143fcb736f4a2f63ff56b4980802eeb0041 (diff)
parent48d3e2c1bba6ea60d73fdf8241fea4770b18d09b (diff)
downloadmariadb-git-cdcf3ec097d62fe3daf0ed7df90daa3c77172e4e.tar.gz
Merge bk@192.168.21.1:mysql-5.1
into mysql.com:/home/hf/work/mrg/mysql-5.1-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 3b08036368c..edc905d50ff 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -785,7 +785,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);
@@ -801,9 +810,13 @@ 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;
}
Item_result result_type() { return INT_RESULT; }
+
+ friend int cmp_longlong(void *cmp_arg, packed_longlong *a,packed_longlong *b);
};
class in_double :public in_vector