Debian Codegraph @

mysql-test/suite/innodb/include/evict_everything_from_buffer_pool.inc

raw
1 #
2 # Create and drop a table, larger than the buffer pool so that
3 # everything else is evicted from it.
4 #
5 # Beware: Running this with big buffer pool is slow.
6 #
7
8 -- disable_query_log
9
10 -- echo # Emptying InnoDB buffer pool: begin
11
12 CREATE TABLE _big (a TEXT) ENGINE=INNODB;
13 -- let $bp_size = `SELECT @@innodb_buffer_pool_size`
14 -- echo # Buffer pool size: $bp_size bytes
15 -- let $table_size = `SELECT ROUND($bp_size * 2.0)`
16 -- echo # Creating and dropping a table with size: $table_size bytes
17 -- let $row_size = 1024
18 -- let $i = `SELECT ROUND($table_size / $row_size)`
19 BEGIN;
20 while ($i)
21 {
22 -- eval INSERT INTO _big VALUES (REPEAT('a', $row_size));
23 dec $i;
24 }
25 COMMIT;
26 -- disable_result_log
27 SELECT * FROM _big WHERE a = 'find nothing';
28 -- enable_result_log
29 DROP TABLE _big;
30
31 -- echo # Emptying InnoDB buffer pool: end
32
33 -- enable_query_log