Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
71e48593
Commit
71e48593
authored
Feb 15, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fixes
parent
38d1a424
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
20 deletions
+30
-20
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+1
-1
sql/field.cc
sql/field.cc
+1
-1
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+27
-17
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
mysql-test/r/ctype_ucs.result
View file @
71e48593
...
...
@@ -635,6 +635,6 @@ DROP TABLE t1;
CREATE TABLE t1 (Field1 int(10) unsigned default '0');
INSERT INTO t1 VALUES ('-1');
Warnings:
Warning 126
5 Data trunca
ted for column 'Field1' at row 1
Warning 126
4 Out of range value adjus
ted for column 'Field1' at row 1
DROP TABLE t1;
SET NAMES latin1;
sql/field.cc
View file @
71e48593
...
...
@@ -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
)
{
...
...
sql/item_cmpfunc.cc
View file @
71e48593
...
...
@@ -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,10 +876,20 @@ void Item_func_interval::fix_length_and_dec()
/*
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
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
*/
longlong
Item_func_interval
::
val_int
()
...
...
@@ -888,11 +897,10 @@ longlong Item_func_interval::val_int()
DBUG_ASSERT
(
fixed
==
1
);
double
value
=
row
->
el
(
0
)
->
val_real
();
my_decimal
dec_buf
,
*
dec
=
NULL
;
uint
i
;
if
(
use_decimal_comparison
)
{
dec
=
row
->
el
(
0
)
->
val_decimal
(
&
dec_buf
);
}
uint
i
;
if
(
row
->
el
(
0
)
->
null_value
)
return
-
1
;
// -1 if null
...
...
@@ -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
...
...
@@ -917,7 +930,7 @@ longlong Item_func_interval::val_int()
}
interval_range
*
range
=
intervals
+
start
;
return
((
dec
&&
range
->
type
==
DECIMAL_RESULT
)
?
my_decimal_cmp
(
dec
,
&
range
->
dec
)
<
0
:
my_decimal_cmp
(
dec
,
&
range
->
dec
)
<
0
:
value
<
range
->
dbl
)
?
0
:
start
+
1
;
}
...
...
@@ -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
)
return
i
-
1
;
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
);
...
...
sql/sql_yacc.yy
View file @
71e48593
...
...
@@ -5026,7 +5026,7 @@ select_derived:
}
;
select_derived:
select_derived
2
:
{
LEX *lex= Lex;
lex->derived_tables|= DERIVED_SUBQUERY;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment