2
# Test of fulltext index
3
# bug reported by Tibor Simko <tibor.simko@cern.ch>
7
DROP TABLE IF EXISTS t1, t2;
11
id mediumint unsigned NOT NULL auto_increment,
12
tag char(6) NOT NULL default '',
13
value text NOT NULL default '',
17
FULLTEXT KEY kvf(value)
20
id_t2 mediumint unsigned NOT NULL default '0',
21
id_t1 mediumint unsigned NOT NULL default '0',
22
field_number tinyint unsigned NOT NULL default '0',
23
PRIMARY KEY (id_t2,id_t1,field_number),
27
INSERT INTO t1 (tag,value) VALUES ('foo123','bar111');
28
INSERT INTO t1 (tag,value) VALUES ('foo123','bar222');
29
INSERT INTO t1 (tag,value) VALUES ('bar345','baz333 ar');
31
INSERT INTO t2 VALUES (2231626,64280,0);
32
INSERT INTO t2 VALUES (2231626,64281,0);
33
INSERT INTO t2 VALUES (12346, 3, 1);
35
SELECT * FROM t1; SELECT * FROM t2;
37
SELECT DISTINCT t2.id_t2 FROM t2, t1
38
WHERE MATCH (t1.value) AGAINST ('baz333') AND t1.id = t2.id_t1;
40
SELECT DISTINCT t2.id_t2 FROM t2, t1
41
WHERE MATCH (t1.value) AGAINST ('baz333' IN BOOLEAN MODE)