Debian Codegraph @

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

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 # This test verifies the correct behaviour in case of invalid
4 # usage of DMLs on the table replication_applier_status_by_worker.
5
6 --source include/not_embedded.inc
7 --source include/have_perfschema.inc
8
9 --disable_result_log
10 SELECT * FROM performance_schema.replication_applier_status_by_worker
11 LIMIT 1;
12
13 SELECT * FROM performance_schema.replication_applier_status_by_worker
14 WHERE service_state='YES' OR last_error_message='ERROR';
15 --enable_result_log
16
17 --error ER_TABLEACCESS_DENIED_ERROR
18 INSERT INTO performance_schema.replication_applier_status_by_worker
19 SET service_state='YES', last_error_message='ERROR',
20 worker_id=1, thread_id=2, last_error_number=1234;
21
22 --error ER_TABLEACCESS_DENIED_ERROR
23 UPDATE performance_schema.replication_applier_status_by_worker
24 SET worker_id=12;
25
26 --error ER_TABLEACCESS_DENIED_ERROR
27 UPDATE performance_schema.replication_applier_status_by_worker
28 SET worker_d=12 where service_state like "YES";
29
30 --error ER_TABLEACCESS_DENIED_ERROR
31 DELETE FROM performance_schema.replication_applier_status_by_worker
32 WHERE worker_id=1;
33
34 --error ER_TABLEACCESS_DENIED_ERROR
35 DELETE FROM performance_schema.replication_applier_status_by_worker;
36
37 -- error ER_TABLEACCESS_DENIED_ERROR
38 LOCK TABLES performance_schema.replication_applier_status_by_worker READ;
39 UNLOCK TABLES;
40
41 -- error ER_TABLEACCESS_DENIED_ERROR
42 LOCK TABLES performance_schema.replication_applier_status_by_worker WRITE;
43 UNLOCK TABLES;
44
45 --echo #
46 --echo # MDEV-25325 column_comment for performance_schema tables
47 --echo #
48 select column_name, column_comment
49 from information_schema.columns
50 where table_schema='performance_schema' and table_name='replication_applier_status_by_worker';