summaryrefslogtreecommitdiff
path: root/plugin/query_response_time/mysql-test/query_response_time/query_response_time-stored.test
blob: e281bd352f1b669b480961112f0fccc2ca6f9e1d (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--source include/have_debug.inc

# The file with expected results fits only to a run without
# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL
            + $VIEW_PROTOCOL > 0`)
{
   --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}


CREATE TABLE t(a INT);

delimiter ^;
CREATE PROCEDURE test_f(t INT)
BEGIN
  SET SESSION query_response_time_exec_time_debug=t;
  INSERT INTO t VALUES(1);
  SET SESSION query_response_time_exec_time_debug=100000;
  DELETE FROM t;
END^
delimiter ;^

--let base=1
--source query_response_time-stored.inc
--let base=2
--source query_response_time-stored.inc
--let base=10
--source query_response_time-stored.inc
--let base=7
--source query_response_time-stored.inc
--let base=156
--source query_response_time-stored.inc
--let base=1000
--source query_response_time-stored.inc
--let base=1001
--source query_response_time-stored.inc

SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;

DROP PROCEDURE test_f;

DROP TABLE t;