Debian Codegraph @

mysql-test/suite/innodb_fts/t/innodb_fts_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 --source include/maybe_versioning.inc
8
9 # Create FTS table
10 CREATE TABLE t1 (
11 id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
12 a VARCHAR(200),
13 b TEXT
14 ) ENGINE= InnoDB;
15
16 # Create the FTS index again
17 CREATE FULLTEXT INDEX idx on t1 (a,b);
18
19 # Insert rows
20 INSERT INTO t1 (a,b) VALUES
21 ('MySQL from Tutorial','DBMS stands for DataBase ...') ,
22 ('when To Use MySQL Well','After that you went through a ...'),
23 ('where will Optimizing MySQL','what In this tutorial we will show ...'),
24 ('MySQL from Tutorial','DBMS stands for DataBase ...') ,
25 ('when To Use MySQL Well','After that you went through a ...'),
26 ('where will Optimizing MySQL','what In this tutorial we will show ...'),
27 ('MySQL from Tutorial','DBMS stands for DataBase ...') ,
28 ('when To Use MySQL Well','After that you went through a ...'),
29 ('where will Optimizing MySQL','what In this tutorial we will show ...');
30
31 SET @saved_debug_dbug = @@SESSION.debug_dbug;
32 SET SESSION 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 SESSION debug_dbug=@saved_debug_dbug;
50
51 DROP TABLE t1;
52
53 SET GLOBAL innodb_ft_result_cache_limit=default;