Debian Codegraph @

mysql-test/suite/innodb_fts/r/subexpr.result

raw
1 #
2 # Bug #20028323 INNODB FULLTEXT BOOLEAN SEARCH INCORRECTLY HANDLES
3 # PARENTHESES
4 #
5 CREATE TABLE t1 (
6 f1 INT NOT NULL AUTO_INCREMENT,
7 f2 TEXT NOT NULL,
8 PRIMARY KEY (f1),
9 FULLTEXT (f2)
10 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
11 INSERT INTO t1 (f2) VALUES
12 ('Pumpkin soup with cheese bread'),
13 ('Yellow chicken curry'),
14 ('Fresh green vegetables with garlic');
15 SELECT * FROM t1 WHERE MATCH(f2) AGAINST('+pumpkin' IN BOOLEAN MODE);
16 f1 f2
17 1 Pumpkin soup with cheese bread
18 SELECT * FROM t1 WHERE MATCH(f2) AGAINST('+cheese' IN BOOLEAN MODE);
19 f1 f2
20 1 Pumpkin soup with cheese bread
21 SELECT * FROM t1 WHERE MATCH(f2) AGAINST('+(pumpkin cheese)' IN BOOLEAN MODE);
22 f1 f2
23 1 Pumpkin soup with cheese bread
24 SELECT * FROM t1 WHERE MATCH(f2)
25 AGAINST('+pumpkin +(souffle)' IN BOOLEAN MODE);
26 f1 f2
27 SELECT * FROM t1 WHERE MATCH(f2)
28 AGAINST('+pumpkin +(souffle tart)' IN BOOLEAN MODE);
29 f1 f2
30 SELECT * FROM t1 WHERE MATCH(f2)
31 AGAINST('+pumpkin +(>souffle <tart)' IN BOOLEAN MODE);
32 f1 f2
33 SELECT * FROM t1 WHERE MATCH(f2)
34 AGAINST('+pumpkin +(souffle tart)' IN BOOLEAN MODE);
35 f1 f2
36 INSERT INTO t1 (f2) VALUES
37 ('This row contains only souffle'),
38 ('This row contains only tart'),
39 ('This row contains only pumpkin'),
40 ('This row contains only cheese'),
41 ('This row contains pumpkin and souffle'),
42 ('This row contains pumpkin and tart'),
43 ('This row contains pumpkin and cheese'),
44 ('This row contains both souffle and tart'),
45 ('This row contains both souffle and cheese'),
46 ('This row contains both tart and cheese'),
47 ('This row contains all three souffle, pumpkin and tart'),
48 ('This row contains all four cheese, souffle, pumpkin and tart');
49 SELECT * FROM t1 WHERE MATCH(f2) AGAINST('+pumpkin' IN BOOLEAN MODE);
50 f1 f2
51 1 Pumpkin soup with cheese bread
52 6 This row contains only pumpkin
53 8 This row contains pumpkin and souffle
54 9 This row contains pumpkin and tart
55 10 This row contains pumpkin and cheese
56 14 This row contains all three souffle, pumpkin and tart
57 15 This row contains all four cheese, souffle, pumpkin and tart
58 SELECT * FROM t1 WHERE MATCH(f2) AGAINST('+cheese' IN BOOLEAN MODE);
59 f1 f2
60 1 Pumpkin soup with cheese bread
61 7 This row contains only cheese
62 10 This row contains pumpkin and cheese
63 12 This row contains both souffle and cheese
64 13 This row contains both tart and cheese
65 15 This row contains all four cheese, souffle, pumpkin and tart
66 SELECT * FROM t1 WHERE MATCH(f2) AGAINST('+(pumpkin cheese)' IN BOOLEAN MODE);
67 f1 f2
68 1 Pumpkin soup with cheese bread
69 10 This row contains pumpkin and cheese
70 15 This row contains all four cheese, souffle, pumpkin and tart
71 7 This row contains only cheese
72 12 This row contains both souffle and cheese
73 13 This row contains both tart and cheese
74 6 This row contains only pumpkin
75 8 This row contains pumpkin and souffle
76 9 This row contains pumpkin and tart
77 14 This row contains all three souffle, pumpkin and tart
78 SELECT * FROM t1 WHERE MATCH(f2)
79 AGAINST('+pumpkin +(souffle)' IN BOOLEAN MODE);
80 f1 f2
81 8 This row contains pumpkin and souffle
82 14 This row contains all three souffle, pumpkin and tart
83 15 This row contains all four cheese, souffle, pumpkin and tart
84 SELECT * FROM t1 WHERE MATCH(f2)
85 AGAINST('+pumpkin +(souffle tart)' IN BOOLEAN MODE);
86 f1 f2
87 14 This row contains all three souffle, pumpkin and tart
88 15 This row contains all four cheese, souffle, pumpkin and tart
89 8 This row contains pumpkin and souffle
90 9 This row contains pumpkin and tart
91 SELECT * FROM t1 WHERE MATCH(f2)
92 AGAINST('+pumpkin +(>souffle <tart)' IN BOOLEAN MODE);
93 f1 f2
94 8 This row contains pumpkin and souffle
95 14 This row contains all three souffle, pumpkin and tart
96 15 This row contains all four cheese, souffle, pumpkin and tart
97 9 This row contains pumpkin and tart
98 SELECT * FROM t1 WHERE MATCH(f2)
99 AGAINST('+pumpkin +(souffle tart)' IN BOOLEAN MODE);
100 f1 f2
101 14 This row contains all three souffle, pumpkin and tart
102 15 This row contains all four cheese, souffle, pumpkin and tart
103 8 This row contains pumpkin and souffle
104 9 This row contains pumpkin and tart
105 DROP TABLE t1;