summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-06-08 15:02:40 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-06-08 15:02:40 +0300
commit72b248962136ccb08800d8267522549f0cdd4647 (patch)
tree1dbb0f39d6543b3b33cd395f9513140c6a6b0694 /mysql-test/suite/vcol
parentbb28bffc3ed179a9912aced2b873e43999111887 (diff)
parent6e9642beb2cafecbcb96e591e1b4466b877d4885 (diff)
downloadmariadb-git-72b248962136ccb08800d8267522549f0cdd4647.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r--mysql-test/suite/vcol/r/vcol_syntax.result11
-rw-r--r--mysql-test/suite/vcol/t/vcol_syntax.test17
2 files changed, 23 insertions, 5 deletions
diff --git a/mysql-test/suite/vcol/r/vcol_syntax.result b/mysql-test/suite/vcol/r/vcol_syntax.result
index c8983f34c93..0063f38ea36 100644
--- a/mysql-test/suite/vcol/r/vcol_syntax.result
+++ b/mysql-test/suite/vcol/r/vcol_syntax.result
@@ -1,4 +1,3 @@
-drop table if exists t1;
set @OLD_SQL_MODE=@@SESSION.SQL_MODE;
create table t1 (a int, b int generated always as (a+1));
show create table t1;
@@ -88,3 +87,13 @@ create table t1 (x int, y int default test2.t1.x);
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'DEFAULT'
create table t1 (x int, check (test2.t1.x > 0));
ERROR 42S22: Unknown column '`test2`.`t1`.`x`' in 'CHECK'
+#
+# MDEV-25672 table alias from previous statement interferes later commands
+#
+create table t1 (a int, v_a int generated always as (a));
+update t1 as x set a = 1;
+alter table t1 force;
+drop table t1;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/suite/vcol/t/vcol_syntax.test b/mysql-test/suite/vcol/t/vcol_syntax.test
index f425b52ab79..3c8a50a7f36 100644
--- a/mysql-test/suite/vcol/t/vcol_syntax.test
+++ b/mysql-test/suite/vcol/t/vcol_syntax.test
@@ -1,10 +1,6 @@
#
# test syntax
#
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
set @OLD_SQL_MODE=@@SESSION.SQL_MODE;
create table t1 (a int, b int generated always as (a+1));
show create table t1;
@@ -72,3 +68,16 @@ create table t1 (x int, y int check (y > test2.t1.x));
create table t1 (x int, y int default test2.t1.x);
--error ER_BAD_FIELD_ERROR
create table t1 (x int, check (test2.t1.x > 0));
+
+--echo #
+--echo # MDEV-25672 table alias from previous statement interferes later commands
+--echo #
+create table t1 (a int, v_a int generated always as (a));
+update t1 as x set a = 1;
+alter table t1 force;
+drop table t1;
+
+
+--echo #
+--echo # End of 10.2 tests
+--echo #