Skip to content

Commit 685a0a2

Browse files
Joao Gramachodahlerlend
authored andcommitted
BUG#27599831 RENAME PERFORMANCE_SCHEMA INSTANCE_LOGS_STATUS TABLE AND
COLUMNS This fix just renamed instance_log_status resources to align with later MySQL server and replication standards: - instance_log_status P_S table is now named log_status; - MASTER field is now named LOCAL; - CHANNELS field is now named REPLICATION. No changes in behavior were introduced by this patch.
1 parent d7aae0e commit 685a0a2

32 files changed

+319
-334
lines changed

mysql-test/suite/binlog_gtid/r/binlog_gtid_instance_log_status_errors.result

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
CHANGE MASTER TO MASTER_HOST='127.0.0.1';
2+
# Adding debug point 'log_status_oom_mi' to @@GLOBAL.debug
3+
SELECT * FROM performance_schema.log_status;
4+
ERROR HY000: Unable to collect information for column 'REPLICATION': failed to allocate memory to collect information from replication channel ''.
5+
# Removing debug point 'log_status_oom_mi' from @@GLOBAL.debug
6+
# Adding debug point 'log_status_oom_binlog' to @@GLOBAL.debug
7+
SELECT * FROM performance_schema.log_status;
8+
ERROR HY000: Unable to collect information for column 'LOCAL': failed to allocate memory to collect binary log information.
9+
# Removing debug point 'log_status_oom_binlog' from @@GLOBAL.debug
10+
# Adding debug point 'log_status_oom_gtid' to @@GLOBAL.debug
11+
SELECT * FROM performance_schema.log_status;
12+
ERROR HY000: Unable to collect information for column 'LOCAL': failed to allocate memory to collect gtid_executed information.
13+
# Removing debug point 'log_status_oom_gtid' from @@GLOBAL.debug
14+
# Adding debug point 'log_status_oom_se' to @@GLOBAL.debug
15+
SELECT * FROM performance_schema.log_status;
16+
ERROR HY000: Unable to collect information for column 'STORAGE_ENGINE': failed to allocate memory to collect storage engines information.
17+
# Removing debug point 'log_status_oom_se' from @@GLOBAL.debug
18+
# Adding debug point 'log_status_oom_collecting' to @@GLOBAL.debug
19+
SELECT * FROM performance_schema.log_status;
20+
ERROR HY000: Unable to collect information for column 'REPLICATION': failed to allocate memory to collect information.
21+
# Removing debug point 'log_status_oom_collecting' from @@GLOBAL.debug
22+
# Adding debug point 'log_status_oom_replication' to @@GLOBAL.debug
23+
SELECT * FROM performance_schema.log_status;
24+
ERROR HY000: Unable to collect information for column 'REPLICATION': failed to allocate memory to collect information.
25+
# Removing debug point 'log_status_oom_replication' from @@GLOBAL.debug
26+
SELECT * FROM performance_schema.log_status ORDER BY 1;
27+
RESET SLAVE ALL;

mysql-test/suite/binlog_gtid/t/binlog_gtid_instance_log_status_errors.test renamed to mysql-test/suite/binlog_gtid/t/binlog_gtid_log_status_errors.test

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ==== Purpose ====
22
#
33
# This test will use debug instrumentation to hit all OOM
4-
# errors expected by performance_schema.instance_log_status
4+
# errors expected by performance_schema.log_status
55
# table while collecting the information to be displayed.
66
#
77
# ==== Related Bugs and Worklogs ====
@@ -18,50 +18,50 @@
1818
CHANGE MASTER TO MASTER_HOST='127.0.0.1';
1919

2020
# Adding a channel to the resources list
21-
--let $debug_point= instance_log_status_oom_mi
21+
--let $debug_point= log_status_oom_mi
2222
--source include/add_debug_point.inc
23-
--error ER_UNABLE_TO_COLLECT_INSTANCE_LOG_STATUS
24-
SELECT * FROM performance_schema.instance_log_status;
23+
--error ER_UNABLE_TO_COLLECT_LOG_STATUS
24+
SELECT * FROM performance_schema.log_status;
2525
--source include/remove_debug_point.inc
2626

2727
# Adding binary log to the resources list
28-
--let $debug_point= instance_log_status_oom_binlog
28+
--let $debug_point= log_status_oom_binlog
2929
--source include/add_debug_point.inc
30-
--error ER_UNABLE_TO_COLLECT_INSTANCE_LOG_STATUS
31-
SELECT * FROM performance_schema.instance_log_status;
30+
--error ER_UNABLE_TO_COLLECT_LOG_STATUS
31+
SELECT * FROM performance_schema.log_status;
3232
--source include/remove_debug_point.inc
3333

3434
# Adding gtid_state to the resources list
35-
--let $debug_point= instance_log_status_oom_gtid
35+
--let $debug_point= log_status_oom_gtid
3636
--source include/add_debug_point.inc
37-
--error ER_UNABLE_TO_COLLECT_INSTANCE_LOG_STATUS
38-
SELECT * FROM performance_schema.instance_log_status;
37+
--error ER_UNABLE_TO_COLLECT_LOG_STATUS
38+
SELECT * FROM performance_schema.log_status;
3939
--source include/remove_debug_point.inc
4040

4141
# Adding a storage engine (InnoDB) to the resources list
42-
--let $debug_point= instance_log_status_oom_se
42+
--let $debug_point= log_status_oom_se
4343
--source include/add_debug_point.inc
44-
--error ER_UNABLE_TO_COLLECT_INSTANCE_LOG_STATUS
45-
SELECT * FROM performance_schema.instance_log_status;
44+
--error ER_UNABLE_TO_COLLECT_LOG_STATUS
45+
SELECT * FROM performance_schema.log_status;
4646
--source include/remove_debug_point.inc
4747

4848
# Collecting information (only from a replication channel)
49-
--let $debug_point= instance_log_status_oom_collecting
49+
--let $debug_point= log_status_oom_collecting
5050
--source include/add_debug_point.inc
51-
--error ER_UNABLE_TO_COLLECT_INSTANCE_LOG_STATUS
52-
SELECT * FROM performance_schema.instance_log_status;
51+
--error ER_UNABLE_TO_COLLECT_LOG_STATUS
52+
SELECT * FROM performance_schema.log_status;
5353
--source include/remove_debug_point.inc
5454

5555
# Generating the final channels JSON
56-
--let $debug_point= instance_log_status_oom_channels
56+
--let $debug_point= log_status_oom_replication
5757
--source include/add_debug_point.inc
58-
--error ER_UNABLE_TO_COLLECT_INSTANCE_LOG_STATUS
59-
SELECT * FROM performance_schema.instance_log_status;
58+
--error ER_UNABLE_TO_COLLECT_LOG_STATUS
59+
SELECT * FROM performance_schema.log_status;
6060
--source include/remove_debug_point.inc
6161

6262
# To improve code coverage
6363
--disable_result_log
64-
SELECT * FROM performance_schema.instance_log_status ORDER BY 1;
64+
SELECT * FROM performance_schema.log_status ORDER BY 1;
6565
--enable_result_log
6666

6767
# Cleanup

mysql-test/suite/perfschema/r/all_tests.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ update t2 set test_name= replace(test_name, "user_variables_", "uvar_");
2424
delete from t2 where t2.test_name in (select t1.test_name from t1);
2525
select test_name as `MISSING DDL/DML TESTS` from t2;
2626
MISSING DDL/DML TESTS
27-
idx_instance_log_status.test
27+
idx_log_status.test
2828
idx_replication_applier_filters.test
2929
idx_replication_applier_global_filters.test
3030
idx_user_defined_functions.test
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ALTER TABLE performance_schema.instance_log_status
1+
ALTER TABLE performance_schema.log_status
22
ADD COLUMN foo integer;
33
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
4-
TRUNCATE TABLE performance_schema.instance_log_status;
5-
ERROR 42000: DROP command denied to user 'root'@'localhost' for table 'instance_log_status'
6-
ALTER TABLE performance_schema.instance_log_status
4+
TRUNCATE TABLE performance_schema.log_status;
5+
ERROR 42000: DROP command denied to user 'root'@'localhost' for table 'log_status'
6+
ALTER TABLE performance_schema.log_status
77
ADD INDEX test_index(server_uuid);
88
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
99
CREATE UNIQUE INDEX test_index ON
10-
performance_schema.instance_log_status(server_uuid);
10+
performance_schema.log_status(server_uuid);
1111
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'

mysql-test/suite/perfschema/r/dml_handler.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=55;
154154
HANDLER performance_schema.memory_summary_by_account_by_event_name OPEN;
155155
ERROR HY000: Table storage engine for 'memory_summary_by_account_by_event_name' doesn't have this option
156156
SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=54;
157-
HANDLER performance_schema.instance_log_status OPEN;
158-
ERROR HY000: Table storage engine for 'instance_log_status' doesn't have this option
157+
HANDLER performance_schema.log_status OPEN;
158+
ERROR HY000: Table storage engine for 'log_status' doesn't have this option
159159
SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=53;
160160
HANDLER performance_schema.hosts OPEN;
161161
ERROR HY000: Table storage engine for 'hosts' doesn't have this option

mysql-test/suite/perfschema/r/dml_instance_log_status.result

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SELECT * FROM performance_schema.log_status
2+
LIMIT 1;
3+
INSERT INTO performance_schema.log_status
4+
SET server_uuid='ABC123';
5+
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'log_status'
6+
UPDATE performance_schema.log_status
7+
SET server_uuid='ABC123' WHERE server_uuid=@@server_uuid;
8+
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'log_status'
9+
DELETE FROM performance_schema.log_status
10+
WHERE server_uuid=@@server_uuid;
11+
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'log_status'
12+
DELETE FROM performance_schema.log_status;
13+
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'log_status'
14+
LOCK TABLES performance_schema.log_status READ;
15+
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'log_status'
16+
UNLOCK TABLES;
17+
LOCK TABLES performance_schema.log_status WRITE;
18+
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'log_status'
19+
UNLOCK TABLES;

mysql-test/suite/perfschema/r/information_schema.result

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ performance_schema global_status def
5555
performance_schema global_variables def
5656
performance_schema host_cache def
5757
performance_schema hosts def
58-
performance_schema instance_log_status def
58+
performance_schema log_status def
5959
performance_schema memory_summary_by_account_by_event_name def
6060
performance_schema memory_summary_by_host_by_event_name def
6161
performance_schema memory_summary_by_thread_by_event_name def
@@ -161,7 +161,7 @@ global_status BASE TABLE PERFORMANCE_SCHEMA
161161
global_variables BASE TABLE PERFORMANCE_SCHEMA
162162
host_cache BASE TABLE PERFORMANCE_SCHEMA
163163
hosts BASE TABLE PERFORMANCE_SCHEMA
164-
instance_log_status BASE TABLE PERFORMANCE_SCHEMA
164+
log_status BASE TABLE PERFORMANCE_SCHEMA
165165
memory_summary_by_account_by_event_name BASE TABLE PERFORMANCE_SCHEMA
166166
memory_summary_by_host_by_event_name BASE TABLE PERFORMANCE_SCHEMA
167167
memory_summary_by_thread_by_event_name BASE TABLE PERFORMANCE_SCHEMA
@@ -267,7 +267,7 @@ global_status 10 Dynamic
267267
global_variables 10 Dynamic
268268
host_cache 10 Dynamic
269269
hosts 10 Fixed
270-
instance_log_status 10 Dynamic
270+
log_status 10 Dynamic
271271
memory_summary_by_account_by_event_name 10 Dynamic
272272
memory_summary_by_host_by_event_name 10 Dynamic
273273
memory_summary_by_thread_by_event_name 10 Dynamic
@@ -372,7 +372,7 @@ file_summary_by_event_name 0
372372
file_summary_by_instance 0
373373
host_cache 0
374374
hosts 0
375-
instance_log_status 0
375+
log_status 0
376376
memory_summary_by_account_by_event_name 0
377377
memory_summary_by_host_by_event_name 0
378378
memory_summary_by_thread_by_event_name 0
@@ -485,7 +485,7 @@ global_status 0 0
485485
global_variables 0 0
486486
host_cache 0 0
487487
hosts 0 0
488-
instance_log_status 0 0
488+
log_status 0 0
489489
memory_summary_by_account_by_event_name 0 0
490490
memory_summary_by_host_by_event_name 0 0
491491
memory_summary_by_thread_by_event_name 0 0
@@ -591,7 +591,7 @@ global_status 0 0 NULL
591591
global_variables 0 0 NULL
592592
host_cache 0 0 NULL
593593
hosts 0 0 NULL
594-
instance_log_status 0 0 NULL
594+
log_status 0 0 NULL
595595
memory_summary_by_account_by_event_name 0 0 NULL
596596
memory_summary_by_host_by_event_name 0 0 NULL
597597
memory_summary_by_thread_by_event_name 0 0 NULL
@@ -697,7 +697,7 @@ global_status NULL NULL NULL
697697
global_variables NULL NULL NULL
698698
host_cache NULL NULL NULL
699699
hosts NULL NULL NULL
700-
instance_log_status NULL NULL NULL
700+
log_status NULL NULL NULL
701701
memory_summary_by_account_by_event_name NULL NULL NULL
702702
memory_summary_by_host_by_event_name NULL NULL NULL
703703
memory_summary_by_thread_by_event_name NULL NULL NULL
@@ -803,7 +803,7 @@ global_status utf8mb4_0900_ai_ci NULL
803803
global_variables utf8mb4_0900_ai_ci NULL
804804
host_cache utf8mb4_0900_ai_ci NULL
805805
hosts utf8mb4_0900_ai_ci NULL
806-
instance_log_status utf8mb4_0900_ai_ci NULL
806+
log_status utf8mb4_0900_ai_ci NULL
807807
memory_summary_by_account_by_event_name utf8mb4_0900_ai_ci NULL
808808
memory_summary_by_host_by_event_name utf8mb4_0900_ai_ci NULL
809809
memory_summary_by_thread_by_event_name utf8mb4_0900_ai_ci NULL
@@ -909,7 +909,7 @@ global_status
909909
global_variables
910910
host_cache
911911
hosts
912-
instance_log_status
912+
log_status
913913
memory_summary_by_account_by_event_name
914914
memory_summary_by_host_by_event_name
915915
memory_summary_by_thread_by_event_name
@@ -1015,7 +1015,7 @@ global_status
10151015
global_variables
10161016
host_cache
10171017
hosts
1018-
instance_log_status
1018+
log_status
10191019
memory_summary_by_account_by_event_name
10201020
memory_summary_by_host_by_event_name
10211021
memory_summary_by_thread_by_event_name

mysql-test/suite/perfschema/r/schema.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ global_status
6060
global_variables
6161
host_cache
6262
hosts
63-
instance_log_status
63+
log_status
6464
memory_summary_by_account_by_event_name
6565
memory_summary_by_host_by_event_name
6666
memory_summary_by_thread_by_event_name

mysql-test/suite/perfschema/r/table_schema.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -821,10 +821,10 @@ def performance_schema host_cache FIRST_SEEN 26 0000-00-00 00:00:00 NO timestamp
821821
def performance_schema host_cache LAST_SEEN 27 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NULL
822822
def performance_schema host_cache FIRST_ERROR_SEEN 28 0000-00-00 00:00:00 YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NULL
823823
def performance_schema host_cache LAST_ERROR_SEEN 29 0000-00-00 00:00:00 YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references NULL
824-
def performance_schema instance_log_status SERVER_UUID 1 NULL NO char 36 144 NULL NULL NULL utf8mb4 utf8mb4_bin char(36) select,insert,update,references NULL
825-
def performance_schema instance_log_status MASTER 2 NULL NO json NULL NULL NULL NULL NULL NULL NULL json select,insert,update,references NULL
826-
def performance_schema instance_log_status CHANNELS 3 NULL NO json NULL NULL NULL NULL NULL NULL NULL json select,insert,update,references NULL
827-
def performance_schema instance_log_status STORAGE_ENGINES 4 NULL NO json NULL NULL NULL NULL NULL NULL NULL json select,insert,update,references NULL
824+
def performance_schema log_status SERVER_UUID 1 NULL NO char 36 144 NULL NULL NULL utf8mb4 utf8mb4_bin char(36) select,insert,update,references NULL
825+
def performance_schema log_status LOCAL 2 NULL NO json NULL NULL NULL NULL NULL NULL NULL json select,insert,update,references NULL
826+
def performance_schema log_status REPLICATION 3 NULL NO json NULL NULL NULL NULL NULL NULL NULL json select,insert,update,references NULL
827+
def performance_schema log_status STORAGE_ENGINES 4 NULL NO json NULL NULL NULL NULL NULL NULL NULL json select,insert,update,references NULL
828828
def performance_schema memory_summary_by_account_by_event_name USER 1 NULL YES char 32 128 NULL NULL NULL utf8mb4 utf8mb4_bin char(32) MUL select,insert,update,references NULL
829829
def performance_schema memory_summary_by_account_by_event_name HOST 2 NULL YES char 60 240 NULL NULL NULL utf8mb4 utf8mb4_bin char(60) select,insert,update,references NULL
830830
def performance_schema memory_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 512 NULL NULL NULL utf8mb4 utf8mb4_0900_ai_ci varchar(128) select,insert,update,references NULL

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ create table test.pfs_published_schema
6161

6262
insert into test.pfs_published_schema
6363
values("MySQL 8.0.11",
64-
"ffad5f90b6b462bad59454d450cc62b0ec26a7cb56582588e9a5a499363b1104");
64+
"1ea9bcf26f26adb1065907de189b1c6a2d90b1218ebe945013e0763fe10259bb");
6565

6666
create table test.pfs_check_table
6767
(id int(11) NOT NULL AUTO_INCREMENT,

mysql-test/suite/perfschema/t/ddl_instance_log_status.test renamed to mysql-test/suite/perfschema/t/ddl_log_status.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
# Tests for PERFORMANCE_SCHEMA
44
#
55
# This test verifies the correct behaviour in case of invalid
6-
# usage of DDLs on the table instance_log_status
6+
# usage of DDLs on the table log_status
77
#
88
# ==== References ====
99
#
1010
# WL#9452: Log Position Lock
1111
#
1212

1313
-- error ER_DBACCESS_DENIED_ERROR
14-
ALTER TABLE performance_schema.instance_log_status
14+
ALTER TABLE performance_schema.log_status
1515
ADD COLUMN foo integer;
1616

1717
-- error ER_TABLEACCESS_DENIED_ERROR
18-
TRUNCATE TABLE performance_schema.instance_log_status;
18+
TRUNCATE TABLE performance_schema.log_status;
1919

2020
-- error ER_DBACCESS_DENIED_ERROR
21-
ALTER TABLE performance_schema.instance_log_status
21+
ALTER TABLE performance_schema.log_status
2222
ADD INDEX test_index(server_uuid);
2323

2424
-- error ER_DBACCESS_DENIED_ERROR
2525
CREATE UNIQUE INDEX test_index ON
26-
performance_schema.instance_log_status(server_uuid);
26+
performance_schema.log_status(server_uuid);

0 commit comments

Comments
 (0)