diff options
4 files changed, 45 insertions, 43 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result b/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result new file mode 100644 index 00000000000..efe43945c69 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result @@ -0,0 +1,18 @@ +CREATE TABLE t1 (a INT, b INT AS (a), KEY(b)) ENGINE=InnoDB; +INSERT INTO t1 () VALUES (),(); +connect con1,localhost,root,,test; +ALTER TABLE t1 ADD COLUMN x INT as (a), add key(x), ALGORITHM=COPY; +SET debug_sync= "ib_open_after_dict_open SIGNAL delete_open WAIT_FOR another_open"; +DELETE FROM t1; +connection default; +SET debug_sync= "now WAIT_FOR delete_open"; +SET debug_sync= "ib_open_after_dict_open SIGNAL another_open"; +SELECT a FROM t1; +a +NULL +NULL +connection con1; +disconnect con1; +connection default; +SET debug_sync= "RESET"; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns.result b/mysql-test/suite/innodb/r/innodb-virtual-columns.result index 4a510effd43..de97d933ad9 100644 --- a/mysql-test/suite/innodb/r/innodb-virtual-columns.result +++ b/mysql-test/suite/innodb/r/innodb-virtual-columns.result @@ -345,21 +345,3 @@ SELECT * FROM t1; a b c 1 foo 1 DROP TABLE t1; -CREATE TABLE t1 (a INT, b INT AS (a), KEY(b)) ENGINE=InnoDB; -INSERT INTO t1 () VALUES (),(); -connect con1,localhost,root,,test; -ALTER TABLE t1 ADD COLUMN x INT as (a), add key(x), ALGORITHM=COPY; -SET debug_sync= "ib_open_after_dict_open SIGNAL delete_open WAIT_FOR another_open"; -DELETE FROM t1; -connection default; -SET debug_sync= "now WAIT_FOR delete_open"; -SET debug_sync= "ib_open_after_dict_open SIGNAL another_open"; -SELECT a FROM t1; -a -NULL -NULL -connection con1; -disconnect con1; -connection default; -SET debug_sync= "RESET"; -DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test b/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test new file mode 100644 index 00000000000..6de43dd80f8 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test @@ -0,0 +1,27 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +# +# MDEV-17005 ASAN heap-use-after-free in innobase_get_computed_value +# +CREATE TABLE t1 (a INT, b INT AS (a), KEY(b)) ENGINE=InnoDB; + +INSERT INTO t1 () VALUES (),(); +--connect (con1,localhost,root,,test) +ALTER TABLE t1 ADD COLUMN x INT as (a), add key(x), ALGORITHM=COPY; +SET debug_sync= "ib_open_after_dict_open SIGNAL delete_open WAIT_FOR another_open"; +--send +DELETE FROM t1; +--connection default +SET debug_sync= "now WAIT_FOR delete_open"; +SET debug_sync= "ib_open_after_dict_open SIGNAL another_open"; +SELECT a FROM t1; +--connection con1 +--reap + +# Cleanup +--disconnect con1 +--connection default +SET debug_sync= "RESET"; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-virtual-columns.test b/mysql-test/suite/innodb/t/innodb-virtual-columns.test index 39725b90cc6..faf542645fb 100644 --- a/mysql-test/suite/innodb/t/innodb-virtual-columns.test +++ b/mysql-test/suite/innodb/t/innodb-virtual-columns.test @@ -1,5 +1,4 @@ --source include/have_innodb.inc ---source include/have_debug_sync.inc # # MDEV-7367: Updating a virtual column corrupts table which crashes server @@ -318,27 +317,3 @@ INSERT INTO t1 (a,b) VALUES (1,'foo'); ALTER TABLE t1 ADD FULLTEXT KEY(b); SELECT * FROM t1; DROP TABLE t1; - -# -# MDEV-17005 ASAN heap-use-after-free in innobase_get_computed_value -# -CREATE TABLE t1 (a INT, b INT AS (a), KEY(b)) ENGINE=InnoDB; - -INSERT INTO t1 () VALUES (),(); ---connect (con1,localhost,root,,test) -ALTER TABLE t1 ADD COLUMN x INT as (a), add key(x), ALGORITHM=COPY; -SET debug_sync= "ib_open_after_dict_open SIGNAL delete_open WAIT_FOR another_open"; ---send -DELETE FROM t1; ---connection default -SET debug_sync= "now WAIT_FOR delete_open"; -SET debug_sync= "ib_open_after_dict_open SIGNAL another_open"; -SELECT a FROM t1; ---connection con1 ---reap - -# Cleanup ---disconnect con1 ---connection default -SET debug_sync= "RESET"; -DROP TABLE t1; |