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