Debian Codegraph @

mysql-test/suite/innodb_fts/t/result_cache_limit.test

raw
1 # This is a basic test for innodb fts result cache limit.
2
3
4 # Must have debug code to use SET SESSION debug
5 --source include/have_debug.inc
6
7 # Create FTS table
8 CREATE TABLE t1 (
9 id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
10 a VARCHAR(200),
11 b TEXT
12 ) ENGINE= InnoDB;
13
14 # Create the FTS index again
15 CREATE FULLTEXT INDEX idx on t1 (a,b);
16
17 # Insert rows
18 INSERT INTO t1 (a,b) VALUES
19 ('MySQL from Tutorial','DBMS stands for DataBase ...') ,
20 ('when To Use MySQL Well','After that you went through a ...'),
21 ('where will Optimizing MySQL','what In this tutorial we will show ...'),
22 ('MySQL from Tutorial','DBMS stands for DataBase ...') ,
23 ('when To Use MySQL Well','After that you went through a ...'),
24 ('where will Optimizing MySQL','what In this tutorial we will show ...'),
25 ('MySQL from Tutorial','DBMS stands for DataBase ...') ,
26 ('when To Use MySQL Well','After that you went through a ...'),
27 ('where will Optimizing MySQL','what In this tutorial we will show ...');
28
29 SET SESSION debug="+d,fts_instrument_result_cache_limit";
30
31 # Simple term search
32 SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('mysql' IN BOOLEAN MODE);
33
34 # Query expansion
35 # HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT = 188
36 --error 188
37 SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('mysql' WITH QUERY EXPANSION);
38
39 # Simple phrase search
40 --error 188
41 SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN MODE);
42
43 # Simple proximity search
44 --error 188
45 SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database" @ 5' IN BOOLEAN MODE);
46
47 SET SESSION debug="-d,fts_instrument_result_cache_limit";
48
49 DROP TABLE t1;
50
51 SET GLOBAL innodb_ft_result_cache_limit=default;