diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/gcol/inc/gcol_ins_upd.inc | 30 | ||||
-rw-r--r-- | mysql-test/suite/gcol/inc/gcol_view.inc | 17 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result | 27 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result | 27 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_view_innodb.result | 12 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_view_myisam.result | 12 |
6 files changed, 125 insertions, 0 deletions
diff --git a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc index 6bd7974f2af..4cfcf371fd7 100644 --- a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc +++ b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc @@ -629,4 +629,34 @@ DROP TABLE t1; --let $datadir= `SELECT @@datadir` --remove_file $datadir/test/load.data + +--echo # +--echo # MDEV-18166 ASSERT_COLUMN_MARKED_FOR_READ failed on tables with vcols +--echo # + +CREATE TABLE t1 ( + id INT NOT NULL AUTO_INCREMENT, + f ENUM('a','b','c'), + v ENUM('a','b','c') AS (f), + KEY(v,id) +) ENGINE=MyISAM; +INSERT INTO t1 (f) VALUES ('a'),('b'); +INSERT IGNORE INTO t1 SELECT * FROM t1; + +# Cleanup +DROP TABLE t1; + + +CREATE TABLE t1 ( + id INT NOT NULL AUTO_INCREMENT, + f ENUM('a','b','c'), + v ENUM('a','b','c') AS (f), + KEY(v,id) +) ENGINE=MyISAM; +INSERT INTO t1 (f) VALUES ('a'),('b'); +INSERT IGNORE INTO t1 SELECT * FROM t1; + +# Cleanup +DROP TABLE t1; + } diff --git a/mysql-test/suite/gcol/inc/gcol_view.inc b/mysql-test/suite/gcol/inc/gcol_view.inc index 5e5afcb5ab1..4aabd2429cd 100644 --- a/mysql-test/suite/gcol/inc/gcol_view.inc +++ b/mysql-test/suite/gcol/inc/gcol_view.inc @@ -250,3 +250,20 @@ DELETE FROM v1 ORDER BY b LIMIT 2; # Cleanup DROP VIEW v1; DROP TABLE t1; +CREATE TABLE t1 (d INT, v TINYINT AS (d)); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 (d) VALUES ('2004'),('1985') ; +DELETE FROM v1 ORDER BY v LIMIT 4; + +DROP VIEW v1; +DROP TABLE t1; + + +CREATE TABLE t1 (d VARCHAR(64), v VARCHAR(63) AS (d)); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 (d) VALUES ('2004-04-19 15:37:39.123'),('1985-12-24 10:15:08.456') ; +DELETE FROM v1 ORDER BY v LIMIT 4; + +DROP TABLE t1; +DROP VIEW v1; + diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result index 99e47c2d168..1d85fc837dc 100644 --- a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result @@ -764,6 +764,33 @@ SELECT pk, b FROM t1 INTO OUTFILE 'load.data'; LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1 (pk, b); ERROR 22001: Data too long for column 'v' at row 1 DROP TABLE t1; +# +# MDEV-18166 ASSERT_COLUMN_MARKED_FOR_READ failed on tables with vcols +# +CREATE TABLE t1 ( +id INT NOT NULL AUTO_INCREMENT, +f ENUM('a','b','c'), +v ENUM('a','b','c') AS (f), +KEY(v,id) +) ENGINE=MyISAM; +INSERT INTO t1 (f) VALUES ('a'),('b'); +INSERT IGNORE INTO t1 SELECT * FROM t1; +Warnings: +Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored +Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored +DROP TABLE t1; +CREATE TABLE t1 ( +id INT NOT NULL AUTO_INCREMENT, +f ENUM('a','b','c'), +v ENUM('a','b','c') AS (f), +KEY(v,id) +) ENGINE=MyISAM; +INSERT INTO t1 (f) VALUES ('a'),('b'); +INSERT IGNORE INTO t1 SELECT * FROM t1; +Warnings: +Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored +Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored +DROP TABLE t1; DROP VIEW IF EXISTS v1,v2; DROP TABLE IF EXISTS t1,t2,t3; DROP PROCEDURE IF EXISTS p1; diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result index ce57fc08ac2..e10b83cabf5 100644 --- a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result @@ -686,6 +686,33 @@ SELECT pk, b FROM t1 INTO OUTFILE 'load.data'; LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1 (pk, b); ERROR 22001: Data too long for column 'v' at row 1 DROP TABLE t1; +# +# MDEV-18166 ASSERT_COLUMN_MARKED_FOR_READ failed on tables with vcols +# +CREATE TABLE t1 ( +id INT NOT NULL AUTO_INCREMENT, +f ENUM('a','b','c'), +v ENUM('a','b','c') AS (f), +KEY(v,id) +) ENGINE=MyISAM; +INSERT INTO t1 (f) VALUES ('a'),('b'); +INSERT IGNORE INTO t1 SELECT * FROM t1; +Warnings: +Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored +Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored +DROP TABLE t1; +CREATE TABLE t1 ( +id INT NOT NULL AUTO_INCREMENT, +f ENUM('a','b','c'), +v ENUM('a','b','c') AS (f), +KEY(v,id) +) ENGINE=MyISAM; +INSERT INTO t1 (f) VALUES ('a'),('b'); +INSERT IGNORE INTO t1 SELECT * FROM t1; +Warnings: +Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored +Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored +DROP TABLE t1; DROP VIEW IF EXISTS v1,v2; DROP TABLE IF EXISTS t1,t2,t3; DROP PROCEDURE IF EXISTS p1; diff --git a/mysql-test/suite/gcol/r/gcol_view_innodb.result b/mysql-test/suite/gcol/r/gcol_view_innodb.result index 2690c60f634..59e299f9d8c 100644 --- a/mysql-test/suite/gcol/r/gcol_view_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_view_innodb.result @@ -291,6 +291,18 @@ INSERT INTO t1 (a) VALUES ('foo'),('bar'); DELETE FROM v1 ORDER BY b LIMIT 2; DROP VIEW v1; DROP TABLE t1; +CREATE TABLE t1 (d INT, v TINYINT AS (d)); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 (d) VALUES ('2004'),('1985') ; +DELETE FROM v1 ORDER BY v LIMIT 4; +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 (d VARCHAR(64), v VARCHAR(63) AS (d)); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 (d) VALUES ('2004-04-19 15:37:39.123'),('1985-12-24 10:15:08.456') ; +DELETE FROM v1 ORDER BY v LIMIT 4; +DROP TABLE t1; +DROP VIEW v1; DROP VIEW IF EXISTS v1,v2; DROP TABLE IF EXISTS t1,t2,t3; DROP PROCEDURE IF EXISTS p1; diff --git a/mysql-test/suite/gcol/r/gcol_view_myisam.result b/mysql-test/suite/gcol/r/gcol_view_myisam.result index b2856e36d13..17cc2135439 100644 --- a/mysql-test/suite/gcol/r/gcol_view_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_view_myisam.result @@ -291,6 +291,18 @@ INSERT INTO t1 (a) VALUES ('foo'),('bar'); DELETE FROM v1 ORDER BY b LIMIT 2; DROP VIEW v1; DROP TABLE t1; +CREATE TABLE t1 (d INT, v TINYINT AS (d)); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 (d) VALUES ('2004'),('1985') ; +DELETE FROM v1 ORDER BY v LIMIT 4; +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 (d VARCHAR(64), v VARCHAR(63) AS (d)); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 (d) VALUES ('2004-04-19 15:37:39.123'),('1985-12-24 10:15:08.456') ; +DELETE FROM v1 ORDER BY v LIMIT 4; +DROP TABLE t1; +DROP VIEW v1; DROP VIEW IF EXISTS v1,v2; DROP TABLE IF EXISTS t1,t2,t3; DROP PROCEDURE IF EXISTS p1; |