-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathtest_event_tracking_consumer_authentication.inc
51 lines (44 loc) · 1.61 KB
/
test_event_tracking_consumer_authentication.inc
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
45
46
47
48
49
50
51
#
# Usage:
# --let $EVENT_TYPE=<event type>
# --let $COUNTER_NAME=<name of event tracking counter>
# --source ../include/test_event_tracking_authentication.inc
SELECT reset_event_tracking_counter("all");
--echo # Execute query to populate event tracker
--disable_warnings
FLUSH PRIVILEGES;
--enable_warnings
--echo # Should only show event markers for following events:
--echo # command events
--echo # $EVENT_TYPE
SELECT display_session_data();
--echo # Execute query to populate event tracker
CREATE USER test_wl12652 IDENTIFIED BY 'abcd';
--echo # Should only show event markers for following events:
--echo # command events
--echo # $EVENT_TYPE
SELECT display_session_data();
--echo # Execute query to populate event tracker
ALTER USER test_wl12652 IDENTIFIED BY 'efgh';
--echo # Should only show event markers for following events:
--echo # command events
--echo # $EVENT_TYPE
SELECT display_session_data();
--echo # Execute query to populate event tracker
RENAME USER test_wl12652 TO test_wl12652_2;
--echo # Should only show event markers for following events:
--echo # command events
--echo # $EVENT_TYPE
SELECT display_session_data();
--echo # Execute query to populate event tracker
DROP USER test_wl12652_2;
--echo # Should only show event markers for following events:
--echo # command events
--echo # $EVENT_TYPE
SELECT display_session_data();
--echo # Should show following counters:
--echo # test_event_tracking_consumer.counter_command
--echo # $COUNTER_NAME
SELECT VARIABLE_NAME, VARIABLE_VALUE FROM performance_schema.global_status
WHERE VARIABLE_NAME like 'test_event_tracking_consumer%' AND
VARIABLE_VALUE > 0;