summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb_fts/t/phrase.test
blob: fb0d29f369aa8a5279a812863c94fa5f102c9966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- source include/have_innodb.inc

#
# BUG#20465273 - FULLTEXT SEARCH BEHAVIOUR WITH MYISAM VS. INNODB (WRONG RESULT WITH INNODB)
#

CREATE TABLE articles (
	id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
	title VARCHAR(200),
	body TEXT,
	FULLTEXT (title,body)
) ENGINE=InnoDB;

INSERT INTO articles (title,body) VALUES
	(NULL, 'mysql good database'),
	(NULL, ' mysql good database'),
	('', 'mysql good database'),
	('', ' mysql good database'),
	(' ', 'mysql good database'),
	('mysql', 'good database'),
	('mysql ', 'good database'),
	('mysql', ' good database'),
	('mysql good database', ''),
	('mysql good database', NULL);


SET GLOBAL innodb_ft_aux_table="test/articles";
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
SET GLOBAL innodb_ft_aux_table=default;

SELECT * FROM articles;

SELECT * FROM articles WHERE MATCH(title, body)
	AGAINST('"mysql good database"' IN BOOLEAN MODE);

SELECT * FROM articles WHERE MATCH(title, body)
	AGAINST('("mysql good database")' IN BOOLEAN MODE);

DROP TABLE articles;