diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/gcol/t/innodb_wl8114.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/gcol/t/innodb_wl8114.test')
-rw-r--r-- | mysql-test/suite/gcol/t/innodb_wl8114.test | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/suite/gcol/t/innodb_wl8114.test b/mysql-test/suite/gcol/t/innodb_wl8114.test new file mode 100644 index 00000000..bed83753 --- /dev/null +++ b/mysql-test/suite/gcol/t/innodb_wl8114.test @@ -0,0 +1,42 @@ +--source include/have_innodb.inc + +# Test alter table add column +CREATE TABLE t_8114 (a int) ENGINE = INNODB; + +ALTER TABLE t_8114 ADD b INT GENERATED ALWAYS AS (a) VIRTUAL; + +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE "%t_8114"; + +SELECT NAME, POS, MTYPE, PRTYPE, LEN FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE TABLE_ID IN (SELECT TABLE_ID FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE "%t_8114"); + +INSERT INTO t_8114 VALUES (9, default); +INSERT INTO t_8114 VALUES (3, default); +INSERT INTO t_8114 VALUES (1, default); +INSERT INTO t_8114 VALUES (5, default); + +SELECT * FROM t_8114; + +DROP TABLE t_8114; + +CREATE TABLE t_8114 (Column_1 CHAR(5) GENERATED ALWAYS AS (PI()+5), Column_2 CHAR(5)) engine=innodb; + +SELECT NAME, FLAG, N_COLS FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE "%t_8114"; + +SELECT NAME, POS, MTYPE, PRTYPE, LEN FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE TABLE_ID IN (SELECT TABLE_ID FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE "%t_8114"); + +INSERT INTO t_8114 VALUES (default, "aa"); +INSERT INTO t_8114 VALUES (default, "bb"); +INSERT INTO t_8114 VALUES (default, "ee"); +INSERT INTO t_8114 VALUES (default, "pp"); + +SELECT * FROM t_8114; + +ALTER TABLE t_8114 DROP Column_1; + +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE "%t_8114"; + +SELECT NAME, POS, MTYPE, PRTYPE, LEN FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS WHERE TABLE_ID IN (SELECT TABLE_ID FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE "%t_8114"); + +SELECT * FROM t_8114; + +DROP TABLE t_8114; |