You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG#30311908 RESTARTING SERVER POST 'RESET SLAVE', CLEANS UP SLAVE_RELAY_LOG_INFO SETTINGS
Description
-----------
While implementing WL#12966 and WL#12968, decision was made to not clear
`PRIVILEGE_CHECKS_USER` and `REQUIRES_ROW_FORMAT` options values when performing
a `RESET SLAVE`. The state of such options is not kept if after a `RESET SLAVE`
the server is restarted.
Analysis
--------
Although the option values are kept in memory after a `RESET SLAVE`, the same
values are not persisted into the configured repository in order to be reloaded
into memory after a server restart.
Fix
---
1) Make `Relay_log_info` fields nullable.
2) Make `RESET SLAVE` clear all field values except for `PRIVILEGE_CHECKS_USER`
and `REQUIRE_ROW_FORMAT`.
3) Persist the cleared record into the relay-log repositories.
4) Change boot logic so that the cleared record is used to instantiate
`PRIVILEGE_CHECKS_USER` and `REQUIRE_ROW_FORMAT` and then relay log is
initialized as before.
RB: 23376
Reviewed-by: Pedro Gomes <pedro.gomes@oracle.com>
Reviewed-by: Luís Soares <luis.soares@oracle.com>
Copy file name to clipboardExpand all lines: mysql-test/r/mysqldump.result
+7-7
Original file line number
Diff line number
Diff line change
@@ -5334,13 +5334,13 @@ CREATE TABLE IF NOT EXISTS `slave_master_info` (
5334
5334
/*!50503 SET character_set_client = utf8mb4 */;
5335
5335
CREATE TABLE IF NOT EXISTS `slave_relay_log_info` (
5336
5336
`Number_of_lines` int unsigned NOT NULL COMMENT 'Number of lines in the file or rows in the table. Used to version table definitions.',
5337
-
`Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the current relay log file.',
5338
-
`Relay_log_pos` bigint unsigned NOT NULL COMMENT 'The relay log position of the last executed event.',
5339
-
`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log file from which the events in the relay log file were read.',
5340
-
`Master_log_pos` bigint unsigned NOT NULL COMMENT 'The master log position of the last executed event.',
5341
-
`Sql_delay` int NOT NULL COMMENT 'The number of seconds that the slave must lag behind the master.',
5342
-
`Number_of_workers` int unsigned NOT NULL,
5343
-
`Id` int unsigned NOT NULL COMMENT 'Internal Id that uniquely identifies this record.',
5337
+
`Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the current relay log file.',
5338
+
`Relay_log_pos` bigint unsigned DEFAULT NULL COMMENT 'The relay log position of the last executed event.',
5339
+
`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the master binary log file from which the events in the relay log file were read.',
5340
+
`Master_log_pos` bigint unsigned DEFAULT NULL COMMENT 'The master log position of the last executed event.',
5341
+
`Sql_delay` int DEFAULT NULL COMMENT 'The number of seconds that the slave must lag behind the master.',
5342
+
`Number_of_workers` int unsigned DEFAULT NULL,
5343
+
`Id` int unsigned DEFAULT NULL COMMENT 'Internal Id that uniquely identifies this record.',
5344
5344
`Channel_name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'The channel on which the slave is connected to a source. Used in Multisource Replication',
5345
5345
`Privilege_checks_username` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'Username part of PRIVILEGE_CHECKS_USER.',
5346
5346
`Privilege_checks_hostname` char(255) CHARACTER SET ascii COLLATE ascii_general_ci DEFAULT NULL COMMENT 'Hostname part of PRIVILEGE_CHECKS_USER.',
0 commit comments