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
c4dc2b87
Commit
c4dc2b87
authored
Sep 12, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: TIME_FORMAT() should be ok in stored generated columns
parent
3e5cdfae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
+15
-0
mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc
mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc
+6
-0
sql/item_timefunc.h
sql/item_timefunc.h
+2
-0
No files found.
mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
View file @
c4dc2b87
...
...
@@ -2924,3 +2924,18 @@ a b
2001-01-01 02:03:04 02.03.04
drop table t1;
set sql_warnings = 0;
# TIME_FORMAT() STORED
set sql_warnings = 1;
create table t1 (a datetime, b varchar(10) as (time_format(a,"%H.%i.%S")) STORED);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
`b` varchar(10) GENERATED ALWAYS AS (time_format(`a`,'%H.%i.%S')) STORED
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2001-01-01 02:03:04',default);
select * from t1;
a b
2001-01-01 02:03:04 02.03.04
drop table t1;
set sql_warnings = 0;
mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc
View file @
c4dc2b87
...
...
@@ -1209,3 +1209,9 @@ let $values1 = '2001-01-01 02:03:04',default;
let
$rows
=
1
;
--
source
suite
/
vcol
/
inc
/
vcol_supported_sql_funcs
.
inc
--
echo
# TIME_FORMAT() STORED
let
$cols
=
a
datetime
,
b
varchar
(
10
)
as
(
time_format
(
a
,
"%H.%i.%S"
))
STORED
;
let
$values1
=
'2001-01-01 02:03:04'
,
default
;
let
$rows
=
1
;
--
source
suite
/
vcol
/
inc
/
vcol_supported_sql_funcs
.
inc
sql/item_timefunc.h
View file @
c4dc2b87
...
...
@@ -832,6 +832,8 @@ class Item_func_date_format :public Item_str_func
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
bool
check_vcol_func_processor
(
void
*
arg
)
{
if
(
is_time_format
)
return
false
;
return
mark_unsupported_function
(
func_name
(),
"()"
,
arg
,
VCOL_SESSION_FUNC
);
}
Item
*
get_copy
(
THD
*
thd
,
MEM_ROOT
*
mem_root
)
...
...
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