diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 50f0a1dc120..ce1703fca0e 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -315,3 +315,9 @@ select count(*) from t1; count(*) 1 drop table t1; +CREATE TABLE t1 ( a TEXT, FULLTEXT (a) ); +INSERT INTO t1 VALUES ('testing ft_nlq_find_relevance'); +SELECT MATCH(a) AGAINST ('nosuchword') FROM t1; +MATCH(a) AGAINST ('nosuchword') +0 +DROP TABLE t1; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index b44854860f9..90020e9468e 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -252,3 +252,11 @@ REPAIR TABLE t1; select count(*) from t1; drop table t1; +# +# testing out of bounds memory access in ft_nlq_find_relevance() +# (bug#8522); visible in valgrind. +# +CREATE TABLE t1 ( a TEXT, FULLTEXT (a) ); +INSERT INTO t1 VALUES ('testing ft_nlq_find_relevance'); +SELECT MATCH(a) AGAINST ('nosuchword') FROM t1; +DROP TABLE t1;