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
218b0374
Commit
218b0374
authored
Jan 15, 2001
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/my/mysql into donna.mysql.com:/home/my/bk/mysql
sql/field.cc: Auto merged
parents
983ab4d3
c5339cf5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+2
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+7
-0
sql/field.cc
sql/field.cc
+1
-1
No files found.
mysql-test/r/func_time.result
View file @
218b0374
...
@@ -184,3 +184,5 @@ extract(MINUTE_SECOND FROM "10:11:12")
...
@@ -184,3 +184,5 @@ extract(MINUTE_SECOND FROM "10:11:12")
1112
1112
extract(SECOND FROM "1999-01-02 10:11:12")
extract(SECOND FROM "1999-01-02 10:11:12")
12
12
ctime hour(ctime)
2001-01-12 12:23:40 12
mysql-test/t/func_time.test
View file @
218b0374
...
@@ -98,3 +98,10 @@ select extract(HOUR_SECOND FROM "10:11:12");
...
@@ -98,3 +98,10 @@ select extract(HOUR_SECOND FROM "10:11:12");
select
extract
(
MINUTE
FROM
"10:11:12"
);
select
extract
(
MINUTE
FROM
"10:11:12"
);
select
extract
(
MINUTE_SECOND
FROM
"10:11:12"
);
select
extract
(
MINUTE_SECOND
FROM
"10:11:12"
);
select
extract
(
SECOND
FROM
"1999-01-02 10:11:12"
);
select
extract
(
SECOND
FROM
"1999-01-02 10:11:12"
);
drop
table
if
exists
t1
;
create
table
t1
(
ctime
varchar
(
20
));
insert
into
t1
values
(
'2001-01-12 12:23:40'
);
select
ctime
,
hour
(
ctime
)
from
t1
;
drop
table
t1
;
sql/field.cc
View file @
218b0374
...
@@ -328,7 +328,7 @@ bool Field::get_time(TIME *ltime)
...
@@ -328,7 +328,7 @@ bool Field::get_time(TIME *ltime)
char
buff
[
40
];
char
buff
[
40
];
String
tmp
(
buff
,
sizeof
(
buff
)),
tmp2
,
*
res
;
String
tmp
(
buff
,
sizeof
(
buff
)),
tmp2
,
*
res
;
if
(
!
(
res
=
val_str
(
&
tmp
,
&
tmp2
))
||
if
(
!
(
res
=
val_str
(
&
tmp
,
&
tmp2
))
||
str_to_time
(
res
->
ptr
(),
res
->
length
(),
ltime
)
==
TIMESTAMP_NONE
)
str_to_time
(
res
->
ptr
(),
res
->
length
(),
ltime
))
return
1
;
return
1
;
return
0
;
return
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