diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-12-20 00:55:32 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-12-20 00:55:32 +0400 |
commit | a05a566cf0f14bb71740ea7f54f371b4df4f9604 (patch) | |
tree | 2a7da6428c30ae1845906c75e5924ccf95e748a8 /mysql-test/t/fulltext_left_join.test | |
parent | 15ea7238e42ea62da32c926c0a1667802f7646d9 (diff) | |
download | mariadb-git-a05a566cf0f14bb71740ea7f54f371b4df4f9604.tar.gz |
BUG#906357: Incorrect result with outer join and full text match
- The problem was that const-table-reading code would try to evaluate MATCH()
before init_ftfuncs() was called.
- Fixed by making MATCH function "expensive" so that nobody tries to evaluate it
at optimization phase.
Diffstat (limited to 'mysql-test/t/fulltext_left_join.test')
-rw-r--r-- | mysql-test/t/fulltext_left_join.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/fulltext_left_join.test b/mysql-test/t/fulltext_left_join.test index 8c13ae5cad9..3a81c1a5d1b 100644 --- a/mysql-test/t/fulltext_left_join.test +++ b/mysql-test/t/fulltext_left_join.test @@ -98,3 +98,16 @@ INSERT INTO t1 VALUES(1); INSERT INTO t2(b,c) VALUES(2,'castle'),(3,'castle'); SELECT * FROM t1 LEFT JOIN t2 ON a=b WHERE MATCH(c) AGAINST('+castle' IN BOOLEAN MODE); DROP TABLE t1, t2; + +--echo # +--echo # BUG#906357: Incorrect result with outer join and full text match +--echo # +CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1)); +INSERT INTO t1 VALUES ('test'); + +CREATE TABLE t2(f2 VARCHAR(6) NOT NULL, FULLTEXT KEY(f2), UNIQUE(f2)); +INSERT INTO t2 VALUES ('test'); +SELECT * FROM t2 LEFT OUTER JOIN t1 ON (MATCH(f1) against ("")); +SELECT * FROM t1 RIGHT OUTER JOIN t2 ON (MATCH(f1) against ("")); + +DROP table t1,t2; |