Commit 01ed9a32 authored by unknown's avatar unknown

Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0

into beethoven.site:/home/georg/work/mysql/mysql-5.0


sql/item_func.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
parents 3f0def33 af4b5c89
......@@ -344,6 +344,10 @@ SOURCE=..\mysys\my_alloc.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_decimal.cpp
# End Source File
# Begin Source File
SOURCE=..\mysys\my_getopt.c
# End Source File
# Begin Source File
......
......@@ -1085,6 +1085,10 @@ SOURCE=.\mf_iocache.cpp
# End Source File
# Begin Source File
SOURCE=.\my_decimal.cpp
# End Source File
# Begin Source File
SOURCE=.\my_time.c
# End Source File
# Begin Source File
......
......@@ -177,6 +177,10 @@ SOURCE=.\ctype.c
# End Source File
# Begin Source File
SOURCE=.\decimal.c
# End Source File
# Begin Source File
SOURCE=.\int2str.c
# End Source File
# Begin Source File
......
......@@ -1581,10 +1581,10 @@ bool Field_new_decimal::store_value(const my_decimal *decimal_value)
DBUG_PRINT("info", ("overflow"));
set_value_on_overflow(&buff, dec->sign());
my_decimal2binary(E_DEC_FATAL_ERROR, &buff, ptr, field_length, decimals());
DBUG_EXECUTE("info", print_decimal_buff(&buff, ptr, bin_size););
DBUG_EXECUTE("info", print_decimal_buff(&buff, (byte *) ptr, bin_size););
DBUG_RETURN(1);
}
DBUG_EXECUTE("info", print_decimal_buff(dec, ptr, bin_size););
DBUG_EXECUTE("info", print_decimal_buff(dec, (byte *) ptr, bin_size););
DBUG_RETURN(error);
}
......@@ -1708,7 +1708,7 @@ my_decimal* Field_new_decimal::val_decimal(my_decimal *decimal_value)
binary2my_decimal(E_DEC_FATAL_ERROR, ptr, decimal_value,
field_length,
decimals());
DBUG_EXECUTE("info", print_decimal_buff(decimal_value, ptr, bin_size););
DBUG_EXECUTE("info", print_decimal_buff(decimal_value, (byte *) ptr, bin_size););
DBUG_RETURN(decimal_value);
}
......
......@@ -453,7 +453,11 @@ class Item_splocal : public Item
longlong val_int();
String *val_str(String *sp);
my_decimal *val_decimal(my_decimal *);
#ifdef __WIN__
bool is_null();
#else
inline bool is_null();
#endif
void print(String *str);
inline void make_field(Send_field *field)
......
......@@ -1732,7 +1732,7 @@ longlong Item_func_round::int_op()
if (truncate)
{
if (unsigned_flag)
tmp2= floor(((double)((ulonglong)value))/tmp)*tmp;
tmp2= floor(ulonglong2double(value)/tmp)*tmp;
else if (value >= 0)
tmp2= floor(((double)value)/tmp)*tmp;
else
......
......@@ -578,7 +578,7 @@ bool Item_sum_sum_distinct::add()
{
DBUG_ASSERT(tree);
null_value= 0;
my_decimal2binary(E_DEC_FATAL_ERROR, val, dec_bin_buff,
my_decimal2binary(E_DEC_FATAL_ERROR, val, (char *) dec_bin_buff,
args[0]->max_length, args[0]->decimals);
DBUG_RETURN(tree->unique_add(dec_bin_buff));
}
......@@ -613,7 +613,7 @@ void Item_sum_sum_distinct::add_real(double val)
void Item_sum_sum_distinct::add_decimal(byte *val)
{
binary2my_decimal(E_DEC_FATAL_ERROR, val, &tmp_dec,
binary2my_decimal(E_DEC_FATAL_ERROR, (char *) val, &tmp_dec,
args[0]->max_length, args[0]->decimals);
my_decimal_add(E_DEC_FATAL_ERROR, dec_buffs + (curr_dec_buff^1),
&tmp_dec, dec_buffs + curr_dec_buff);
......
......@@ -2019,7 +2019,7 @@ sp_merge_table_hash(HASH *hdst, HASH *hsrc)
SP_TABLE *tabsrc= (SP_TABLE *)hash_element(hsrc, i);
if (! (tabdst= (SP_TABLE *)hash_search(hdst,
tabsrc->qname.str,
(byte *) tabsrc->qname.str,
tabsrc->qname.length)))
{
my_hash_insert(hdst, (byte *)tabsrc);
......
......@@ -1102,7 +1102,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
("Handler require invalidation queries of %s.%s %lld-%lld",
table_list.db, table_list.alias,
engine_data, table->engine_data()));
invalidate_table(table->db(), table->key_length());
invalidate_table((byte *) table->db(), table->key_length());
}
else
thd->lex->safe_to_cache_query= 0; // Don't try to cache this
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment