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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0bd1c03e
Commit
0bd1c03e
authored
Jan 31, 2007
by
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after-merge fix.
parent
f0f83a36
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+9
-9
sql/item_sum.cc
sql/item_sum.cc
+4
-3
No files found.
sql/item_cmpfunc.cc
View file @
0bd1c03e
...
@@ -417,12 +417,8 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
...
@@ -417,12 +417,8 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
break
;
break
;
}
}
case
DECIMAL_RESULT
:
case
DECIMAL_RESULT
:
case
REAL_RESULT
:
break
;
break
;
default:
case
REAL_RESULT
:
DBUG_ASSERT
(
0
);
}
else
if
(
type
==
REAL_RESULT
)
{
{
if
((
*
a
)
->
decimals
<
NOT_FIXED_DEC
&&
(
*
b
)
->
decimals
<
NOT_FIXED_DEC
)
if
((
*
a
)
->
decimals
<
NOT_FIXED_DEC
&&
(
*
b
)
->
decimals
<
NOT_FIXED_DEC
)
{
{
...
@@ -432,6 +428,10 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
...
@@ -432,6 +428,10 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
else
if
(
func
==
&
Arg_comparator
::
compare_e_real
)
else
if
(
func
==
&
Arg_comparator
::
compare_e_real
)
func
=
&
Arg_comparator
::
compare_e_real_fixed
;
func
=
&
Arg_comparator
::
compare_e_real_fixed
;
}
}
break
;
}
default:
DBUG_ASSERT
(
0
);
}
}
return
0
;
return
0
;
}
}
...
@@ -577,10 +577,10 @@ int Arg_comparator::compare_real_fixed()
...
@@ -577,10 +577,10 @@ int Arg_comparator::compare_real_fixed()
performing the comparison.
performing the comparison.
*/
*/
volatile
double
val1
,
val2
;
volatile
double
val1
,
val2
;
val1
=
(
*
a
)
->
val
();
val1
=
(
*
a
)
->
val
_real
();
if
(
!
(
*
a
)
->
null_value
)
if
(
!
(
*
a
)
->
null_value
)
{
{
val2
=
(
*
b
)
->
val
();
val2
=
(
*
b
)
->
val
_real
();
if
(
!
(
*
b
)
->
null_value
)
if
(
!
(
*
b
)
->
null_value
)
{
{
owner
->
null_value
=
0
;
owner
->
null_value
=
0
;
...
@@ -598,8 +598,8 @@ int Arg_comparator::compare_real_fixed()
...
@@ -598,8 +598,8 @@ int Arg_comparator::compare_real_fixed()
int
Arg_comparator
::
compare_e_real_fixed
()
int
Arg_comparator
::
compare_e_real_fixed
()
{
{
double
val1
=
(
*
a
)
->
val
();
double
val1
=
(
*
a
)
->
val
_real
();
double
val2
=
(
*
b
)
->
val
();
double
val2
=
(
*
b
)
->
val
_real
();
if
((
*
a
)
->
null_value
||
(
*
b
)
->
null_value
)
if
((
*
a
)
->
null_value
||
(
*
b
)
->
null_value
)
return
test
((
*
a
)
->
null_value
&&
(
*
b
)
->
null_value
);
return
test
((
*
a
)
->
null_value
&&
(
*
b
)
->
null_value
);
return
test
(
val1
==
val2
||
fabs
(
val1
-
val2
)
<
precision
);
return
test
(
val1
==
val2
||
fabs
(
val1
-
val2
)
<
precision
);
...
...
sql/item_sum.cc
View file @
0bd1c03e
...
@@ -398,7 +398,8 @@ Field *Item_sum::create_tmp_field(bool group, TABLE *table,
...
@@ -398,7 +398,8 @@ Field *Item_sum::create_tmp_field(bool group, TABLE *table,
{
{
switch
(
result_type
())
{
switch
(
result_type
())
{
case
REAL_RESULT
:
case
REAL_RESULT
:
return
new
Field_double
(
max_length
,
maybe_null
,
name
,
table
,
decimals
);
return
new
Field_double
(
max_length
,
maybe_null
,
name
,
table
,
decimals
,
TRUE
);
case
INT_RESULT
:
case
INT_RESULT
:
return
new
Field_longlong
(
max_length
,
maybe_null
,
name
,
table
,
unsigned_flag
);
return
new
Field_longlong
(
max_length
,
maybe_null
,
name
,
table
,
unsigned_flag
);
case
STRING_RESULT
:
case
STRING_RESULT
:
...
@@ -1123,7 +1124,7 @@ Field *Item_sum_avg::create_tmp_field(bool group, TABLE *table,
...
@@ -1123,7 +1124,7 @@ Field *Item_sum_avg::create_tmp_field(bool group, TABLE *table,
if
(
hybrid_type
==
DECIMAL_RESULT
)
if
(
hybrid_type
==
DECIMAL_RESULT
)
return
new
Field_new_decimal
(
max_length
,
maybe_null
,
name
,
table
,
return
new
Field_new_decimal
(
max_length
,
maybe_null
,
name
,
table
,
decimals
,
unsigned_flag
);
decimals
,
unsigned_flag
);
return
new
Field_double
(
max_length
,
maybe_null
,
name
,
table
,
decimals
);
return
new
Field_double
(
max_length
,
maybe_null
,
name
,
table
,
decimals
,
TRUE
);
}
}
...
@@ -1317,7 +1318,7 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table,
...
@@ -1317,7 +1318,7 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table,
*/
*/
return
new
Field_string
(
sizeof
(
double
)
*
2
+
sizeof
(
longlong
),
0
,
name
,
table
,
&
my_charset_bin
);
return
new
Field_string
(
sizeof
(
double
)
*
2
+
sizeof
(
longlong
),
0
,
name
,
table
,
&
my_charset_bin
);
}
}
return
new
Field_double
(
max_length
,
maybe_null
,
name
,
table
,
decimals
);
return
new
Field_double
(
max_length
,
maybe_null
,
name
,
table
,
decimals
,
TRUE
);
}
}
...
...
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