mariadb/mysql-test/suite/innodb/r/innodb-virtual-columns2.result
2017-05-09 19:44:10 +02:00

64 lines
1.6 KiB
Text

CREATE TABLE t1 (
y YEAR NULL,
i SMALLINT NULL,
c VARCHAR(8) NOT NULL DEFAULT '',
vi SMALLINT AS (i) VIRTUAL,
INDEX(y)
) ENGINE=InnoDB;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`y` year(4) DEFAULT NULL,
`i` smallint(6) DEFAULT NULL,
`c` varchar(8) NOT NULL DEFAULT '',
`vi` smallint(6) GENERATED ALWAYS AS (`i`) VIRTUAL,
KEY `y` (`y`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
y i c vi
INSERT INTO t1 (i) VALUES (1),(2);
SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
y i c vi
DROP TABLE t1;
CREATE TABLE t1 (
y YEAR NULL,
i SMALLINT NULL,
vi SMALLINT AS (i) VIRTUAL,
INDEX(y)
) ENGINE=InnoDB;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`y` year(4) DEFAULT NULL,
`i` smallint(6) DEFAULT NULL,
`vi` smallint(6) GENERATED ALWAYS AS (`i`) VIRTUAL,
KEY `y` (`y`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
y i vi
INSERT INTO t1 (i) VALUES (1),(2);
SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
y i vi
DROP TABLE t1;
CREATE TABLE t1 (
y YEAR NULL,
i SMALLINT NULL,
b BLOB NULL,
vi SMALLINT AS (i) VIRTUAL,
INDEX(y)
) ENGINE=InnoDB;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`y` year(4) DEFAULT NULL,
`i` smallint(6) DEFAULT NULL,
`b` blob DEFAULT NULL,
`vi` smallint(6) GENERATED ALWAYS AS (`i`) VIRTUAL,
KEY `y` (`y`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
y i b vi
INSERT INTO t1 (i) VALUES (1),(2);
SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
y i b vi
DROP TABLE t1;