summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc15
-rw-r--r--mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result12
-rw-r--r--mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result12
3 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
index 9435551ce6f..908864a2953 100644
--- a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
+++ b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc
@@ -247,3 +247,18 @@ create table t1 (a int);
alter table t1 add column r blob generated always
as (match(a) against ('' in boolean mode)) virtual;
drop table t1;
+
+--echo #
+--echo # MDEV-29029 Index corruption and/or assertion failure upon using RANDOM_BYTES for indexed virtual column
+--echo #
+
+create table t1 (a int);
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+alter table t1 add column b binary(32) generated always as (random_bytes(a));
+alter table t1 add column b binary(32) default (random_bytes(a));
+drop table t1;
+
+--echo #
+--echo #
+--echo # End of 10.10 tests
+--echo #
diff --git a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
index fa8f2660aef..f35d720f0af 100644
--- a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result
@@ -170,6 +170,18 @@ alter table t1 add column r blob generated always
as (match(a) against ('' in boolean mode)) virtual;
ERROR HY000: Function or expression 'match ... against()' cannot be used in the GENERATED ALWAYS AS clause of `r`
drop table t1;
+#
+# MDEV-29029 Index corruption and/or assertion failure upon using RANDOM_BYTES for indexed virtual column
+#
+create table t1 (a int);
+alter table t1 add column b binary(32) generated always as (random_bytes(a));
+ERROR HY000: Function or expression 'random_bytes()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+alter table t1 add column b binary(32) default (random_bytes(a));
+drop table t1;
+#
+#
+# End of 10.10 tests
+#
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_blocked_sql_funcs_myisam.result b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
index b777bb485de..a34b9906d52 100644
--- a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result
@@ -172,6 +172,18 @@ alter table t1 add column r blob generated always
as (match(a) against ('' in boolean mode)) virtual;
ERROR HY000: Function or expression 'match ... against()' cannot be used in the GENERATED ALWAYS AS clause of `r`
drop table t1;
+#
+# MDEV-29029 Index corruption and/or assertion failure upon using RANDOM_BYTES for indexed virtual column
+#
+create table t1 (a int);
+alter table t1 add column b binary(32) generated always as (random_bytes(a));
+ERROR HY000: Function or expression 'random_bytes()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+alter table t1 add column b binary(32) default (random_bytes(a));
+drop table t1;
+#
+#
+# End of 10.10 tests
+#
DROP VIEW IF EXISTS v1,v2;
DROP TABLE IF EXISTS t1,t2,t3;
DROP PROCEDURE IF EXISTS p1;