52
52
-- Leave the objects setup in the same state
53
53
SELECT * from performance_schema .setup_objects
54
54
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
55
+
56
+ -- Leave the prepared statement instances in the same state
57
+ SELECT * from performance_schema .prepared_statements_instances ;
58
+
59
+ -- Leave the user defined functions in the same state
60
+ SELECT * from performance_schema .user_defined_functions ;
55
61
END;
56
62
END IF;
57
63
END||
@@ -70,32 +76,37 @@ BEGIN
70
76
SELECT * FROM performance_schema .global_variables
71
77
WHERE variable_name NOT IN (' timestamp' , ' server_uuid' ,
72
78
' gtid_executed' , ' gtid_purged' ,
73
- ' group_replication_group_name' )
79
+ ' group_replication_group_name' ,
80
+ ' keyring_file_data' )
81
+ ORDER BY VARIABLE_NAME;
82
+
83
+ -- Dump all persisted variables, those that may change.
84
+ SELECT * FROM performance_schema .persisted_variables
74
85
ORDER BY VARIABLE_NAME;
75
86
76
87
-- Dump all databases, there should be none
77
88
-- except those that was created during bootstrap
78
89
SELECT * FROM INFORMATION_SCHEMA .SCHEMATA ORDER BY SCHEMA_NAME;
79
90
80
91
-- Dump all tablespaces, there should be none
81
- SELECT * FROM INFORMATION_SCHEMA .FILES WHERE
82
- FILE_TYPE != ' TEMPORARY' AND TABLE_SCHEMA = ' test ' ORDER BY FILE_ID;
92
+ SELECT FILE_NAME, FILE_TYPE, TABLESPACE_NAME, ENGINE FROM INFORMATION_SCHEMA .FILES
93
+ WHERE FILE_TYPE != ' TEMPORARY' ORDER BY FILE_ID;
83
94
84
95
-- The test database should not contain any tables
85
96
SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA .TABLES
86
97
WHERE table_schema= ' test'
87
- ORDER BY TABLE_NAME;
98
+ ORDER BY TABLE_NAME;
88
99
89
100
-- Show "mysql" database, tables and columns
90
101
SELECT CONCAT(table_schema, ' .' , table_name) AS tables_in_mysql
91
102
FROM INFORMATION_SCHEMA .TABLES
92
103
WHERE table_schema= ' mysql' AND table_name != ' ndb_apply_status'
93
104
ORDER BY tables_in_mysql;
94
105
SELECT CONCAT(table_schema, ' .' , table_name) AS columns_in_mysql,
95
- column_name, ordinal_position, column_default, is_nullable,
96
- data_type, character_maximum_length, character_octet_length,
97
- numeric_precision, numeric_scale, character_set_name,
98
- collation_name, column_type, column_key, extra, column_comment
106
+ column_name, ordinal_position, column_default, is_nullable,
107
+ data_type, character_maximum_length, character_octet_length,
108
+ numeric_precision, numeric_scale, character_set_name,
109
+ collation_name, column_type, column_key, extra, column_comment
99
110
FROM INFORMATION_SCHEMA .COLUMNS
100
111
WHERE table_schema= ' mysql' AND table_name != ' ndb_apply_status'
101
112
ORDER BY columns_in_mysql, column_name;
@@ -110,7 +121,7 @@ BEGIN
110
121
ACTION_REFERENCE_OLD_ROW, ACTION_REFERENCE_NEW_ROW, SQL_MODE, DEFINER CHARACTER_SET_CLIENT,
111
122
COLLATION_CONNECTION, DATABASE_COLLATION
112
123
FROM INFORMATION_SCHEMA .TRIGGERS
113
- WHERE TRIGGER_NAME NOT IN (' gs_insert' , ' ts_insert' );
124
+ WHERE TRIGGER_NAME NOT IN (' gs_insert' , ' ts_insert' );
114
125
-- Dump all created procedures, only those in the sys schema should exist
115
126
-- do not select the CREATED or LAST_ALTERED columns however, as tests like mysqldump.test / mysql_ugprade.test update this
116
127
SELECT SPECIFIC_NAME,ROUTINE_CATALOG,ROUTINE_SCHEMA,ROUTINE_NAME,ROUTINE_TYPE,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,
@@ -122,30 +133,56 @@ BEGIN
122
133
-- Dump all views, only those in the sys schema should exist
123
134
SELECT * FROM INFORMATION_SCHEMA .VIEWS
124
135
ORDER BY TABLE_SCHEMA, TABLE_NAME;
136
+ -- Dump all plugins, loaded with plugin-loading options or through
137
+ -- INSTALL/UNINSTALL command
138
+ SELECT * FROM INFORMATION_SCHEMA .PLUGINS ;
125
139
126
140
SHOW GLOBAL STATUS LIKE ' slave_open_temp_tables' ;
127
141
142
+ -- Check for number of active connections before & after the test run.
143
+ -- It is observed that several rpl tests fails due to mismatch in Threads
144
+ -- count when we use SHOW GLOBAL STATUS LIKE 'Threads_Connected':
145
+ -- Variable_name Value
146
+ -- -Threads_connected 1
147
+ -- +Threads_connected 2
148
+ -- This is due to the default value of MASTER_HEARTBEAT_PERIOD which is equal
149
+ -- to slave_net_timeout/2 = 60secs.
150
+ -- Due to this, even after the slave is stopped, the master will not close
151
+ -- the client session until MASTER_HEARTBEAT_PERIOD is reached.
152
+ -- Hence, excluding the 'Binlog Dump' thread.
153
+ SELECT USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA .PROCESSLIST
154
+ WHERE COMMAND NOT IN (' Binlog Dump' ,' Binlog Dump GTID' ,' Sleep' )
155
+ ORDER BY COMMAND;
156
+
128
157
-- Checksum system tables to make sure they have been properly
129
- -- restored after test
130
- -- skip mysql.proc however, as created timestamps may have been updated by mysqldump.test / mysql_ugprade.test
131
- -- the above SELECT on I_S.ROUTINES ensures consistency across runs instead
158
+ -- restored after test.
159
+ -- skip mysql.proc however, as created timestamps may have been updated by
160
+ -- mysqldump.test / mysql_ugprade.test the above SELECT on I_S.ROUTINES
161
+ -- ensures consistency across runs instead
162
+ -- We are skipping mysql.plugin from the checksum table list, as it does not
163
+ -- register plugin-loading options like (--plugin-load,--plugin-load-add ..)
164
+ -- instead we will use I_S.PLUGINS to ensure consistency across runs.
132
165
checksum table
133
166
mysql .columns_priv ,
167
+ mysql .component ,
168
+ mysql .default_roles ,
134
169
mysql .db ,
135
170
mysql .func ,
171
+ mysql .global_grants ,
136
172
mysql .help_category ,
137
173
mysql .help_keyword ,
138
174
mysql .help_relation ,
139
- mysql .host ,
175
+ mysql .help_topic ,
140
176
mysql .procs_priv ,
177
+ mysql .proxies_priv ,
178
+ mysql .role_edges ,
141
179
mysql .tables_priv ,
142
180
mysql .time_zone ,
143
181
mysql .time_zone_leap_second ,
144
182
mysql .time_zone_name ,
145
183
mysql .time_zone_transition ,
146
184
mysql .time_zone_transition_type ,
147
- mysql .user ,
148
- mysql .global_grants ;
185
+ mysql .user ;
149
186
150
187
END||
151
188
0 commit comments