summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-03-08 22:04:17 +0400
committerunknown <holyfoot/hf@hfmain.(none)>2007-03-08 22:04:17 +0400
commit3d52be158467a4cfdb397ca0ad3a808ebdcf26ff (patch)
treea0686066351b8e7441c1b2937a6d675b4a2963fd /sql/item_cmpfunc.h
parentceefecb2112559e3289a6bb457ef739720f0f789 (diff)
parent012ae63522372a16e824b7a47f04533b9f43423f (diff)
downloadmariadb-git-3d52be158467a4cfdb397ca0ad3a808ebdcf26ff.tar.gz
Merge bk@192.168.21.1:mysql-5.1
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt mysql-test/r/order_by.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/t/order_by.test: Auto merged mysql-test/t/sp.test: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_func.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged mysql-test/r/func_str.result: merging mysql-test/r/sp.result: merging mysql-test/r/view.result: merging mysql-test/t/func_str.test: merging mysql-test/t/view.test: merging
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