mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
ft0000001.test more tests added
ft0000002.test several ft-indexes test filesort.cc DBUG_PRINT's added sql/filesort.cc: more DBUG_PRINT's added mysql-test/t/ft0000001.test: more tests added
This commit is contained in:
parent
5d6b2d0d35
commit
5902b26a86
7 changed files with 49 additions and 2 deletions
8
mysql-test/r/ft0000001.e.result
Normal file
8
mysql-test/r/ft0000001.e.result
Normal file
|
@ -0,0 +1,8 @@
|
|||
a rel
|
||||
1 0
|
||||
2 0
|
||||
3 0
|
||||
5 0
|
||||
6 0
|
||||
7 0.89568988462614
|
||||
4 0.90587321329654
|
4
mysql-test/r/ft0000002.a.result
Normal file
4
mysql-test/r/ft0000002.a.result
Normal file
|
@ -0,0 +1,4 @@
|
|||
a MATCH b AGAINST ('lala lkjh')
|
||||
1 0.67003110026735
|
||||
2 0
|
||||
3 0
|
4
mysql-test/r/ft0000002.b.result
Normal file
4
mysql-test/r/ft0000002.b.result
Normal file
|
@ -0,0 +1,4 @@
|
|||
a MATCH c AGAINST ('lala lkjh')
|
||||
1 0
|
||||
2 0.67756324121582
|
||||
3 0
|
4
mysql-test/r/ft0000002.c.result
Normal file
4
mysql-test/r/ft0000002.c.result
Normal file
|
@ -0,0 +1,4 @@
|
|||
a MATCH b,c AGAINST ('lala lkjh')
|
||||
1 0.64840710366884
|
||||
2 0.66266459031789
|
||||
3 0
|
|
@ -4,10 +4,16 @@ CREATE TABLE test (
|
|||
a INT AUTO_INCREMENT PRIMARY KEY,
|
||||
message CHAR(20),
|
||||
FULLTEXT(message)
|
||||
) comment = 'testcase by sroussey@network54.com';
|
||||
) comment = 'original testcase by sroussey@network54.com';
|
||||
INSERT INTO test (message) VALUES ("Testing"),("table"),("testbug"),
|
||||
("steve"),("is"),("cool"),("steve is cool");
|
||||
# basic MATCH
|
||||
@r/ft0000001.a.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE MATCH (message) AGAINST ('steve');
|
||||
@r/ft0000001.b.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE MATCH (message) AGAINST ('steve') ORDER BY a;
|
||||
# MATCH + ORDER BY (w/o ft-ranges)
|
||||
@r/ft0000001.b.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE MATCH (message) AGAINST ('steve') +0 ORDER BY a;
|
||||
# MATCH + ORDER BY (w/ ft-ranges) + UNIQUE
|
||||
@r/ft0000001.c.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE a in (2,7,4) and MATCH (message) AGAINST ('steve') ORDER BY a DESC;
|
||||
# MATCH + ORDER BY + UNIQUE (const_table)
|
||||
@r/ft0000001.d.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE a=7 and MATCH (message) AGAINST ('steve') ORDER BY 1;
|
||||
# ORDER BY MATCH
|
||||
@r/ft0000001.e.result SELECT a, MATCH (message) AGAINST ('steve') as rel FROM test ORDER BY rel;
|
||||
|
|
20
mysql-test/t/ft0000002.test
Normal file
20
mysql-test/t/ft0000002.test
Normal file
|
@ -0,0 +1,20 @@
|
|||
# several FULLTEXT indexes in one table test
|
||||
use test;
|
||||
DROP TABLE IF EXISTS test;
|
||||
CREATE TABLE test (
|
||||
a int(11) NOT NULL auto_increment,
|
||||
b text,
|
||||
c varchar(254) default NULL,
|
||||
PRIMARY KEY (a),
|
||||
FULLTEXT KEY bb(b),
|
||||
FULLTEXT KEY cc(c),
|
||||
FULLTEXT KEY a(b,c)
|
||||
);
|
||||
|
||||
INSERT INTO test VALUES (1,'lala lolo lili','oooo aaaa pppp');
|
||||
INSERT INTO test VALUES (2,'asdf fdsa','lkjh fghj');
|
||||
INSERT INTO test VALUES (3,'qpwoei','zmxnvb');
|
||||
|
||||
@r/ft0000002.a.result SELECT a, MATCH b AGAINST ('lala lkjh') FROM test;
|
||||
@r/ft0000002.b.result SELECT a, MATCH c AGAINST ('lala lkjh') FROM test;
|
||||
@r/ft0000002.c.result SELECT a, MATCH b,c AGAINST ('lala lkjh') FROM test;
|
|
@ -301,6 +301,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
|
|||
volatile bool *killed= ¤t_thd->killed;
|
||||
handler *file;
|
||||
DBUG_ENTER("find_all_keys");
|
||||
DBUG_PRINT("info",("using: %s",(select?select->quick?"ranges":"where":"every row")));
|
||||
|
||||
idx=indexpos=0;
|
||||
error=quick_select=0;
|
||||
|
|
Loading…
Reference in a new issue