summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorholyfoot/hf@hfmain.(none) <>2007-03-08 19:08:28 +0400
committerholyfoot/hf@hfmain.(none) <>2007-03-08 19:08:28 +0400
commit75be7cd1aebb833309d0224761558eb1e32b6925 (patch)
tree159b4f318828e8537baa6d0b846728e8f2a0e84b /sql/item_cmpfunc.h
parent2baf35b4fab1cd1c185b7b98645eb76ed88d9f73 (diff)
parent999c1cdcc1a6c82b69ea75d6661f75ed55f405f1 (diff)
downloadmariadb-git-75be7cd1aebb833309d0224761558eb1e32b6925.tar.gz
Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
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 08a411ae39a..7f12e90f0f8 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -699,7 +699,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);
@@ -715,9 +724,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