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
b9fc8e1f
Commit
b9fc8e1f
authored
Apr 21, 2006
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #17896: MIN of CASE WHEN returns non-minimum value!
- after review fixes
parent
78adb4bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+5
-1
No files found.
sql/item_cmpfunc.cc
View file @
b9fc8e1f
...
@@ -39,19 +39,23 @@ static void agg_result_type(Item_result *type, Item **items, uint nitems)
...
@@ -39,19 +39,23 @@ static void agg_result_type(Item_result *type, Item **items, uint nitems)
{
{
Item
**
item
,
**
item_end
;
Item
**
item
,
**
item_end
;
/* Note: NULL items don't affect the result type */
*
type
=
STRING_RESULT
;
*
type
=
STRING_RESULT
;
/* Skip beginning NULL items */
/* Skip beginning NULL items */
for
(
item
=
items
,
item_end
=
item
+
nitems
;
item
<
item_end
;
item
++
)
for
(
item
=
items
,
item_end
=
item
+
nitems
;
item
<
item_end
;
item
++
)
{
if
((
*
item
)
->
type
()
!=
Item
::
NULL_ITEM
)
if
((
*
item
)
->
type
()
!=
Item
::
NULL_ITEM
)
{
{
*
type
=
(
*
item
)
->
result_type
();
*
type
=
(
*
item
)
->
result_type
();
item
++
;
item
++
;
break
;
break
;
}
}
}
/* Combine result types. Note: NULL items don't affect the result */
for
(;
item
<
item_end
;
item
++
)
for
(;
item
<
item_end
;
item
++
)
{
if
((
*
item
)
->
type
()
!=
Item
::
NULL_ITEM
)
if
((
*
item
)
->
type
()
!=
Item
::
NULL_ITEM
)
*
type
=
item_store_type
(
type
[
0
],
(
*
item
)
->
result_type
());
*
type
=
item_store_type
(
type
[
0
],
(
*
item
)
->
result_type
());
}
}
}
static
void
agg_cmp_type
(
Item_result
*
type
,
Item
**
items
,
uint
nitems
)
static
void
agg_cmp_type
(
Item_result
*
type
,
Item
**
items
,
uint
nitems
)
...
...
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