File: dd_pfs_init.inc

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (29 lines) | stat: -rw-r--r-- 1,273 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# Initialize a table for storing the DD PFS memory events. This is typically done
# at the beginning of an MTR test. Please source dd_pfs_cleanup.inc at the end
# of the test to remove the table and schema.
#
--disable_query_log
TRUNCATE TABLE performance_schema.memory_summary_global_by_event_name;

CREATE SCHEMA dd_pfs;

# Create a table for saving PFS state based on one of the PFS table, along with a
# sequence column and a query field.
CREATE TABLE dd_pfs.mem_events (Seq int auto_increment PRIMARY KEY, Query varchar(1000)) AS
  SELECT EVENT_NAME AS Name, COUNT_ALLOC AS N_alloc, COUNT_FREE AS N_free,
         CURRENT_COUNT_USED AS N_curr, SUM_NUMBER_OF_BYTES_ALLOC AS Sz_alloc,
         SUM_NUMBER_OF_BYTES_FREE AS Sz_free, CURRENT_NUMBER_OF_BYTES_USED AS Sz_curr,
         'savepoint' AS Query
  FROM performance_schema.memory_summary_global_by_event_name
  WHERE EVENT_NAME = 'memory/sql/dd::infrastructure' OR
        EVENT_NAME = 'memory/sql/dd::objects' OR
        EVENT_NAME = 'memory/sql/dd::String_type';

# Save the current state after the table and schema have been created, since
# the execution of the previous statement affects the counters.
--source include/dd_pfs_save_state.inc

# Turn off reporting by default.
let $report=;
--enable_query_log