1
by brian
clean slate |
1 |
# several FULLTEXT indexes in one table test
|
2 |
--disable_warnings |
|
3 |
DROP TABLE IF EXISTS t1; |
|
4 |
--enable_warnings |
|
5 |
||
6 |
CREATE TABLE t1 ( |
|
7 |
a int(11) NOT NULL auto_increment, |
|
8 |
b text, |
|
9 |
c varchar(254) default NULL, |
|
10 |
PRIMARY KEY (a), |
|
11 |
FULLTEXT KEY bb(b), |
|
12 |
FULLTEXT KEY cc(c), |
|
13 |
FULLTEXT KEY a(b,c) |
|
14 |
);
|
|
15 |
||
16 |
INSERT INTO t1 VALUES (1,'lala lolo lili','oooo aaaa pppp'); |
|
17 |
INSERT INTO t1 VALUES (2,'asdf fdsa','lkjh fghj'); |
|
18 |
INSERT INTO t1 VALUES (3,'qpwoei','zmxnvb'); |
|
19 |
||
20 |
SELECT a, round(MATCH b AGAINST ('lala lkjh'),5) FROM t1; |
|
21 |
SELECT a, round(MATCH c AGAINST ('lala lkjh'),5) FROM t1; |
|
22 |
SELECT a, round(MATCH b,c AGAINST ('lala lkjh'),5) FROM t1; |
|
23 |
drop table t1; |
|
24 |
||
25 |
# End of 4.1 tests
|