mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
0c2d19b5b5
mysql-test/r/fulltext_cache.result: fixed mysql-test/r/fulltext_left_join.result: fixed mysql-test/r/fulltext_multi.result: fixed mysql-test/r/fulltext_order_by.result: fixed
34 lines
1.1 KiB
Text
34 lines
1.1 KiB
Text
use test;
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (
|
|
a INT AUTO_INCREMENT PRIMARY KEY,
|
|
message CHAR(20),
|
|
FULLTEXT(message)
|
|
) comment = 'original testcase by sroussey@network54.com';
|
|
INSERT INTO t1 (message) VALUES ("Testing"),("table"),("testbug"),
|
|
("steve"),("is"),("cool"),("steve is cool");
|
|
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE MATCH (message) AGAINST ('steve');
|
|
a MATCH (message) AGAINST ('steve')
|
|
4 0.90587323904037
|
|
7 0.89568990468979
|
|
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE MATCH (message) AGAINST ('steve') ORDER BY a;
|
|
a MATCH (message) AGAINST ('steve')
|
|
4 0.90587323904037
|
|
7 0.89568990468979
|
|
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE a in (2,7,4) and MATCH (message) AGAINST ('steve') ORDER BY a DESC;
|
|
a MATCH (message) AGAINST ('steve')
|
|
7 0.89568990468979
|
|
4 0.90587323904037
|
|
SELECT a, MATCH (message) AGAINST ('steve') FROM t1 WHERE a=7 and MATCH (message) AGAINST ('steve') ORDER BY 1;
|
|
a MATCH (message) AGAINST ('steve')
|
|
7 0.89568990468979
|
|
SELECT a, MATCH (message) AGAINST ('steve') as rel FROM t1 ORDER BY rel;
|
|
a rel
|
|
1 0
|
|
2 0
|
|
3 0
|
|
5 0
|
|
6 0
|
|
7 0.89568990468979
|
|
4 0.90587323904037
|
|
drop table t1;
|