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
7bf4f9f7
Commit
7bf4f9f7
authored
Dec 03, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
followup for MDEV-6996, update tests and results
parent
24a6b413
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
11 deletions
+21
-11
mysql-test/suite/vcol/inc/vcol_blocked_sql_funcs_main.inc
mysql-test/suite/vcol/inc/vcol_blocked_sql_funcs_main.inc
+4
-0
mysql-test/suite/vcol/inc/vcol_non_stored_columns.inc
mysql-test/suite/vcol/inc/vcol_non_stored_columns.inc
+2
-2
mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc
mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc
+1
-1
mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result
mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result
+3
-0
mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result
mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result
+3
-0
mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
...l-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
+2
-2
mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
...l-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
+2
-2
mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result
...-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result
+2
-2
mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result
...-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result
+2
-2
No files found.
mysql-test/suite/vcol/inc/vcol_blocked_sql_funcs_main.inc
View file @
7bf4f9f7
...
...
@@ -87,6 +87,10 @@ create table t1 (a datetime, b datetime as (utc_time()));
--
error
ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
create
table
t1
(
a
datetime
,
b
datetime
as
(
utc_timestamp
()));
--
echo
# WEEK() - one argument version
--
error
ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
create
table
t1
(
a
datetime
,
b
datetime
as
(
week
(
a
)));
--
echo
# MATCH()
if
(
!
$skip_full_text_checks
)
{
...
...
mysql-test/suite/vcol/inc/vcol_non_stored_columns.inc
View file @
7bf4f9f7
...
...
@@ -141,7 +141,7 @@ show create table t1;
drop
table
t1
;
--
echo
# Case 14. ALTER. Changing the expression of a virtual stored column.
create
table
t1
(
a
int
,
b
datetime
,
c
int
as
(
week
(
b
))
persistent
);
create
table
t1
(
a
int
,
b
datetime
,
c
int
as
(
week
(
b
,
0
))
persistent
);
insert
into
t1
values
(
1
,
'2008-09-04'
,
default
);
insert
into
t1
values
(
2
,
'2008-09-05'
,
default
);
select
*
from
t1
;
...
...
@@ -151,7 +151,7 @@ show create table t1;
drop
table
t1
;
--
echo
# Case 15. ALTER. Changing the expression of a virtual non-stored column.
create
table
t1
(
a
int
,
b
datetime
,
c
int
as
(
week
(
b
)));
create
table
t1
(
a
int
,
b
datetime
,
c
int
as
(
week
(
b
,
0
)));
insert
into
t1
values
(
1
,
'2008-09-04'
,
default
);
insert
into
t1
values
(
2
,
'2008-09-05'
,
default
);
select
*
from
t1
;
...
...
mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc
View file @
7bf4f9f7
...
...
@@ -1068,7 +1068,7 @@ let $rows = 1;
--
source
suite
/
vcol
/
inc
/
vcol_supported_sql_funcs
.
inc
--
echo
# WEEK()
let
$cols
=
a
datetime
,
b
int
as
(
week
(
a
));
let
$cols
=
a
datetime
,
b
int
as
(
week
(
a
,
0
));
let
$values1
=
'2008-09-01'
,
default
;
let
$rows
=
1
;
--
source
suite
/
vcol
/
inc
/
vcol_supported_sql_funcs
.
inc
...
...
mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result
View file @
7bf4f9f7
...
...
@@ -54,6 +54,9 @@ ERROR HY000: Function or expression is not allowed for column 'b'
# UTC_TIMESTAMP()
create table t1 (a datetime, b datetime as (utc_timestamp()));
ERROR HY000: Function or expression is not allowed for column 'b'
# WEEK() - one argument version
create table t1 (a datetime, b datetime as (week(a)));
ERROR HY000: Function or expression is not allowed for column 'b'
# MATCH()
# BENCHMARK()
create table t1 (a varchar(1024), b varchar(1024) as (benchmark(a,3)));
...
...
mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result
View file @
7bf4f9f7
...
...
@@ -54,6 +54,9 @@ ERROR HY000: Function or expression is not allowed for column 'b'
# UTC_TIMESTAMP()
create table t1 (a datetime, b datetime as (utc_timestamp()));
ERROR HY000: Function or expression is not allowed for column 'b'
# WEEK() - one argument version
create table t1 (a datetime, b datetime as (week(a)));
ERROR HY000: Function or expression is not allowed for column 'b'
# MATCH()
create table t1 (a varchar(32), b bool as (match a against ('sample text')));
ERROR HY000: Function or expression is not allowed for column 'b'
...
...
mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
View file @
7bf4f9f7
...
...
@@ -199,7 +199,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 14. ALTER. Changing the expression of a virtual stored column.
create table t1 (a int, b datetime, c int as (week(b)) persistent);
create table t1 (a int, b datetime, c int as (week(b
,0
)) persistent);
insert into t1 values (1,'2008-09-04',default);
insert into t1 values (2,'2008-09-05',default);
select * from t1;
...
...
@@ -220,7 +220,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 15. ALTER. Changing the expression of a virtual non-stored column.
create table t1 (a int, b datetime, c int as (week(b)));
create table t1 (a int, b datetime, c int as (week(b
,0
)));
insert into t1 values (1,'2008-09-04',default);
insert into t1 values (2,'2008-09-05',default);
select * from t1;
...
...
mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
View file @
7bf4f9f7
...
...
@@ -199,7 +199,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 14. ALTER. Changing the expression of a virtual stored column.
create table t1 (a int, b datetime, c int as (week(b)) persistent);
create table t1 (a int, b datetime, c int as (week(b
,0
)) persistent);
insert into t1 values (1,'2008-09-04',default);
insert into t1 values (2,'2008-09-05',default);
select * from t1;
...
...
@@ -220,7 +220,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 15. ALTER. Changing the expression of a virtual non-stored column.
create table t1 (a int, b datetime, c int as (week(b)));
create table t1 (a int, b datetime, c int as (week(b
,0
)));
insert into t1 values (1,'2008-09-04',default);
insert into t1 values (2,'2008-09-05',default);
select * from t1;
...
...
mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result
View file @
7bf4f9f7
...
...
@@ -2595,12 +2595,12 @@ drop table t1;
set sql_warnings = 0;
# WEEK()
set sql_warnings = 1;
create table t1 (a datetime, b int as (week(a)));
create table t1 (a datetime, b int as (week(a
,0
)));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
`b` int(11) AS (week(a)) VIRTUAL
`b` int(11) AS (week(a
,0
)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
...
...
mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result
View file @
7bf4f9f7
...
...
@@ -2595,12 +2595,12 @@ drop table t1;
set sql_warnings = 0;
# WEEK()
set sql_warnings = 1;
create table t1 (a datetime, b int as (week(a)));
create table t1 (a datetime, b int as (week(a
,0
)));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
`b` int(11) AS (week(a)) VIRTUAL
`b` int(11) AS (week(a
,0
)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
...
...
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