summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-08-17 05:18:06 +0300
committerunknown <monty@hundin.mysql.fi>2002-08-17 05:18:06 +0300
commit4ed427921d9614b9d9a0ded478fc5e42128f6bf0 (patch)
tree6ddcfd168371a75010c2bd6892cf8b2b33839553 /sql/item_cmpfunc.cc
parentac6dc20ae0b4daa20390366eb5d1572f4c5113cf (diff)
downloadmariadb-git-4ed427921d9614b9d9a0ded478fc5e42128f6bf0.tar.gz
Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc)
Removed thread marking of safemalloc blocks (becasue of alignment problems) Temporary fix for bigint comparison. configure.in: Added size checking of char* BitKeeper/etc/ignore: Added sql-bench/innotest1 sql-bench/innotest1a sql-bench/innotest1b sql-bench/innotest2 sql-bench/innotest2a sql-bench/innotest2b to the ignore list mysql-test/r/select.result: Cleaned up test mysql-test/t/select.test: Cleaned up test mysys/my_static.h: Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc) mysys/safemalloc.c: Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc) sql/field.h: Temporary fix for bigint comparison. sql/gen_lex_hash.cc: Smaller hash table sql/item_cmpfunc.cc: Cleanup sql/mysqld.cc: Removed thread marking of safemalloc blocks (becasue of alignment problems) sql/opt_range.cc: Comment
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 8e010e7de8a..e5544bc7bc2 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -42,13 +42,13 @@ static bool convert_constant_item(Field *field, Item **item)
{
if ((*item)->const_item())
{
- (*item)->save_in_field(field);
- if (!((*item)->null_value))
+ if (!(*item)->save_in_field(field) &&
+ !((*item)->null_value))
{
Item *tmp=new Item_int_with_ref(field->val_int(), *item);
if (tmp)
*item=tmp;
- return 1;
+ return 1; // Item was replaced
}
}
return 0;
@@ -57,7 +57,7 @@ static bool convert_constant_item(Field *field, Item **item)
void Item_bool_func2::fix_length_and_dec()
{
- max_length=1;
+ max_length=1; // Function returns 0 or 1
/*
As some compare functions are generated after sql_yacc,
@@ -69,7 +69,7 @@ void Item_bool_func2::fix_length_and_dec()
if (args[0]->type() == FIELD_ITEM)
{
Field *field=((Item_field*) args[0])->field;
- if (field->store_for_compare() || field->result_type() == INT_RESULT)
+ if (field->store_for_compare())
{
if (convert_constant_item(field,&args[1]))
{
@@ -81,7 +81,7 @@ void Item_bool_func2::fix_length_and_dec()
if (args[1]->type() == FIELD_ITEM)
{
Field *field=((Item_field*) args[1])->field;
- if (field->store_for_compare() || field->result_type() == INT_RESULT)
+ if (field->store_for_compare())
{
if (convert_constant_item(field,&args[0]))
{