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
02cac1c5
Commit
02cac1c5
authored
Jun 20, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed time_format printing (BUG#7521)
parent
c45df760
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
mysql-test/r/view.result
mysql-test/r/view.result
+5
-0
mysql-test/t/view.test
mysql-test/t/view.test
+7
-0
sql/item_timefunc.h
sql/item_timefunc.h
+2
-1
No files found.
mysql-test/r/view.result
View file @
02cac1c5
...
...
@@ -1743,3 +1743,8 @@ select * from v1;
cast(1 as decimal)
1.00
drop view v1;
create view v1 as SELECT TIME_FORMAT(SEC_TO_TIME(3600),'%H:%i') as t;
select * from v1;
t
01:00
drop view v1;
mysql-test/t/view.test
View file @
02cac1c5
...
...
@@ -1587,3 +1587,10 @@ drop table t1;
create
view
v1
as
select
cast
(
1
as
decimal
);
select
*
from
v1
;
drop
view
v1
;
#
# using time_format in view (BUG#7521)
#
create
view
v1
as
SELECT
TIME_FORMAT
(
SEC_TO_TIME
(
3600
),
'%H:%i'
)
as
t
;
select
*
from
v1
;
drop
view
v1
;
sql/item_timefunc.h
View file @
02cac1c5
...
...
@@ -503,7 +503,8 @@ class Item_func_date_format :public Item_str_func
Item_func_date_format
(
Item
*
a
,
Item
*
b
,
bool
is_time_format_arg
)
:
Item_str_func
(
a
,
b
),
is_time_format
(
is_time_format_arg
)
{}
String
*
val_str
(
String
*
str
);
const
char
*
func_name
()
const
{
return
"date_format"
;
}
const
char
*
func_name
()
const
{
return
is_time_format
?
"time_format"
:
"date_format"
;
}
void
fix_length_and_dec
();
uint
format_length
(
const
String
*
format
);
};
...
...
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