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
bb8361b6
Commit
bb8361b6
authored
Nov 25, 2010
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge from mysql-5.5.7-rc-release.
parents
98369277
7a8515cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+9
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+8
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+1
-1
No files found.
mysql-test/r/func_time.result
View file @
bb8361b6
...
...
@@ -1341,3 +1341,12 @@ SELECT * FROM t1 WHERE date_date <= addtime(date_add("2000-1-1", INTERVAL "1:1:1
date_date
DROP TABLE t1;
#
# Bug#57512 str_to_date crash...
#
SELECT WEEK(STR_TO_DATE(NULL,0));
WEEK(STR_TO_DATE(NULL,0))
NULL
SELECT SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR);
SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR)
NULL
#
mysql-test/t/func_time.test
View file @
bb8361b6
...
...
@@ -852,5 +852,13 @@ INSERT INTO t1 VALUES ('2008-01-03 00:00:00'), ('2008-01-03 00:00:00');
SELECT
*
FROM
t1
WHERE
date_date
>=
subtime
(
now
(),
"00:30:00"
);
SELECT
*
FROM
t1
WHERE
date_date
<=
addtime
(
date_add
(
"2000-1-1"
,
INTERVAL
"1:1:1"
HOUR_SECOND
),
"00:20:00"
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#57512 str_to_date crash...
--
echo
#
SELECT
WEEK
(
STR_TO_DATE
(
NULL
,
0
));
SELECT
SUBDATE
(
STR_TO_DATE
(
NULL
,
0
),
INTERVAL
1
HOUR
);
--
echo
#
sql/item_timefunc.cc
View file @
bb8361b6
...
...
@@ -3465,7 +3465,7 @@ bool Item_func_str_to_date::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
return
0
;
null_date:
if
(
fuzzy_date
&
TIME_NO_ZERO_DATE
)
if
(
val
&&
(
fuzzy_date
&
TIME_NO_ZERO_DATE
)
)
{
char
buff
[
128
];
strmake
(
buff
,
val
->
ptr
(),
min
(
val
->
length
(),
sizeof
(
buff
)
-
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