summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-09-28 12:34:57 +0400
committerAlexander Barkov <bar@mariadb.com>2019-09-28 12:34:57 +0400
commitf1dcbc2d9a36b00fad4acee447b5c5066725fa7b (patch)
tree879dbc83932bd069bfb6a9d6469a2746bfed5dec /mysql-test/suite/vcol
parent9b5cdeeb0f3fa9540df50d7feec8a703db4777ab (diff)
downloadmariadb-git-f1dcbc2d9a36b00fad4acee447b5c5066725fa7b.tar.gz
MDEV-20639 ASAN SEGV in get_prefix upon modifying base column type with existing indexed virtual column
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r--mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result17
-rw-r--r--mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test12
2 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result b/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result
index d9a74708477..7c82856717d 100644
--- a/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result
+++ b/mysql-test/suite/vcol/r/vcol_sql_mode_timestamp.result
@@ -97,5 +97,22 @@ UPDATE IGNORE t1 SET d = NOW();
DROP TABLE t1;
SET sql_mode=DEFAULT;
#
+# MDEV-20639 ASAN SEGV in get_prefix upon modifying base column type with existing indexed virtual column
+#
+CREATE TABLE t1 (
+a TIMESTAMP,
+b TIMESTAMP AS (a) VIRTUAL,
+KEY (b)
+);
+ALTER TABLE t1 MODIFY a BLOB FIRST;
+Warnings:
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `b`
+Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL
+DROP TABLE t1;
+#
# End of 10.4 tests
#
diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test b/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test
index cd7f1125840..4f38da75948 100644
--- a/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test
+++ b/mysql-test/suite/vcol/t/vcol_sql_mode_timestamp.test
@@ -106,6 +106,18 @@ UPDATE IGNORE t1 SET d = NOW();
DROP TABLE t1;
SET sql_mode=DEFAULT;
+--echo #
+--echo # MDEV-20639 ASAN SEGV in get_prefix upon modifying base column type with existing indexed virtual column
+--echo #
+
+CREATE TABLE t1 (
+ a TIMESTAMP,
+ b TIMESTAMP AS (a) VIRTUAL,
+ KEY (b)
+);
+ALTER TABLE t1 MODIFY a BLOB FIRST;
+DROP TABLE t1;
+
--echo #
--echo # End of 10.4 tests