diff options
author | Igor Babaev <igor@askmonty.org> | 2012-06-24 09:10:11 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-06-24 09:10:11 -0700 |
commit | 2954ed1ec977dab2e6594343455d100d56051473 (patch) | |
tree | 71bfa7a627ca5633dba3fa0bb9d8e21de7589c88 /mysql-test/suite/vcol/r | |
parent | f8f65accf99821386ad2cffdf0c3f473e8f33064 (diff) | |
parent | 20f3f4a273202ef539314acbbdbb67ab91376ab6 (diff) | |
download | mariadb-git-2954ed1ec977dab2e6594343455d100d56051473.tar.gz |
Merge 5.3->5.5.
Diffstat (limited to 'mysql-test/suite/vcol/r')
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_misc.result | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index c27b36089c6..17b38b7d7af 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -146,6 +146,42 @@ table_schema table_name column_name column_type extra test t2 a int(11) test t2 b int(11) VIRTUAL DROP TABLE t1,t2; +create table t1 ( +a int not null, b char(2) not null, +c enum('Y','N') as (case when b = 'aa' then 'Y' else 'N' end) persistent +); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` char(2) NOT NULL, + `c` enum('Y','N') AS (case when b = 'aa' then 'Y' else 'N' end) PERSISTENT +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1(a,b) values (1,'bb'), (2,'aa'), (3,'cc'); +select * from t1; +a b c +1 bb N +2 aa Y +3 cc N +create table t2 ( +a int, b int, +c set("y","n") +as (if(a=0,if(b=0,('n,n'),('n,y')),if(b=0,('y,n'),('y,y')))) persistent +); +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` set('y','n') AS (if(a=0,if(b=0,('n,n'),('n,y')),if(b=0,('y,n'),('y,y')))) PERSISTENT +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t2(a,b) values (7,0), (2,3), (0,1); +select * from t2; +a b c +7 0 y,n +2 3 y +0 1 y,n +drop table t1,t2; create table t1 (a int, b int); insert into t1 values (3, 30), (4, 20), (1, 20); create table t2 (c int, d int, v int as (d+1), index idx(c)); |