summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-12-14 08:57:39 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-12-14 08:57:39 +0200
commitfa389b9098722522fa17c216375ea7ea8c5757c5 (patch)
treec23c102f0e3ca93027fbcdc8ee8b120f32b71dca /mysql-test/suite/vcol
parent7ab42fdd23308cd92eab14c5c1e587d5ef87c339 (diff)
parent2f959a691071b9a192c47e083618e33e8b03dd39 (diff)
downloadmariadb-git-fa389b9098722522fa17c216375ea7ea8c5757c5.tar.gz
Merge 10.9 into 10.10
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r--mysql-test/suite/vcol/r/not_supported.result13
-rw-r--r--mysql-test/suite/vcol/r/upgrade.result2
-rw-r--r--mysql-test/suite/vcol/t/not_supported.test15
3 files changed, 29 insertions, 1 deletions
diff --git a/mysql-test/suite/vcol/r/not_supported.result b/mysql-test/suite/vcol/r/not_supported.result
index d8703f755da..37ce4865dcc 100644
--- a/mysql-test/suite/vcol/r/not_supported.result
+++ b/mysql-test/suite/vcol/r/not_supported.result
@@ -42,3 +42,16 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
#
# End of 10.2 tests
#
+create table t1 (a int, b real as (rand()), c real as (b) stored);
+ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c`
+create table t1 (a int, b real as (rand()), c real as (b) unique);
+ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c`
+create table t1 (a int auto_increment primary key,
+b int as (a+1), c int as (b+1) stored);
+ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c`
+create table t1 (a int auto_increment primary key,
+b int as (a+1), c int as (b+1) unique);
+ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c`
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/suite/vcol/r/upgrade.result b/mysql-test/suite/vcol/r/upgrade.result
index fea6588a5f3..5393a3543dc 100644
--- a/mysql-test/suite/vcol/r/upgrade.result
+++ b/mysql-test/suite/vcol/r/upgrade.result
@@ -6,7 +6,7 @@ show create table vcol_autoinc;
Table Create Table
vcol_autoinc CREATE TABLE `vcol_autoinc` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
- `v3` int(11) GENERATED ALWAYS AS (`pk`) VIRTUAL,
+ `v3` int(11) GENERATED ALWAYS AS (`pk`) STORED,
PRIMARY KEY (`pk`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
select * from vcol_autoinc;
diff --git a/mysql-test/suite/vcol/t/not_supported.test b/mysql-test/suite/vcol/t/not_supported.test
index 2b5baf4ff4b..d58b207a7eb 100644
--- a/mysql-test/suite/vcol/t/not_supported.test
+++ b/mysql-test/suite/vcol/t/not_supported.test
@@ -49,3 +49,18 @@ create table t1 (a int, b serial as (a+1));
--echo #
--echo # End of 10.2 tests
--echo #
+
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int, b real as (rand()), c real as (b) stored);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int, b real as (rand()), c real as (b) unique);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int auto_increment primary key,
+ b int as (a+1), c int as (b+1) stored);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int auto_increment primary key,
+ b int as (a+1), c int as (b+1) unique);
+
+--echo #
+--echo # End of 10.3 tests
+--echo #