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
27e512d3
Commit
27e512d3
authored
May 31, 2010
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1-bugteam->mysql_trunk-merge merge
parents
f90429ed
89b83c05
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
15 deletions
+21
-15
mysql-test/r/type_time.result
mysql-test/r/type_time.result
+10
-0
mysql-test/t/type_time.test
mysql-test/t/type_time.test
+10
-1
sql/field.cc
sql/field.cc
+1
-14
No files found.
mysql-test/r/type_time.result
View file @
27e512d3
...
...
@@ -139,6 +139,16 @@ CAST(c AS TIME)
00:00:00
DROP TABLE t1;
End of 5.0 tests
#
# Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values
#
CREATE TABLE t1(f1 TIME);
INSERT INTO t1 VALUES ('23:38:57');
SELECT TIMESTAMP(f1,'1') FROM t1;
TIMESTAMP(f1,'1')
NULL
DROP TABLE t1;
End of 5.1 tests
CREATE TABLE t1 (f1 TIME);
INSERT INTO t1 VALUES ('24:00:00');
SELECT '24:00:00' = (SELECT f1 FROM t1);
...
...
mysql-test/t/type_time.test
View file @
27e512d3
...
...
@@ -88,9 +88,18 @@ INSERT INTO t1 VALUES ('0:00:00');
SELECT
CAST
(
c
AS
TIME
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
--
echo
#
--
echo
# Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values
--
echo
#
CREATE
TABLE
t1
(
f1
TIME
);
INSERT
INTO
t1
VALUES
(
'23:38:57'
);
SELECT
TIMESTAMP
(
f1
,
'1'
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
#
# Bug#42664 - Sign ignored for TIME types when not comparing as longlong
...
...
sql/field.cc
View file @
27e512d3
...
...
@@ -5268,7 +5268,6 @@ String *Field_time::val_str(String *val_buffer,
bool
Field_time
::
get_date
(
MYSQL_TIME
*
ltime
,
uint
fuzzydate
)
{
long
tmp
;
THD
*
thd
=
table
?
table
->
in_use
:
current_thd
;
if
(
!
(
fuzzydate
&
TIME_FUZZY_DATE
))
{
...
...
@@ -5278,19 +5277,7 @@ bool Field_time::get_date(MYSQL_TIME *ltime, uint fuzzydate)
thd
->
warning_info
->
current_row_for_warning
());
return
1
;
}
tmp
=
(
long
)
sint3korr
(
ptr
);
ltime
->
neg
=
0
;
if
(
tmp
<
0
)
{
ltime
->
neg
=
1
;
tmp
=-
tmp
;
}
ltime
->
hour
=
tmp
/
10000
;
tmp
-=
ltime
->
hour
*
10000
;
ltime
->
minute
=
tmp
/
100
;
ltime
->
second
=
tmp
%
100
;
ltime
->
year
=
ltime
->
month
=
ltime
->
day
=
ltime
->
second_part
=
0
;
return
0
;
return
Field_time
::
get_time
(
ltime
);
}
...
...
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