Debian Codegraph @

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

raw
1 # SELECT
2 --disable_result_log
3 SELECT * FROM performance_schema.error_log
4 LIMIT 1;
5
6 SELECT * FROM performance_schema.error_log
7 WHERE error_code="MY-010116"
8 OR data LIKE "% starting as process %"
9 LIMIT 1;
10 --enable_result_log
11
12 # INSERT
13 --error ER_TABLEACCESS_DENIED_ERROR
14 INSERT INTO performance_schema.error_log
15 SET logged=0,thread_id=0,prio="System",error_code="MY-123456",
16 subsystem="Server",data="This is a test. One that should fail.";
17
18 # UPDATE
19 # With pfs_updatable_acl, individual columns can still be un-updatable
20 # (HA_ERR_WRONG_COMMAND), in which case we throw ER_WRONG_PERFSCHEMA_USAGE.
21 # With pfs_readonly_acl, we throw ER_TABLEACCESS_DENIED_ERROR instead.
22 --error ER_TABLEACCESS_DENIED_ERROR
23 UPDATE performance_schema.error_log
24 SET subsystem='Server';
25
26 --error ER_TABLEACCESS_DENIED_ERROR
27 UPDATE performance_schema.error_log
28 SET subsystem='Server' WHERE prio!='System';
29
30 # DELETE
31 --error ER_TABLEACCESS_DENIED_ERROR
32 DELETE FROM performance_schema.error_log
33 WHERE subsystem='Server';
34
35 --error ER_TABLEACCESS_DENIED_ERROR
36 DELETE FROM performance_schema.error_log;
37
38 # LOCK
39 # This should fail on account of pfs_readonly_acl.
40 --error ER_TABLEACCESS_DENIED_ERROR
41 LOCK TABLES performance_schema.error_log READ;
42 UNLOCK TABLES;
43
44 --error ER_TABLEACCESS_DENIED_ERROR
45 LOCK TABLES performance_schema.error_log WRITE;
46 UNLOCK TABLES;