Debian Codegraph @

mysql-test/suite/perfschema/t/start_server_no_prepared_stmts_instances.test

raw
1 # Test requires: sp-protocol/ps-protocol/view-protocol/cursor-protocol disabled
2 --source include/no_protocol.inc
3
4 --source ../include/start_server_common.inc
5
6 CREATE DATABASE db;
7 USE db;
8
9 # Expect no history
10
11 show global variables like "performance_schema_max_prepared_statements_instances";
12 select count(*) from performance_schema.prepared_statements_instances;
13
14 # Valid operation, edge case
15
16 truncate table performance_schema.prepared_statements_instances;
17
18 # Prepare statements
19 --source suite/perfschema/include/prepared_stmts_setup.inc
20
21 # check the lost status
22 show global status like "%performance_schema_prepared_statements_lost%";
23
24 # Execute statements
25 --source suite/perfschema/include/prepared_stmts_execution.inc
26
27 # check the lost status
28 show global status like "%performance_schema_prepared_statements_lost%";
29
30 # deallocate prepared statements
31 --source suite/perfschema/include/prepared_stmts_deallocation.inc
32
33 # check the lost status
34 show global status like "%performance_schema_prepared_statements_lost%";
35
36 # Flush status now
37 flush status;
38
39 # status after flush. expect 0.
40 show global status like "%performance_schema_prepared_statements_lost%";
41
42 DROP DATABASE db;