Commit 679b7704 authored by Sergey Petrunya's avatar Sergey Petrunya

Merge

parents c583aaf5 a05a566c
......@@ -97,3 +97,17 @@ 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);
a b c
DROP TABLE t1, t2;
#
# BUG#906357: Incorrect result with outer join and full text match
#
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 (""));
f2 f1
test NULL
SELECT * FROM t1 RIGHT OUTER JOIN t2 ON (MATCH(f1) against (""));
f1 f2
NULL test
DROP table t1,t2;
......@@ -46,10 +46,10 @@ a MATCH (message) AGAINST ('steve' IN BOOLEAN MODE)
7 1
SELECT a, FORMAT(MATCH (message) AGAINST ('steve'),6) as rel FROM t1 ORDER BY rel;
a rel
1 0.000000
2 0.000000
3 0.000000
1 0.000000
5 0.000000
2 0.000000
6 0.000000
7 0.895690
4 0.905873
......
......@@ -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;
......@@ -1676,6 +1676,7 @@ public:
table= 0; // required by Item_func_match::eq()
DBUG_VOID_RETURN;
}
bool is_expensive_processor(uchar *arg) { return TRUE; }
enum Functype functype() const { return FT_FUNC; }
const char *func_name() const { return "match"; }
void update_used_tables() {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment