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
cf0fc729
Commit
cf0fc729
authored
May 10, 2006
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b18501
parents
f1fb5b9f
8cdd68a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+4
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+7
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+2
-2
No files found.
mysql-test/r/func_time.result
View file @
cf0fc729
...
...
@@ -626,3 +626,7 @@ last_day('2005-01-00')
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2005-01-00'
select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m'))
NULL NULL January NULL
mysql-test/t/func_time.test
View file @
cf0fc729
...
...
@@ -315,4 +315,11 @@ select last_day('2005-00-00');
select
last_day
(
'2005-00-01'
);
select
last_day
(
'2005-01-00'
);
#
# Bug #18501: monthname and NULLs
#
select
monthname
(
str_to_date
(
null
,
'%m'
)),
monthname
(
str_to_date
(
null
,
'%m'
)),
monthname
(
str_to_date
(
1
,
'%m'
)),
monthname
(
str_to_date
(
0
,
'%m'
));
# End of 4.1 tests
sql/item_timefunc.cc
View file @
cf0fc729
...
...
@@ -906,9 +906,9 @@ String* Item_func_monthname::val_str(String* str)
{
DBUG_ASSERT
(
fixed
==
1
);
const
char
*
month_name
;
uint
month
=
(
uint
)
Item_func_month
::
val_int
();
uint
month
=
(
uint
)
val_int
();
if
(
!
month
)
// This is also true for NULL
if
(
null_value
||
!
month
)
{
null_value
=
1
;
return
(
String
*
)
0
;
...
...
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