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
c6294779
Commit
c6294779
authored
Mar 18, 2011
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lp:737474 Wrong result with DAY(COALESCE(NULL)) in 5.1-micro
fix the return value of Item_func_coalesce::get_date()
parent
5122e43a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+3
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+5
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-1
No files found.
mysql-test/r/func_time.result
View file @
c6294779
...
@@ -1533,3 +1533,6 @@ select least(greatest(f3, f2, f4), f5) from t1;
...
@@ -1533,3 +1533,6 @@ select least(greatest(f3, f2, f4), f5) from t1;
least(greatest(f3, f2, f4), f5)
least(greatest(f3, f2, f4), f5)
0000-00-00 00:00:00
0000-00-00 00:00:00
drop table t1;
drop table t1;
select day(coalesce(null));
day(coalesce(null))
NULL
mysql-test/t/func_time.test
View file @
c6294779
...
@@ -968,3 +968,8 @@ insert ignore t1 values ('04:38:11','0000-00-00 00:00:00',0,'0000-00-00 00:00:00
...
@@ -968,3 +968,8 @@ insert ignore t1 values ('04:38:11','0000-00-00 00:00:00',0,'0000-00-00 00:00:00
select
least
(
greatest
(
f3
,
f2
,
f4
),
f5
)
from
t1
;
select
least
(
greatest
(
f3
,
f2
,
f4
),
f5
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# lp:737474 Wrong result with DAY(COALESCE(NULL)) in 5.1-micro
#
select
day
(
coalesce
(
null
));
sql/item_cmpfunc.cc
View file @
c6294779
...
@@ -2917,7 +2917,7 @@ bool Item_func_coalesce::get_date(MYSQL_TIME *ltime,uint fuzzydate)
...
@@ -2917,7 +2917,7 @@ bool Item_func_coalesce::get_date(MYSQL_TIME *ltime,uint fuzzydate)
return
res
;
return
res
;
}
}
null_value
=
1
;
null_value
=
1
;
return
0
;
return
1
;
}
}
...
...
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