followup for MDEV-6996, update tests and results
This commit is contained in:
parent
24a6b41348
commit
7bf4f9f7f6
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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)));
|
||||
|
@ -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'
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user