mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
After merge fixes
mysql-test/r/ctype_ucs.result: Fixed warning after merge sql/field.cc: After merge fix sql/item_cmpfunc.cc: Style & comment changes sql/sql_yacc.yy: After merge fix
This commit is contained in:
@ -635,6 +635,6 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (Field1 int(10) unsigned default '0');
|
||||
INSERT INTO t1 VALUES ('-1');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'Field1' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'Field1' at row 1
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
|
@ -2452,7 +2452,7 @@ int Field_long::store(const char *from,uint len,CHARSET_INFO *cs)
|
||||
from+= tmp;
|
||||
|
||||
end= (char*) from+len;
|
||||
tmp= my_strtoll10(from, &end, &error);
|
||||
tmp= cs->cset->my_strtoll10(cs, from, &end, &error);
|
||||
|
||||
if (error != MY_ERRNO_EDOM)
|
||||
{
|
||||
|
@ -273,8 +273,7 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
|
||||
owner= item;
|
||||
func= comparator_matrix[type]
|
||||
[test(owner->functype() == Item_func::EQUAL_FUNC)];
|
||||
switch(type)
|
||||
{
|
||||
switch(type) {
|
||||
case ROW_RESULT:
|
||||
{
|
||||
uint n= (*a)->cols();
|
||||
@ -877,7 +876,17 @@ void Item_func_interval::fix_length_and_dec()
|
||||
|
||||
|
||||
/*
|
||||
return -1 if null value,
|
||||
Execute Item_func_interval()
|
||||
|
||||
SYNOPSIS
|
||||
Item_func_interval::val_int()
|
||||
|
||||
NOTES
|
||||
If we are doing a decimal comparison, we are
|
||||
evaluating the first item twice.
|
||||
|
||||
RETURN
|
||||
-1 if null value,
|
||||
0 if lower than lowest
|
||||
1 - arg_count-1 if between args[n] and args[n+1]
|
||||
arg_count if higher than biggest argument
|
||||
@ -888,12 +897,11 @@ longlong Item_func_interval::val_int()
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
double value= row->el(0)->val_real();
|
||||
my_decimal dec_buf, *dec= NULL;
|
||||
if (use_decimal_comparison)
|
||||
{
|
||||
dec= row->el(0)->val_decimal(&dec_buf);
|
||||
}
|
||||
uint i;
|
||||
|
||||
if (use_decimal_comparison)
|
||||
dec= row->el(0)->val_decimal(&dec_buf);
|
||||
|
||||
if (row->el(0)->null_value)
|
||||
return -1; // -1 if null
|
||||
if (intervals)
|
||||
@ -906,6 +914,11 @@ longlong Item_func_interval::val_int()
|
||||
uint mid= (start + end + 1) / 2;
|
||||
interval_range *range= intervals + mid;
|
||||
my_bool cmp_result;
|
||||
/*
|
||||
The values in the range intervall may have different types,
|
||||
Only do a decimal comparision of the first argument is a decimal
|
||||
and we are comparing against a decimal
|
||||
*/
|
||||
if (dec && range->type == DECIMAL_RESULT)
|
||||
cmp_result= my_decimal_cmp(&range->dec, dec) <= 0;
|
||||
else
|
||||
@ -932,13 +945,13 @@ longlong Item_func_interval::val_int()
|
||||
if (my_decimal_cmp(e_dec, dec) > 0)
|
||||
return i-1;
|
||||
}
|
||||
else
|
||||
if (row->el(i)->val_real() > value)
|
||||
else if (row->el(i)->val_real() > value)
|
||||
return i-1;
|
||||
}
|
||||
return i-1;
|
||||
}
|
||||
|
||||
|
||||
void Item_func_between::fix_length_and_dec()
|
||||
{
|
||||
max_length= 1;
|
||||
@ -1087,8 +1100,7 @@ Item_func_ifnull::fix_length_and_dec()
|
||||
args[1]->max_length - args[1]->decimals) +
|
||||
decimals);
|
||||
agg_result_type(&cached_result_type, args, 2);
|
||||
switch (cached_result_type)
|
||||
{
|
||||
switch (cached_result_type) {
|
||||
case STRING_RESULT:
|
||||
agg_arg_charsets(collation, args, arg_count, MY_COLL_CMP_CONV);
|
||||
break;
|
||||
@ -1166,7 +1178,6 @@ my_decimal *Item_func_ifnull::val_decimal(my_decimal *decimal_value)
|
||||
}
|
||||
|
||||
|
||||
|
||||
String *
|
||||
Item_func_ifnull::val_str(String *str)
|
||||
{
|
||||
@ -1456,7 +1467,6 @@ Item *Item_func_case::find_item(String *str)
|
||||
}
|
||||
|
||||
|
||||
|
||||
String *Item_func_case::val_str(String *str)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
|
@ -5026,7 +5026,7 @@ select_derived:
|
||||
}
|
||||
;
|
||||
|
||||
select_derived:
|
||||
select_derived2:
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
lex->derived_tables|= DERIVED_SUBQUERY;
|
||||
|
Reference in New Issue
Block a user