2
# Bugreport due to Roy Nasser <roy@vem.ca>
6
drop table if exists t1, t2;
10
id int(10) unsigned NOT NULL auto_increment,
11
q varchar(255) default NULL,
14
INSERT INTO t1 VALUES (1,'aaaaaaaaa dsaass de');
15
INSERT INTO t1 VALUES (2,'ssde df s fsda sad er');
17
id int(10) unsigned NOT NULL auto_increment,
18
id2 int(10) unsigned default NULL,
19
item varchar(255) default NULL,
21
FULLTEXT KEY item(item)
23
INSERT INTO t2 VALUES (1,1,'sushi');
24
INSERT INTO t2 VALUES (2,1,'Bolo de Chocolate');
25
INSERT INTO t2 VALUES (3,1,'Feijoada');
26
INSERT INTO t2 VALUES (4,1,'Mousse de Chocolate');
27
INSERT INTO t2 VALUES (5,2,'um copo de Vodka');
28
INSERT INTO t2 VALUES (6,2,'um chocolate Snickers');
29
INSERT INTO t2 VALUES (7,1,'Bife');
30
INSERT INTO t2 VALUES (8,1,'Pizza de Salmao');
32
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),6)
33
as x FROM t1, t2 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
35
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
36
as x FROM t1, t2 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
38
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),6)
39
as x FROM t2, t1 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
41
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
42
as x FROM t2, t1 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;