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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3c87aeef
Commit
3c87aeef
authored
May 15, 2009
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
52973c14
12f18228
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
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
+13
-0
sql/field.cc
sql/field.cc
+1
-1
No files found.
mysql-test/r/type_time.result
View file @
3c87aeef
...
...
@@ -128,3 +128,13 @@ SELECT sum(f3) FROM t1 where f2='2007-07-01 00:00:00' group by f2;
sum(f3)
3
drop table t1;
#
# Bug #44792: valgrind warning when casting from time to time
#
CREATE TABLE t1 (c TIME);
INSERT INTO t1 VALUES ('0:00:00');
SELECT CAST(c AS TIME) FROM t1;
CAST(c AS TIME)
00:00:00
DROP TABLE t1;
End of 5.0 tests
mysql-test/t/type_time.test
View file @
3c87aeef
...
...
@@ -77,3 +77,16 @@ insert into t1 values('2007-07-02', 1);
insert
into
t1
values
(
'2007-07-02'
,
2
);
SELECT
sum
(
f3
)
FROM
t1
where
f2
=
'2007-07-01 00:00:00'
group
by
f2
;
drop
table
t1
;
--
echo
#
--
echo
# Bug #44792: valgrind warning when casting from time to time
--
echo
#
CREATE
TABLE
t1
(
c
TIME
);
INSERT
INTO
t1
VALUES
(
'0:00:00'
);
SELECT
CAST
(
c
AS
TIME
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
sql/field.cc
View file @
3c87aeef
...
...
@@ -5307,7 +5307,7 @@ bool Field_time::get_time(MYSQL_TIME *ltime)
ltime
->
neg
=
1
;
tmp
=-
tmp
;
}
ltime
->
day
=
0
;
ltime
->
year
=
ltime
->
month
=
ltime
->
day
=
0
;
ltime
->
hour
=
(
int
)
(
tmp
/
10000
);
tmp
-=
ltime
->
hour
*
10000
;
ltime
->
minute
=
(
int
)
tmp
/
100
;
...
...
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