diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/sp-i_s_columns.test | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/sp-i_s_columns.test')
-rw-r--r-- | mysql-test/main/sp-i_s_columns.test | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/main/sp-i_s_columns.test b/mysql-test/main/sp-i_s_columns.test new file mode 100644 index 00000000..0782d06d --- /dev/null +++ b/mysql-test/main/sp-i_s_columns.test @@ -0,0 +1,49 @@ +--echo # +--echo # MDEV-28267 ASAN heap-use-after-free in Item_sp::func_name_cstring +--echo # + +CREATE TABLE t1 (a INT); +CREATE FUNCTION test.f1(a INT) RETURNS TEXT RETURN ''; +CREATE FUNCTION test.f2(a INT) RETURNS TEXT RETURN ''; +CREATE VIEW v1 AS SELECT f1(a) AS v1 FROM t1; +CREATE VIEW v2 AS SELECT f1(a) AS v2 FROM t1; +CREATE VIEW v3 AS SELECT f1(a) AS v3 FROM t1; +CREATE VIEW v4 AS SELECT f1(a) AS v4 FROM t1; + +--disable_result_log + +DELIMITER $$; +--send +BEGIN NOT ATOMIC + FOR i IN 1..10 + DO + ANALYZE FORMAT=JSON SELECT * + FROM INFORMATION_SCHEMA.COLUMNS + WHERE + TABLE_SCHEMA='test' + AND + TABLE_NAME LIKE 'v%' + AND + (SLEEP(0.01)=0 OR f1(ordinal_position) >'') + ORDER BY TABLE_NAME; + END FOR; +END; +$$ +DELIMITER ;$$ + +--connect (con1,localhost,root,,test) +CREATE OR REPLACE FUNCTION f2(a INT) RETURNS TEXT RETURN ''; +--connection default +--reap + +--enable_result_log + + +# Cleanup +--disconnect con1 +--connection default + +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP TABLE t1; +DROP VIEW v1, v2, v3, v4; |